generic gup fixups
Subsystems (3)
Hi Andrew,
below two fixups for the generic GUP series, as reported by Guenter.
PATCH 1/2 sh: stub out pud_page
There wasn't any actual need to add a real pud_page, as pud_huge always returns false on sh. Just stub it out to fix the sh3 compile failure.
--- arch/sh/include/asm/pgtable-3level.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
arch/sh/include/asm/pgtable-3level.h +3 -1
@@ -37,7 +37,9 @@ static inline unsigned long pud_page_vaddr(pud_t pud) {return pud_val (pud); } -#define pud_page (pud) pfn_to_page(pud_pfn(pud)) + +/* only used by the stubbed out hugetlb gup code, should never be called */ +#define pud_page (pud) NULL#define pmd_index (address) (((address) >> PMD_SHIFT) & (PTRS_PER_PMD-1))static inline pmd_t *pmd_offset (pud_t *pud,unsigned long address)
Signature · 1 line
2.20.1
Re: [PATCH 1/2] sh: stub out pud_page
Quoted 7 lines · Christoph Hellwig
There wasn't any actual need to add a real
pud_page, aspud_hugealways returns false on sh. Just stub it out to fix the sh3 compile failure.Fixes 937b4e1d6471 ("sh: add the missing pud_page definition")Reported-by Guenter Roeck <[email protected]>Signed-off-by Christoph Hellwig <[email protected]>
Quoted 22 lines
--- arch/sh/include/asm/pgtable-3level.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)arch/sh/include/asm/pgtable-3level.h +3
-1@@ -37,7 +37,9 @@ static inline unsigned long pud_page_vaddr(pud_t pud) {return pud_val (pud); } -#define pud_page (pud) pfn_to_page(pud_pfn(pud)) + +/* only used by the stubbed out hugetlb gup code, should never be called */ +#define pud_page (pud) NULL#define pmd_index (address) (((address) >> PMD_SHIFT) & (PTRS_PER_PMD-1))static inline pmd_t *pmd_offset (pud_t *pud,unsigned long address)Signature · 1 line
2.20.1
PATCH 2/2 MIPS: don't select ARCH_HAS_PTE_SPECIAL
In reply to Christoph HellwigMIPS doesn't really have a proper pte_special implementation, just stubs. It turns out they were not enough to make get_user_pages_fast work, so drop the select. This means get_user_pages_fast won't actually use the fast path for non-hugepage mappings, so someone who actually knows about mips page table management should look into adding real pte_special support.
--- arch/mips/Kconfig | 1 - 1 file changed, 1 deletion(-)
arch/mips/Kconfig +0 -1
@@ -6,7 +6,6 @@ config MIPS select ARCH_BINFMT_ELF_STATE if MIPS_FP_SUPPORT select ARCH_CLOCKSOURCE_DATA select ARCH_HAS_ELF_RANDOMIZE - select ARCH_HAS_PTE_SPECIAL select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST select ARCH_HAS_UBSAN_SANITIZE_ALL select ARCH_SUPPORTS_UPROBES
Signature · 1 line
2.20.1
Re: [PATCH 2/2] MIPS: don't select ARCH_HAS_PTE_SPECIAL
Quoted 10 lines · Christoph Hellwig
MIPS doesn't really have a proper
pte_specialimplementation, just stubs. It turns out they were not enough to makeget_user_pages_fastwork, so drop the select. This meansget_user_pages_fastwon't actually use the fast path for non-hugepage mappings, so someone who actually knows about mips page table management should look into adding realpte_specialsupport.Fixes eb9488e58bbc ("MIPS: use the generic get_user_pages_fast code")Reported-by Guenter Roeck <[email protected]>Signed-off-by Christoph Hellwig <[email protected]>
Quoted 19 lines
--- arch/mips/Kconfig | 1 - 1 file changed, 1 deletion(-)arch/mips/Kconfig +0
-1@@ -6,7 +6,6 @@ config MIPS select ARCH_BINFMT_ELF_STATE if MIPS_FP_SUPPORT select ARCH_CLOCKSOURCE_DATA select ARCH_HAS_ELF_RANDOMIZE - select ARCH_HAS_PTE_SPECIAL select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST select ARCH_HAS_UBSAN_SANITIZE_ALL select ARCH_SUPPORTS_UPROBESSignature · 1 line
2.20.1