* [PATCH] parisc: fix PMD pages allocation by restoring pmd_alloc_one()
@ 2020-08-16 14:24 Mike Rapoport
2020-08-16 14:42 ` Matthew Wilcox
0 siblings, 1 reply; 6+ messages in thread
From: Mike Rapoport @ 2020-08-16 14:24 UTC (permalink / raw)
To: linux-parisc
Cc: linux-kernel, Andrew Morton, Helge Deller, James E.J. Bottomley,
Linus Torvalds, Pekka Enberg, Matthew Wilcox, Meelis Roos,
Mike Rapoport, Mike Rapoport, Stephen Rothwell
From: Mike Rapoport <rppt@linux.ibm.com>
Commit 1355c31eeb7e ("asm-generic: pgalloc: provide generic pmd_alloc_one()
and pmd_free_one()") converted parisc to use generic version of
pmd_alloc_one() but it missed the fact that parisc uses order-1 pages for
PMD.
Restore the original version of pmd_alloc_one() for parisc, just use
GFP_PGTABLE_KERNEL that implies __GFP_ZERO instead of GFP_KERNEL and
memset.
Fixes: 1355c31eeb7e ("asm-generic: pgalloc: provide generic pmd_alloc_one() and pmd_free_one()")
Repoerted-by: Meelis Roos <mroos@linux.ee>
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Tested-by: Meelis Roos <mroos@linux.ee>
Link: https://lkml.kernel.org/r/9f2b5ebd-e4a4-0fa1-6cd3-4b9f6892d1ad@linux.ee
---
Hi,
I've trimmed the 'cc list relatively to the bug report and added parisc
maintainers.
arch/parisc/include/asm/pgalloc.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/parisc/include/asm/pgalloc.h b/arch/parisc/include/asm/pgalloc.h
index cc7ecc2ef55d..a6482b2ce0ea 100644
--- a/arch/parisc/include/asm/pgalloc.h
+++ b/arch/parisc/include/asm/pgalloc.h
@@ -10,6 +10,7 @@
#include <asm/cache.h>
+#define __HAVE_ARCH_PMD_ALLOC_ONE
#define __HAVE_ARCH_PMD_FREE
#define __HAVE_ARCH_PGD_FREE
#include <asm-generic/pgalloc.h>
@@ -67,6 +68,11 @@ static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd)
(__u32)(__pa((unsigned long)pmd) >> PxD_VALUE_SHIFT)));
}
+static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address)
+{
+ return (pmd_t *)__get_free_pages(GFP_PGTABLE_KERNEL, PMD_ORDER);
+}
+
static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
{
if (pmd_flag(*pmd) & PxD_FLAG_ATTACHED) {
--
2.26.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] parisc: fix PMD pages allocation by restoring pmd_alloc_one()
2020-08-16 14:24 [PATCH] parisc: fix PMD pages allocation by restoring pmd_alloc_one() Mike Rapoport
@ 2020-08-16 14:42 ` Matthew Wilcox
2020-08-16 17:43 ` Mike Rapoport
0 siblings, 1 reply; 6+ messages in thread
From: Matthew Wilcox @ 2020-08-16 14:42 UTC (permalink / raw)
To: Mike Rapoport
Cc: linux-parisc, linux-kernel, Andrew Morton, Helge Deller,
James E.J. Bottomley, Linus Torvalds, Pekka Enberg, Meelis Roos,
Mike Rapoport, Stephen Rothwell
On Sun, Aug 16, 2020 at 05:24:03PM +0300, Mike Rapoport wrote:
> From: Mike Rapoport <rppt@linux.ibm.com>
>
> Commit 1355c31eeb7e ("asm-generic: pgalloc: provide generic pmd_alloc_one()
> and pmd_free_one()") converted parisc to use generic version of
> pmd_alloc_one() but it missed the fact that parisc uses order-1 pages for
> PMD.
>
> Restore the original version of pmd_alloc_one() for parisc, just use
> GFP_PGTABLE_KERNEL that implies __GFP_ZERO instead of GFP_KERNEL and
> memset.
>
> Fixes: 1355c31eeb7e ("asm-generic: pgalloc: provide generic pmd_alloc_one() and pmd_free_one()")
> Repoerted-by: Meelis Roos <mroos@linux.ee>
typo, "Reported-by"
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
> Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
> Tested-by: Meelis Roos <mroos@linux.ee>
> Link: https://lkml.kernel.org/r/9f2b5ebd-e4a4-0fa1-6cd3-4b9f6892d1ad@linux.ee
> ---
>
> Hi,
>
> I've trimmed the 'cc list relatively to the bug report and added parisc
> maintainers.
>
> arch/parisc/include/asm/pgalloc.h | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/arch/parisc/include/asm/pgalloc.h b/arch/parisc/include/asm/pgalloc.h
> index cc7ecc2ef55d..a6482b2ce0ea 100644
> --- a/arch/parisc/include/asm/pgalloc.h
> +++ b/arch/parisc/include/asm/pgalloc.h
> @@ -10,6 +10,7 @@
>
> #include <asm/cache.h>
>
> +#define __HAVE_ARCH_PMD_ALLOC_ONE
> #define __HAVE_ARCH_PMD_FREE
> #define __HAVE_ARCH_PGD_FREE
> #include <asm-generic/pgalloc.h>
> @@ -67,6 +68,11 @@ static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd)
> (__u32)(__pa((unsigned long)pmd) >> PxD_VALUE_SHIFT)));
> }
>
> +static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address)
> +{
> + return (pmd_t *)__get_free_pages(GFP_PGTABLE_KERNEL, PMD_ORDER);
> +}
> +
> static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
> {
> if (pmd_flag(*pmd) & PxD_FLAG_ATTACHED) {
> --
> 2.26.2
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] parisc: fix PMD pages allocation by restoring pmd_alloc_one()
2020-08-16 14:42 ` Matthew Wilcox
@ 2020-08-16 17:43 ` Mike Rapoport
2020-08-16 17:52 ` Linus Torvalds
0 siblings, 1 reply; 6+ messages in thread
From: Mike Rapoport @ 2020-08-16 17:43 UTC (permalink / raw)
To: Matthew Wilcox, Helge Deller
Cc: linux-parisc, linux-kernel, Andrew Morton, James E.J. Bottomley,
Linus Torvalds, Pekka Enberg, Meelis Roos, Mike Rapoport,
Stephen Rothwell
On Sun, Aug 16, 2020 at 03:42:09PM +0100, Matthew Wilcox wrote:
> On Sun, Aug 16, 2020 at 05:24:03PM +0300, Mike Rapoport wrote:
> > From: Mike Rapoport <rppt@linux.ibm.com>
> >
> > Commit 1355c31eeb7e ("asm-generic: pgalloc: provide generic pmd_alloc_one()
> > and pmd_free_one()") converted parisc to use generic version of
> > pmd_alloc_one() but it missed the fact that parisc uses order-1 pages for
> > PMD.
> >
> > Restore the original version of pmd_alloc_one() for parisc, just use
> > GFP_PGTABLE_KERNEL that implies __GFP_ZERO instead of GFP_KERNEL and
> > memset.
> >
> > Fixes: 1355c31eeb7e ("asm-generic: pgalloc: provide generic pmd_alloc_one() and pmd_free_one()")
> > Repoerted-by: Meelis Roos <mroos@linux.ee>
>
> typo, "Reported-by"
Helge,
I presume this is going via parisc tree, do you mind fixing up
while applying?
> Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
>
> > Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
> > Tested-by: Meelis Roos <mroos@linux.ee>
> > Link: https://lkml.kernel.org/r/9f2b5ebd-e4a4-0fa1-6cd3-4b9f6892d1ad@linux.ee
> > ---
> >
> > Hi,
> >
> > I've trimmed the 'cc list relatively to the bug report and added parisc
> > maintainers.
> >
> > arch/parisc/include/asm/pgalloc.h | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > diff --git a/arch/parisc/include/asm/pgalloc.h b/arch/parisc/include/asm/pgalloc.h
> > index cc7ecc2ef55d..a6482b2ce0ea 100644
> > --- a/arch/parisc/include/asm/pgalloc.h
> > +++ b/arch/parisc/include/asm/pgalloc.h
> > @@ -10,6 +10,7 @@
> >
> > #include <asm/cache.h>
> >
> > +#define __HAVE_ARCH_PMD_ALLOC_ONE
> > #define __HAVE_ARCH_PMD_FREE
> > #define __HAVE_ARCH_PGD_FREE
> > #include <asm-generic/pgalloc.h>
> > @@ -67,6 +68,11 @@ static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd)
> > (__u32)(__pa((unsigned long)pmd) >> PxD_VALUE_SHIFT)));
> > }
> >
> > +static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address)
> > +{
> > + return (pmd_t *)__get_free_pages(GFP_PGTABLE_KERNEL, PMD_ORDER);
> > +}
> > +
> > static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
> > {
> > if (pmd_flag(*pmd) & PxD_FLAG_ATTACHED) {
> > --
> > 2.26.2
> >
--
Sincerely yours,
Mike.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] parisc: fix PMD pages allocation by restoring pmd_alloc_one()
2020-08-16 17:43 ` Mike Rapoport
@ 2020-08-16 17:52 ` Linus Torvalds
2020-08-16 18:54 ` Helge Deller
2020-08-17 6:53 ` Mike Rapoport
0 siblings, 2 replies; 6+ messages in thread
From: Linus Torvalds @ 2020-08-16 17:52 UTC (permalink / raw)
To: Mike Rapoport
Cc: Matthew Wilcox, Helge Deller, linux-parisc,
Linux Kernel Mailing List, Andrew Morton, James E.J. Bottomley,
Pekka Enberg, Meelis Roos, Mike Rapoport, Stephen Rothwell
On Sun, Aug 16, 2020 at 10:43 AM Mike Rapoport <rppt@kernel.org> wrote:
>
> I presume this is going via parisc tree, do you mind fixing up
> while applying?
I'll take it directly to not miss rc1, and I'll fix up the typo too.
Linus
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] parisc: fix PMD pages allocation by restoring pmd_alloc_one()
2020-08-16 17:52 ` Linus Torvalds
@ 2020-08-16 18:54 ` Helge Deller
2020-08-17 6:53 ` Mike Rapoport
1 sibling, 0 replies; 6+ messages in thread
From: Helge Deller @ 2020-08-16 18:54 UTC (permalink / raw)
To: Linus Torvalds, Mike Rapoport
Cc: Matthew Wilcox, linux-parisc, Linux Kernel Mailing List,
Andrew Morton, Pekka Enberg, Meelis Roos, Mike Rapoport,
Stephen Rothwell
On 16.08.20 19:52, Linus Torvalds wrote:
> On Sun, Aug 16, 2020 at 10:43 AM Mike Rapoport <rppt@kernel.org> wrote:
>>
>> I presume this is going via parisc tree, do you mind fixing up
>> while applying?
>
> I'll take it directly to not miss rc1, and I'll fix up the typo too.
Thanks!
Helge
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] parisc: fix PMD pages allocation by restoring pmd_alloc_one()
2020-08-16 17:52 ` Linus Torvalds
2020-08-16 18:54 ` Helge Deller
@ 2020-08-17 6:53 ` Mike Rapoport
1 sibling, 0 replies; 6+ messages in thread
From: Mike Rapoport @ 2020-08-17 6:53 UTC (permalink / raw)
To: Linus Torvalds
Cc: Matthew Wilcox, Helge Deller, linux-parisc,
Linux Kernel Mailing List, Andrew Morton, James E.J. Bottomley,
Pekka Enberg, Meelis Roos, Mike Rapoport, Stephen Rothwell
On Sun, Aug 16, 2020 at 10:52:21AM -0700, Linus Torvalds wrote:
> On Sun, Aug 16, 2020 at 10:43 AM Mike Rapoport <rppt@kernel.org> wrote:
> >
> > I presume this is going via parisc tree, do you mind fixing up
> > while applying?
>
> I'll take it directly to not miss rc1, and I'll fix up the typo too.
Thanks!
> Linus
--
Sincerely yours,
Mike.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-08-17 6:53 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-16 14:24 [PATCH] parisc: fix PMD pages allocation by restoring pmd_alloc_one() Mike Rapoport
2020-08-16 14:42 ` Matthew Wilcox
2020-08-16 17:43 ` Mike Rapoport
2020-08-16 17:52 ` Linus Torvalds
2020-08-16 18:54 ` Helge Deller
2020-08-17 6:53 ` Mike Rapoport
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).