Re: [patch 11/13] ioapic: Fix non atomic allocation with interrupts disabled

Jaswinder Singh Rajput
2009-04-09T15:08:38Z

Hello Suresh,

I am getting sparse warning from this patch.
If possible, please run sparse before sending the patches.

On Mon, 2009-03-16 at 17:05 -0700, Suresh Siddha wrote:
> plain text document attachment (fix_kmalloc_with_irqs_disabled.patch)
> save_mask_IO_APIC_setup() was using non atomic memory allocation while getting
> called with interrupts disabled. Fix this by splitting this into two different
> function. Allocation part save_IO_APIC_setup() now happens before
> disabling interrupts.
>
> Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
> ---
>
> Index: tip/arch/x86/kernel/apic/io_apic.c
> ===================================================================
> --- tip.orig/arch/x86/kernel/apic/io_apic.c
> +++ tip/arch/x86/kernel/apic/io_apic.c
> @@ -902,6 +895,25 @@ nomem:
> return -ENOMEM;
> }
>
> +void mask_IO_APIC_setup(void)
> +{
> + int apic, pin;
> +

arch/x86/kernel/apic/io_apic.c:806:6: warning: symbol 'apic' shadows an earlier one
arch/x86/include/asm/apic.h:352:20: originally declared here

Don't worry you are not alone ;-)

CHECK arch/x86/kernel/apic/io_apic.c
arch/x86/kernel/apic/io_apic.c:544:6: warning: symbol 'apic' shadows an earlier one
arch/x86/include/asm/apic.h:352:20: originally declared here
arch/x86/kernel/apic/io_apic.c:806:6: warning: symbol 'apic' shadows an earlier one
arch/x86/include/asm/apic.h:352:20: originally declared here
arch/x86/kernel/apic/io_apic.c:994:7: warning: symbol 'apic' shadows an earlier one
arch/x86/include/asm/apic.h:352:20: originally declared here
arch/x86/kernel/apic/io_apic.c:1012:6: warning: symbol 'apic' shadows an earlier one
arch/x86/include/asm/apic.h:352:20: originally declared here
arch/x86/kernel/apic/io_apic.c:1440:6: warning: symbol 'apic' shadows an earlier one
arch/x86/include/asm/apic.h:352:20: originally declared here
arch/x86/kernel/apic/io_apic.c:1700:6: warning: symbol 'apic' shadows an earlier one
arch/x86/include/asm/apic.h:352:20: originally declared here
arch/x86/kernel/apic/io_apic.c:1994:6: warning: symbol 'apic' shadows an earlier one
arch/x86/include/asm/apic.h:352:20: originally declared here
arch/x86/kernel/apic/io_apic.c:2781:6: warning: symbol 'apic' shadows an earlier one
arch/x86/include/asm/apic.h:352:20: originally declared here

Ingo:
don't you think struct apic *apic is very common name can we find some better name.

--
JSR