Subject: [PATCH 4/4] irqchip: gic: Perform the gic_secondary_init() call via CPU notifier

From: [email-masked] (Catalin Marinas)
Date: Fri, 25 Jan 2013 18:12:20 +0000

On Fri, Jan 25, 2013 at 04:16:18PM +0000, Dinh Nguyen wrote:
> Hi Catalin,
> 
> On Wed, 2013-01-23 at 17:59 +0000, Catalin Marinas wrote:
> > All the calls to gic_secondary_init() pass 0 as the first argument.
> > Since this function is called on each CPU when starting, it can be done
> > in a platform-independent way via a CPU notifier registered by the GIC
> > code.
> > 
> > Signed-off-by: Catalin Marinas <[email-masked]>
> > Cc: Russell King <[email-masked]>
> > Cc: Thomas Gleixner <[email-masked]>
> > Cc: Kukjin Kim <[email-masked]>
> > Cc: Rob Herring <[email-masked]>
> > Cc: Sascha Hauer <[email-masked]>
> > Cc: David Brown <[email-masked]>
> > Cc: Daniel Walker <[email-masked]>
> > Cc: Bryan Huntsman <[email-masked]>
> > Cc: Tony Lindgren <[email-masked]>
> > Cc: Simon Horman <[email-masked]>
> > Cc: Magnus Damm <[email-masked]>
> > Cc: Dinh Nguyen <[email-masked]>
> > Cc: Viresh Kumar <[email-masked]>
> > Cc: Shiraz Hashim <[email-masked]>
> > Cc: Stephen Warren <[email-masked]>
> > Cc: Srinidhi Kasagar <[email-masked]>
> > Cc: Linus Walleij <[email-masked]>
> > ---
> > 
> > Randomly chosen CPU notifier priority. I can add a definition somewhere
> > though they don't seem to be used much and cause conflicts.
> > 
> >  arch/arm/mach-exynos/platsmp.c       |  8 --------
> >  arch/arm/mach-highbank/platsmp.c     |  7 -------
> >  arch/arm/mach-imx/platsmp.c          | 12 ------------
> >  arch/arm/mach-msm/platsmp.c          |  8 --------
> >  arch/arm/mach-omap2/omap-smp.c       |  7 -------
> >  arch/arm/mach-shmobile/smp-emev2.c   |  7 -------
> >  arch/arm/mach-shmobile/smp-r8a7779.c |  7 -------
> >  arch/arm/mach-shmobile/smp-sh73a0.c  |  7 -------
> >  arch/arm/mach-socfpga/platsmp.c      | 12 ------------
> 
> For socfpga, I get this error when I build for sofpga_defconfig:
> 
> drivers/gpio/gpio-pl061.c: In function ?pl061_irq_handler?:
> drivers/gpio/gpio-pl061.c:183:2: error: implicit declaration of function
> ?chained_irq_enter? [-Werror=implicit-function-declaration]
> drivers/gpio/gpio-pl061.c:192:2: error: implicit declaration of function
> ?chained_irq_exit? [-Werror=implicit-function-declaration]

Ah, I only grep'ed arch/arm for chained_irq_enter() use. The simplest
for arch/arm is to actually include chained_irq.h into asm/mach/irq.h
since the latter is already included. For code shared with arm64 I'll
just include chained_irq.h explicitly.

Thanks.

-- 
Catalin