From patchwork Mon Jun 15 20:09:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ashwin Chaugule X-Patchwork-Id: 6612121 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 493339F1C1 for ; Mon, 15 Jun 2015 20:09:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 491D220773 for ; Mon, 15 Jun 2015 20:09:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6248F20710 for ; Mon, 15 Jun 2015 20:09:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755876AbbFOUJd (ORCPT ); Mon, 15 Jun 2015 16:09:33 -0400 Received: from mail-pd0-f175.google.com ([209.85.192.175]:34569 "EHLO mail-pd0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755927AbbFOUJb (ORCPT ); Mon, 15 Jun 2015 16:09:31 -0400 Received: by pdbki1 with SMTP id ki1so80102994pdb.1 for ; Mon, 15 Jun 2015 13:09:30 -0700 (PDT) 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:in-reply-to:references; bh=N+nu1TmEaQvXdM+cewax9ewh1sXI9farjJIfN/ZTazQ=; b=VR1YAF9kZK9ml7tNZtFjnHErMMAf812eCVTNyTU649aNEyW/RLMyU4zEr3VWplz7XG kqyewlAmwR+eA+nIoXCMDBaqA9gy4HvrrazyC9KltMA4DoDLxwn/nyDXpuIaRdJtXW7j e5h3/3t4IDqBHB3Uuqa6t9GaFH/iH6/OVEcadDK7uRcv8miNmjWS5QnuXwzxJwMrXlFP XYk6vfgA0vRZbl+EnoP2Zqi4Dgyb2qJIMYOWrBhPd4OuPFrAHsOEVW12SWWIMbh0or42 9KbSy0Y45OUF7UDX8pQtuYMW4ktASKadNYNCLfDIWzgELhnSNfQu3kVRKmINrGCN5EaZ ldMw== X-Gm-Message-State: ALoCoQlO63yfR4RHFdTpTypKnHEbJ7CUHdaDEAHO15luEeArbA1vs30QlH9FgxzrAuJujxd4pN8C X-Received: by 10.69.17.130 with SMTP id ge2mr50832764pbd.75.1434398970890; Mon, 15 Jun 2015 13:09:30 -0700 (PDT) Received: from esagroth.qualcomm.com (rrcs-67-52-130-30.west.biz.rr.com. [67.52.130.30]) by mx.google.com with ESMTPSA id eu5sm13059688pbb.44.2015.06.15.13.09.29 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 15 Jun 2015 13:09:30 -0700 (PDT) From: Ashwin Chaugule To: rjw@rjwysocki.net, jaswinder.singh@linaro.org Cc: linux-pm@vger.kernel.org, linaro-acpi@lists.linaro.org, patches@linaro.org, linux-acpi@vger.kernel.org, viresh.kumar@linaro.org, sudeep.holla@arm.com, Ashwin Chaugule Subject: [PATCH v6 5/7] CPPC: Probe for CPPC tables for each ACPI Processor object Date: Mon, 15 Jun 2015 16:09:09 -0400 Message-Id: <8e45cf0167dadb81e10e4136e33b578b0f6090a6.1434398373.git.ashwin.chaugule@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 For each detected ACPI Processor object (ACPI0007), search its device handle for CPPC specific tables (i.e. _CPC) and extract CPU specific performance capabilities. Signed-off-by: Ashwin Chaugule Reviewed-by: Al Stone --- drivers/acpi/Kconfig | 2 +- drivers/acpi/processor_driver.c | 4 ++++ include/acpi/processor.h | 9 +++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index 937c7f0..a600192 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig @@ -209,7 +209,7 @@ config ACPI_CPPC config ACPI_PROCESSOR tristate "Processor" - depends on X86 || IA64 + depends on X86 || IA64 || ARM64 default y help This driver adds support for the ACPI Processor package. It is required diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c index 64aa638..ea9c93b 100644 --- a/drivers/acpi/processor_driver.c +++ b/drivers/acpi/processor_driver.c @@ -246,6 +246,10 @@ static int __acpi_processor_start(struct acpi_device *device) if (pr->flags.need_hotplug_init) return 0; + result = acpi_cppc_processor_probe(pr); + if (result) + return -ENODEV; + if (!cpuidle_get_driver() || cpuidle_get_driver() == &acpi_idle_driver) acpi_processor_power_init(pr); diff --git a/include/acpi/processor.h b/include/acpi/processor.h index b76d05b..c48684b 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h @@ -328,6 +328,15 @@ phys_cpuid_t acpi_get_phys_id(acpi_handle, int type, u32 acpi_id); int acpi_map_cpuid(phys_cpuid_t phys_id, u32 acpi_id); int acpi_get_cpuid(acpi_handle, int type, u32 acpi_id); +#ifdef CONFIG_ACPI_CPPC +extern int acpi_cppc_processor_probe(struct acpi_processor *pr); +#else +static inline int acpi_cppc_processor_probe(struct acpi_processor *pr) +{ + return 0; +} +#endif /* CONFIG_ACPI_CPPC */ + /* in processor_pdc.c */ void acpi_processor_set_pdc(acpi_handle handle);