From patchwork Wed Jul 31 17:06:58 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Gortmaker X-Patchwork-Id: 2836483 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 AFC1DC0319 for ; Wed, 31 Jul 2013 17:07:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6AF6A20397 for ; Wed, 31 Jul 2013 17:07:53 +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 B4D6A2037D for ; Wed, 31 Jul 2013 17:07:51 +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 1V4ZsJ-0007hg-5d; Wed, 31 Jul 2013 17:07:47 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1V4ZsG-00053w-Ng; Wed, 31 Jul 2013 17:07:44 +0000 Received: from mail1.windriver.com ([147.11.146.13]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V4ZsD-000531-RZ for linux-arm-kernel@lists.infradead.org; Wed, 31 Jul 2013 17:07:42 +0000 Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail1.windriver.com (8.14.5/8.14.3) with ESMTP id r6VH6kWv015401 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Wed, 31 Jul 2013 10:06:46 -0700 (PDT) Received: from yow-pgortmak-d1.corp.ad.wrs.com (128.224.146.65) by ALA-HCA.corp.ad.wrs.com (147.11.189.40) with Microsoft SMTP Server id 14.2.342.3; Wed, 31 Jul 2013 10:06:45 -0700 From: Paul Gortmaker To: Russell King Subject: [PATCH] arm: add .text at __CPUINIT places to prevent section grandfathering Date: Wed, 31 Jul 2013 13:06:58 -0400 Message-ID: <1375290418-1848-1-git-send-email-paul.gortmaker@windriver.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <20130731094352.GV24642@n2100.arm.linux.org.uk> References: <20130731094352.GV24642@n2100.arm.linux.org.uk> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130731_130742_022842_42A25FAB X-CRM114-Status: GOOD ( 10.07 ) X-Spam-Score: -3.4 (---) Cc: Paul Gortmaker , Simon Horman , Magnus Damm , linux-arm-kernel@lists.infradead.org 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: , 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.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, 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 In commit 22f0a27367742f65130c0fb25ef00f7297e032c1 ("init.h: remove __cpuinit sections from the kernel") the macros like __CPUINIT were converted from .section commands to no-ops. This caused CPU hotplug regressions because the code following the __CPUINIT lines was now grandfathered into whatever the previous section happened to be. In most files, __CPUINIT was at the top of the file, so there was no previous section. However in the files changed here, there was a previous section, and so we'd inadvertently garbage collect CPU hotplug related code. This changeset inserts ".text" into the exact same spot that the __CPUINIT section markers were found prior to commit 8bd26e3a7e49af2697449bbcb7187a39dc85d672 ("arm: delete __cpuinit/__CPUINIT usage from all ARM users:) in the three affected files, as suggested by Russell. Bisected-by: Simon Horman Reported-by: Magnus Damm Reported-by: Russell King Signed-off-by: Paul Gortmaker --- [NB: Untested - I've not got an SMP ARM handy at the moment] arch/arm/kernel/head-common.S | 1 + arch/arm/kernel/head-nommu.S | 1 + arch/arm/kernel/head.S | 1 + 3 files changed, 3 insertions(+) diff --git a/arch/arm/kernel/head-common.S b/arch/arm/kernel/head-common.S index 47cd974..def853e 100644 --- a/arch/arm/kernel/head-common.S +++ b/arch/arm/kernel/head-common.S @@ -149,6 +149,7 @@ ENDPROC(lookup_processor_type) * r5 = proc_info pointer in physical address space * r9 = cpuid (preserved) */ + .text __lookup_processor_type: adr r3, __lookup_processor_type_data ldmia r3, {r4 - r6} diff --git a/arch/arm/kernel/head-nommu.S b/arch/arm/kernel/head-nommu.S index b361de1..14235ba 100644 --- a/arch/arm/kernel/head-nommu.S +++ b/arch/arm/kernel/head-nommu.S @@ -87,6 +87,7 @@ ENTRY(stext) ENDPROC(stext) #ifdef CONFIG_SMP + .text ENTRY(secondary_startup) /* * Common entry point for secondary CPUs. diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index 9cf6063..2c7cc1e 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S @@ -343,6 +343,7 @@ __turn_mmu_on_loc: .long __turn_mmu_on_end #if defined(CONFIG_SMP) + .text ENTRY(secondary_startup) /* * Common entry point for secondary CPUs.