Skip to content

Commit 2d08a89

Browse files
sean-jcPeter Zijlstra
authored andcommitted
x86/debug: Include percpu.h in debugreg.h to get DECLARE_PER_CPU() et al
Include percpu.h to pick up the definition of DECLARE_PER_CPU() and friends instead of relying on the parent to provide the #include. E.g. swapping the order of includes in arch/x86/kvm/vmx/nested.c (simulating KVM code movement being done for other purposes) results in build errors: In file included from arch/x86/kvm/vmx/nested.c:3: arch/x86/include/asm/debugreg.h:9:32: error: unknown type name â��cpu_dr7â�=99 9 | DECLARE_PER_CPU(unsigned long, cpu_dr7); | ^~~~~~~ Signed-off-by: Sean Christopherson <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent b159991 commit 2d08a89

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/include/asm/debugreg.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
#ifndef _ASM_X86_DEBUGREG_H
33
#define _ASM_X86_DEBUGREG_H
44

5-
65
#include <linux/bug.h>
6+
#include <linux/percpu.h>
77
#include <uapi/asm/debugreg.h>
88

99
DECLARE_PER_CPU(unsigned long, cpu_dr7);

0 commit comments

Comments
 (0)