Remove special handling of {set,clear}_in_cr4().

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
This commit is contained in:
cl349@firebug.cl.cam.ac.uk committed 2006-03-28 10:09:44 +01:00
1 parent 80605be3af
commit e8e51446b5
2 files changed
+9 -28

No files matched your search

@@ -237,20 +237,11 @@ extern unsigned long mmu_cr4_features;
static inline void set_in_cr4 (unsigned long mask)
{
unsigned cr4;
mmu_cr4_features |= mask;
switch (mask) {
case X86_CR4_OSFXSR:
case X86_CR4_OSXMMEXCPT:
break;
default:
do {
const char *msg = "Xen unsupported cr4 update\n";
(void)HYPERVISOR_console_io(
CONSOLEIO_write, __builtin_strlen(msg),
(char *)msg);
BUG();
} while (0);
}
cr4 = read_cr4();
cr4 |= mask;
write_cr4(cr4);
}
static inline void clear_in_cr4 (unsigned long mask)
@@ -141,31 +141,21 @@ extern unsigned long mmu_cr4_features;
static inline void set_in_cr4 (unsigned long mask)
{
mmu_cr4_features |= mask;
switch (mask) {
case X86_CR4_OSFXSR:
case X86_CR4_OSXMMEXCPT:
break;
default:
do {
const char *msg = "Xen unsupported cr4 update\n";
(void)HYPERVISOR_console_io(
CONSOLEIO_write, __builtin_strlen(msg),
(char *)msg);
BUG();
} while (0);
}
__asm__("movq %%cr4,%%rax\n\t"
"orq %0,%%rax\n\t"
"movq %%rax,%%cr4\n"
: : "irg" (mask)
:"ax");
}
static inline void clear_in_cr4 (unsigned long mask)
{
#ifndef CONFIG_XEN
mmu_cr4_features &= ~mask;
__asm__("movq %%cr4,%%rax\n\t"
"andq %0,%%rax\n\t"
"movq %%rax,%%cr4\n"
: : "irg" (~mask)
:"ax");
#endif
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.