Hi Shaopeng, On 09/09/2025 08:03, Shaopeng Tan (Fujitsu) wrote: >> Probing MPAM is convoluted. MSCs that are integrated with a CPU may only be >> accessible from those CPUs, and they may not be online. >> Touching the hardware early is pointless as MPAM can't be used until the >> system-wide common values for num_partid and num_pmg have been >> discovered. >> >> Start with driver probe/remove and mapping the MSC. >> diff --git a/drivers/resctrl/mpam_devices.c b/drivers/resctrl/mpam_devices.c >> new file mode 100644 index 000000000000..a0d9a699a6e7 >> --- /dev/null >> +++ b/drivers/resctrl/mpam_devices.c >> @@ -0,0 +1,336 @@ >> +static int mpam_dt_parse_resources(struct mpam_msc *msc, void *ignored) >> +{ >> + int err, num_ris = 0; >> + const u32 *ris_idx_p; >> + struct device_node *iter, *np; >> + >> + np = msc->pdev->dev.of_node; >> + for_each_child_of_node(np, iter) { >> + ris_idx_p = of_get_property(iter, "reg", NULL); >> + if (ris_idx_p) { >> + num_ris++; >> + err = mpam_dt_parse_resource(msc, iter, *ris_idx_p); >> + if (err) { >> + of_node_put(iter); >> + return err; >> + } >> + } >> + } >> + >> + if (!num_ris) >> + mpam_dt_parse_resource(msc, np, 0); > err = mpam_dt_parse_resource(msc, np, 0); Oops! Thanks for catching that, James