From patchwork Mon May 25 21:51:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ashwin Chaugule X-Patchwork-Id: 48966 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A3C2A2121F for ; Mon, 25 May 2015 21:52:01 +0000 (UTC) Received: by lalw1 with SMTP id w1sf4377699lal.0 for ; Mon, 25 May 2015 14:52:00 -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:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=IQ/Zwip2aLmOsX6q+NolAD6l6n4rllEgBnyw8kqwWAI=; b=etxUOpsoty8aQ/X1mh/5rIDHykP77GGQJJyEt507NCtGmQ3f9o2TxsqexYNBfFb/j7 02Qtxleq6pHlii8KIgQlDGtJ7SodXOFLy4ELqI+HHp9U1R4gLikQ8drS4n6hoKW3PliF aAH7MHi4h+EJLp1DYkblPwYGDoXT9C7prTSYiduTtVVPuCxRYLHhnpZzJNrvvGwF/UKw wfa+AMkVn3HGOmJ5TVF+cR14mbC3eM2Ac2V1XZM7DKT/8PQ6ljZY4ES2I1iEFK6cXdy1 7m2ZpvQzKW1SJaJZQVArNUMKA8hHQwvf5GEPDwWxWTD16AeUHUONeTX2q9gnMZJkL/BG mp1Q== X-Gm-Message-State: ALoCoQmF9I3/jV4/84hzHoL2i6V6GG0QgLgdvUx/7A5rpyu71bZEmhyxXd/3n9P8PGwGIQ19U3jJ X-Received: by 10.112.42.236 with SMTP id r12mr24219054lbl.2.1432590720630; Mon, 25 May 2015 14:52:00 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.29.100 with SMTP id j4ls830631lah.92.gmail; Mon, 25 May 2015 14:52:00 -0700 (PDT) X-Received: by 10.152.43.110 with SMTP id v14mr19613270lal.4.1432590720489; Mon, 25 May 2015 14:52:00 -0700 (PDT) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id e1si7890668lam.23.2015.05.25.14.52.00 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 May 2015 14:52:00 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by lagv1 with SMTP id v1so55705838lag.3 for ; Mon, 25 May 2015 14:52:00 -0700 (PDT) X-Received: by 10.152.44.166 with SMTP id f6mr4674783lam.86.1432590720302; Mon, 25 May 2015 14:52:00 -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 hn6csp2099845lbb; Mon, 25 May 2015 14:51:59 -0700 (PDT) X-Received: by 10.236.70.197 with SMTP id p45mr2502642yhd.21.1432590718974; Mon, 25 May 2015 14:51:58 -0700 (PDT) Received: from mail-yk0-f170.google.com (mail-yk0-f170.google.com. [209.85.160.170]) by mx.google.com with ESMTPS id j187si7056540ykb.82.2015.05.25.14.51.58 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 May 2015 14:51:58 -0700 (PDT) Received-SPF: pass (google.com: domain of ashwin.chaugule@linaro.org designates 209.85.160.170 as permitted sender) client-ip=209.85.160.170; Received: by ykfr66 with SMTP id r66so22905973ykf.0 for ; Mon, 25 May 2015 14:51:58 -0700 (PDT) X-Received: by 10.170.84.215 with SMTP id b206mr24399072yka.21.1432590718366; Mon, 25 May 2015 14:51:58 -0700 (PDT) Received: from esagroth.lan (cpe-174-109-47-171.nc.res.rr.com. [174.109.47.171]) by mx.google.com with ESMTPSA id c23sm9855418yha.45.2015.05.25.14.51.57 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 25 May 2015 14:51:58 -0700 (PDT) From: Ashwin Chaugule To: rjw@rjwysocki.net Cc: linux-pm@vger.kernel.org, linaro-acpi@lists.linaro.org, patches@linaro.org, jaswinder.singh@linaro.org, viresh.kumar@linaro.org, sudeep.holla@arm.com, Ashwin Chaugule Subject: [PATCH v5 5/6] CPPC: Probe for CPPC tables for each ACPI Processor object Date: Mon, 25 May 2015 17:51:51 -0400 Message-Id: <1432590711-9149-1-git-send-email-ashwin.chaugule@linaro.org> X-Mailer: git-send-email 1.9.1 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.43 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 capabilites. Signed-off-by: Ashwin Chaugule --- 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 f61c09b..8554496 100644 --- a/drivers/acpi/processor_driver.c +++ b/drivers/acpi/processor_driver.c @@ -245,6 +245,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 659edd6..0b51117 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h @@ -339,6 +339,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);