]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/x86/kernel/cpu/perf_event_intel_pt.c
Merge remote-tracking branch 'qcom/qcom/for-next'
[karo-tx-linux.git] / arch / x86 / kernel / cpu / perf_event_intel_pt.c
index 42169283448b9c5af7a75175ad18d02ec0079612..868e1194337f6cf93cd1a8048480a60aa7acf3e3 100644 (file)
@@ -139,9 +139,6 @@ static int __init pt_pmu_hw_init(void)
        long i;
 
        attrs = NULL;
-       ret = -ENODEV;
-       if (!test_cpu_cap(&boot_cpu_data, X86_FEATURE_INTEL_PT))
-               goto fail;
 
        for (i = 0; i < PT_CPUID_LEAVES; i++) {
                cpuid_count(20, i,
@@ -1130,6 +1127,10 @@ static __init int pt_init(void)
        int ret, cpu, prior_warn = 0;
 
        BUILD_BUG_ON(sizeof(struct topa) > PAGE_SIZE);
+
+       if (!test_cpu_cap(&boot_cpu_data, X86_FEATURE_INTEL_PT))
+               return -ENODEV;
+
        get_online_cpus();
        for_each_online_cpu(cpu) {
                u64 ctl;