From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 13 May 2010 10:09:23 +1000 From: Paul Mackerras To: Albert Herranz Subject: Re: [PATCH] powerpc: fix register_power_pmu() section mismatch warning Message-ID: <20100513000923.GD11450@brick.ozlabs.ibm.com> References: <1273687486-13381-1-git-send-email-albert_herranz@yahoo.es> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <1273687486-13381-1-git-send-email-albert_herranz@yahoo.es> Cc: linuxppc-dev@lists.ozlabs.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Wed, May 12, 2010 at 08:04:46PM +0200, Albert Herranz wrote: > Add missing __cpuinit annotations to fix a bunch of warnings like the one > shown below when building a kernel for the PowerPC architecture with > CONFIG_DEBUG_SECTION_MISMATCH=y. > > WARNING: arch/powerpc/kernel/built-in.o(.text+0x11c72): Section mismatch in reference from the function register_power_pmu() to the variable .cpuinit.data:power_pmu_notifier_nb.23552 > The function register_power_pmu() references > the variable __cpuinitdata power_pmu_notifier_nb.23552. > This is often because register_power_pmu lacks a __cpuinitdata > annotation or the annotation of power_pmu_notifier_nb.23552 is wrong. Hmmm, I would think these things could be just plain __init, not __cpuinit. They're not called on cpu hotplug events. Paul.