mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] ACPI: RISC-V: Add support for the RQSC table
@ 2026-11-17 22:11 Drew Fustini (Tenstorrent)
  2026-11-17 22:11 ` [PATCH 1/3] ACPI: RISC-V: Add RQSC table definitions Drew Fustini (Tenstorrent)
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Drew Fustini (Tenstorrent) @ 2026-11-17 22:11 UTC (permalink / raw)
  To: Sunil V L
  Cc: Rafael J. Wysocki, Len Brown, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Alexandre Ghiti, Atish Patra, Anup Patel, Chen Pei,
	yunhui cui, Reinette Chatre, Radim Krčmář,
	Zeng Heng, Conor Dooley, Ben Horgan, James Morse, Tony Luck,
	Adrien Ricciardi, Zhanpeng Zhang, Gong Shuai, Gong Shuai,
	Weiwei Li, Liu Zhiwei, Kornel Dulęba, Samuel Holland,
	guo.wenjia23, liu.qingtao2, Dave Martin, Babu Moger, Fenghua Yu,
	Peter Newman, Shaopeng Tan, Jonathan Cameron, Catalin Marinas,
	linux-acpi, linux-riscv, linux-kernel, Drew Fustini (Tenstorrent)

Add support for the ACPI RISC-V Quality of Service Controllers (RQSC)
table [1] that describes the CBQRI controllers [2] present in a system.
Create a platform device for each controller so that the same CBQRI
driver can bind on device tree and ACPI systems.

Patch 1 adds the table definitions. They stay in drivers/acpi/riscv
until ACPICA carries them [3]. Patch 2 parses the table and creates
the platform devices. It is derived from the large RFC series that
implemented all of CBQRI [4]. Patch 3 makes the CBQRI capacity driver
bind to the capacity controller devices. I plan to add support for
bandwidth controller devices once the resctrl generic schema lands.

This series depends on:
 - "riscv: Add initial CBQRI resctrl support" v12 [5]

Tested on QEMU virt with the RQSC table support [6], two L2 capacity
controllers, one L3 capacity controller and one bandwidth controller:

  ACPI: RQSC 0x00000000BDD5B000 0000E0 (v01 BOCHS  BXPC     00000001 BXPC 00000001)
  ACPI: RQSC: 4 CBQRI controllers

  # ls /sys/bus/platform/devices | grep cbqri
  cbqri-bandwidth.2
  cbqri-capacity.0
  cbqri-capacity.1
  cbqri-capacity.3

  # grep cbqri /proc/iomem
  04820000-04820fff : cbqri-capacity.0
    04820000-04820fff : cbqri-capacity.0 cbqri-capacity.0
  04821000-04821fff : cbqri-capacity.1
    04821000-04821fff : cbqri-capacity.1 cbqri-capacity.1
  04828000-04828fff : cbqri-bandwidth.2
  0482b000-0482bfff : cbqri-capacity.3
    0482b000-0482bfff : cbqri-capacity.3 cbqri-capacity.3

The capacity driver binds and resctrl shows the L2 and L3 domains:

  cbqri-capacity cbqri-capacity.0: registered L2 capacity controller at 0x0000000004820000 (cache_id=33685504, rcid=64)
  cbqri-capacity cbqri-capacity.1: registered L2 capacity controller at 0x0000000004821000 (cache_id=33685508, rcid=64)
  cbqri-capacity cbqri-capacity.3: registered L3 capacity controller at 0x000000000482b000 (cache_id=33751040, rcid=64)

  # mount -t resctrl resctrl /sys/fs/resctrl
  # cat /sys/fs/resctrl/schemata
  L2:33685504=fff;33685508=fff
  L3:33751040=ffff

[1] https://github.com/riscv-non-isa/riscv-rqsc/releases/tag/v1.0.0
[2] https://github.com/riscv-non-isa/riscv-cbqri/releases/tag/v1.0
[3] https://github.com/open-acpica/acpica/pull/1262
[4] https://lore.kernel.org/all/20260601-ssqosid-cbqri-rqsc-v7-0-v6-0-baf00f50028a@kernel.org/
[5] https://lore.kernel.org/all/20261114-dfustini-atl-sc-cbqri-dt-v12-0-6ef1f627072d@kernel.org/
[6] https://lore.kernel.org/qemu-devel/20261113-riscv-rqsc-v2-0-34d47fa4141e@kernel.org/

Signed-off-by: Drew Fustini (Tenstorrent) <fustini@kernel.org>
---
Drew Fustini (Tenstorrent) (3):
      ACPI: RISC-V: Add RQSC table definitions
      ACPI: RISC-V: Enumerate CBQRI controllers from the RQSC table
      riscv_cbqri: Bind to RQSC platform devices

 drivers/acpi/riscv/Kconfig       |   3 +
 drivers/acpi/riscv/Makefile      |   1 +
 drivers/acpi/riscv/init.c        |   2 +
 drivers/acpi/riscv/init.h        |   1 +
 drivers/acpi/riscv/rqsc.c        | 210 +++++++++++++++++++++++++++++++++++++++
 drivers/acpi/riscv/rqsc.h        |  67 +++++++++++++
 drivers/resctrl/Kconfig          |  11 +-
 drivers/resctrl/cbqri_capacity.c | 111 +++++++++++++++------
 8 files changed, 371 insertions(+), 35 deletions(-)
---
base-commit: aebb7274476403040d582c61478df8f4a7bf9cd3
change-id: 20261108-acpi-rqsc-6df871ab608a
prerequisite-change-id: 20260610-dfustini-atl-sc-cbqri-dt-410c8e2711dd:v12
prerequisite-patch-id: 492fe81aa4f3c885ac5bb48252def2fdc5527275
prerequisite-patch-id: b4f0bd4bf660c92dbf4ca0c7d871c1550b66df0d
prerequisite-patch-id: a2e36f0788f8e11c708d162dce653351dd99c4f0
prerequisite-patch-id: d1d359c5cf89b2b5018d64ca8f320892f6dbcca2
prerequisite-patch-id: 5b7fea6f1ad8f2137ffe45681d56b83e17f7cb2a

Best regards,
--  
Drew Fustini (Tenstorrent) <fustini@kernel.org>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-11-18 20:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-17 22:11 [PATCH 0/3] ACPI: RISC-V: Add support for the RQSC table Drew Fustini (Tenstorrent)
2026-11-17 22:11 ` [PATCH 1/3] ACPI: RISC-V: Add RQSC table definitions Drew Fustini (Tenstorrent)
2026-11-18 20:37   ` Jonathan Cameron
2026-11-17 22:11 ` [PATCH 2/3] ACPI: RISC-V: Enumerate CBQRI controllers from the RQSC table Drew Fustini (Tenstorrent)
2026-11-17 22:11 ` [PATCH 3/3] riscv_cbqri: Bind to RQSC platform devices Drew Fustini (Tenstorrent)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®