Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 79946
b: refs/heads/master
c: d46d7d7
h: refs/heads/master
v: v3
  • Loading branch information
Glauber de Oliveira Costa authored and Ingo Molnar committed Jan 30, 2008
1 parent b6eb3a3 commit 5be532a
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0a3b4d151a8e57f50ce5a12c7ea5ec9965cf0b5a
refs/heads/master: d46d7d754014a299fa9b3400d080e09bfe4d629f
26 changes: 24 additions & 2 deletions trunk/include/asm-x86/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@
#define _ASM_X86_SYSTEM_H_

#include <asm/asm.h>
#include <asm/segment.h>
#include <asm/cpufeature.h>
#include <asm/cmpxchg.h>

#include <linux/kernel.h>
#include <linux/irqflags.h>

#ifdef CONFIG_X86_32
#define AT_VECTOR_SIZE_ARCH 2 /* entries in ARCH_DLINFO */
Expand Down Expand Up @@ -34,7 +38,10 @@ extern struct task_struct *FASTCALL(__switch_to(struct task_struct *prev,
"2" (prev), "d" (next)); \
} while (0)

# include "system_32.h"
/*
* disable hlt during certain critical i/o operations
*/
#define HAVE_DISABLE_HLT
#else
#define __SAVE(reg, offset) "movq %%" #reg ",(14-" #offset ")*8(%%rsp)\n\t"
#define __RESTORE(reg, offset) "movq (14-" #offset ")*8(%%rsp),%%" #reg "\n\t"
Expand Down Expand Up @@ -69,7 +76,6 @@ extern struct task_struct *FASTCALL(__switch_to(struct task_struct *prev,
[thread_info] "i" (offsetof(struct task_struct, stack)), \
[pda_pcurrent] "i" (offsetof(struct x8664_pda, pcurrent)) \
: "memory", "cc" __EXTRA_CLOBBER)
# include "system_64.h"
#endif

#ifdef __KERNEL__
Expand Down Expand Up @@ -236,6 +242,22 @@ static inline void native_wbinvd(void)
#define write_cr4(x) (native_write_cr4(x))
#define wbinvd() (native_wbinvd())

#ifdef CONFIG_X86_64

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");
}

#endif

/* Clear the 'TS' bit */
#define clts() (native_clts())

Expand Down
15 changes: 0 additions & 15 deletions trunk/include/asm-x86/system_32.h

This file was deleted.

0 comments on commit 5be532a

Please sign in to comment.