From nobody Sat Feb 7 07:09:32 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A7B8037475F; Wed, 28 Jan 2026 20:28:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769632085; cv=none; b=JJMwKxY0WzNAEOsU4+hJq9Qj4fM7MhqTg9lar8/qKgZuoKvL3cJ/M787slyMQLMgb73K6zF88ev9LF1lujIdMW7eKEnEqLaefdZ/c7f7NV2eIFfGtyf/M4AEU4SRKeXaOUA2AmIyF3jp9UfJ62vQXE/SDFumknwcwCsBV/eoOe8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769632085; c=relaxed/simple; bh=e1gD37k8W4Pzp7U55pR9/mebQe/hwn2pjhUSiquHa+s=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=I+C9nrQihUfa6TTK70FmcXrc3HrNfnyIIoUuDgJhO3sowlcFaU9SYRx7AtROXvUlDmdX762wa6Mc3T7VbaS3cGeilomQAjxzJb/tfuNViWdNcW6uCJSYTuywz986+Y+YE9U1LuLwy3GalerzHeMWK41pkfzZe6d2EfYyUz3Akbk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=RCoi2aWY; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="RCoi2aWY" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CFF73C2BCAF; Wed, 28 Jan 2026 20:28:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1769632085; bh=e1gD37k8W4Pzp7U55pR9/mebQe/hwn2pjhUSiquHa+s=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=RCoi2aWY/oZS67ocZqD2asZzFlXYhQYfYhe3wqNa6gStwaGO2FSunPiQni46XQpSQ v+1mkd1Zi76k+jAK7BCTvTUqnvaTWrXRVi6KyTCxJOUkKxs2/ViSLefTPmB4M6TYfp zgygXHEFdMq8RyNpJks8Ckn43dqM6a4lvqOEVNmoUXQ9XxGregt3JOmmtKLgsSjGsF 3DQcYdFAJ0FMYBe4PNJ5JST/NIi4UA9Wj3bLJQXJTzehMYVVJ2IFQjbSlGkzagdyaM c7JBsIVir62difcOv6pNT3HM0+QnQeoK5MC82ctYZTuWro0r3JwENByHgcYGVw0yak mRzMX4TE7tbIg== From: Drew Fustini Date: Wed, 28 Jan 2026 12:27:25 -0800 Subject: [PATCH RFC v2 04/17] RISC-V: QoS: define properties of CBQRI controllers Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260128-ssqosid-cbqri-v2-4-dca586b091b9@kernel.org> References: <20260128-ssqosid-cbqri-v2-0-dca586b091b9@kernel.org> In-Reply-To: <20260128-ssqosid-cbqri-v2-0-dca586b091b9@kernel.org> To: Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , =?utf-8?q?Radim_Kr=C4=8Dm=C3=A1=C5=99?= , Samuel Holland , Adrien Ricciardi , Nicolas Pitre , =?utf-8?q?Kornel_Dul=C4=99ba?= , Atish Patra , Atish Kumar Patra , Vasudevan Srinivasan , Ved Shanbhogue , yunhui cui , Chen Pei , Liu Zhiwei , Weiwei Li , guo.wenjia23@zte.com.cn, liu.qingtao2@zte.com.cn, Reinette Chatre , Tony Luck , Babu Moger , Peter Newman , Fenghua Yu , James Morse , Ben Horgan , Dave Martin , Drew Fustini , linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, x86@kernel.org, Rob Herring , "Rafael J. Wysocki" , Len Brown , Robert Moore , Sunil V L , Krzysztof Kozlowski , Conor Dooley Cc: Paul Walmsley , linux-acpi@vger.kernel.org, acpica-devel@lists.linux.dev, devicetree@vger.kernel.org X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=1881; i=fustini@kernel.org; h=from:subject:message-id; bh=e1gD37k8W4Pzp7U55pR9/mebQe/hwn2pjhUSiquHa+s=; b=owGbwMvMwCV2+43O4ZsaG3kYT6slMWRWFfo/PsmQs8/5uN0n4RmuNZbNnaqKh08JWp8PniEvI bZA5vf0jlIWBjEuBlkxRZZNH/IuLPEK/bpg/ottMHNYmUCGMHBxCsBEplxlZLhUc3PVNvcCloD3 kWI1zKbTl3BYzC5zeF0/S6nPd/bORDOGv7KKuyXYZZdlXPyvsccx8XE9U12Qqvt2Y92ekIhmPZU nHAA= X-Developer-Key: i=fustini@kernel.org; a=openpgp; fpr=1B6F948213EA489734F3997035D5CD577C1E6010 Define data structure to represent the CBQRI properties that a driver for an CBQRI-capable controller would discover during probe. Each instance of a CBQRI-capable controller is added to a list that the RISC-V CBQRI resctrl implementation will consume. Co-developed-by: Adrien Ricciardi Signed-off-by: Adrien Ricciardi Signed-off-by: Drew Fustini --- MAINTAINERS | 1 + include/linux/riscv_qos.h | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index e98d553bd0ca..31e536304972 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -22511,6 +22511,7 @@ L: linux-riscv@lists.infradead.org S: Supported F: arch/riscv/include/asm/qos.h F: arch/riscv/kernel/qos/ +F: include/linux/riscv_qos.h =20 RISC-V RPMI AND MPXY DRIVERS M: Rahul Pathak diff --git a/include/linux/riscv_qos.h b/include/linux/riscv_qos.h new file mode 100644 index 000000000000..51c3a96bbcd0 --- /dev/null +++ b/include/linux/riscv_qos.h @@ -0,0 +1,34 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef __LINUX_RISCV_QOS_H +#define __LINUX_RISCV_QOS_H + +#include +#include + +#include + +enum cbqri_controller_type { + CBQRI_CONTROLLER_TYPE_CAPACITY, + CBQRI_CONTROLLER_TYPE_BANDWIDTH, + CBQRI_CONTROLLER_TYPE_UNKNOWN +}; + +struct cbqri_controller_info { + unsigned long addr; + unsigned long size; + enum cbqri_controller_type type; + u32 rcid_count; + u32 mcid_count; + struct list_head list; + + struct cache_controller { + u32 cache_level; + u32 cache_size; /* in bytes */ + struct cpumask cpu_mask; + } cache; +}; + +extern struct list_head cbqri_controllers; + +#endif /* __LINUX_RISCV_QOS_H */ --=20 2.43.0