Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b30e7590 authored by Aneesh Kumar K.V's avatar Aneesh Kumar K.V Committed by Michael Ellerman
Browse files

powerpc/mm: Switch to generic RCU get_user_pages_fast



This patch switch the ppc arch to use the generic RCU based
gup implementation.

Signed-off-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent f30c59e9
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -149,6 +149,7 @@ config PPC
	select ARCH_SUPPORTS_ATOMIC_RMW
	select DCACHE_WORD_ACCESS if PPC64 && CPU_LITTLE_ENDIAN
	select NO_BOOTMEM
	select HAVE_GENERIC_RCU_GUP

config GENERIC_CSUM
	def_bool CPU_LITTLE_ENDIAN
+4 −4
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@ static inline unsigned int hugepd_shift(hugepd_t hpd)
#endif /* CONFIG_PPC_BOOK3S_64 */


static inline pte_t *hugepte_offset(hugepd_t *hpdp, unsigned long addr,
static inline pte_t *hugepte_offset(hugepd_t hpd, unsigned long addr,
				    unsigned pdshift)
{
	/*
@@ -58,9 +58,9 @@ static inline pte_t *hugepte_offset(hugepd_t *hpdp, unsigned long addr,
	 */
	unsigned long idx = 0;

	pte_t *dir = hugepd_page(*hpdp);
	pte_t *dir = hugepd_page(hpd);
#ifndef CONFIG_PPC_FSL_BOOK3E
	idx = (addr & ((1UL << pdshift) - 1)) >> hugepd_shift(*hpdp);
	idx = (addr & ((1UL << pdshift) - 1)) >> hugepd_shift(hpd);
#endif

	return dir + idx;
@@ -193,7 +193,7 @@ static inline void flush_hugetlb_page(struct vm_area_struct *vma,
}

#define hugepd_shift(x) 0
static inline pte_t *hugepte_offset(hugepd_t *hpdp, unsigned long addr,
static inline pte_t *hugepte_offset(hugepd_t hpd, unsigned long addr,
				    unsigned pdshift)
{
	return 0;
+2 −1
Original line number Diff line number Diff line
@@ -379,13 +379,14 @@ static inline int hugepd_ok(hugepd_t hpd)
}
#endif

#define is_hugepd(pdep)               (hugepd_ok(*((hugepd_t *)(pdep))))
#define is_hugepd(hpd)               (hugepd_ok(hpd))
#define pgd_huge pgd_huge
int pgd_huge(pgd_t pgd);
#else /* CONFIG_HUGETLB_PAGE */
#define is_hugepd(pdep)			0
#define pgd_huge(pgd)			0
#endif /* CONFIG_HUGETLB_PAGE */
#define __hugepd(x) ((hugepd_t) { (x) })

struct page;
extern void clear_user_page(void *page, unsigned long vaddr, struct page *pg);
+0 −1
Original line number Diff line number Diff line
@@ -600,6 +600,5 @@ static inline int pmd_move_must_withdraw(struct spinlock *new_pmd_ptl,
	 */
	return true;
}

#endif /* __ASSEMBLY__ */
#endif /* _ASM_POWERPC_PGTABLE_PPC64_H_ */
+2 −4
Original line number Diff line number Diff line
@@ -274,11 +274,9 @@ extern void paging_init(void);
 */
extern void update_mmu_cache(struct vm_area_struct *, unsigned long, pte_t *);

extern int gup_hugepd(hugepd_t *hugepd, unsigned pdshift, unsigned long addr,
		      unsigned long end, int write, struct page **pages, int *nr);

extern int gup_hugepte(pte_t *ptep, unsigned long sz, unsigned long addr,
		       unsigned long end, int write, struct page **pages, int *nr);
		       unsigned long end, int write,
		       struct page **pages, int *nr);
#ifndef CONFIG_TRANSPARENT_HUGEPAGE
#define pmd_large(pmd)		0
#define has_transparent_hugepage() 0
Loading