From patchwork Tue Feb 18 16:23:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 24902 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f70.google.com (mail-qa0-f70.google.com [209.85.216.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2EE84202B2 for ; Tue, 18 Feb 2014 16:24:43 +0000 (UTC) Received: by mail-qa0-f70.google.com with SMTP id m5sf13531470qaj.1 for ; Tue, 18 Feb 2014 08:24:42 -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=gCdItZNZbN7skVRmzvRfCgiBfGH19Nwd7bbYh9vcVIM=; b=F8S9kIk305WZDpNbAwqonJkmzw5j66RXFWynBEX04/EwJs1ZaSTS/+eU78tigdwkEk SitDxfqMrY0EP1nZeYCd/Lb/YMcJBmSCH49QYBzBcE9tbF+AV+f4EI4uWmQCJogsEMVy b+unypIZxf3DVgUCtXX0XiZL99ClYdVMS8DH5e9J+0jjB8oFfMAmZREi1bOlhcwEcFte k+IzTfD3wJkNspByEj5IJQ7CTz1OWPXY/Mls5EXcGnWL9ye+buEOuKn1hNn+D0JeV1N3 zWQ07f93MGMjX9SOHZNeta/SsVfXumADLGVSH5u/roeM1Q3q9nZtu0REKozcPkKcFFQT pXIA== X-Gm-Message-State: ALoCoQlkqUh5rWKnF4ZgWcKRZIYgPaMU0RvUUZUb7oZvE9rEFDwI+ymgbzjARq0GjP1dRJZq655Y X-Received: by 10.236.18.196 with SMTP id l44mr11798793yhl.52.1392740682867; Tue, 18 Feb 2014 08:24:42 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.88.203 with SMTP id t69ls1379372qgd.87.gmail; Tue, 18 Feb 2014 08:24:42 -0800 (PST) X-Received: by 10.220.92.135 with SMTP id r7mr21818335vcm.11.1392740682768; Tue, 18 Feb 2014 08:24:42 -0800 (PST) Received: from mail-ve0-f181.google.com (mail-ve0-f181.google.com [209.85.128.181]) by mx.google.com with ESMTPS id b20si1440064veu.144.2014.02.18.08.24.42 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 18 Feb 2014 08:24:42 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.181 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.181; Received: by mail-ve0-f181.google.com with SMTP id cz12so13438523veb.26 for ; Tue, 18 Feb 2014 08:24:42 -0800 (PST) X-Received: by 10.52.117.115 with SMTP id kd19mr18190261vdb.15.1392740682693; Tue, 18 Feb 2014 08:24:42 -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 u4csp229240vcz; Tue, 18 Feb 2014 08:24:42 -0800 (PST) X-Received: by 10.67.1.69 with SMTP id be5mr4141087pad.103.1392740681585; Tue, 18 Feb 2014 08:24:41 -0800 (PST) Received: from mail-pd0-f178.google.com (mail-pd0-f178.google.com [209.85.192.178]) by mx.google.com with ESMTPS id sz7si18812658pab.203.2014.02.18.08.24.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 18 Feb 2014 08:24:41 -0800 (PST) Received-SPF: neutral (google.com: 209.85.192.178 is neither permitted nor denied by best guess record for domain of hanjun.guo@linaro.org) client-ip=209.85.192.178; Received: by mail-pd0-f178.google.com with SMTP id fp1so7738874pdb.37 for ; Tue, 18 Feb 2014 08:24:41 -0800 (PST) X-Received: by 10.66.250.202 with SMTP id ze10mr11150343pac.153.1392740681146; Tue, 18 Feb 2014 08:24:41 -0800 (PST) Received: from localhost ([39.181.46.96]) by mx.google.com with ESMTPSA id yh4sm29595579pbb.19.2014.02.18.08.24.37 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 18 Feb 2014 08:24:40 -0800 (PST) From: Hanjun Guo To: "Rafael J. Wysocki" Cc: Lan Tianyu , Joe Perches , 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 v5 1/5] ACPI / idle: Make idle_boot_override depend on x86 and ia64 Date: Wed, 19 Feb 2014 00:23:54 +0800 Message-Id: <1392740638-2479-2-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1392740638-2479-1-git-send-email-hanjun.guo@linaro.org> References: <1392740638-2479-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.181 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..4d91b32 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,