Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp96067pxb; Thu, 7 Jan 2021 23:02:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJyQ0ygfnmrGwVLG8WtC6o7MDGhroenBpnx00BH73p+4txaIU7lcntQfas+5aAfW7Cikvm9f X-Received: by 2002:a17:906:d146:: with SMTP id br6mr1731232ejb.331.1610089345172; Thu, 07 Jan 2021 23:02:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610089345; cv=none; d=google.com; s=arc-20160816; b=DpmCDyN30pKlf+3/rddI1NGCxmIAlLuxgJHavXTqq6ysYxa8Gzmdo/fxBobB1boBSt T2bHrXH2ckwc2cFb89h+inpNsFG3+bSUOjEWMuHI3Hqr+irfza2HA6DOVjBHsFAEcrTG 1awyWVZoY+//5Sr58VgajBOELdjGXeYJcWXB+dJ9acsDZSi/X0hX3f0wmvJSrO2X+w4B unoC05qyyMKJbfB4BGP6WrucruOu2Yl8Bfxt3TCV2Inm7kFAERv3T3SsSwHTCQ+TposE I67iTGeN2UnapL/nk5Wj6+7ukVH6nE9BWHZVQaH3hy8mMsY3ags5OOfoPWC3dV8SCXBT x5+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=j6lI+H5SOXk6LyLM5MFtaWuzkjP8g/vl4b14e8tqS+A=; b=yVg+Io/Zjvb0b8D1mo/QuKY08Y0GwD5ZNNFAcjJCPRBT7xFRmPlnbD7nvns7SQebgD UW3Tpu9SJtvOjYfFkeb6PI9J9uFUsx/SEgFPynqSHqNe+HesIzCbAfaCrF1NQ+auCwps nJ0TbKwmu0VmMQ/3Mr5UkQy6EQw2y9VCx/O2VO2ZGJxU8wjEzToweYCASybBxUPDP29V xETd6NpqcyOZKY2i8nQ5tGUQAo6MhCyrT0bDbxrkqNRjcL7lVWjnl9VYFwbikcz/PEr1 mHKm6sDXClvXcgA2/0yjy580tXCoOghlgzbs0HCcvDM+qsf3kr8quyd+bfWTrHfZ3xcY sUlg== 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 a12si3195121ejg.220.2021.01.07.23.02.02; Thu, 07 Jan 2021 23:02:25 -0800 (PST) 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 S1727137AbhAHHA2 (ORCPT + 99 others); Fri, 8 Jan 2021 02:00:28 -0500 Received: from mga17.intel.com ([192.55.52.151]:32323 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726353AbhAHHA1 (ORCPT ); Fri, 8 Jan 2021 02:00:27 -0500 IronPort-SDR: 6iMsA/HE7O4d2/HN67RFMEiBLjxqOLHhv6r/x53HHhodBJsOjRh3DDfvSWQ1MHZHqJ7zMlu5jN 2bHil9jEYdzQ== X-IronPort-AV: E=McAfee;i="6000,8403,9857"; a="157333332" X-IronPort-AV: E=Sophos;i="5.79,330,1602572400"; d="scan'208";a="157333332" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jan 2021 22:59:47 -0800 IronPort-SDR: rKoqaCrgPDURoG6Ya6gmu7XpPIAEW0IpGMlef91Hc6+Tdk+5LFdikTVKE5BHfc67ptdgw5Ihl/ K42twj3nUlOA== X-IronPort-AV: E=Sophos;i="5.79,330,1602572400"; d="scan'208";a="463305167" Received: from chenyu-office.sh.intel.com ([10.239.158.173]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jan 2021 22:59:45 -0800 Date: Fri, 8 Jan 2021 15:02:11 +0800 From: Chen Yu To: "Rafael J. Wysocki" Cc: Linux PM , LKML , Srinivas Pandruvada Subject: Re: [PATCH v1 1/3] cpufreq: intel_pstate: Always read hwp_cap_cached with READ_ONCE() Message-ID: <20210108070211.GC20383@chenyu-office.sh.intel.com> References: <5701645.lOV4Wx5bFT@kreacher> <1993550.StjdRojnlU@kreacher> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1993550.StjdRojnlU@kreacher> User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 07, 2021 at 07:42:15PM +0100, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > Because intel_pstate_get_hwp_max() which updates hwp_cap_cached > may run in parallel with the readers of it, annotate all of the > read accesses to it with READ_ONCE(). > > Signed-off-by: Rafael J. Wysocki Tested-by: Chen Yu thanks, Chenyu