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: 49936 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 0741C205DE for ; Mon, 15 Jun 2015 20:09:53 +0000 (UTC) Received: by labnp3 with SMTP id np3sf9365001lab.1 for ; Mon, 15 Jun 2015 13:09:52 -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=N+nu1TmEaQvXdM+cewax9ewh1sXI9farjJIfN/ZTazQ=; b=SFihHMDidXA59BOOSUCdss/h1E9yn7VVdGKYoN40xtlIvuk/Qawr/QmMELXbyf69Z2 5uljwWnONasQ1cBj8HIfAZpBss2SPPyDyqwqgKdrOcWtOfA9AgIEba3FXGNoLyQoN32H NBs+8sivNEDMdO13WGQFEAZ8U5051U0QIS4lkWEHASNg/HkOHjC+hodepA0QV+zCG7lQ oaEK0xSOlrNnS6KMn61wZaQcXuA8jZG5WqjaTtIVRjkqWLsPFpxQAMqIWop2J5hWO60F puJLkTmywr40b1dDbFiNeCJm4OXQi49TqyMvy0kgp71JCyBOEDj7X3EwPfsyshicR+Nk JyEQ== X-Gm-Message-State: ALoCoQlnB0DNlAD8UmI8/8lNBGF0UTbkvz3E1Jt2vVBBg07udcdXSMOg5eG8+ECLPulR4kGDHWn8 X-Received: by 10.152.116.66 with SMTP id ju2mr9168090lab.7.1434398991914; Mon, 15 Jun 2015 13:09:51 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.225.167 with SMTP id rl7ls942432lac.74.gmail; Mon, 15 Jun 2015 13:09:51 -0700 (PDT) X-Received: by 10.112.166.132 with SMTP id zg4mr1790472lbb.3.1434398991762; Mon, 15 Jun 2015 13:09:51 -0700 (PDT) Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com. [209.85.217.181]) by mx.google.com with ESMTPS id mj2si11299280lbc.68.2015.06.15.13.09.51 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Jun 2015 13:09:51 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.181 as permitted sender) client-ip=209.85.217.181; Received: by lblr1 with SMTP id r1so34065079lbl.0 for ; Mon, 15 Jun 2015 13:09:51 -0700 (PDT) X-Received: by 10.152.225.166 with SMTP id rl6mr28703898lac.36.1434398991673; Mon, 15 Jun 2015 13:09:51 -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 hn6csp1648624lbb; Mon, 15 Jun 2015 13:09:50 -0700 (PDT) X-Received: by 10.70.29.164 with SMTP id l4mr3317704pdh.32.1434398971870; Mon, 15 Jun 2015 13:09:31 -0700 (PDT) Received: from mail-pd0-f172.google.com (mail-pd0-f172.google.com. [209.85.192.172]) by mx.google.com with ESMTPS id sk5si2050536pac.9.2015.06.15.13.09.30 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Jun 2015 13:09:31 -0700 (PDT) Received-SPF: pass (google.com: domain of ashwin.chaugule@linaro.org designates 209.85.192.172 as permitted sender) client-ip=209.85.192.172; Received: by pdjm12 with SMTP id m12so79949455pdj.3 for ; Mon, 15 Jun 2015 13:09:30 -0700 (PDT) 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: 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.217.181 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 --- 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);