blob: 1159e091ad09c66a9f3efab3a387e9536493165d [file] [log] [blame]
H. Peter Anvin1965aae2008-10-22 22:26:29 -07001#ifndef _ASM_X86_SYSTEM_64_H
2#define _ASM_X86_SYSTEM_64_H
Linus Torvalds1da177e2005-04-16 15:20:36 -07003
Linus Torvalds1da177e2005-04-16 15:20:36 -07004#include <asm/segment.h>
Jeff Dikea436ed92007-05-08 00:35:02 -07005#include <asm/cmpxchg.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -07006
Linus Torvalds1da177e2005-04-16 15:20:36 -07007
Glauber de Oliveira Costad3ca9012008-01-30 13:31:08 +01008static inline unsigned long read_cr8(void)
9{
10 unsigned long cr8;
11 asm volatile("movq %%cr8,%0" : "=r" (cr8));
12 return cr8;
13}
14
15static inline void write_cr8(unsigned long val)
16{
17 asm volatile("movq %0,%%cr8" :: "r" (val) : "memory");
18}
19
Ingo Molnar2601e642006-07-03 00:24:45 -070020#include <linux/irqflags.h>
Ravikiran G Thirumalai2ddb55f2006-01-17 07:03:47 +010021
H. Peter Anvin1965aae2008-10-22 22:26:29 -070022#endif /* _ASM_X86_SYSTEM_64_H */