From patchwork Wed Jul 31 05:58:07 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 2836073 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 669D9C0319 for ; Wed, 31 Jul 2013 05:58:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9877A201E1 for ; Wed, 31 Jul 2013 05:58:33 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8D712201D5 for ; Wed, 31 Jul 2013 05:58:32 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V4PQY-0007KO-H5; Wed, 31 Jul 2013 05:58:26 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1V4PQW-0003c0-Br; Wed, 31 Jul 2013 05:58:24 +0000 Received: from mail-pa0-x22f.google.com ([2607:f8b0:400e:c03::22f]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V4PQS-0003bS-Uu for linux-arm-kernel@lists.infradead.org; Wed, 31 Jul 2013 05:58:22 +0000 Received: by mail-pa0-f47.google.com with SMTP id kl13so457947pab.6 for ; Tue, 30 Jul 2013 22:57:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:date:message-id:subject; bh=1BqSLY4wRPa8srhjSGW+Ozd82SGU+6lC+x/cF/PtFLI=; b=B9yADj+qk2U35nC2Kka+0H+vkGtzk2vyGxbsWwVC4ZR+NZg4vJgdb6am6Hrpb9ApbP hRWkNGMoY7Qk5S6yPX3YzNCFqDxhMrs5b+omQorgIW2BnhwceEDQ/GBX60peBGUDbS+h vlx0u9GDI0MDtbf7i0Do93npKmAZuHqVRcSyD04/QD3ZvuYMxGe8H0+LMQ71zaNDtfcF jr13TddT/qXY0YL6+ooTWBCXmono66MHBmGWLNB+RKDgG6eUgTpchW6zVNtvyzUbLg5y mS1qdVCtvc6kd8kqv9oNE6/5yaGrpcm1r/S+OIYc6XeDBTE84vKExgrX2/vKUJAXDJ9n 5gNA== X-Received: by 10.68.143.199 with SMTP id sg7mr78182795pbb.13.1375250277241; Tue, 30 Jul 2013 22:57:57 -0700 (PDT) Received: from [127.0.0.1] (ac230065.ppp.asahi-net.or.jp. [183.77.230.65]) by mx.google.com with ESMTPSA id iu7sm40374577pbc.8.2013.07.30.22.57.54 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 30 Jul 2013 22:57:56 -0700 (PDT) From: Magnus Damm To: linux-arm-kernel@lists.infradead.org Date: Wed, 31 Jul 2013 14:58:07 +0900 Message-Id: <20130731055807.14054.70106.sendpatchset@w520> Subject: [PATCH] ARM: Fix memblock_reserve() to include stext X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130731_015821_105770_BC9203B0 X-CRM114-Status: GOOD ( 11.19 ) X-Spam-Score: -2.0 (--) Cc: linux@arm.linux.org.uk, arnd@arndb.de, linux-sh@vger.kernel.org, Magnus Damm , paul.gortmaker@windriver.com, horms@verge.net.au, olof@lixom.net X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Magnus Damm This fix for the ARM architecture will include stext in the memblock_reserve() call to make sure that the following symbols are not overwritten (from System.map): c0008000 T _text c0008000 T stext ... c0008138 T secondary_startup ... c0009000 T _stext With this patch applied CPU Hotplug starts working again. Without this patch code in secondary_startup never gets reached as expected. This issue started triggering on kernels later than v3.10 - perhaps a side effect of the CPU Hotplug init section rework - so this is a fix for v3.11-rc. Tested on the sh73a0 KZM9G board with CPU Hotplug: # echo 0 > /sys/devices/system/cpu/cpu1/online CPU1: shutdown # echo 1 > /sys/devices/system/cpu/cpu1/online CPU1: Booted secondary processor Signed-off-by: Magnus Damm Tested-by: Magnus Damm --- arch/arm/mm/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- 0001/arch/arm/mm/init.c +++ work/arch/arm/mm/init.c 2013-07-31 14:17:49.000000000 +0900 @@ -346,7 +346,7 @@ void __init arm_memblock_init(struct mem #ifdef CONFIG_XIP_KERNEL memblock_reserve(__pa(_sdata), _end - _sdata); #else - memblock_reserve(__pa(_stext), _end - _stext); + memblock_reserve(__pa(_text), _end - _text); #endif #ifdef CONFIG_BLK_DEV_INITRD if (phys_initrd_size &&