From patchwork Wed Aug 5 13:40:30 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ashwin Chaugule X-Patchwork-Id: 6949511 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 E25D09F39D for ; Wed, 5 Aug 2015 13:41:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 19C162041F for ; Wed, 5 Aug 2015 13:41:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7014520430 for ; Wed, 5 Aug 2015 13:41:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753320AbbHENlH (ORCPT ); Wed, 5 Aug 2015 09:41:07 -0400 Received: from mail-yk0-f178.google.com ([209.85.160.178]:34093 "EHLO mail-yk0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753217AbbHENlE (ORCPT ); Wed, 5 Aug 2015 09:41:04 -0400 Received: by ykax123 with SMTP id x123so35454333yka.1 for ; Wed, 05 Aug 2015 06:41:03 -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=iMz+ltVM++3g3DJMyCuCjv/VjB7lf+HsgyATRidb5NY=; b=cediBRdLzt5zSRczC06GQLYhFyvmMMkZB6pQC2xLZnHLU805ov4mVM2wzVDrPGO+zQ wXdCXmtpXtJc5O1O+/G2qAazQIeVdVmY1Fjfpk0SWnmjYdt00+XjnQ+ULNcRICAs/AZz BvLSCLQQQaqpoKwNr8fAM63Xgcni4VhJ/2wA4tqJI6f03QbPv2i2gM6xE6rFVPLh9D3Z pBIcdaX9COZqAIQkFReZPX6Txu5Pt9Ra6vd95T7PJXhC2yh2Fq/0H3hIBHCYukJdyOH+ oxfb+XaDDLfH+umVBP2BWyolZVmCZaP7FtWsXCeik4cDyR3xGx1zUli0GBew9ad4dDlH 03Lg== X-Gm-Message-State: ALoCoQl108GKBPzIhUtSHNm2Kxb44PQaV9g13Bz6c6Gj2dNIKufqyWJhjyXP+npCrc8EbX7NZRbi X-Received: by 10.129.86.139 with SMTP id k133mr9563101ywb.53.1438782063318; Wed, 05 Aug 2015 06:41:03 -0700 (PDT) Received: from esagroth.lan ([98.122.160.202]) by smtp.gmail.com with ESMTPSA id g187sm2768031ywf.35.2015.08.05.06.41.01 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 05 Aug 2015 06:41:02 -0700 (PDT) From: Ashwin Chaugule To: rjw@rjwysocki.net, jaswinder.singh@linaro.org Cc: sudeep.holla@arm.com, linux-pm@vger.kernel.org, linux-acpi@vger.kernel.org, linaro-acpi@lists.linaro.org, patches@linaro.org, viresh.kumar@linaro.org, rwells@codeaurora.org, Ashwin Chaugule Subject: [PATCH v8 7/9] CPPC: Probe for CPPC tables for each ACPI Processor object Date: Wed, 5 Aug 2015 09:40:30 -0400 Message-Id: <59f5258b52b485aedba4d6b2f4dc2954ce767ce0.1438781668.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.0 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/processor_driver.c | 4 ++++ include/acpi/processor.h | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c index 16d44ad..ac3dd51 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 2c4e7a9..9b3977f 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h @@ -314,6 +314,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_LIB +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_LIB */ + /* in processor_pdc.c */ void acpi_processor_set_pdc(acpi_handle handle);