[patch] fix !apic build breakage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Andi Kleen <[email protected]> wrote:

> > 63K???? You've got to be kidding. That's huge. That's ~10% of the 
> > minconfig kernel. 
> 
> A large part of it is the ACPI support. Without that it's smaller:
> 
>    text    data     bss     dec     hex filename
> 2978333  640752  416100 4035185  3d9271 obj32-up-noacpi/vmlinux
> 2947808  612088  400292 3960188  3c6d7c obj32-up-noacpi-noapic/vmlinux
> 
> ~30k

that's still huge! The patch below fixes the panic_on_unrecovered_nmi 
thing ...

> You might be able to do without ACPI on your embedded system.

of course many people do.

> > Even 1K would be bad. We did config hacks for half a K  
> > win. 
> 
> <rant>
> 
> Sorry, but that's silly. I did some measurements and just tweaking a 
> few dynamic allocation pigs saves you much more memory without 
> uglifying the code. In fact in most configurations you can find 
> dynamic users who need more than the complete kernel text - this means 
> even if you got the kernel text down to 0 bytes you wouldn't save as 
> much as simple tweaks in the dynamic pig.

so please do it. The fact that there are /other/ reductions possible 
doesnt mean we can be lax. It's like: "oh, the buddy allocator scales 
better now, so we can slow down the SLAB allocator". No, kernel size is 
like scalability: we need a million small steps.

the panic_on_unrecovered_nmi thing is gross anyway: it has no place in 
kernel.h, it should go into include/[asm-i386|x86_64]/nmi.h and not the 
generic headers. There the prototype can be made #ifdef APIC, hence 
eliminating the #ifdefs from traps.c. (that's all we care about anyway)

please dont throw away a perfectly fine config option.

	Ingo

---------------->
From: Ingo Molnar <[email protected]>
Subject: fix !apic build breakage

fix !apic build breakage.

Signed-off-by: Ingo Molnar <[email protected]>

Index: linux-hrt-mm.q/arch/i386/kernel/traps.c
===================================================================
--- linux-hrt-mm.q.orig/arch/i386/kernel/traps.c
+++ linux-hrt-mm.q/arch/i386/kernel/traps.c
@@ -709,8 +709,10 @@ mem_parity_error(unsigned char reason, s
 		"CPU %d.\n", reason, smp_processor_id());
 	printk(KERN_EMERG "You probably have a hardware problem with your RAM "
 			"chips\n");
+#ifdef CONFIG_X86_LOCAL_APIC
 	if (panic_on_unrecovered_nmi)
                 panic("NMI: Not continuing");
+#endif
 
 	printk(KERN_EMERG "Dazed and confused, but trying to continue\n");
 
@@ -749,8 +751,10 @@ unknown_nmi_error(unsigned char reason, 
 	printk(KERN_EMERG "Uhhuh. NMI received for unknown reason %02x on "
 		"CPU %d.\n", reason, smp_processor_id());
 	printk(KERN_EMERG "Do you have a strange power saving mode enabled?\n");
+#ifdef CONFIG_X86_LOCAL_APIC
 	if (panic_on_unrecovered_nmi)
                 panic("NMI: Not continuing");
+#endif
 
 	printk(KERN_EMERG "Dazed and confused, but trying to continue\n");
 }
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux