Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3966501pxf; Mon, 22 Mar 2021 21:58:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxEEgQoiqQyePtj++xgsXUG7fPRsHC9A9H8TiCV+VwcobH/MDIbKd4sSoVOneF2wMGLEPJZ X-Received: by 2002:a17:906:b297:: with SMTP id q23mr3054077ejz.315.1616475515808; Mon, 22 Mar 2021 21:58:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616475515; cv=none; d=google.com; s=arc-20160816; b=j6SlTz1Xm5ZMFYwszlkSUEM8Hd3MGI4ws1D2yg8w/O+UjnrmaLnrgHob1W8Ovi5SSj tmVL9ktrR7nHnL38kEjzfBU/POlC9ezyJ2F9j98b9VzvZ2/eiNg87NJoViSbsqy7ETyj r1l8yIZTviPM8dsLJeprEgaLxahwghZ50nHwTtSMYz1ckZtCzplIetiXZhlhX2VITaWB KXdE/GG5tI6Z5iSR7fliNJ+0EUmyzpOj5o0wccr0VajpWtgR9d0C6yD6lBePsCaoFVbD XXR6z/ehHqiRgnb6kDRK4Xf4e333n1hnxaOsDOAIjbJpuq5+9rrf2unuTzplMB+Vc2ML 4q6w== 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:ironport-sdr :ironport-sdr; bh=yuL1jsznmyKtXleKseLN0XSf8PrdI5anvJmqmyvzGIE=; b=xBC356LEb8RYRyfTknO8PImQWnpHNysUS3uqJkneRtQ3bIlgnmYHVhWqNcFA+5/pEz 6qxGeZdiVo9SESnlCM9KWO7ONla0wW5jfc+OJKgUy7vUK1e27yZMApswnK0HZaZWumDV 9Uihorhd3h81aTh28V3w00JMwqmCGHpzLZWAkZFU9fkuLZvmhkSxUnOKLut6u+TTSXpF cKxa/bqCfNSCffbDAJHLdFShCu2I7N9pOOq+Cqzo0rPLTr8DCMRFC8fRLdpWfzhkyeUn qxtu4RWnzXqQjL4fhJtheaNMswabjBduWVxiQ2H4l8GptmCTVeUTjXZSfvf/F0SAJj9b vhoQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g8si13768171ejm.240.2021.03.22.21.58.13; Mon, 22 Mar 2021 21:58:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229632AbhCWE5P (ORCPT + 99 others); Tue, 23 Mar 2021 00:57:15 -0400 Received: from mga07.intel.com ([134.134.136.100]:10073 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229494AbhCWE5N (ORCPT ); Tue, 23 Mar 2021 00:57:13 -0400 IronPort-SDR: nkRkMg+gLmf6a+LD5MkIpMROqYkBFxt5/KWb3IhU87CyaIZMx2KlUnuJ3kyCpDj+iGsBeg9l3h /RFDEVVOB0gw== X-IronPort-AV: E=McAfee;i="6000,8403,9931"; a="254403205" X-IronPort-AV: E=Sophos;i="5.81,270,1610438400"; d="scan'208";a="254403205" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Mar 2021 21:57:11 -0700 IronPort-SDR: 9Uwt+JkCd93DYgfZWklvfVxffhh4zhcKqWMeoDeLt6wtqj6+6nE0JfZ/Fsd1R40PkPQhdVoIY0 y12zaBanY7mw== X-IronPort-AV: E=Sophos;i="5.81,270,1610438400"; d="scan'208";a="607590636" Received: from chenyu-desktop.sh.intel.com (HELO chenyu-desktop) ([10.239.158.173]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Mar 2021 21:57:10 -0700 Date: Tue, 23 Mar 2021 13:01:19 +0800 From: Chen Yu To: "Rafael J. Wysocki" Cc: Linux PM , LKML , Srinivas Pandruvada Subject: Re: [PATCH] cpufreq: intel_pstate: Clean up frequency computations Message-ID: <20210323050119.GB71586@chenyu-desktop> References: <1662840.8zf6FDN98U@kreacher> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1662840.8zf6FDN98U@kreacher> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 16, 2021 at 04:52:43PM +0100, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > Notice that some computations related to frequency in intel_pstate > can be simplified if (a) intel_pstate_get_hwp_max() updates the > relevant members of struct cpudata by itself and (b) the "turbo > disabled" check is moved from it to its callers, so modify the code > accordingly and while at it rename intel_pstate_get_hwp_max() to > intel_pstate_get_hwp_cap() which better reflects its purpose and > provide a simplified variat of it, __intel_pstate_get_hwp_cap(), > suitable for the initialization path. > > No intentional functional impact. > > Signed-off-by: Rafael J. Wysocki Tested-by: Chen Yu thanks, Chenyu