Skip to content

Commit f518d46

Browse files
committed
Merge branch 'pai-pmu-merge'
Thomas Richter says: ==================== The PAI PMUs pai_crypto and pai_ext both operate on memory mapped counters supported by z16 and follow on machines. These memory mapped counters have a lot in common, like: - validation, installing and removing events - starting and stopping events - retrieving counter values - collecting sample data. However both PMU drivers have slightly different parameters, for example: - different mapped memory size - different number of supported counters - different counter numbers and names - different bits in the CR0 register - different anchor address in lowcore Due to these different parameters, two independent PMUs have been developed. However both PMU drivers have very much in common and most of the PMU call back functions look very similar and are sometimes identical. This patch set combines both independent PMU device drivers perf_pai_crypto.c and per_pai_ext.c into one device driver. The new device driver operations on a table which contains the different parameters and uses common functions for event operations. Result is one PAI PMU driver which supports both PMUs. It is also extendable to support new PAI PMUs. ==================== Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
2 parents c1287d6 + 492578d commit f518d46

5 files changed

Lines changed: 1233 additions & 1600 deletions

File tree

arch/s390/include/asm/pai.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ static __always_inline void pai_kernel_exit(struct pt_regs *regs)
7777

7878
#define PAI_SAVE_AREA(x) ((x)->hw.event_base)
7979
#define PAI_CPU_MASK(x) ((x)->hw.addr_filters)
80+
#define PAI_PMU_IDX(x) ((x)->hw.last_tag)
8081
#define PAI_SWLIST(x) (&(x)->hw.tp_list)
8182

8283
#endif

arch/s390/kernel/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ obj-$(CONFIG_IMA_SECURE_AND_OR_TRUSTED_BOOT) += ima_arch.o
7979
obj-$(CONFIG_PERF_EVENTS) += perf_event.o
8080
obj-$(CONFIG_PERF_EVENTS) += perf_cpum_cf.o perf_cpum_sf.o
8181
obj-$(CONFIG_PERF_EVENTS) += perf_cpum_cf_events.o perf_regs.o
82-
obj-$(CONFIG_PERF_EVENTS) += perf_pai_crypto.o perf_pai_ext.o
82+
obj-$(CONFIG_PERF_EVENTS) += perf_pai.o
8383

8484
obj-$(CONFIG_TRACEPOINTS) += trace.o
8585

0 commit comments

Comments
 (0)