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: 3277601 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 246879F380 for ; Tue, 3 Dec 2013 16:40:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 792C120386 for ; Tue, 3 Dec 2013 16:40:43 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2C31B2037D for ; Tue, 3 Dec 2013 16:40:42 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vnt0C-00058T-U6; Tue, 03 Dec 2013 16:39:14 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vnszj-0000tw-41; Tue, 03 Dec 2013 16:38:43 +0000 Received: from mail-pb0-f42.google.com ([209.85.160.42]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vnszf-0000r3-TR for linux-arm-kernel@lists.infradead.org; Tue, 03 Dec 2013 16:38:40 +0000 Received: by mail-pb0-f42.google.com with SMTP id uo5so21571520pbc.1 for ; Tue, 03 Dec 2013 08:38:18 -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=Lxqx9WWevPwxALnhu3fpkVhcjsSHhEL1uOG1H7eer84=; b=OUB9gMOz0qe7GchsMGglNc4GqAFcXj/Ss7Uf6g9OAuUhp6DQeARWAZjXS1Bony+B2o +UxXOPpPfVdG5Umivu9V0q2RpfhnUk1RfktDoWPEHEHHRqDPMyuBg71NUw3XQ/0MlCvq WlcOcdeXSUN9//cKyt4DusJkip+sqjvR1X71veZuXp6YPFUlJF9iRrmYsvOXUrbeM4MV gKOk8fE7K85KWVoWXI1ket7pt9mGE9HI2AdE+4oaFuVsVXD7YlC3weElhLlH88GO+XRY jxD9jXa8YZ4AHec1aECQBkSr7IlzaI4BT0/znjkqpOaasMnWAWDp0QN0YZzTSKGFFG0f e51Q== X-Gm-Message-State: ALoCoQkoE9J5wNBE5MbhP26rjcp9uqyJacQYdzRCWUExeu03VSOfKmzLzVbxFPPH5Jf6Sh81kA27 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 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131203_113840_060755_83033B5D X-CRM114-Status: GOOD ( 16.77 ) X-Spam-Score: -2.6 (--) Cc: Mark Rutland , Matthew Garrett , linaro-kernel@lists.linaro.org, Graeme Gregory , Al Stone , patches@linaro.org, Linus Walleij , Olof Johansson , linux-kernel@vger.kernel.org, Rob Herring , linaro-acpi@lists.linaro.org, linux-acpi@vger.kernel.org, Jon Masters , Grant Likely , Bjorn Helgaas , linux-arm-kernel@lists.infradead.org, Hanjun Guo X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 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