be80e758d0
Most of the power processor generation performance monitoring unit (PMU) driver code is bundled in the kernel and one of those is enabled/registered based on the oprofile_cpu_type check at the boot. But things get little tricky incase of "compat" mode boot. IBM POWER System Server based processors has a compactibility mode feature, which simpily put is, Nth generation processor (lets say POWER8) will act and appear in a mode consistent with an earlier generation (N-1) processor (that is POWER7). And in this "compat" mode boot, kernel modify the "oprofile_cpu_type" to be Nth generation (POWER8). If Nth generation pmu driver is bundled (POWER8), it gets registered. Key dependency here is to have distro support for latest processor performance monitoring support. Patch here adds a generic "compat-mode" performance monitoring driver to be register in absence of powernv platform specific pmu driver. Driver supports only "cycles" and "instruction" events. "0x0001e" used as event code for "cycles" and "0x00002" used as event code for "instruction" events. New file called "generic-compat-pmu.c" is created to contain the driver specific code. And base raw event code format modeled on PPMU_ARCH_207S. Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com> [mpe: Use SPDX tag for license] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
13 lines
378 B
C
13 lines
378 B
C
// SPDX-License-Identifier: GPL-2.0+
|
|
//
|
|
// Copyright 2019 Madhavan Srinivasan, IBM Corporation.
|
|
|
|
extern int init_ppc970_pmu(void);
|
|
extern int init_power5_pmu(void);
|
|
extern int init_power5p_pmu(void);
|
|
extern int init_power6_pmu(void);
|
|
extern int init_power7_pmu(void);
|
|
extern int init_power8_pmu(void);
|
|
extern int init_power9_pmu(void);
|
|
extern int init_generic_compat_pmu(void);
|