• Mark Rutland's avatar
    arm: perf: fold hotplug notifier into arm_pmu · af66abfe
    Mark Rutland authored
    Handling multiple PMUs using a single hotplug notifier requires a list
    of PMUs to be maintained, with synchronisation in the probe, remove, and
    notify paths. This is error-prone and makes the code much harder to
    maintain.
    
    Instead of using a single notifier, we can dynamically allocate a
    notifier block per-PMU. The end result is the same, but the list of PMUs
    is implicit in the hotplug notifier list rather than within a perf-local
    data structure, which makes the code far easier to handle.
    
    Signed-off-by: Mark Rutland <mark.rutland at arm.com>
    Reviewed-by: default avatarStephen Boyd <sboyd@codeaurora.org>
    Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
    af66abfe
perf_event_cpu.c 9.08 KB