From patchwork Wed Aug 8 14:47:18 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 1296291 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 ABFEBDF223 for ; Wed, 8 Aug 2012 14:52:32 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Sz7ZR-0005te-Qj; Wed, 08 Aug 2012 14:49:13 +0000 Received: from moutng.kundenserver.de ([212.227.17.8]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Sz7Xy-0005JD-PW for linux-arm-kernel@lists.infradead.org; Wed, 08 Aug 2012 14:47:44 +0000 Received: from klappe2.boeblingen.de.ibm.com (deibp9eh1--blueice3n2.emea.ibm.com [195.212.29.180]) by mrelayeu.kundenserver.de (node=mrbap1) with ESMTP (Nemesis) id 0LlpLM-1TYSMW3irI-00Zr3k; Wed, 08 Aug 2012 16:47:33 +0200 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 01/11] ARM: topology: mark init_cpu_topology as __init Date: Wed, 8 Aug 2012 16:47:18 +0200 Message-Id: <1344437248-20560-2-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1344437248-20560-1-git-send-email-arnd@arndb.de> References: <1344437248-20560-1-git-send-email-arnd@arndb.de> X-Provags-ID: V02:K0:AIDeXsX5DDPuzG9ikqR0noogLnxN8v/NCeyJ5+mA9h2 lPyUpQfjEmxGt8wnLq/e9ZQ+t0eQmJwnbS20Ss75KSpzMaV8FP UWkYivDdAty9VDeQO5tQ5tufdXTJNDGzEO2/GVvJnoATFF7BV7 L7iU35TlBoy3S8qXOYWJhdLd4gWWQCXxm3WgcCSyPmRCOyxj9v hxntzz24zTvPdmmHDlpz8yph9P9Ass6gXXpmYCvFKdTgPjH6uz RfVTFOBETXDgYORPNkpiw0/WyxrHKnUZvM8KVse3WDqSWYws9N eWZN6xCxCBBTqOq8BzR6ZvITcuBbW3Z20cHWLwlk9fPxqxjYlM kQHYcO13XZYPNVnaAdcrEuMUXNa4yvHN523ig3PoXqPbVSVzHx JrbjL5Gjk1rvsxuoZSfYRI5xTAJXLJ3a8k= X-Spam-Note: CRM114 invocation failed 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.17.8 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: Vincent Guittot , Peter Zijlstra , Arnd Bergmann , linux-kernel@vger.kernel.org, arm@kernel.org, Russell King , Namhyung Kim 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 init_cpu_topology function can be put into the __init section and discarded after boot, because it is only called from smp_prepare_cpus, which is also marked __init. This was reported by gcc after Vincent Guittot added the parse_dt_topology function in 339ca09d7ada "ARM: 7463/1: topology: Update cpu_power according to DT information". Without this patch, building kzm9g_defconfig results in: WARNING: vmlinux.o(.text+0xb5a0): Section mismatch in reference from the function init_cpu_topology() to the function .init.text:parse_dt_topology() The function init_cpu_topology() references the function __init parse_dt_topology(). This is often because init_cpu_topology lacks a __init annotation or the annotation of parse_dt_topology is wrong. Signed-off-by: Arnd Bergmann Cc: Vincent Guittot Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Russell King --- arch/arm/kernel/topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c index 198b084..26c12c6 100644 --- a/arch/arm/kernel/topology.c +++ b/arch/arm/kernel/topology.c @@ -321,7 +321,7 @@ void store_cpu_topology(unsigned int cpuid) * init_cpu_topology is called at boot when only one cpu is running * which prevent simultaneous write access to cpu_topology array */ -void init_cpu_topology(void) +void __init init_cpu_topology(void) { unsigned int cpu;