From patchwork Mon Feb 10 07:49:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 3616131 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5D8EF9F2F6 for ; Mon, 10 Feb 2014 07:51:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8B99820138 for ; Mon, 10 Feb 2014 07:51:06 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A3C842012D for ; Mon, 10 Feb 2014 07:51:05 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WCldT-0002UX-Cm; Mon, 10 Feb 2014 07:50:35 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WCldI-0001w7-Jt; Mon, 10 Feb 2014 07:50:24 +0000 Received: from mail-pd0-f181.google.com ([209.85.192.181]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WCldG-0001u4-4G for linux-arm-kernel@lists.infradead.org; Mon, 10 Feb 2014 07:50:22 +0000 Received: by mail-pd0-f181.google.com with SMTP id y10so5729466pdj.26 for ; Sun, 09 Feb 2014 23:49:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=TQwVmMyKtNwrU0kaE40V5D5NrM6wmzWChDUTt3+r/Lw=; b=KjRYHz84yZK+e4/tDBp6e9HmvQQ/M5+O1r14E1YKfYL7AP+TyiwFkMebKG6FwNymnF N110iVk51KNMTrmEo2gAnyHb1PUm5ChWyaaAv3zCHBaGvgmCbtajgKWgRJGcKleIMhxe 13ybWKNOxTPDTgrVpJLc/VJ9edGhWEdMxO58i3vJKyUvxSKcYYp120yKFN163+zM52P6 DfMFdZeiLSTS6wIh5eQDPOyGUtLsjnfmxH8EWFPKb1tFgaeDOj6Z0kaFqU0PjK4xLQS1 RQ9ZEBfgdRvdjAdxtFCYjDj4jj+w209+IicDBxdW5TCneQbMn+GeXhqfzgKTloHSzUKL nWzg== X-Gm-Message-State: ALoCoQlo5iTca+LrajVdKvr25+vQKCYcUvgGJ22p3E3FCSNITlI2/Sq+ZcvWH8idmT8j2dyuwSV+ X-Received: by 10.66.16.131 with SMTP id g3mr7661243pad.138.1392018596786; Sun, 09 Feb 2014 23:49:56 -0800 (PST) Received: from localhost ([218.17.215.175]) by mx.google.com with ESMTPSA id i10sm104160613pat.11.2014.02.09.23.49.51 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 09 Feb 2014 23:49:56 -0800 (PST) From: Hanjun Guo To: "Rafael J. Wysocki" Subject: [PATCH v3 1/3] ACPI / idle: Make idle_boot_override depend on x86 and ia64 Date: Mon, 10 Feb 2014 15:49:00 +0800 Message-Id: <1392018542-10949-2-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1392018542-10949-1-git-send-email-hanjun.guo@linaro.org> References: <1392018542-10949-1-git-send-email-hanjun.guo@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140210_025022_266153_36E2C091 X-CRM114-Status: GOOD ( 14.12 ) X-Spam-Score: -1.1 (-) Cc: Lan Tianyu , linaro-acpi@lists.linaro.org, patches@linaro.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, Hanjun Guo , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_WEB, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP idle_boot_override depends on x86 and ia64 now, and we can not foresee it will be used on ARM or ARM64,so move the code into CONFIG_X86 and CONFIG_IA64 #ifdefs to make processor_core.c can be compiled on ARM64. Reviewed-by: Lan Tianyu Signed-off-by: Hanjun Guo --- drivers/acpi/processor_core.c | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index 7c50a4c..a79fd8ee 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c @@ -19,24 +19,6 @@ #define _COMPONENT ACPI_PROCESSOR_COMPONENT ACPI_MODULE_NAME("processor_core"); -static int __init set_no_mwait(const struct dmi_system_id *id) -{ - printk(KERN_NOTICE PREFIX "%s detected - " - "disabling mwait for CPU C-states\n", id->ident); - boot_option_idle_override = IDLE_NOMWAIT; - return 0; -} - -static struct dmi_system_id processor_idle_dmi_table[] __initdata = { - { - set_no_mwait, "Extensa 5220", { - DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"), - DMI_MATCH(DMI_SYS_VENDOR, "Acer"), - DMI_MATCH(DMI_PRODUCT_VERSION, "0100"), - DMI_MATCH(DMI_BOARD_NAME, "Columbia") }, NULL}, - {}, -}; - static int map_lapic_id(struct acpi_subtable_header *entry, u32 acpi_id, int *apic_id) { @@ -379,13 +361,35 @@ early_init_pdc(acpi_handle handle, u32 lvl, void *context, void **rv) return AE_OK; } +#if defined(CONFIG_X86) || defined(CONFIG_IA64) +static int __init set_no_mwait(const struct dmi_system_id *id) +{ + printk(KERN_NOTICE PREFIX "%s detected - " + "disabling mwait for CPU C-states\n", id->ident); + boot_option_idle_override = IDLE_NOMWAIT; + return 0; +} + +static struct dmi_system_id processor_idle_dmi_table[] __initdata = { + { + set_no_mwait, "Extensa 5220", { + DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"), + DMI_MATCH(DMI_SYS_VENDOR, "Acer"), + DMI_MATCH(DMI_PRODUCT_VERSION, "0100"), + DMI_MATCH(DMI_BOARD_NAME, "Columbia") }, NULL}, + {}, +}; +#endif + void __init acpi_early_processor_set_pdc(void) { +#if defined(CONFIG_X86) || defined(CONFIG_IA64) /* * Check whether the system is DMI table. If yes, OSPM * should not use mwait for CPU-states. */ dmi_check_system(processor_idle_dmi_table); +#endif acpi_walk_namespace(ACPI_TYPE_PROCESSOR, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX,