Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 80339
b: refs/heads/master
c: 9042219
h: refs/heads/master
i:
  80337: 2acf838
  80335: d06f2be
v: v3
  • Loading branch information
Eduardo Habkost authored and Ingo Molnar committed Jan 30, 2008
1 parent a74b4cb commit 7d9eae5
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1fe91514a3dc07ab540bc891589c46aaa47e92f6
refs/heads/master: 9042219cd8d43b81322b826d463dd6e52acae6cf
55 changes: 55 additions & 0 deletions trunk/include/asm-x86/paravirt.h
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,8 @@ struct pv_mmu_ops {
#if PAGETABLE_LEVELS == 4
pudval_t (*pud_val)(pud_t);
pud_t (*make_pud)(pudval_t pud);

void (*set_pgd)(pgd_t *pudp, pgd_t pgdval);
#endif /* PAGETABLE_LEVELS == 4 */
#endif /* PAGETABLE_LEVELS >= 3 */

Expand Down Expand Up @@ -1065,6 +1067,59 @@ static inline void set_pud(pud_t *pudp, pud_t pud)
PVOP_VCALL2(pv_mmu_ops.set_pud, pudp,
val);
}
#if PAGETABLE_LEVELS == 4
static inline pud_t __pud(pudval_t val)
{
pudval_t ret;

if (sizeof(pudval_t) > sizeof(long))
ret = PVOP_CALL2(pudval_t, pv_mmu_ops.make_pud,
val, (u64)val >> 32);
else
ret = PVOP_CALL1(pudval_t, pv_mmu_ops.make_pud,
val);

return (pud_t) { ret };
}

static inline pudval_t pud_val(pud_t pud)
{
pudval_t ret;

if (sizeof(pudval_t) > sizeof(long))
ret = PVOP_CALL2(pudval_t, pv_mmu_ops.pud_val,
pud.pud, (u64)pud.pud >> 32);
else
ret = PVOP_CALL1(pudval_t, pv_mmu_ops.pud_val,
pud.pud);

return ret;
}

static inline void set_pgd(pgd_t *pgdp, pgd_t pgd)
{
pgdval_t val = native_pgd_val(pgd);

if (sizeof(pgdval_t) > sizeof(long))
PVOP_VCALL3(pv_mmu_ops.set_pgd, pgdp,
val, (u64)val >> 32);
else
PVOP_VCALL2(pv_mmu_ops.set_pgd, pgdp,
val);
}

static inline void pgd_clear(pgd_t *pgdp)
{
set_pgd(pgdp, __pgd(0));
}

static inline void pud_clear(pud_t *pudp)
{
set_pud(pudp, __pud(0));
}

#endif /* PAGETABLE_LEVELS == 4 */

#endif /* PAGETABLE_LEVELS >= 3 */

#ifdef CONFIG_X86_PAE
Expand Down

0 comments on commit 7d9eae5

Please sign in to comment.