]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
xen: fix allocation and use of large ldts, cleanup
authorJeremy Fitzhardinge <jeremy@goop.org>
Mon, 28 Jul 2008 20:33:44 +0000 (13:33 -0700)
committerIngo Molnar <mingo@elte.hu>
Thu, 31 Jul 2008 15:10:35 +0000 (17:10 +0200)
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>
arch/x86/xen/enlighten.c

index cf8b3a93122b9cf616780ec08f08d363807873a8..04ec69e4d02ef1b35f7f68294bf0efde527b8060 100644 (file)
@@ -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();