From patchwork Tue Feb 18 13:54:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 3670881 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A95A6BF13A for ; Tue, 18 Feb 2014 13:57:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C596E20171 for ; Tue, 18 Feb 2014 13:57:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F1A3320166 for ; Tue, 18 Feb 2014 13:57:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932160AbaBRN4H (ORCPT ); Tue, 18 Feb 2014 08:56:07 -0500 Received: from mail-pb0-f54.google.com ([209.85.160.54]:48739 "EHLO mail-pb0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932099AbaBRN4E (ORCPT ); Tue, 18 Feb 2014 08:56:04 -0500 Received: by mail-pb0-f54.google.com with SMTP id uo5so16807243pbc.13 for ; Tue, 18 Feb 2014 05:56:04 -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=TCWaMqVuM9XjypX1ddx//gz3yeXF9mTYqn7tAtTlTGQ=; b=XP7DpgmoPriER51zBJCi5bRYXubGdwq4HpXbPI5grqvzvRDHUGUE6qO1ZzWjYvjsIj dWVsEP1alXUigPTwz+wi+OVXy312oNNKbLmnZlQdGDqle6ayT5Urd+i380xpB+iDvhR9 mf+86AWMPjrfaFInHlMr4ZD95+yobpLNTv/guX9jfRiT7KxAdFmYZRhbFQMyyFWKa8Mm BdC12bHK1eHsGQ1vIHbxHasuf9amXIiDlteKOdZa62nEHWiWYqI9xXQCmCWr9+LmCCzm jvb2AOh0cenYMSjy5ZdAKDJhOJQcEVdT9Ci5qNePWt9qmabxpg638GJVYNylDF940NN5 V+bg== X-Gm-Message-State: ALoCoQkCWyzbVxdbk9AV00QXua6BTC4JQxq/gNEMWW7W6x27zz+ajwTLCd2kKoJl6yjp01WDD7wR X-Received: by 10.66.250.202 with SMTP id ze10mr10285254pac.153.1392731764368; Tue, 18 Feb 2014 05:56:04 -0800 (PST) Received: from localhost ([39.181.46.96]) by mx.google.com with ESMTPSA id yd4sm56152997pbc.13.2014.02.18.05.56.01 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 18 Feb 2014 05:56:03 -0800 (PST) From: Hanjun Guo To: "Rafael J. Wysocki" Cc: Lan Tianyu , linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, patches@linaro.org, linux-kernel@vger.kernel.org, linaro-acpi@lists.linaro.org, Hanjun Guo Subject: [PATCH v4 1/5] ACPI / idle: Make idle_boot_override depend on x86 and ia64 Date: Tue, 18 Feb 2014 21:54:56 +0800 Message-Id: <1392731700-10992-2-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1392731700-10992-1-git-send-email-hanjun.guo@linaro.org> References: <1392731700-10992-1-git-send-email-hanjun.guo@linaro.org> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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. Signed-off-by: Hanjun Guo --- drivers/acpi/processor_core.c | 47 ++++++++++++++++++++++++----------------- 1 file changed, 28 insertions(+), 19 deletions(-) diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index 7c50a4c..636fd59 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,40 @@ early_init_pdc(acpi_handle handle, u32 lvl, void *context, void **rv) return AE_OK; } -void __init acpi_early_processor_set_pdc(void) +#if defined(CONFIG_X86) || defined(CONFIG_IA64) +static int __init set_no_mwait(const struct dmi_system_id *id) +{ + pr_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 void __init processor_dmi_check(void) { /* * Check whether the system is DMI table. If yes, OSPM * should not use mwait for CPU-states. */ dmi_check_system(processor_idle_dmi_table); +} +#else +static inline void processor_dmi_check(void) {} +#endif + +void __init acpi_early_processor_set_pdc(void) +{ + processor_dmi_check(); acpi_walk_namespace(ACPI_TYPE_PROCESSOR, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX,