From patchwork Thu Jan 18 08:51:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akshu Agrawal X-Patchwork-Id: 10172519 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5A27D60230 for ; Thu, 18 Jan 2018 09:02:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 47C6A2434C for ; Thu, 18 Jan 2018 09:02:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 39B6925D9E; Thu, 18 Jan 2018 09:02:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3E30D2434C for ; Thu, 18 Jan 2018 09:02:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750910AbeARJCH (ORCPT ); Thu, 18 Jan 2018 04:02:07 -0500 Received: from mail-by2nam01on0068.outbound.protection.outlook.com ([104.47.34.68]:49647 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750724AbeARJCG (ORCPT ); Thu, 18 Jan 2018 04:02:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=VPMXLhWVYAYFuSMsxwqR61q34KdYVl7gK4sPUeOJngg=; b=mMpu7BL7Bn6YoouUF90Bq+7s+nkHn7b/wS5zdBG1fwq2fhUWRsp8FVafhNDDG55WApBDwXtMw6yD0HTbKrm+PbUgc7Pz2o8bXBIUFLTv0f+Whp3AOSdIWrMt4caBNgmcfh5/W0dm2exiJ5RZN3i1/6v3egaaCKa9cbrVGKOoCH4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Akshu.Agrawal@amd.com; Received: from akshu-HP-EliteBook-745-G2.amd.com (202.56.249.162) by CY4PR1201MB0184.namprd12.prod.outlook.com (10.172.78.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.407.7; Thu, 18 Jan 2018 09:02:02 +0000 From: Akshu Agrawal To: rjw@rjwysocki.net Cc: linux-pm@vger.kernel.org, viresh.kumar@linaro.org, satyajit.sahu@amd.com Subject: [PATCH] cpufreq: AMD: Ignore the check for ProcFeedback in ST/CZ Date: Thu, 18 Jan 2018 14:21:28 +0530 Message-Id: <1516265488-31452-1-git-send-email-akshu.agrawal@amd.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [202.56.249.162] X-ClientProxiedBy: PN1PR01CA0103.INDPRD01.PROD.OUTLOOK.COM (10.174.144.19) To CY4PR1201MB0184.namprd12.prod.outlook.com (10.172.78.141) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c39a371c-82e9-4751-f228-08d55e5224b1 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(48565401081)(2017052603307)(7153060)(7193020); SRVR:CY4PR1201MB0184; X-Microsoft-Exchange-Diagnostics: 1; CY4PR1201MB0184; 3:WCC7S6efN3tL4GjFbeN1ISvRdW7CV7D1FZdUaWEv/20G/hP23e+tZCCZCq77KMLsvyZbO/sTn/fxXce5cztPwwWI8OKyKzYmVjUe5S9PKG2iNJ0EKX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ntMJ1ceOpJasqhIOcgGRXaF3zNFkZsCYLw6X0zJBodne8L/n9hCAwQJASh5DtuJwwuBshhK5hHcEr/BWaloKIFElc2KkzU0Bw8IWyikOnwdAVM0ZCHqMcgjUzmKfFRrcVwgMF4R6igzW1HwW2g0BvzSB/mVkGFYa0Uhe/aarnpnDrZ5DF7Yim5C6u/gjUbRr69uPL8kvb1TS9ozYO7CYk/e92/rCcFddKLeotxFuuLigqxmKNARbdsToBL; 4:SfupH3rM120+B8trRGD4d73/BpHoz1Pkmdwcb6hpMo2cQcXSgFP3Cuph3LMKVz3Ph0idA6FgMqfmv/IGezBXtBp6HsSBh1WJE8Zlg7i91ZcdJJmJhhhjE7Ckkaxnvy1oshIaAl1tlZ8wJFMiknwZ/Ckl6kF7nVbap5T0SL83WvpLjwPhmCG37+teKLdbfuJwVOWv8jaJFdPTRzONPm0NSdKZpn+RftBn+GJKI7VhwALMgvt9mogOJl9XjOp0NZ5QRrRH+O2SFjt9CLAcyX7+uPzZ3DXhDs8uMNhgqLIJSv+ZNg1HvQjlaRYyNCsU39EV X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231023)(2400059)(944501161)(3002001)(10201501046)(6055026)(6041268)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(6072148)(201708071742011); SRVR:CY4PR1201MB0184; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:CY4PR1201MB0184; X-Forefront-PRVS: 05568D1FF7 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39380400002)(366004)(396003)(346002)(376002)(39860400002)(199004)(189003)(6916009)(6666003)(25786009)(4326008)(7696005)(2351001)(2361001)(51416003)(52116002)(47776003)(66066001)(68736007)(105586002)(36756003)(53416004)(3846002)(6116002)(5660300001)(106356001)(16586007)(81166006)(6486002)(316002)(50226002)(81156014)(86362001)(7736002)(50466002)(48376002)(16526018)(97736004)(26005)(478600001)(2906002)(53936002)(8676002)(72206003)(8936002)(386003)(305945005); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR1201MB0184; H:akshu-HP-EliteBook-745-G2.amd.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR1201MB0184; 23:HDy13OAoFHLGrp8NVZEclb9ndtqoL41jgno/0tb?= =?us-ascii?Q?HRg60i+fhfIKOBOGH+flvJXec93VxvT/sC5SFFHCm05rqJqg+wldksBLJOWm?= =?us-ascii?Q?WH66rZ3EwaWF/lIy4dbdSsSjhQ/pyLXb3ACKpBgggQK/fL1cn4NsfuqkgSxJ?= =?us-ascii?Q?iQZmIKIb8t+RXpClFzreR5hRszs+5qbwPAXBbje18AIwOUHjS5a+RtaZ4Wil?= =?us-ascii?Q?Ci/04WVI4t2Irmsv4gRHuet0MgwKImhRgiJl3nEZUylgdwcrsfVyJzpuhloW?= =?us-ascii?Q?018mCKUGEYGHjNRTGLlU6yRr+QcYMNpB5PwOiDAWZmdvQesTAJwzoyj5xQhj?= =?us-ascii?Q?V3wbnyuPCVsnTdMVmpnZTr9T/GI6SCTcxplMih4h0q3tEO0oB2Y0Ynh3cPYc?= =?us-ascii?Q?hU8zBJKd9OyITh5U4BOvYjFdGAKAChlm1xMHr+eYG3B2vcgw02zD3A5kp490?= =?us-ascii?Q?i++kLzxdn8ltmw//W7ZsXTbtRRyfDseEHV0SvME95/M5Ly9Ent4GfGuohPgT?= =?us-ascii?Q?Mz0prMcoKeoqaPfR2/VVQ3kyDwo8OCQZgQCe+N5qWyIJ+1dYkEdo1NlnBgV4?= =?us-ascii?Q?2YZ96Zc+msGJFqwOwXsiTLUcMkDvFvlaYU0fyMWaRUaW5KpczCec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jjPANgB/3sd6ULiulkH8pmNkVhr4MwpqtGIqR60uWzV5TUSjR7+E8IhSyCDT7L0UFGnKUoqxIyP2P/cM66+Krc6YAXl6zTEU=; 24:5yVgx8sV3i24BX5VTDemiDGGV73WD8otIVJxNFjig6ZKC55dergHO5DYktRMkyYEiZMN1Tz7CC640zeq2CxL5ogziFUZEtJ1+2znScV2rGQ=; 7:zZKFHCv+R0XBSQPDJCFdDLsyey+XBj3YxJ2aWa4I2eWJ2TgbDEhQgbn5obvcMJl3RxKTQYgY0gLbYsqNlIZpnN/xjcTyPBVFgcuR6W3iNnXmVM8Eq+Svc8mFa3Ej7Wg9IGhp7aeqx7TeWEbzW8UiNRcEWhGpqQG6xZrhwHeFrtCB3obvRGT+VK0Gkl7dxPbQgjpWdVypZoCVFY0mke+ll7oN/dV+Sz4ydd8c+5WwmDYeNJB/Nz0MlASXvBdny/XM SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY4PR1201MB0184; 20:81kjDzBaHYRLuQerKFYs/mFVHjPp2DTyjMbTLi3JDaGpjkECpoBZ2pOJOe9NnYVSI1bH6lgWww/U39kWrlkxmPCWPYk/yYW5XMCyxUGyOocN5NptvY8CjvltjU6PUQbtnZoN6EUW5/TkxbSJ6WHVNu/Ppfb/rqmKBzPdrIlkBJar4ptP0pogte868K4pZ6m8PZUerwaZObibxAwgl7u0OySKCnQjrGrNIS9OHEsAjq1oVQe3Lwzp3hZTFHoO0+qq X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2018 09:02:02.1732 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c39a371c-82e9-4751-f228-08d55e5224b1 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1201MB0184 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In ST/CZ CPUID 8000_0007_EDX[11, ProcFeedbackInterface] is 0, but the mechanism is still available and can be used. Change-Id: I5751d92c628da9ad4e15ec34079090c4315d4f2a Signed-off-by: Akshu Agrawal Acked-by: Viresh Kumar --- drivers/cpufreq/amd_freq_sensitivity.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/cpufreq/amd_freq_sensitivity.c b/drivers/cpufreq/amd_freq_sensitivity.c index 042023bbbf62..be926d9a66e5 100644 --- a/drivers/cpufreq/amd_freq_sensitivity.c +++ b/drivers/cpufreq/amd_freq_sensitivity.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -109,12 +110,18 @@ static unsigned int amd_powersave_bias_target(struct cpufreq_policy *policy, static int __init amd_freq_sensitivity_init(void) { u64 val; + struct pci_dev *pcidev; if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD) return -ENODEV; - if (!static_cpu_has(X86_FEATURE_PROC_FEEDBACK)) - return -ENODEV; + pcidev = pci_get_device(PCI_VENDOR_ID_AMD, + PCI_DEVICE_ID_AMD_KERNCZ_SMBUS, NULL); + + if (!pcidev) { + if (!static_cpu_has(X86_FEATURE_PROC_FEEDBACK)) + return -ENODEV; + } if (rdmsrl_safe(MSR_AMD64_FREQ_SENSITIVITY_ACTUAL, &val)) return -ENODEV;