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: 6612131 Return-Path: X-Original-To: patchwork-linux-pm@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 0D77C9F1C1 for ; Mon, 15 Jun 2015 20:09:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2611F20768 for ; Mon, 15 Jun 2015 20:09:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 457C520772 for ; Mon, 15 Jun 2015 20:09:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755927AbbFOUJe (ORCPT ); Mon, 15 Jun 2015 16:09:34 -0400 Received: from mail-pa0-f43.google.com ([209.85.220.43]:33683 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755985AbbFOUJb (ORCPT ); Mon, 15 Jun 2015 16:09:31 -0400 Received: by padev16 with SMTP id ev16so72050059pad.0 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=YbAitLmbz9DMEg7YJ1Irq6Nc/XQPiQ1nyPU2GLlfBpFOQ5YJz0KAkf3nOzvQC38JUL EroRxZIffec/S6uuAref1ZTlyi1hPukb8QYXFKqgFKr18Mp/a5unRnsnZMMZ7JjhyMuH miupMMByk3kr0BxQ3Tg8ObWm+4h7R+XIZQzAYeIvsg9BpcY94Vg3UC1xgaxgYQLUSA09 3FTrCRVCKAtoxUxyRInFwcRnzOqtOQNOVEATvUwq2VXn35DIAhloTSuOmJgPkp+O0Ua6 AIUv314SnVCRxqlY9oOrOXONovo/iW8fZU5d1jz1o0BjsRMfXJsxJgU51dIIc4pEiXtL qVkw== X-Gm-Message-State: ALoCoQlelsjRLyE5aQy5e8A4jNC3649Fcnq9Yv06rzjhFwusVLXd9EbI/+2+RNyYjpblokN3yw60 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-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@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=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 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);