diff options
author | Kan Liang <kan.liang@linux.intel.com> | 2021-07-01 00:08:28 +0300 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2021-07-02 16:58:37 +0300 |
commit | e199eb5131591c020705deceee224b437d09ece4 (patch) | |
tree | d80b143a4c5feb1cd7fc4028de743861e7093d87 /arch/x86/events | |
parent | 3ba7095beaec1bace1b5864fa92b2b7a0eaadf38 (diff) | |
download | linux-e199eb5131591c020705deceee224b437d09ece4.tar.xz |
perf/x86/intel/uncore: Add Sapphire Rapids server IRP support
The IRP is responsible for maintaining coherency for the IIO traffic
targeting coherent memory.
The layout of the control registers for a IRP uncore unit is a little
bit different from the generic one.
Factor out SPR_UNCORE_COMMON_FORMAT, which can be reused by the
following uncore units.
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Andi Kleen <ak@linux.intel.com>
Link: https://lore.kernel.org/r/1625087320-194204-5-git-send-email-kan.liang@linux.intel.com
Diffstat (limited to 'arch/x86/events')
-rw-r--r-- | arch/x86/events/intel/uncore_snbep.c | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/arch/x86/events/intel/uncore_snbep.c b/arch/x86/events/intel/uncore_snbep.c index 3b4039577f09..de5a6d1f1735 100644 --- a/arch/x86/events/intel/uncore_snbep.c +++ b/arch/x86/events/intel/uncore_snbep.c @@ -5603,12 +5603,37 @@ static struct intel_uncore_type spr_uncore_iio = { .format_group = &snr_uncore_iio_format_group, }; +static struct attribute *spr_uncore_raw_formats_attr[] = { + &format_attr_event.attr, + &format_attr_umask_ext4.attr, + &format_attr_edge.attr, + &format_attr_inv.attr, + &format_attr_thresh8.attr, + NULL, +}; + +static const struct attribute_group spr_uncore_raw_format_group = { + .name = "format", + .attrs = spr_uncore_raw_formats_attr, +}; + +#define SPR_UNCORE_COMMON_FORMAT() \ + .event_mask = SNBEP_PMON_RAW_EVENT_MASK, \ + .event_mask_ext = SPR_RAW_EVENT_MASK_EXT, \ + .format_group = &spr_uncore_raw_format_group + +static struct intel_uncore_type spr_uncore_irp = { + SPR_UNCORE_COMMON_FORMAT(), + .name = "irp", + +}; + #define UNCORE_SPR_NUM_UNCORE_TYPES 12 static struct intel_uncore_type *spr_uncores[UNCORE_SPR_NUM_UNCORE_TYPES] = { &spr_uncore_chabox, &spr_uncore_iio, - NULL, + &spr_uncore_irp, NULL, NULL, NULL, |