Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 5459
b: refs/heads/master
c: e7b47cc
h: refs/heads/master
i:
  5457: ff68887
  5455: ce2e2a6
v: v3
  • Loading branch information
Eric W. Biederman authored and Linus Torvalds committed Jul 29, 2005
1 parent da7339e commit 3f72131
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 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: 1108bae41e2ac596f46bc4cd8876b93063203d2b
refs/heads/master: e7b47ccaf655cbaf336745a9b65cf7b22a536fca
22 changes: 11 additions & 11 deletions trunk/arch/i386/kernel/machine_kexec.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <asm/io.h>
#include <asm/apic.h>
#include <asm/cpufeature.h>
#include <asm/desc.h>

static inline unsigned long read_cr3(void)
{
Expand Down Expand Up @@ -90,33 +91,32 @@ static void identity_map_page(unsigned long address)
}
#endif


static void set_idt(void *newidt, __u16 limit)
{
unsigned char curidt[6];
struct Xgt_desc_struct curidt;

/* ia32 supports unaliged loads & stores */
(*(__u16 *)(curidt)) = limit;
(*(__u32 *)(curidt +2)) = (unsigned long)(newidt);
curidt.size = limit;
curidt.address = (unsigned long)newidt;

__asm__ __volatile__ (
"lidt %0\n"
: "=m" (curidt)
"lidtl %0\n"
: : "m" (curidt)
);
};


static void set_gdt(void *newgdt, __u16 limit)
{
unsigned char curgdt[6];
struct Xgt_desc_struct curgdt;

/* ia32 supports unaligned loads & stores */
(*(__u16 *)(curgdt)) = limit;
(*(__u32 *)(curgdt +2)) = (unsigned long)(newgdt);
curgdt.size = limit;
curgdt.address = (unsigned long)newgdt;

__asm__ __volatile__ (
"lgdt %0\n"
: "=m" (curgdt)
"lgdtl %0\n"
: : "m" (curgdt)
);
};

Expand Down

0 comments on commit 3f72131

Please sign in to comment.