* generic gup fixups
@ 2019-07-01 15:18 Christoph Hellwig
2019-07-01 15:18 ` [PATCH 1/2] sh: stub out pud_page Christoph Hellwig
2019-07-01 15:18 ` [PATCH 2/2] MIPS: don't select ARCH_HAS_PTE_SPECIAL Christoph Hellwig
0 siblings, 2 replies; 5+ messages in thread
From: Christoph Hellwig @ 2019-07-01 15:18 UTC (permalink / raw)
To: Andrew Morton, Guenter Roeck, Paul Burton, James Hogan,
Yoshinori Sato, Rich Felker
Cc: linux-mips, linux-sh, linux-mm, linux-kernel
Hi Andrew,
below two fixups for the generic GUP series, as reported by Guenter.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] sh: stub out pud_page
2019-07-01 15:18 generic gup fixups Christoph Hellwig
@ 2019-07-01 15:18 ` Christoph Hellwig
2019-07-01 17:43 ` Guenter Roeck
2019-07-01 15:18 ` [PATCH 2/2] MIPS: don't select ARCH_HAS_PTE_SPECIAL Christoph Hellwig
1 sibling, 1 reply; 5+ messages in thread
From: Christoph Hellwig @ 2019-07-01 15:18 UTC (permalink / raw)
To: Andrew Morton, Guenter Roeck, Paul Burton, James Hogan,
Yoshinori Sato, Rich Felker
Cc: linux-mips, linux-sh, linux-mm, linux-kernel
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.
Fixes: 937b4e1d6471 ("sh: add the missing pud_page definition")
Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
arch/sh/include/asm/pgtable-3level.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/sh/include/asm/pgtable-3level.h b/arch/sh/include/asm/pgtable-3level.h
index 3c7ff20f3f94..779260b721ca 100644
--- a/arch/sh/include/asm/pgtable-3level.h
+++ b/arch/sh/include/asm/pgtable-3level.h
@@ -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)
--
2.20.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] MIPS: don't select ARCH_HAS_PTE_SPECIAL
2019-07-01 15:18 generic gup fixups Christoph Hellwig
2019-07-01 15:18 ` [PATCH 1/2] sh: stub out pud_page Christoph Hellwig
@ 2019-07-01 15:18 ` Christoph Hellwig
2019-07-01 17:43 ` Guenter Roeck
1 sibling, 1 reply; 5+ messages in thread
From: Christoph Hellwig @ 2019-07-01 15:18 UTC (permalink / raw)
To: Andrew Morton, Guenter Roeck, Paul Burton, James Hogan,
Yoshinori Sato, Rich Felker
Cc: linux-mips, linux-sh, linux-mm, linux-kernel
MIPS 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.
Fixes: eb9488e58bbc ("MIPS: use the generic get_user_pages_fast code")
Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
arch/mips/Kconfig | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index b1e42f0e4ed0..7957d3457156 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -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
--
2.20.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] sh: stub out pud_page
2019-07-01 15:18 ` [PATCH 1/2] sh: stub out pud_page Christoph Hellwig
@ 2019-07-01 17:43 ` Guenter Roeck
0 siblings, 0 replies; 5+ messages in thread
From: Guenter Roeck @ 2019-07-01 17:43 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Andrew Morton, Paul Burton, James Hogan, Yoshinori Sato,
Rich Felker, linux-mips, linux-sh, linux-mm, linux-kernel
On Mon, Jul 01, 2019 at 05:18:17PM +0200, Christoph Hellwig wrote:
> 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.
>
> Fixes: 937b4e1d6471 ("sh: add the missing pud_page definition")
> Reported-by: Guenter Roeck <linux@roeck-us.net>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Guenter Roeck <linux@roeck-us.net>
> ---
> arch/sh/include/asm/pgtable-3level.h | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/arch/sh/include/asm/pgtable-3level.h b/arch/sh/include/asm/pgtable-3level.h
> index 3c7ff20f3f94..779260b721ca 100644
> --- a/arch/sh/include/asm/pgtable-3level.h
> +++ b/arch/sh/include/asm/pgtable-3level.h
> @@ -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)
> --
> 2.20.1
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] MIPS: don't select ARCH_HAS_PTE_SPECIAL
2019-07-01 15:18 ` [PATCH 2/2] MIPS: don't select ARCH_HAS_PTE_SPECIAL Christoph Hellwig
@ 2019-07-01 17:43 ` Guenter Roeck
0 siblings, 0 replies; 5+ messages in thread
From: Guenter Roeck @ 2019-07-01 17:43 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Andrew Morton, Paul Burton, James Hogan, Yoshinori Sato,
Rich Felker, linux-mips, linux-sh, linux-mm, linux-kernel
On Mon, Jul 01, 2019 at 05:18:18PM +0200, Christoph Hellwig wrote:
> MIPS 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.
>
> Fixes: eb9488e58bbc ("MIPS: use the generic get_user_pages_fast code")
> Reported-by: Guenter Roeck <linux@roeck-us.net>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Guenter Roeck <linux@roeck-us.net>
> ---
> arch/mips/Kconfig | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
> index b1e42f0e4ed0..7957d3457156 100644
> --- a/arch/mips/Kconfig
> +++ b/arch/mips/Kconfig
> @@ -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
> --
> 2.20.1
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-07-01 17:43 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-01 15:18 generic gup fixups Christoph Hellwig
2019-07-01 15:18 ` [PATCH 1/2] sh: stub out pud_page Christoph Hellwig
2019-07-01 17:43 ` Guenter Roeck
2019-07-01 15:18 ` [PATCH 2/2] MIPS: don't select ARCH_HAS_PTE_SPECIAL Christoph Hellwig
2019-07-01 17:43 ` Guenter Roeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).