lkml.org 
[lkml]   [2009]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH] x86,apic: Checking kernel option before detect_init_APIC()
From
 Impact: cleanup

Before calling detect_init_APIC(), check whether apic is disabled from
kernel option or not.

Thanks.

Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com>

--- linus/arch/x86/kernel/apic.c 2009-03-26 06:26:31.000000000 +0600
+++ rakib/arch/x86/kernel/apic.c 2009-03-26 20:47:50.116376200 +0600
@@ -1429,10 +1429,6 @@ static int __init detect_init_APIC(void)
{
u32 h, l, features;

- /* Disabled by kernel option? */
- if (disable_apic)
- return -1;
-
switch (boot_cpu_data.x86_vendor) {
case X86_VENDOR_AMD:
if ((boot_cpu_data.x86 == 6 && boot_cpu_data.x86_model > 1) ||
@@ -1543,8 +1539,9 @@ void __init init_apic_mappings(void)
* If no local APIC can be found then set up a fake all
* zeroes page to simulate the local APIC and another
* one for the IO-APIC.
+ * Check apic is disabled from kernel option or not.
*/
- if (!smp_found_config && detect_init_APIC()) {
+ if (!smp_found_config && (disable_apic || detect_init_APIC())) {
apic_phys = (unsigned long) alloc_bootmem_pages(PAGE_SIZE);
apic_phys = __pa(apic_phys);
} else

\
 
 \ /
  Last update: 2009-03-28 02:27    [W:1.543 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site