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: 24846 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f69.google.com (mail-oa0-f69.google.com [209.85.219.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 424E3202B2 for ; Tue, 18 Feb 2014 13:56:07 +0000 (UTC) Received: by mail-oa0-f69.google.com with SMTP id h16sf69683005oag.8 for ; Tue, 18 Feb 2014 05:56:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=TCWaMqVuM9XjypX1ddx//gz3yeXF9mTYqn7tAtTlTGQ=; b=P+Krc+sTMpnr7yzU/Igfkoz6FyHd4/s9ieJKj+5yjviNXhTvTZkjHAbDex/6DlSsna GeekRzUC8tUAnUv7Hfgt95WHMCL1VlvwXdYEcJ5lhBC1FHQo6f+w0d91+Bj/ixz71ZZ1 /Pxbww+wz0BXV9xo+0Rk7Yjv6TuZXhmhUfwapDFPqX/E+6347eBoabEhPikn5GhZS+XC JZ9xW9ydBwbqLLwVDKAdfJJOLDFnenfacBE+HOIFP1CZmlBfRAw7iyW0YBzErvVlnQDV kTThV8IOh3ZTqB8cyhViX12tgg5tr8tTeh7F3biwHsr5gqx9JlNles1NKf1mkgg9bn4R /DPw== X-Gm-Message-State: ALoCoQmljyBV4OAjwKY/LwEm+Pdhh3u+Srad20zjzEgQ5sV7zL51MbVbfn6lTUvA4C1DvvvYjaSG X-Received: by 10.42.53.135 with SMTP id n7mr11687708icg.11.1392731766278; Tue, 18 Feb 2014 05:56:06 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.24.49 with SMTP id 46ls1325099qgq.21.gmail; Tue, 18 Feb 2014 05:56:06 -0800 (PST) X-Received: by 10.221.40.10 with SMTP id to10mr16836385vcb.22.1392731766202; Tue, 18 Feb 2014 05:56:06 -0800 (PST) Received: from mail-ve0-f180.google.com (mail-ve0-f180.google.com [209.85.128.180]) by mx.google.com with ESMTPS id us10si5504945vcb.134.2014.02.18.05.56.06 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 18 Feb 2014 05:56:06 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.180 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.180; Received: by mail-ve0-f180.google.com with SMTP id db12so13228898veb.39 for ; Tue, 18 Feb 2014 05:56:06 -0800 (PST) X-Received: by 10.220.178.73 with SMTP id bl9mr4965956vcb.42.1392731766092; Tue, 18 Feb 2014 05:56:06 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp218168vcz; Tue, 18 Feb 2014 05:56:05 -0800 (PST) X-Received: by 10.68.94.4 with SMTP id cy4mr21472184pbb.101.1392731764880; Tue, 18 Feb 2014 05:56:04 -0800 (PST) Received: from mail-pb0-f50.google.com (mail-pb0-f50.google.com [209.85.160.50]) by mx.google.com with ESMTPS id vb2si18451763pbc.7.2014.02.18.05.56.04 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 18 Feb 2014 05:56:04 -0800 (PST) Received-SPF: neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of hanjun.guo@linaro.org) client-ip=209.85.160.50; Received: by mail-pb0-f50.google.com with SMTP id rq2so16793572pbb.37 for ; Tue, 18 Feb 2014 05:56:04 -0800 (PST) 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> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: hanjun.guo@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.180 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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,