소스 검색

perf_event, amd: Fix spinlock initialization

Avoid kernels from exploding on AMD machines when they have any
lock debugging bits enabled.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Peter Zijlstra 15 년 전
부모
커밋
1dd2980d99
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      arch/x86/kernel/cpu/perf_event_amd.c

+ 1 - 1
arch/x86/kernel/cpu/perf_event_amd.c

@@ -1,6 +1,6 @@
 #ifdef CONFIG_CPU_SUP_AMD
 
-static raw_spinlock_t amd_nb_lock;
+static DEFINE_RAW_SPINLOCK(amd_nb_lock);
 
 static __initconst u64 amd_hw_cache_event_ids
 				[PERF_COUNT_HW_CACHE_MAX]