• Kan Liang's avatar
    perf/x86/intel/uncore: Generic support for the PCI type of uncore blocks · 42839ef4
    Kan Liang authored
    The discovery table provides the generic uncore block information
    for the PCI type of uncore blocks, which is good enough to provide
    basic uncore support.
    
    The PCI BUS and DEVFN information can be retrieved from the box control
    field. Introduce the uncore_pci_pmus_register() to register all the
    PCICFG type of uncore blocks. The old PCI probe/remove way is dropped.
    
    The PCI BUS and DEVFN information are different among dies. Add box_ctls
    to store the box control field of each die.
    
    Add a new BUS notifier for the PCI type of uncore block to support the
    hotplug. If the device is "hot remove", the corresponding registered PMU
    has to be unregistered. Perf cannot locate the PMU by searching a const
    pci_device_id table, because the discovery tables don't provide such
    information. Introduce uncore_pci_find_dev_pmu_from_types() to search
    the whole uncore_pci_uncores for the PMU.
    
    Implement generic support for the PCI type of uncore block.
    Signed-off-by: default avatarKan Liang <kan.liang@linux.intel.com>
    Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
    Link: https://lkml.kernel.org/r/1616003977-90612-5-git-send-email-kan.liang@linux.intel.com
    42839ef4
uncore.h 17.9 KB