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: 24399 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f71.google.com (mail-qa0-f71.google.com [209.85.216.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2E5DA202B2 for ; Mon, 10 Feb 2014 07:49:59 +0000 (UTC) Received: by mail-qa0-f71.google.com with SMTP id j5sf12820922qaq.10 for ; Sun, 09 Feb 2014 23:49:58 -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=TQwVmMyKtNwrU0kaE40V5D5NrM6wmzWChDUTt3+r/Lw=; b=eR+B5DZMa8gdHrDsomzoQncUJNUNCd4q424J690fcAxiC2Whwab8ZG4led4UyxW46h BtXJ/L5Epl5oO96w475H4KzY/Hm/b1g4tj7O4EqsgbIwBpzS8hX21RNvoh1At++WZxOB fUZCtgABZrd90nQv39Rr+2IEDTLuzeQB44gUBXhdX3SsK4g+h/9XxnTw03JfxhJL58cx QAstmX4Uw1AQTfeCPbVMce3A0ydnhKoKD+hawB5OiGO+Jyjyu8TeIOXTQhgtalLsDvP+ fI4gk7pnoTIgNAD/5wjFUPWjmQc4l026gBQGA5GpQUEqQ3/mv4MyZyvOGm+w5YFwTfRT Dd6Q== X-Gm-Message-State: ALoCoQk+jLN3NlCOXiR2mtyZZHGGwDgaLgnxVfzffvVmHV1w19dUPO96D9jur8AbH8rnlpgfQSc4 X-Received: by 10.58.46.204 with SMTP id x12mr10310593vem.19.1392018598257; Sun, 09 Feb 2014 23:49:58 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.88.203 with SMTP id t69ls1926190qgd.87.gmail; Sun, 09 Feb 2014 23:49:58 -0800 (PST) X-Received: by 10.58.49.129 with SMTP id u1mr23215919ven.0.1392018598180; Sun, 09 Feb 2014 23:49:58 -0800 (PST) Received: from mail-ve0-f171.google.com (mail-ve0-f171.google.com [209.85.128.171]) by mx.google.com with ESMTPS id tt2si4545217vdc.126.2014.02.09.23.49.58 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 09 Feb 2014 23:49:58 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.171 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.171; Received: by mail-ve0-f171.google.com with SMTP id pa12so4763227veb.30 for ; Sun, 09 Feb 2014 23:49:58 -0800 (PST) X-Received: by 10.52.171.68 with SMTP id as4mr19043972vdc.0.1392018598104; Sun, 09 Feb 2014 23:49:58 -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 u4csp148658vcz; Sun, 9 Feb 2014 23:49:57 -0800 (PST) X-Received: by 10.68.190.169 with SMTP id gr9mr36044655pbc.30.1392018597163; Sun, 09 Feb 2014 23:49:57 -0800 (PST) Received: from mail-pd0-f170.google.com (mail-pd0-f170.google.com [209.85.192.170]) by mx.google.com with ESMTPS id to9si14309655pbc.275.2014.02.09.23.49.56 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 09 Feb 2014 23:49:57 -0800 (PST) Received-SPF: neutral (google.com: 209.85.192.170 is neither permitted nor denied by best guess record for domain of hanjun.guo@linaro.org) client-ip=209.85.192.170; Received: by mail-pd0-f170.google.com with SMTP id p10so5782308pdj.15 for ; Sun, 09 Feb 2014 23:49:56 -0800 (PST) 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" 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 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-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.171 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. 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,