]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
perf_counter, x86: Clean up hw_cache_event ids copies
authorThomas Gleixner <tglx@linutronix.de>
Mon, 8 Jun 2009 17:10:25 +0000 (19:10 +0200)
committerIngo Molnar <mingo@elte.hu>
Mon, 8 Jun 2009 21:10:42 +0000 (23:10 +0200)
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/cpu/perf_counter.c

index 93af821ebe5182e15df473cbe18f713fc46c8aba..56001feeffcd20029af6e9834c39b99b12c92bbc 100644 (file)
@@ -1409,23 +1409,20 @@ static int intel_pmu_init(void)
        switch (boot_cpu_data.x86_model) {
        case 17:
                memcpy(hw_cache_event_ids, core2_hw_cache_event_ids,
-               sizeof(u64)*PERF_COUNT_HW_CACHE_MAX*
-                       PERF_COUNT_HW_CACHE_OP_MAX*PERF_COUNT_HW_CACHE_RESULT_MAX);
+                      sizeof(hw_cache_event_ids));
 
                pr_cont("Core2 events, ");
                break;
        default:
        case 26:
                memcpy(hw_cache_event_ids, nehalem_hw_cache_event_ids,
-               sizeof(u64)*PERF_COUNT_HW_CACHE_MAX*
-                       PERF_COUNT_HW_CACHE_OP_MAX*PERF_COUNT_HW_CACHE_RESULT_MAX);
+                      sizeof(hw_cache_event_ids));
 
                pr_cont("Nehalem/Corei7 events, ");
                break;
        case 28:
                memcpy(hw_cache_event_ids, atom_hw_cache_event_ids,
-               sizeof(u64)*PERF_COUNT_HW_CACHE_MAX*
-                       PERF_COUNT_HW_CACHE_OP_MAX*PERF_COUNT_HW_CACHE_RESULT_MAX);
+                      sizeof(hw_cache_event_ids));
 
                pr_cont("Atom events, ");
                break;