diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-01-15 17:00:11 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-01-15 17:00:11 +0300 |
commit | c182ce9bc8c85a623c71a23bcd6768045126c289 (patch) | |
tree | 73fb6561bbec5d89cba74492c149f3012e275afa /arch/x86/events/intel/bts.c | |
parent | 2da050e4f151c458df909780843067e7c2d11ec2 (diff) | |
parent | a8750ddca918032d6349adbf9a4b6555e7db20da (diff) | |
download | linux-c182ce9bc8c85a623c71a23bcd6768045126c289.tar.xz |
Merge 4.15-rc8 into usb-next
We want the USB fixes in here as well for merge issues.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/x86/events/intel/bts.c')
-rw-r--r-- | arch/x86/events/intel/bts.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/x86/events/intel/bts.c b/arch/x86/events/intel/bts.c index 141e07b06216..24ffa1e88cf9 100644 --- a/arch/x86/events/intel/bts.c +++ b/arch/x86/events/intel/bts.c @@ -582,6 +582,24 @@ static __init int bts_init(void) if (!boot_cpu_has(X86_FEATURE_DTES64) || !x86_pmu.bts) return -ENODEV; + if (boot_cpu_has(X86_FEATURE_PTI)) { + /* + * BTS hardware writes through a virtual memory map we must + * either use the kernel physical map, or the user mapping of + * the AUX buffer. + * + * However, since this driver supports per-CPU and per-task inherit + * we cannot use the user mapping since it will not be availble + * if we're not running the owning process. + * + * With PTI we can't use the kernal map either, because its not + * there when we run userspace. + * + * For now, disable this driver when using PTI. + */ + return -ENODEV; + } + bts_pmu.capabilities = PERF_PMU_CAP_AUX_NO_SG | PERF_PMU_CAP_ITRACE | PERF_PMU_CAP_EXCLUSIVE; bts_pmu.task_ctx_nr = perf_sw_context; |