Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 820a6442 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Ingo Molnar
Browse files

perf_counter, x86: Clean up hw_cache_event ids copies



Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent f86748e9
Loading
Loading
Loading
Loading
+3 −6
Original line number Original line Diff line number Diff line
@@ -1409,23 +1409,20 @@ static int intel_pmu_init(void)
	switch (boot_cpu_data.x86_model) {
	switch (boot_cpu_data.x86_model) {
	case 17:
	case 17:
		memcpy(hw_cache_event_ids, core2_hw_cache_event_ids,
		memcpy(hw_cache_event_ids, core2_hw_cache_event_ids,
		sizeof(u64)*PERF_COUNT_HW_CACHE_MAX*
		       sizeof(hw_cache_event_ids));
			PERF_COUNT_HW_CACHE_OP_MAX*PERF_COUNT_HW_CACHE_RESULT_MAX);


		pr_cont("Core2 events, ");
		pr_cont("Core2 events, ");
		break;
		break;
	default:
	default:
	case 26:
	case 26:
		memcpy(hw_cache_event_ids, nehalem_hw_cache_event_ids,
		memcpy(hw_cache_event_ids, nehalem_hw_cache_event_ids,
		sizeof(u64)*PERF_COUNT_HW_CACHE_MAX*
		       sizeof(hw_cache_event_ids));
			PERF_COUNT_HW_CACHE_OP_MAX*PERF_COUNT_HW_CACHE_RESULT_MAX);


		pr_cont("Nehalem/Corei7 events, ");
		pr_cont("Nehalem/Corei7 events, ");
		break;
		break;
	case 28:
	case 28:
		memcpy(hw_cache_event_ids, atom_hw_cache_event_ids,
		memcpy(hw_cache_event_ids, atom_hw_cache_event_ids,
		sizeof(u64)*PERF_COUNT_HW_CACHE_MAX*
		       sizeof(hw_cache_event_ids));
			PERF_COUNT_HW_CACHE_OP_MAX*PERF_COUNT_HW_CACHE_RESULT_MAX);


		pr_cont("Atom events, ");
		pr_cont("Atom events, ");
		break;
		break;