diff options
author | James Hogan <james.hogan@imgtec.com> | 2017-02-09 15:20:06 +0000 |
---|---|---|
committer | James Hogan <james.hogan@imgtec.com> | 2017-02-13 18:57:31 +0000 |
commit | f700a420088624671ed955bf818c17012bb57bca (patch) | |
tree | edb0148c355db8c8f02b550181a250e94e8c93db /arch/mips/include/asm/pgalloc.h | |
parent | 98e58b01e1671e5784c67972ec1b58a8997f784e (diff) | |
parent | 7170bdc777556dad87f92e6a73a6cc557bf3290e (diff) |
Merge tag 'mips_kvm_4.11_1' into mips-for-linux-next
MIPS dependencies for KVM
Miscellaneous MIPS architecture changes depended on by the MIPS KVM
changes in the KVM tree.
- Move pgd_alloc() out of header.
- Exports so KVM can access page table management and TLBEX functions.
- Add return errors to protected cache ops.
Diffstat (limited to 'arch/mips/include/asm/pgalloc.h')
-rw-r--r-- | arch/mips/include/asm/pgalloc.h | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/arch/mips/include/asm/pgalloc.h b/arch/mips/include/asm/pgalloc.h index a03e86969f78..a8705f6c8180 100644 --- a/arch/mips/include/asm/pgalloc.h +++ b/arch/mips/include/asm/pgalloc.h @@ -43,21 +43,7 @@ static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd) * Initialize a new pgd / pmd table with invalid pointers. */ extern void pgd_init(unsigned long page); - -static inline pgd_t *pgd_alloc(struct mm_struct *mm) -{ - pgd_t *ret, *init; - - ret = (pgd_t *) __get_free_pages(GFP_KERNEL, PGD_ORDER); - if (ret) { - init = pgd_offset(&init_mm, 0UL); - pgd_init((unsigned long)ret); - memcpy(ret + USER_PTRS_PER_PGD, init + USER_PTRS_PER_PGD, - (PTRS_PER_PGD - USER_PTRS_PER_PGD) * sizeof(pgd_t)); - } - - return ret; -} +extern pgd_t *pgd_alloc(struct mm_struct *mm); static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd) { |