From patchwork Thu Jul 9 18:04:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ashwin Chaugule X-Patchwork-Id: 50987 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 03B56213FD for ; Thu, 9 Jul 2015 18:05:00 +0000 (UTC) Received: by lagx9 with SMTP id x9sf76849676lag.2 for ; Thu, 09 Jul 2015 11:04:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=iPQAdaQKQEFRsK+BTL9krBQdR/Kg5zYT0mMxTloUMRE=; b=iQY54jzdPEzeMR+0K+ZnrYBf8WfWc2pkB9Ye2riKeztJjomfkQ4xALTrhAFHZrg7Yd EgVlWS0nwb7aPJmI6qL3HOVaAGBTzmYUs9kq64pw17LtwendCP3pgcEr5FRpsWpa0c0J na67AalM6YuKKT2H4TFhpUQELOF6porEboGD1wSl2hzgIIBPSRLXOqS82LL9Vpgxt515 UKsIZ9hB8e884WkEsxWbKxm/5XJ7URT7NxrBFwLfTdeVXxGT0KZhQ3G8qAI1a7KBKv3a gN5ycDAojUZ1+k/sVFghW+SX1ZVOzJf7cBf3vUl4qk2AKnXdmNpFbvUnduaNz+XSCBvt hEZw== X-Gm-Message-State: ALoCoQlEczaEUfGM8tJAWZ7/oq0mH1v7j+UzumFaEw/3bxCgk3OOeR+VwFEf/dxiViAUoQXcoBmO X-Received: by 10.112.122.12 with SMTP id lo12mr8639221lbb.5.1436465098979; Thu, 09 Jul 2015 11:04:58 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.29.36 with SMTP id g4ls1164778lah.33.gmail; Thu, 09 Jul 2015 11:04:58 -0700 (PDT) X-Received: by 10.112.182.99 with SMTP id ed3mr16155611lbc.116.1436465098772; Thu, 09 Jul 2015 11:04:58 -0700 (PDT) Received: from mail-la0-f52.google.com (mail-la0-f52.google.com. [209.85.215.52]) by mx.google.com with ESMTPS id do5si5095432lac.80.2015.07.09.11.04.58 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Jul 2015 11:04:58 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) client-ip=209.85.215.52; Received: by labgy5 with SMTP id gy5so98984638lab.2 for ; Thu, 09 Jul 2015 11:04:58 -0700 (PDT) X-Received: by 10.112.222.133 with SMTP id qm5mr16041825lbc.86.1436465098276; Thu, 09 Jul 2015 11:04:58 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp828674lbb; Thu, 9 Jul 2015 11:04:57 -0700 (PDT) X-Received: by 10.140.150.198 with SMTP id 189mr27933916qhw.88.1436465078584; Thu, 09 Jul 2015 11:04:38 -0700 (PDT) Received: from mail-qk0-f175.google.com (mail-qk0-f175.google.com. [209.85.220.175]) by mx.google.com with ESMTPS id y89si7707450qgd.82.2015.07.09.11.04.38 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Jul 2015 11:04:38 -0700 (PDT) Received-SPF: pass (google.com: domain of ashwin.chaugule@linaro.org designates 209.85.220.175 as permitted sender) client-ip=209.85.220.175; Received: by qkhu186 with SMTP id u186so191377879qkh.0 for ; Thu, 09 Jul 2015 11:04:38 -0700 (PDT) X-Received: by 10.55.20.166 with SMTP id 38mr26758179qku.12.1436465077977; Thu, 09 Jul 2015 11:04:37 -0700 (PDT) Received: from esagroth.qualcomm.com (rrcs-67-52-130-30.west.biz.rr.com. [67.52.130.30]) by smtp.gmail.com with ESMTPSA id x79sm3969918qha.10.2015.07.09.11.04.37 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 09 Jul 2015 11:04:37 -0700 (PDT) From: Ashwin Chaugule To: rjw@rjwysocki.net, jaswinder.singh@linaro.org Cc: linux-pm@vger.kernel.org, linux-acpi@vger.kernel.org, linaro-acpi@lists.linaro.org, patches@linaro.org, viresh.kumar@linaro.org, sudeep.holla@arm.com, Ashwin Chaugule Subject: [PATCH v7 7/8] CPPC: Probe for CPPC tables for each ACPI Processor object Date: Thu, 9 Jul 2015 14:04:23 -0400 Message-Id: X-Mailer: git-send-email 1.9.1 In-Reply-To: References: In-Reply-To: References: X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ashwin.chaugule@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 --- arch/arm64/Kconfig | 1 + drivers/acpi/Kconfig | 2 +- drivers/acpi/processor_driver.c | 4 ++++ include/acpi/processor.h | 9 +++++++++ 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 7796af4..feff114 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -83,6 +83,7 @@ config ARM64 select SPARSE_IRQ select SYSCTL_EXCEPTION_TRACE select HAVE_CONTEXT_TRACKING + select ACPI_CPPC_LIB if ACPI help ARM 64-bit (AArch64) Linux support. diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index 54d73bb..097c02a 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig @@ -198,7 +198,7 @@ config ACPI_CPPC_LIB config ACPI_PROCESSOR tristate "Processor" select CPU_IDLE if ACPI_PROCESSOR_IDLE - 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 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 c071a92..6e53b5e 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_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);