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: 6949501 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4C0F6C05AC for ; Wed, 5 Aug 2015 13:41:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6DA592042A for ; Wed, 5 Aug 2015 13:41:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7C1B4203E3 for ; Wed, 5 Aug 2015 13:41:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753329AbbHENlH (ORCPT ); Wed, 5 Aug 2015 09:41:07 -0400 Received: from mail-yk0-f179.google.com ([209.85.160.179]:35735 "EHLO mail-yk0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752269AbbHENlD (ORCPT ); Wed, 5 Aug 2015 09:41:03 -0400 Received: by ykcq64 with SMTP id q64so30376761ykc.2 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=l5BUQzlOPHdLnKYjBrIVQ/ZJW7C6ipfE9YLqnw9W6K69UG18ZK339Pg6o7XdRTYWJp xW6crb/oIWafHlEEyfqX8oOUlXYg0YK0V/wLkB8C9RruaPzK3OJBRjE18lNczUUFpuEA kbTbPSDKH8QtNOITK4lrjUbmo/NciwVDQTfFIHTe2YFGZ1j9JFtIZSStFqZ1X+WYSsi1 jIKoS9FPhswMxuBlx5iLN1nxmGurh5n9HSotm7f0yyF/1sS+6umZ+3NtgHpNKLfvXdt7 UJeG/x8zZTWHmDNzFtRnXN8OEJfGrCv73m+3Yn57pwLosle9nAvr6ltVbAh/m0bdybCc D5nA== X-Gm-Message-State: ALoCoQmJpLwlWT8FlC6TcQUAU4+DpFKu6g0+e1oLJyBKRm/tw2U1OO1mgPqrHeKgspgjZNAxtiRH 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-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@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);