From patchwork Tue Dec 3 16:36:48 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 21978 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f199.google.com (mail-qc0-f199.google.com [209.85.216.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2C334202AE for ; Tue, 3 Dec 2013 16:38:20 +0000 (UTC) Received: by mail-qc0-f199.google.com with SMTP id i17sf4838156qcy.2 for ; Tue, 03 Dec 2013 08:38:20 -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=Lxqx9WWevPwxALnhu3fpkVhcjsSHhEL1uOG1H7eer84=; b=WQh/mwfDITwCF9yujs82G2XrMJ6tvsOfP/EZD8L/iPDvFR5LNXxuB9oEgou2dDAS1u vX2xzRoLbVR5cXV8C+uD/l2YwHwbQAg6QAyaclcy3k1u0g0hCPJt2MiMTy0lKMVo75FB daCBY18buRm48dz0vUJociUOqZDAXBqszShWqZhR0tfur8pLmVFjpHafksWTKrGUS61o 3wgEbxXsQZXcQunvKqyHLqTPGrVwiSmZqOMhhRVmct2kqhfTbE9aTPfkRB+5WcJTSJ2b vWT9QkE3sUQtDSdWyPzmFkXD+2ppzhQ/4LsorLIrjODliCbs+qlBYns0QGh8q7okzbdM Rkrg== X-Gm-Message-State: ALoCoQlDcOgkOV3f2fpXDvnM43H7O8jGchfXyjyQ+GvzusPmjFsVPrla6iURs/iDmZp9o442N607 X-Received: by 10.224.151.71 with SMTP id b7mr6081076qaw.5.1386088699946; Tue, 03 Dec 2013 08:38:19 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.50.196 with SMTP id e4ls5374865qeo.3.gmail; Tue, 03 Dec 2013 08:38:19 -0800 (PST) X-Received: by 10.52.171.79 with SMTP id as15mr47646811vdc.1.1386088699822; Tue, 03 Dec 2013 08:38:19 -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 ip2si31561907vcb.116.2013.12.03.08.38.19 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 03 Dec 2013 08:38:19 -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 oy12so10325208veb.26 for ; Tue, 03 Dec 2013 08:38:19 -0800 (PST) X-Received: by 10.52.111.200 with SMTP id ik8mr13112255vdb.2.1386088699618; Tue, 03 Dec 2013 08:38:19 -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 u4csp222424vcz; Tue, 3 Dec 2013 08:38:19 -0800 (PST) X-Received: by 10.66.14.41 with SMTP id m9mr56253595pac.123.1386088698641; Tue, 03 Dec 2013 08:38:18 -0800 (PST) Received: from mail-pb0-f48.google.com (mail-pb0-f48.google.com [209.85.160.48]) by mx.google.com with ESMTPS id d5si24105883pac.57.2013.12.03.08.38.18 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 03 Dec 2013 08:38:18 -0800 (PST) Received-SPF: neutral (google.com: 209.85.160.48 is neither permitted nor denied by best guess record for domain of hanjun.guo@linaro.org) client-ip=209.85.160.48; Received: by mail-pb0-f48.google.com with SMTP id md12so21144957pbc.7 for ; Tue, 03 Dec 2013 08:38:18 -0800 (PST) X-Received: by 10.68.219.167 with SMTP id pp7mr39744129pbc.125.1386088698181; Tue, 03 Dec 2013 08:38:18 -0800 (PST) Received: from localhost ([61.148.199.138]) by mx.google.com with ESMTPSA id de1sm131178163pbc.7.2013.12.03.08.38.09 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 03 Dec 2013 08:38:17 -0800 (PST) From: Hanjun Guo To: "Rafael J. Wysocki" , Catalin Marinas , Will Deacon , Russell King - ARM Linux , Daniel Lezcano Cc: linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Grant Likely , Matthew Garrett , Olof Johansson , Linus Walleij , Bjorn Helgaas , Rob Herring , Mark Rutland , Jon Masters , patches@linaro.org, linux-kernel@vger.kernel.org, linaro-kernel@lists.linaro.org, linaro-acpi@lists.linaro.org, Hanjun Guo , Al Stone , Graeme Gregory Subject: [RFC part1 PATCH 4/7] ARM64 / ACPI: Introduce the skeleton of _PDC related for ARM64 Date: Wed, 4 Dec 2013 00:36:48 +0800 Message-Id: <1386088611-2801-5-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1386088611-2801-1-git-send-email-hanjun.guo@linaro.org> References: <1386088611-2801-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: , The _PDC (Processor Driver Capabilities) object provides OSPM a mechanism to convey to the platform the capabilities supported by OSPM for processor power management. OSPM evaluates _PDC prior to evaluating any other processor power management objects returning configuration information. This patch introduces the skeleton of _PDC related file to make ACPI core can be compiled on ARM64. Signed-off-by: Al Stone Signed-off-by: Graeme Gregory Signed-off-by: Hanjun Guo --- arch/arm64/include/asm/acpi.h | 32 ++++++++++++++++++++++++++++++++ arch/arm64/include/asm/processor.h | 11 +++++++++++ arch/arm64/kernel/process.c | 5 +++++ 3 files changed, 48 insertions(+) create mode 100644 arch/arm64/include/asm/acpi.h diff --git a/arch/arm64/include/asm/acpi.h b/arch/arm64/include/asm/acpi.h new file mode 100644 index 0000000..c186f5b --- /dev/null +++ b/arch/arm64/include/asm/acpi.h @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2013, Al Stone + * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + */ + +#ifndef _ASM_ARM_ACPI_H +#define _ASM_ARM_ACPI_H + +static inline bool arch_has_acpi_pdc(void) +{ + return false; /* always false for now */ +} + +static inline void arch_acpi_set_pdc_bits(u32 *buf) +{ + return; +} + +#endif /*_ASM_ARM_ACPI_H*/ diff --git a/arch/arm64/include/asm/processor.h b/arch/arm64/include/asm/processor.h index 45b20cd..73b1d3a 100644 --- a/arch/arm64/include/asm/processor.h +++ b/arch/arm64/include/asm/processor.h @@ -162,6 +162,17 @@ static inline void spin_lock_prefetch(const void *x) #define HAVE_ARCH_PICK_MMAP_LAYOUT +#ifdef CONFIG_ACPI +/* + * FIXME: there is no MWAIT on ARM, should be WFI or something else, + * and modify drivers/acpi/processor_core.c too. + */ +enum idle_boot_override { IDLE_NO_OVERRIDE = 0, IDLE_HALT, IDLE_NOMWAIT, + IDLE_POLL, IDLE_FORCE_MWAIT }; + +extern unsigned long boot_option_idle_override; +#endif + #endif #endif /* __ASM_PROCESSOR_H */ diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c index de17c89..2cd4182 100644 --- a/arch/arm64/kernel/process.c +++ b/arch/arm64/kernel/process.c @@ -347,3 +347,8 @@ unsigned long randomize_et_dyn(unsigned long base) { return randomize_base(base); } + +#ifdef CONFIG_ACPI +unsigned long boot_option_idle_override = IDLE_NO_OVERRIDE; +EXPORT_SYMBOL(boot_option_idle_override); +#endif