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: 51951 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by patches.linaro.org (Postfix) with ESMTPS id 788FE22E92 for ; Wed, 5 Aug 2015 13:41:25 +0000 (UTC) Received: by lbcjj5 with SMTP id jj5sf13446331lbc.1 for ; Wed, 05 Aug 2015 06:41:24 -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=iMz+ltVM++3g3DJMyCuCjv/VjB7lf+HsgyATRidb5NY=; b=C883XHvZt+zxiKe6rFOVoZlIn/ygTejiJjihjxgMmGoLS1Cblu9XjYcwQg0A1j5bpN uMjThNcE/7c+wVEhVNIfubKW857GRNBngDBtCClqjl1SuzxkN+yltn5yj5/MH7biYiVt 8/U8mLX9gePJAKq8vJs5QVvDQK+o6EaRihFX9z6OD30AvPJ+sbcH5UqWpQP06Q0y+eol JlFwj4dfe2RtOc9dIZ1iLjFAA4/o8POsNDNb6DBgRbxPWJCTgMaWEAjgrsyQeRk0omih H7V3sh6mPvEAZTj5m1kb53qdPhVzy+/YMkSsv25E2bo8Zh9YuBpLLD0WM5hXpzJqzryQ gJFQ== X-Gm-Message-State: ALoCoQnwqQabkcvnXxH/9O0f/F2OV9RUWW/w+3nUo+GA5Iurv0w1Jt3swhd7+Qp/4ZsvU3YQRje4 X-Received: by 10.152.28.100 with SMTP id a4mr2775175lah.4.1438782084484; Wed, 05 Aug 2015 06:41:24 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.18.227 with SMTP id z3ls169492lad.97.gmail; Wed, 05 Aug 2015 06:41:24 -0700 (PDT) X-Received: by 10.112.160.42 with SMTP id xh10mr9320114lbb.88.1438782084326; Wed, 05 Aug 2015 06:41:24 -0700 (PDT) Received: from mail-lb0-f178.google.com (mail-lb0-f178.google.com. [209.85.217.178]) by mx.google.com with ESMTPS id jv4si2182942lab.101.2015.08.05.06.41.24 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Aug 2015 06:41:24 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) client-ip=209.85.217.178; Received: by lbbud7 with SMTP id ud7so24638767lbb.3 for ; Wed, 05 Aug 2015 06:41:24 -0700 (PDT) X-Received: by 10.112.131.98 with SMTP id ol2mr9525364lbb.56.1438782084217; Wed, 05 Aug 2015 06:41:24 -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.7.198 with SMTP id l6csp380567lba; Wed, 5 Aug 2015 06:41:23 -0700 (PDT) X-Received: by 10.129.90.136 with SMTP id o130mr8859053ywb.21.1438782064098; Wed, 05 Aug 2015 06:41:04 -0700 (PDT) Received: from mail-yk0-f176.google.com (mail-yk0-f176.google.com. [209.85.160.176]) by mx.google.com with ESMTPS id c188si1764224ykb.122.2015.08.05.06.41.03 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Aug 2015 06:41:04 -0700 (PDT) Received-SPF: pass (google.com: domain of ashwin.chaugule@linaro.org designates 209.85.160.176 as permitted sender) client-ip=209.85.160.176; Received: by ykeo23 with SMTP id o23so35161371yke.3 for ; Wed, 05 Aug 2015 06:41:03 -0700 (PDT) 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: 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.178 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/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);