Skip to content

Commit

Permalink
x86/paravirt: Remove unneeded mmu related paravirt ops bits
Browse files Browse the repository at this point in the history
There is no need to have 32-bit code for CONFIG_PGTABLE_LEVELS >= 4.
Remove it.

Signed-off-by: Juergen Gross <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Link: https://lkml.kernel.org/r/[email protected]
  • Loading branch information
jgross1 authored and KAGA-KOKO committed Sep 3, 2018
1 parent fdc0269 commit 495310e
Showing 1 changed file with 3 additions and 17 deletions.
20 changes: 3 additions & 17 deletions arch/x86/include/asm/paravirt.h
Original file line number Diff line number Diff line change
Expand Up @@ -506,25 +506,14 @@ static inline pud_t __pud(pudval_t val)
{
pudval_t ret;

if (sizeof(pudval_t) > sizeof(long))
ret = PVOP_CALLEE2(pudval_t, mmu.make_pud, val, (u64)val >> 32);
else
ret = PVOP_CALLEE1(pudval_t, mmu.make_pud, val);
ret = PVOP_CALLEE1(pudval_t, mmu.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_CALLEE2(pudval_t, mmu.pud_val,
pud.pud, (u64)pud.pud >> 32);
else
ret = PVOP_CALLEE1(pudval_t, mmu.pud_val, pud.pud);

return ret;
return PVOP_CALLEE1(pudval_t, mmu.pud_val, pud.pud);
}

static inline void pud_clear(pud_t *pudp)
Expand All @@ -536,10 +525,7 @@ static inline void set_p4d(p4d_t *p4dp, p4d_t p4d)
{
p4dval_t val = native_p4d_val(p4d);

if (sizeof(p4dval_t) > sizeof(long))
PVOP_VCALL3(mmu.set_p4d, p4dp, val, (u64)val >> 32);
else
PVOP_VCALL2(mmu.set_p4d, p4dp, val);
PVOP_VCALL2(mmu.set_p4d, p4dp, val);
}

#if CONFIG_PGTABLE_LEVELS >= 5
Expand Down

0 comments on commit 495310e

Please sign in to comment.