Hi Robin and Suzuki,
-----Original Message-----
From: Robin Murphy <robin.murphy@xxxxxxx>
Sent: Thursday, April 27, 2023 7:21 AM
To: Besar Wicaksono <bwicaksono@xxxxxxxxxx>; suzuki.poulose@xxxxxxx;
catalin.marinas@xxxxxxx; will@xxxxxxxxxx; mark.rutland@xxxxxxx
Cc: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; linux-
tegra@xxxxxxxxxxxxxxx; Thierry Reding <treding@xxxxxxxxxx>; Jonathan
Hunter <jonathanh@xxxxxxxxxx>; Vikram Sethi <vsethi@xxxxxxxxxx>; Richard
Wiley <rwiley@xxxxxxxxxx>; Eric Funsten <efunsten@xxxxxxxxxx>
Subject: Re: [PATCH v2] perf: arm_cspmu: Separate Arm and vendor module
External email: Use caution opening links or attachments
On 2023-04-18 07:20, Besar Wicaksono wrote:
Arm Coresight PMU driver consists of main standard code and vendor
backend code. Both are currently built as a single module.
This patch adds vendor registration API to separate the two to
keep things modular. Vendor module shall register to the main
module on loading and trigger device reprobe.
I think it might be considerably cleaner and safer if the main driver
retained at least some knowledge of the PMIIDR matches and used those to
explicity request the relevant module. Otherwise, not only is there an
awful lot of fiddly complexity here, but there's also quite a burden on
the user to know which modules they have to load to get full
functionality on any given system.
Do you mean like keep the existing match table as a whitelist, and associate
each entry with the backend module name to load it from the main driver ?
FYI I've just started working on adding devicetree support, and I do
need the generic architectural functionality to keep working in the
absence of any imp-def backend.
W.r.t the reprobe discussion with Suzuki, this would mean the expected
behavior is to attach the device to standard imp as fallback/default.
Suzuki, my preference is not supporting delayed reprobe on event->destroy
due to the potential access to stale data. We should just fail the backend
registration if one of the device is in use.