From patchwork Thu Aug 6 22:16:32 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 39697 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n76MI74w027249 for ; Thu, 6 Aug 2009 22:18:07 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754093AbZHFWSE (ORCPT ); Thu, 6 Aug 2009 18:18:04 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754167AbZHFWSE (ORCPT ); Thu, 6 Aug 2009 18:18:04 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:59197 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754093AbZHFWSD (ORCPT ); Thu, 6 Aug 2009 18:18:03 -0400 Received: from imap1.linux-foundation.org (imap1.linux-foundation.org [140.211.169.55]) by smtp1.linux-foundation.org (8.14.2/8.13.5/Debian-3ubuntu1.1) with ESMTP id n76MGXEt012325 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 6 Aug 2009 15:16:34 -0700 Received: from localhost.localdomain (localhost [127.0.0.1]) by imap1.linux-foundation.org (8.13.5.20060308/8.13.5/Debian-3ubuntu1.1) with ESMTP id n76MGXY8019375; Thu, 6 Aug 2009 15:16:33 -0700 Message-Id: <200908062216.n76MGXY8019375@imap1.linux-foundation.org> Subject: [patch for 2.6.31? 2/2] acpi: don't call acpi_processor_init if acpi is disabled To: lenb@kernel.org Cc: linux-acpi@vger.kernel.org, akpm@linux-foundation.org, yinghai@kernel.org, jens@leia.mcbone.net, mingo@elte.hu From: akpm@linux-foundation.org Date: Thu, 06 Aug 2009 15:16:32 -0700 X-Spam-Status: No, hits=-3.512 required=5 tests=AWL, BAYES_00, OSDL_HEADER_SUBJECT_BRACKETED X-Spam-Checker-Version: SpamAssassin 3.2.4-osdl_revision__1.47__ X-MIMEDefang-Filter: lf$Revision: 1.188 $ X-Scanned-By: MIMEDefang 2.63 on 140.211.169.13 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Yinghai Lu Jens reported early_ioremap messages with old ASUS board... > [ 1.507461] pci 0000:00:09.0: Firmware left e100 interrupts enabled; > disabling > [ 1.532778] early_ioremap(3fffd080, 0000005c) [0] => Pid: 1, comm: > swapper Not tainted 2.6.31-rc4 #36 > [ 1.561007] Call Trace: > [ 1.568638] [] ? printk+0x18/0x1d > [ 1.581734] [] __early_ioremap+0x74/0x1e9 > [ 1.596898] [] early_ioremap+0x1a/0x1c > [ 1.611270] [] __acpi_map_table+0x18/0x1a > [ 1.626451] [] acpi_os_map_memory+0x1d/0x25 > [ 1.642129] [] acpi_tb_verify_table+0x20/0x49 > [ 1.658321] [] acpi_get_table_with_size+0x53/0xa1 > [ 1.675553] [] acpi_get_table+0x10/0x15 > [ 1.690192] [] acpi_processor_init+0x23/0xab > [ 1.706126] [] do_one_initcall+0x33/0x180 > [ 1.721279] [] ? acpi_processor_init+0x0/0xab > [ 1.737479] [] ? register_irq_proc+0xaa/0xc0 > [ 1.753411] [] ? init_irq_proc+0x67/0x80 > [ 1.768316] [] kernel_init+0x120/0x176 > [ 1.782678] [] ? kernel_init+0x0/0x176 > [ 1.797062] [] kernel_thread_helper+0x7/0x10 > [ 1.812984] 00000080 + ffe00000 that is rather later. acpi_gbl_permanent_mmap should be set in acpi_early_init() if acpi is not disabled and we have > [ 0.000000] ASUS P2B-DS detected: force use of acpi=ht just don't load acpi_processor_init... Reported-and-tested-by: Jens Rosenboom Signed-off-by: Yinghai Lu Acked-by: Ingo Molnar Cc: Len Brown Signed-off-by: Andrew Morton --- drivers/acpi/processor_core.c | 6 ++++++ 1 file changed, 6 insertions(+) diff -puN drivers/acpi/processor_core.c~acpi-dont-call-acpi_processor_init-if-acpi-is-disabled drivers/acpi/processor_core.c --- a/drivers/acpi/processor_core.c~acpi-dont-call-acpi_processor_init-if-acpi-is-disabled +++ a/drivers/acpi/processor_core.c @@ -1137,6 +1137,9 @@ static int __init acpi_processor_init(vo { int result = 0; + if (acpi_disabled) + return 0; + memset(&errata, 0, sizeof(errata)); #ifdef CONFIG_SMP @@ -1185,6 +1188,9 @@ out_proc: static void __exit acpi_processor_exit(void) { + if (acpi_disabled) + return; + acpi_processor_ppc_exit(); acpi_thermal_cpufreq_exit();