aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/xen
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2008-07-28 16:33:44 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-31 11:10:35 -0400
commitcef43bf6b3afd819f7cdcba356af0e8220fb3789 (patch)
treeeecfcb5e61d525972dd39650d43f006ed9b2f6c7 /arch/x86/xen
parent4b336b0625fe822cdc21646cc3bc3abacf05a3d0 (diff)
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.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index cf8b3a93122b..04ec69e4d02e 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -237,8 +237,10 @@ static unsigned long xen_store_tr(void)
237} 237}
238 238
239/* 239/*
240 * If 'v' is a vmalloc mapping, then find the linear mapping of the 240 * Set the page permissions for a particular virtual address. If the
241 * page (if any) and also set its protections to match: 241 * address is a vmalloc mapping (or other non-linear mapping), then
242 * find the linear mapping of the page and also set its protections to
243 * match.
242 */ 244 */
243static void set_aliased_prot(void *v, pgprot_t prot) 245static void set_aliased_prot(void *v, pgprot_t prot)
244{ 246{
@@ -387,8 +389,7 @@ static void xen_load_gs_index(unsigned int idx)
387static void xen_write_ldt_entry(struct desc_struct *dt, int entrynum, 389static void xen_write_ldt_entry(struct desc_struct *dt, int entrynum,
388 const void *ptr) 390 const void *ptr)
389{ 391{
390 unsigned long lp = (unsigned long)&dt[entrynum]; 392 xmaddr_t mach_lp = arbitrary_virt_to_machine(&dt[entrynum]);
391 xmaddr_t mach_lp = arbitrary_virt_to_machine(lp);
392 u64 entry = *(u64 *)ptr; 393 u64 entry = *(u64 *)ptr;
393 394
394 preempt_disable(); 395 preempt_disable();