From patchwork Thu Feb 14 14:01:31 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 2142011 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 9EB56DF283 for ; Thu, 14 Feb 2013 14:04:37 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U5zNo-00037e-Tj; Thu, 14 Feb 2013 14:01:52 +0000 Received: from moutng.kundenserver.de ([212.227.126.186]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1U5zNf-00035r-M8 for linux-arm-kernel@lists.infradead.org; Thu, 14 Feb 2013 14:01:44 +0000 Received: from wuerfel.lan (HSI-KBW-46-223-90-92.hsi.kabel-badenwuerttemberg.de [46.223.90.92]) by mrelayeu.kundenserver.de (node=mreu0) with ESMTP (Nemesis) id 0MIj6a-1U3mS52fhA-002vdl; Thu, 14 Feb 2013 15:01:33 +0100 From: Arnd Bergmann To: arm@kernel.org Subject: [PATCH] ARM: prima2: fix __init section for cpu hotplug Date: Thu, 14 Feb 2013 15:01:31 +0100 Message-Id: <1360850491-1463387-2-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1360850491-1463387-1-git-send-email-arnd@arndb.de> References: <1360850491-1463387-1-git-send-email-arnd@arndb.de> X-Provags-ID: V02:K0:HnCYi7SjFLvwTZGAOzUtJXnguwwCpoktK9J4MpcfGLG O2tpxmgzLoKPhgSJLzJFYQj0imu3/AE6bDetNHcY3Aq1ZDhByF 51sn4OE51wLqeAxPT/MHmHvvKYf21aogNN5AOipZVIfTg2rSMr KB7Q24uRAwmMA5LmcZIIJkszExL4jSXMzuHm324DYPgOjF6ucB 81QsU+saobrZ7YqewtrZGK8fZMk7ef/+dA0WC24JrvMASC8xbm DiAnGkRLwWuKTtvLjcunm2JgRuyFy9WjOFwCDvvzZZs5ROkBnC udQmuY1OPiS2oTqEYTfm1gZfTCh2e0yX37FM+1VI1O01ZqjgUF F9H+MwBz3gkR5S/k1v7ti+8azaMGJHVCVzl+wEP59 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130214_090144_002505_BEF6718C X-CRM114-Status: GOOD ( 12.47 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [212.227.126.186 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Arnd Bergmann , linux-arm-kernel@lists.infradead.org, Barry Song X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The code in arch/arm/mach-prima2/headsmp.S is used for both boot time initialization and for cpu hotplug, so it must not be discarded after the initial boot is complete. This replaces the __INIT annotation with __CPUINIT, and marks the sirfsoc_cpu_die as __ref to annotate that it correctly uses the sections. Without this patch, building prima2_defconfig results in: WARNING: arch/arm/mach-prima2/built-in.o(.cpuinit.text+0x130): Section mismatch in reference from the function sirfsoc_boot_secondary() to the function .init.text:sirfsoc_secondary_startup() The function __cpuinit sirfsoc_boot_secondary() references a function __init sirfsoc_secondary_startup(). If sirfsoc_secondary_startup is only used by sirfsoc_boot_secondary then annotate sirfsoc_secondary_startup with a matching annotation. Signed-off-by: Arnd Bergmann Cc: Barry Song --- arch/arm/mach-prima2/headsmp.S | 3 ++- arch/arm/mach-prima2/hotplug.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) I'm applying this as an obvious fix directly on the next/soc branch that introduced the problem. diff --git a/arch/arm/mach-prima2/headsmp.S b/arch/arm/mach-prima2/headsmp.S index 6ec19d5..ada82d0 100644 --- a/arch/arm/mach-prima2/headsmp.S +++ b/arch/arm/mach-prima2/headsmp.S @@ -9,7 +9,8 @@ #include #include - __INIT + __CPUINIT + /* * Cold boot and hardware reset show different behaviour, * system will be always panic if we warm-reset the board diff --git a/arch/arm/mach-prima2/hotplug.c b/arch/arm/mach-prima2/hotplug.c index 97c1ee5..f4b17cb 100644 --- a/arch/arm/mach-prima2/hotplug.c +++ b/arch/arm/mach-prima2/hotplug.c @@ -35,7 +35,7 @@ static inline void platform_do_lowpower(unsigned int cpu) * * Called with IRQs disabled */ -void sirfsoc_cpu_die(unsigned int cpu) +void __ref sirfsoc_cpu_die(unsigned int cpu) { platform_do_lowpower(cpu); }