system_64.h 409 B

12345678910111213141516171819202122
  1. #ifndef _ASM_X86_SYSTEM_64_H
  2. #define _ASM_X86_SYSTEM_64_H
  3. #include <asm/segment.h>
  4. #include <asm/cmpxchg.h>
  5. static inline unsigned long read_cr8(void)
  6. {
  7. unsigned long cr8;
  8. asm volatile("movq %%cr8,%0" : "=r" (cr8));
  9. return cr8;
  10. }
  11. static inline void write_cr8(unsigned long val)
  12. {
  13. asm volatile("movq %0,%%cr8" :: "r" (val) : "memory");
  14. }
  15. #include <linux/irqflags.h>
  16. #endif /* _ASM_X86_SYSTEM_64_H */