diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2008-07-28 13:33:44 -0700 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-31 17:10:35 +0200 |
commit | cef43bf6b3afd819f7cdcba356af0e8220fb3789 (patch) | |
tree | eecfcb5e61d525972dd39650d43f006ed9b2f6c7 /arch/x86/xen | |
parent | 4b336b0625fe822cdc21646cc3bc3abacf05a3d0 (diff) | |
download | op-kernel-dev-cef43bf6b3afd819f7cdcba356af0e8220fb3789.zip op-kernel-dev-cef43bf6b3afd819f7cdcba356af0e8220fb3789.tar.gz |
xen: fix allocation and use of large ldts, cleanup
Add a proper comment for set_aliased_prot() and fix an
unsigned long/void * warning.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/xen')
-rw-r--r-- | arch/x86/xen/enlighten.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index cf8b3a9..04ec69e 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c @@ -237,8 +237,10 @@ static unsigned long xen_store_tr(void) } /* - * If 'v' is a vmalloc mapping, then find the linear mapping of the - * page (if any) and also set its protections to match: + * Set the page permissions for a particular virtual address. If the + * address is a vmalloc mapping (or other non-linear mapping), then + * find the linear mapping of the page and also set its protections to + * match. */ static void set_aliased_prot(void *v, pgprot_t prot) { @@ -387,8 +389,7 @@ static void xen_load_gs_index(unsigned int idx) static void xen_write_ldt_entry(struct desc_struct *dt, int entrynum, const void *ptr) { - unsigned long lp = (unsigned long)&dt[entrynum]; - xmaddr_t mach_lp = arbitrary_virt_to_machine(lp); + xmaddr_t mach_lp = arbitrary_virt_to_machine(&dt[entrynum]); u64 entry = *(u64 *)ptr; preempt_disable(); |