From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 955BD226CE0 for ; Mon, 10 Mar 2025 12:26:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741609616; cv=none; b=VNTCAf0vpTdLHpUAgt9zL0rysZrgNsSkHlE2Ne0qYSWUx4/gDDSaW8nwjciNCTcWsWQwAv/b3+VcDm/eXMp+bwsX8r+hNtzRQbM15YqMljTX9ejAFNi99biR4xivYjdOL7/lzzHbZ/Y5aRlxZLzGe3kCkHZZHeDSe59rn5PThXM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741609616; c=relaxed/simple; bh=nNO62uba7Yc7GT4yXog5i2t6Pc1CFBWDADhe8JkdihE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=DB9YB+gCdmxlxet4nom/ISAIrdWP4U8AaI/HQG/0pfukbu6WVJGofuT/QNYBg6cb4igHbYIi5KpXlgowMd00YlkYsPtL4+fIqHMrX2YSnBr9hEn7e/4AMEOLX5kfXdHdq5Qe/Ktxqe7eX0edUkH2m9+f+Z1wLgNOFKXJAOF+uHE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 470D8153B; Mon, 10 Mar 2025 05:27:05 -0700 (PDT) Received: from [10.1.197.49] (eglon.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9CD213F5A1; Mon, 10 Mar 2025 05:26:49 -0700 (PDT) Message-ID: <0fe8b8be-d52b-4873-a4c5-a3b070190f2c@arm.com> Date: Mon, 10 Mar 2025 12:26:46 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v7 19/49] x86/resctrl: Add resctrl_arch_is_evt_configurable() to abstract BMEC To: Reinette Chatre , x86@kernel.org, linux-kernel@vger.kernel.org Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , H Peter Anvin , Babu Moger , shameerali.kolothum.thodi@huawei.com, D Scott Phillips OS , carl@os.amperecomputing.com, lcherian@marvell.com, bobo.shaobowang@huawei.com, tan.shaopeng@fujitsu.com, baolin.wang@linux.alibaba.com, Jamie Iles , Xin Hao , peternewman@google.com, dfustini@baylibre.com, amitsinght@marvell.com, David Hildenbrand , Rex Nie , Dave Martin , Koba Ko , Shanker Donthineni , fenghuay@nvidia.com, Shaopeng Tan , Tony Luck References: <20250228195913.24895-1-james.morse@arm.com> <20250228195913.24895-20-james.morse@arm.com> Content-Language: en-GB From: James Morse In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi Reinette, On 07/03/2025 04:37, Reinette Chatre wrote: > On 2/28/25 11:58 AM, James Morse wrote: >> When BMEC is supported the resctrl event can be configured in a number >> of ways. This depends on architecture support. rdt_get_mon_l3_config() >> modifies the struct mon_evt and calls mbm_config_rftype_init() to create >> the files that allow the configuration. >> >> Splitting this into separate architecture and filesystem parts would >> require the struct mon_evt and mbm_config_rftype_init() to be exposed. > > Same comment as for v6 [1]: > "Please replace all instances of mbm_config_rftype_init() with > resctrl_file_fflags_init()." Ah - I didn't spot there was more than on in the commit message. (and git-grep didn't bring it back either!) Fixed. >> Instead, add resctrl_arch_is_evt_configurable(), and use this from >> resctrl_mon_resource_init() to initialise struct mon_evt and call >> resctrl_file_fflags_init() >> resctrl_arch_is_evt_configurable() calls rdt_cpu_has() so it doesn't >> obviously benefit from being inlined. Putting it in core.c will allow >> rdt_cpu_has() to eventually become static. >> >> Signed-off-by: James Morse >> Tested-by: Carl Worth # arm64 >> Tested-by: Shaopeng Tan >> Reviewed-by: Shaopeng Tan >> Reviewed-by: Tony Luck >> --- >> Changes since v6: >> * Fixed stale function name in the commit message. > Fixes seem to have been lost. > > With changelog fixed: > | Reviewed-by: Reinette Chatre Thanks! James