Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #ifndef __ASM_SYSTEM_H |
| 2 | #define __ASM_SYSTEM_H |
| 3 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4 | #include <asm/segment.h> |
Jeff Dike | a436ed9 | 2007-05-08 00:35:02 -0700 | [diff] [blame] | 5 | #include <asm/cmpxchg.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 6 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 7 | |
Glauber de Oliveira Costa | d3ca901 | 2008-01-30 13:31:08 +0100 | [diff] [blame] | 8 | static inline unsigned long read_cr8(void) |
| 9 | { |
| 10 | unsigned long cr8; |
| 11 | asm volatile("movq %%cr8,%0" : "=r" (cr8)); |
| 12 | return cr8; |
| 13 | } |
| 14 | |
| 15 | static inline void write_cr8(unsigned long val) |
| 16 | { |
| 17 | asm volatile("movq %0,%%cr8" :: "r" (val) : "memory"); |
| 18 | } |
| 19 | |
Ingo Molnar | 2601e64 | 2006-07-03 00:24:45 -0700 | [diff] [blame] | 20 | #include <linux/irqflags.h> |
Ravikiran G Thirumalai | 2ddb55f | 2006-01-17 07:03:47 +0100 | [diff] [blame] | 21 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 22 | #endif |