From patchwork Thu Jan 18 10:21:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akshu Agrawal X-Patchwork-Id: 10172821 X-Patchwork-Delegate: rjw@sisk.pl 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 135A1602DC for ; Thu, 18 Jan 2018 10:31:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 03197212DB for ; Thu, 18 Jan 2018 10:31:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EA35F2624A; Thu, 18 Jan 2018 10:31:55 +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 6922E212DB for ; Thu, 18 Jan 2018 10:31:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754765AbeARKbx (ORCPT ); Thu, 18 Jan 2018 05:31:53 -0500 Received: from mail-bl2nam02on0069.outbound.protection.outlook.com ([104.47.38.69]:10896 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755461AbeARKbu (ORCPT ); Thu, 18 Jan 2018 05:31:50 -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=+TzKndOiTQ6DWJPgBGgtg+6Paa/oTFNfVluWDMum8V4=; b=GTvMNucqVQMkjOSCoqJvvYpSh+5JWpvMi666ng7tFBrUSp2ydNss1gb0rKCiWoinF5iprpaRAUrF0jpr044tD6dMTyEl8q3fgl0h85MjPZFyAftAThVkLXmvKD4vrd5JXBDd0aH3qY5wU4iC+0oRKPH3Ba7HTuzwbIhpv11lnPg= 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 BN6PR1201MB0177.namprd12.prod.outlook.com (10.174.115.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.428.17; Thu, 18 Jan 2018 10:31:46 +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 15:51:30 +0530 Message-Id: <1516270890-1224-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: MAXPR0101CA0047.INDPRD01.PROD.OUTLOOK.COM (10.174.62.161) To BN6PR1201MB0177.namprd12.prod.outlook.com (10.174.115.9) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bc2a74de-8d0e-4e6a-9a5e-08d55e5eadae X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(48565401081)(2017052603307)(7153060)(7193020); SRVR:BN6PR1201MB0177; X-Microsoft-Exchange-Diagnostics: 1; BN6PR1201MB0177; 3:op0wENCwFyaLHIwnqey97Yl0PkXubBOc4pjwDih4Hp/1qDyS5VSnXAnAdu9wMKHaNGq7cY4pYlEtWpLK/5B06XJYMprJ6FQ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td/DCxKvyW/1qBgH7GDMwoFVFkYVy/F/oH0YgN1NbHJMVndBGuvSEZO40B22gLcXbIy2vzulcN8W6qxbJ6myIMPYpPTMFmziOXKg4uzhMC4y41ErKH6GpQ6UffS+2umA+3tjpMz9Yl25rNiVrW/qqoeHGmcePlrg1EWtaX8Fyr1wQiMJcFPn89EicxG/u7+96ZhVxFAhbm6Tav5yOUAqBfVrXmXOF9Dny8GnaViaOYmFNNzetFX/0EqYabzcuPmm3t; 4:hYTLAQZNzBGyop4EA2rplFi1rKVc/wLU6UBEAQ72/BRiY4kX5DxKbJjT18XBvJd9YkqxSqxtZFMNy0z5aTA3PdVRd3/FGTHeFYNgfri3wxPDiMLs7ddMqEAFW+vivbSeiXesJhDAJE6l9IcIRaC3DZBZc+7sBQ6EmkGEieFiNfxVlfDEPU5pPGSgpdZmrKAK11lj3jK3LVrW4tkClkiSd6+a/5+BtVTrJTZx+qoh4eS8KNFGCk6fUeNP5551iQIeJRGOaB6EVI++q8MjTStqfFl9BgaivbtAejlwSIKcUpkrxy2mFUiPBQ9PIi2Lp5B3 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(3231023)(944501161)(10201501046)(6055026)(6041268)(20161123558120)(20161123562045)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:BN6PR1201MB0177; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:BN6PR1201MB0177; X-Forefront-PRVS: 05568D1FF7 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(376002)(396003)(39380400002)(366004)(346002)(189003)(199004)(16586007)(386003)(5660300001)(7696005)(51416003)(3846002)(6116002)(2361001)(105586002)(50226002)(47776003)(106356001)(8676002)(2351001)(81166006)(81156014)(53416004)(16526018)(2906002)(66066001)(4326008)(68736007)(305945005)(50466002)(8936002)(52116002)(48376002)(86362001)(97736004)(6916009)(7736002)(316002)(25786009)(6666003)(72206003)(53936002)(478600001)(6486002)(26005)(36756003); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR1201MB0177; H:akshu-HP-EliteBook-745-G2.amd.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:3; A: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; BN6PR1201MB0177; 23:AjT7beC5/WB/G4XsQkwcT2OxbmUrYyf2YnFVfq0?= =?us-ascii?Q?V9ZmN+5lI8QObNzaHRMyxaq1fSiSTHe5fEng/HL0K2uRXyRmrU87jAT76Jbf?= =?us-ascii?Q?xslbCsI4iIMyS5/lYzSyyRIF9ZnnxQrUsgCe4mdzcYFgle0+GGbH7KZPt1xc?= =?us-ascii?Q?qxk02LJIg68UGqUa9B45Db8UPYgsV316ShbSnUITCFCJSmQf7jJBtkB6o2J+?= =?us-ascii?Q?D74k8ICVCbvp2F0NuG+qv1zLYOhyTmKtEop5liCuDrTAVA7fd+jv9rDb7LC0?= =?us-ascii?Q?hZPjk2Y9kaApwWrS0fbY/m6HyGnyHYHLaPBULnY32/dILvOw81SRPSvt8LCX?= =?us-ascii?Q?chvTZGfjHUuCrMqiNLinrf+7+ePZDSwJ3wQ1sBiSiTZZol5HMmwTg9jtxWgq?= =?us-ascii?Q?m2m1AHVQZOPG7dbFvWo9EjQFOktmUPDAny+l+Yvd3BlhVPJX0972Lmugy6bq?= =?us-ascii?Q?TYjOsr1O6hV7TXSP23t6uM2D9foNoVXCP0CcLsfq5Xh+Nr6AyG8reQfGihnj?= =?us-ascii?Q?zyKiPTC0X2706s6s7xCX6rPXNe7x8bIamcN39//GkyomBTOtPVpa73TRUWoX?= =?us-ascii?Q?3R11uoMxJAw/aDTE+bKDAX6sVlT4CURkQt4BUItkAvPGmi/38NZK3rew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2r/4+PZPMOr8F2vweM3wanDFJeNGYWFO/hIkhWGtF/jsB9gY2w2A5kTiLDwdfM4rXqjOWyCcPHK62baD5JDBV3ipHiB8=; 24:jrt5SUY2Om6pB3uo+x7QIBdCQa05vje9DKEhDxHQ8v99uJgkUe9le1t0ja4+ZDk7hqbS6u3NXop13q0Ilp2faNLFU0t1jJmRUyFrc8uoH7k=; 7:i4adnZ3x3HKmvd/CjtgVdwG4kkOwM49ogBKoZkiKex3XwmfVwR1dNwbxaGcFbEnR7lnYDNVe76OMi3B03AjRzeKAo3H5+1+D+xgz1gTwTAECsaPvBwFuUojBNqqIArMaBzQNcwGOnuEod0Bh70LnIotdcA1R9/6tEqqy8ZvNw7PcSTXSUBtUFnfZQowtxTyG+jjJIAfYyiCY7muxwf3cRykMRUKPd8BztCJVY6Qfo3RcAaDE8c+SkeZGqDoOpqB5 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN6PR1201MB0177; 20:YDSR/fq3MtqVoOnlQSJKkSg4DHWmkbE/hLmpQnXAPSXo//Pi70pvH32lQ28AoWL7FGYzH10uk8zcM+ANxMgjAA9ao5peFoBJGagxUoK/Mak9wFT0rHdEPfgMt/DdK+iMPu2qMTVtR83iRoiliMCkILGpBzDcSphKp6aYmPETGNQ8yQmFwwS5/lYJ6TdwMNDsr2F5d09k6RlU5BFMdVvvH6d10HJTeNLnX4VCUuzbNkbCXy0/+jAi9bdwciZk2XQf X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2018 10:31:46.2256 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bc2a74de-8d0e-4e6a-9a5e-08d55e5eadae X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR1201MB0177 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. 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;