Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1610026rwi; Mon, 10 Oct 2022 20:01:31 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7QOxOB1zdAP0S+hLUgHCX9QRGOMcttjzIdbOA6K0TXOlKfrwAC7bb4J7PqMR1E1k3bvio9 X-Received: by 2002:a63:6a03:0:b0:43a:18ce:7473 with SMTP id f3-20020a636a03000000b0043a18ce7473mr20019581pgc.616.1665457291713; Mon, 10 Oct 2022 20:01:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665457291; cv=none; d=google.com; s=arc-20160816; b=tycbEgeUN0qiMrdfR/ku03uOxgZE6Ub1azzCbEYqN9I2uqPO0xbpFLCT3h5NC8UNl+ ngHqIxhOUzpEjZWGYPkoLXrdgvVRbcy0IXCWo7TOxHBwf2kvnI8tiH3Kcbmz88PUKogJ ZfkEU3afgvwpEnEGvqtETVfeIndcqqcMRamqnAqM2eO+HdYBPIJ58QE5Nz/BfmwDkOuJ XWlrqvLveJtHwKIqoeJebAQ23yS8FbjEWV3aH6V1NNpFJsPDeJFzeYC9NSvFFLEGT4kt /PYovXAc2Kn5Hjvb5IHs8vkX+OOepSyezi052CLBeeW/Acl8ADaf21/1bAkaXBZRCvLw L56A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=c9h01mOlxpzNszygrbY3PSLVmKbNIHt3PdjiV1vSnx0=; b=gInE5JHRhSXkSeoWe/XEFbdRWbA6cNwE6XrES8zkG3ioaIyIFZJIaFt/LoSZ8YzUjM QgEhP9j8IrQrAj9aurC5ekWpZq3URbolg5TOrniATPuvG5NfbZSqz58IlsuMhc74n6Yr 1Sf9YXSXeN5Zzz96UHR9icUrdK0Q7GWwi5/1K3Ci0JXCfC0JcTM1f+xd7ng05JmMCoZc wKOrGHHsNx2Pg23ZIs0WFP8jnOo/QiXjlhVVjIq8f0bh/w/4CUtSIdv7AFbbUCBDwamw SW702ZJ6bG/eIvV7M9Yndc+Q7wlM4h2dquRCF3QOQicl3EjhVlGji5Zd7gBW6lklJTfi iY9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZjdW8+T+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e14-20020a056a001a8e00b00563aff386fdsi894508pfv.284.2022.10.10.20.01.14; Mon, 10 Oct 2022 20:01:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZjdW8+T+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229838AbiJKCyh (ORCPT + 99 others); Mon, 10 Oct 2022 22:54:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229663AbiJKCyd (ORCPT ); Mon, 10 Oct 2022 22:54:33 -0400 Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2532A86817 for ; Mon, 10 Oct 2022 19:54:33 -0700 (PDT) Received: by mail-pl1-x62b.google.com with SMTP id h10so11990486plb.2 for ; Mon, 10 Oct 2022 19:54:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=c9h01mOlxpzNszygrbY3PSLVmKbNIHt3PdjiV1vSnx0=; b=ZjdW8+T+Y4e71mZf1sibeBNLw/z7mE7w4NcdaTKDB1CKtnqPQShw9RAW1fDmFFtN1W Ho5cbX8s1Uv6nKmfwUz3zeFuHr30aFJARnS/9GAqL0cSuwqXh8RC5IVM9MxT+Pc2pzko hw9XaY02k60i32ujEOOiUIvYuZAWvReQcHSupledK7sO/UcS8Zs3oqu/Put4yvDbYuEr mLcCNyhWIAZ8CLE7/binJqdcsv7qe8L2YAVl0u2mW0uRZ6Hk37JklnJjK0b9+BuLKJmY VJmQUTvMZ4O7l9ha4D6cbYSyIVtjlZJ3NCYabAINv31yO62jhz2upSSparefphVaxdoV vT6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=c9h01mOlxpzNszygrbY3PSLVmKbNIHt3PdjiV1vSnx0=; b=jJpXKkAjEE3MCKzP5rhF9PFXTCsWZ6GI+b2Y79Q3iv0tJz+7jynYRlE2FanDkH79FX uA7KFzuzKLREiPA/aPX7Df8hAKESJ3jZOsutyKW5hHW+2afzHIj1arhIRUZJ8uLWBAFv XT9sJfX3yrjzPTML8rxeUWxDwCg3JauWs3hSbJlIl22i7UjOZnOCJM39sI2vdJBZDpQC OfLlZ4p93ZylalyJXsj+jdx1MxZIdim8CKgMksDRTGFB5tNLaEp/ckt3bD4yMJiI/aj4 jjotxnrWRlKm9V3dFCh8HgNmapk74RSJhHnsFCMf+//Pjy3n+WKKrnCPQuz96TTX8Z2I WA1A== X-Gm-Message-State: ACrzQf0MuWVl+2xhkTDmbkACn0jRDXZOuOpRmTGycGUmmMTRU4z0ol8U 3Ccgq40RXP/CGqweWp8J2eB3iA== X-Received: by 2002:a17:902:8347:b0:178:6e81:35ce with SMTP id z7-20020a170902834700b001786e8135cemr21272589pln.23.1665456872597; Mon, 10 Oct 2022 19:54:32 -0700 (PDT) Received: from localhost ([122.172.86.128]) by smtp.gmail.com with ESMTPSA id o39-20020a17090a0a2a00b001f262f6f717sm9935137pjo.3.2022.10.10.19.54.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Oct 2022 19:54:31 -0700 (PDT) Date: Tue, 11 Oct 2022 08:24:26 +0530 From: Viresh Kumar To: Perry Yuan Cc: rafael.j.wysocki@intel.com, ray.huang@amd.com, Deepak.Sharma@amd.com, Mario.Limonciello@amd.com, Nathan.Fontenot@amd.com, Alexander.Deucher@amd.com, Shimmer.Huang@amd.com, Xiaojian.Du@amd.com, Li.Meng@amd.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RESEND PATCH V2 7/9] cpufreq: amd_pstate: add AMD Pstate EPP support for the MSR based processors Message-ID: <20221011025426.xocfhvvkakdc4jzo@vireshk-i7> References: <20221010162248.348141-1-Perry.Yuan@amd.com> <20221010162248.348141-8-Perry.Yuan@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221010162248.348141-8-Perry.Yuan@amd.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11-10-22, 00:22, Perry Yuan wrote: > +static void amd_pstate_update_max_freq(unsigned int cpu) > +{ > + struct cpufreq_policy *policy = cpufreq_cpu_acquire(cpu); Why isn't cpufreq_cpu_get() enough here ? cpufreq_cpu_acquire() is special as it takes policy->rwsem as well and you shouldn't need it. > + > + if (!policy) > + return; > + > + refresh_frequency_limits(policy); > + cpufreq_cpu_release(policy); > +} -- viresh