Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760922AbZC1BZp (ORCPT ); Fri, 27 Mar 2009 21:25:45 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751155AbZC1BZf (ORCPT ); Fri, 27 Mar 2009 21:25:35 -0400 Received: from yw-out-2324.google.com ([74.125.46.28]:18988 "EHLO yw-out-2324.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751072AbZC1BZf (ORCPT ); Fri, 27 Mar 2009 21:25:35 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=lYS5whpfwyxkz5DvlHvREQdbQVK1111vsLSZmb/faNXuQ1xkzG5aLd0GBHukndW5wB c3aR9LOZVY6il5SiJMHa3or4xwxzwjLSPlpmaksY4xAgugqVDcLXN+rN7uVHzU1yhvlD s01u+xhT8AHOrK2ahsNwCBKXCVo8J747OpXqw= MIME-Version: 1.0 Date: Sat, 28 Mar 2009 07:25:32 +0600 Message-ID: Subject: [PATCH] x86,apic: Checking kernel option before detect_init_APIC() From: Rakib Mullick To: LKML Cc: Andrew Morton , Ingo Molnar Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1328 Lines: 38 Impact: cleanup Before calling detect_init_APIC(), check whether apic is disabled from kernel option or not. Thanks. Signed-off-by: Rakib Mullick --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/