Skip to content

Commit

Permalink
xen: fix allocation and use of large ldts, cleanup
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jeremy Fitzhardinge authored and Ingo Molnar committed Jul 31, 2008
1 parent 4b336b0 commit cef43bf
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions arch/x86/xen/enlighten.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit cef43bf

Please sign in to comment.