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: 10593 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 8D61423F00 for ; Wed, 8 Aug 2012 14:47:48 +0000 (UTC) Received: from mail-gg0-f180.google.com (mail-gg0-f180.google.com [209.85.161.180]) by fiordland.canonical.com (Postfix) with ESMTP id 5DBF5A190AC for ; Wed, 8 Aug 2012 14:47:48 +0000 (UTC) Received: by mail-gg0-f180.google.com with SMTP id f1so837495ggn.11 for ; Wed, 08 Aug 2012 07:47:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-provags-id:x-gm-message-state; bh=aN4drcQweVnWVp91js3GkBblk2hkCxd8bvLXKsV17tw=; b=LIPtLgK0WS85MEolsZ6LPfTKpJWtbomZVbU1B1UC+Pf8xPmdblOMJN8mtlaBHKeZfO vvlqnUKbebkJsdAEocN64fGVon7BArKu7+Q+4yTdXIf5W5bIgq3Fk4YDq+GuFcyqqCM4 lrkri8Bn+sgASYaVBxA0ee03toBhSJ+pDjMhFZwv+XFjuY7nL57iD2hhAYPF43j2UFgf KUm2JzMDVbzkl7qxs6a5wiM7PmE3AjSYLBcNS6NGcpAJHuZjJHy1G2AS5sRplKzUMPy/ NZmZchfTA+SVqi3g1ht26VS74/cotqi/jSBHB/VJdei6c/izx5QVf8o9MuheHl4W+/Go qc0Q== Received: by 10.50.181.136 with SMTP id dw8mr1226688igc.31.1344437266559; Wed, 08 Aug 2012 07:47:46 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.184.200 with SMTP id ew8csp611877igc; Wed, 8 Aug 2012 07:47:45 -0700 (PDT) Received: by 10.204.157.22 with SMTP id z22mr7516534bkw.4.1344437265353; Wed, 08 Aug 2012 07:47:45 -0700 (PDT) Received: from moutng.kundenserver.de (moutng.kundenserver.de. [212.227.17.8]) by mx.google.com with ESMTP id fs16si23799421bkc.125.2012.08.08.07.47.44; Wed, 08 Aug 2012 07:47:45 -0700 (PDT) Received-SPF: neutral (google.com: 212.227.17.8 is neither permitted nor denied by best guess record for domain of arnd@arndb.de) client-ip=212.227.17.8; Authentication-Results: mx.google.com; spf=neutral (google.com: 212.227.17.8 is neither permitted nor denied by best guess record for domain of arnd@arndb.de) smtp.mail=arnd@arndb.de 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 Cc: arm@kernel.org, linux-kernel@vger.kernel.org, Arnd Bergmann , Vincent Guittot , Namhyung Kim , Peter Zijlstra , Russell King 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-Gm-Message-State: ALoCoQkEmetsOlC8EHmtUOgUA5Gs5TaFPVv9H/70WIL8+i4uINrlemArrpi/35mJByUltmNtxr+7 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;