summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/debugreg.h
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2022-11-10 23:17:07 +0300
committerPeter Zijlstra <peterz@infradead.org>2022-11-16 12:12:56 +0300
commit2d08a893b87cf9b2f9dbb3afaff60ca4530d55a2 (patch)
tree3b3b41060e7b69d3e03fd92430382bc01019a233 /arch/x86/include/asm/debugreg.h
parentb1599915f09157e98f59556e1b2eafe473603347 (diff)
downloadlinux-2d08a893b87cf9b2f9dbb3afaff60ca4530d55a2.tar.xz
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 <seanjc@google.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/20221110201707.1976032-1-seanjc@google.com
Diffstat (limited to 'arch/x86/include/asm/debugreg.h')
-rw-r--r--arch/x86/include/asm/debugreg.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/include/asm/debugreg.h b/arch/x86/include/asm/debugreg.h
index cfdf307ddc01..b049d950612f 100644
--- a/arch/x86/include/asm/debugreg.h
+++ b/arch/x86/include/asm/debugreg.h
@@ -2,8 +2,8 @@
#ifndef _ASM_X86_DEBUGREG_H
#define _ASM_X86_DEBUGREG_H
-
#include <linux/bug.h>
+#include <linux/percpu.h>
#include <uapi/asm/debugreg.h>
DECLARE_PER_CPU(unsigned long, cpu_dr7);