summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/system_64.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/include/asm/system_64.h')
-rw-r--r--arch/x86/include/asm/system_64.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/x86/include/asm/system_64.h b/arch/x86/include/asm/system_64.h
new file mode 100644
index 000000000000..5aedb8bffc5a
--- /dev/null
+++ b/arch/x86/include/asm/system_64.h
@@ -0,0 +1,22 @@
+#ifndef ASM_X86__SYSTEM_64_H
+#define ASM_X86__SYSTEM_64_H
+
+#include <asm/segment.h>
+#include <asm/cmpxchg.h>
+
+
+static inline unsigned long read_cr8(void)
+{
+ unsigned long cr8;
+ asm volatile("movq %%cr8,%0" : "=r" (cr8));
+ return cr8;
+}
+
+static inline void write_cr8(unsigned long val)
+{
+ asm volatile("movq %0,%%cr8" :: "r" (val) : "memory");
+}
+
+#include <linux/irqflags.h>
+
+#endif /* ASM_X86__SYSTEM_64_H */