blob: 97fa251ccb2b088d055e0332fb97d50e5aeb480d [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef __ASM_SYSTEM_H
2#define __ASM_SYSTEM_H
3
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
Linus Torvalds1da177e2005-04-16 15:20:36 -070022#endif