2012-10-18 06:22:17

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build failure after merge of the final tree (tip/s390 trees related)

Hi all,

After merging the final tree, today's linux-next build (s390 allyesconfig)
failed like this:

mm/huge_memory.c:1424:2: error: implicit declaration of function 'pmd_pgprot' [-Werror=implicit-function-declaration]
mm/huge_memory.c:1424:7: error: incompatible types when assigning to type 'pgprot_t' from type 'int'

(see http://kisskb.ellerman.id.au/kisskb/buildresult/7383823/)

Caused by commit 35d3d3427314 ("s390/thp: select
HAVE_ARCH_TRANSPARENT_HUGEPAGE") from the s390 tree interacting with
commit 93c9d633bd9e ("mm/thp: Preserve pgprot across huge page split")
from the tip tree.

N.B. Mips also selects HAVE_ARCH_TRANSPARENT_HUGEPAGE as of commit
e21a828a1bba ("MIPS: Transparent Huge Pages support") from the mips tree
and so will be broken in some configs now as well.

Anyone have suggested merge fix patches I can apply?
--
Cheers,
Stephen Rothwell [email protected]


Attachments:
(No filename) (910.00 B)
(No filename) (836.00 B)
Download all attachments

2012-10-18 14:51:21

by Ralf Baechle

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the final tree (tip/s390 trees related)

On Thu, Oct 18, 2012 at 05:22:01PM +1100, Stephen Rothwell wrote:

> After merging the final tree, today's linux-next build (s390 allyesconfig)
> failed like this:
>
> mm/huge_memory.c:1424:2: error: implicit declaration of function 'pmd_pgprot' [-Werror=implicit-function-declaration]
> mm/huge_memory.c:1424:7: error: incompatible types when assigning to type 'pgprot_t' from type 'int'
>
> (see http://kisskb.ellerman.id.au/kisskb/buildresult/7383823/)
>
> Caused by commit 35d3d3427314 ("s390/thp: select
> HAVE_ARCH_TRANSPARENT_HUGEPAGE") from the s390 tree interacting with
> commit 93c9d633bd9e ("mm/thp: Preserve pgprot across huge page split")
> from the tip tree.
>
> N.B. Mips also selects HAVE_ARCH_TRANSPARENT_HUGEPAGE as of commit
> e21a828a1bba ("MIPS: Transparent Huge Pages support") from the mips tree
> and so will be broken in some configs now as well.
>
> Anyone have suggested merge fix patches I can apply?

See below. There's further MIPS breakage in -next; more on than in a
separate email.

Ralf

Signed-off-by: Ralf Baechle <[email protected]>

arch/mips/include/asm/pgtable.h | 2 ++
1 file changed, 2 insertions(+)

diff --git a/arch/mips/include/asm/pgtable.h b/arch/mips/include/asm/pgtable.h
index 252202d..5f7c615 100644
--- a/arch/mips/include/asm/pgtable.h
+++ b/arch/mips/include/asm/pgtable.h
@@ -534,6 +534,8 @@ static inline pmd_t pmd_modify(pmd_t pmd, pgprot_t newprot)
return pmd;
}

+#define pmd_pgprot(x) __pgprot(pmd_val(x) & ~_PAGE_CHG_MASK)
+
static inline pmd_t pmd_mknotpresent(pmd_t pmd)
{
pmd_val(pmd) &= ~(_PAGE_PRESENT | _PAGE_VALID | _PAGE_DIRTY);

2012-10-18 15:02:17

by Ralf Baechle

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the final tree (tip/s390 trees related)

On Thu, Oct 18, 2012 at 05:22:01PM +1100, Stephen Rothwell wrote:

> Caused by commit 35d3d3427314 ("s390/thp: select
> HAVE_ARCH_TRANSPARENT_HUGEPAGE") from the s390 tree interacting with
> commit 93c9d633bd9e ("mm/thp: Preserve pgprot across huge page split")
> from the tip tree.
>
> N.B. Mips also selects HAVE_ARCH_TRANSPARENT_HUGEPAGE as of commit
> e21a828a1bba ("MIPS: Transparent Huge Pages support") from the mips tree
> and so will be broken in some configs now as well.

The other issue I'm running into is:

CC mm/huge_memory.o
mm/huge_memory.c: In function ‘do_huge_pmd_prot_none’:
mm/huge_memory.c:789:3: error: incompatible type for argument 3 of ‘update_mmu_cache’
In file included from include/linux/mm.h:44:0,
from mm/huge_memory.c:8:
/home/ralf/src/linux/linux-mips/arch/mips/include/asm/pgtable.h:375:91: note: expected ‘struct pte_t *’ but argument is of type ‘pmd_t’
mm/huge_memory.c: In function ‘__split_huge_page_map’:
mm/huge_memory.c:1424:2: error: implicit declaration of function ‘pmd_pgprot’ [-Werror=implicit-function-declaration]
mm/huge_memory.c:1424:7: error: incompatible types when assigning to type ‘pgprot_t’ from type ‘int’
cc1: some warnings being treated as errors
make[1]: *** [mm/huge_memory.o] Error 1

which is caused by:

commit a573b4dfcf58f86235d586ea1f82ed54b2b7e620
Author: Peter Zijlstra <[email protected]>
Date: Tue Jul 17 18:25:14 2012 +0200

mm/mpol: Create special PROT_NONE infrastructure

is adding a update_mmu_cache() call with incorrect arguments to
do_huge_pmd_prot_none(). This only shows up where update_mmu_cache()
is implemented as a C function; the usual macro implementation is eating
everything and the kitchensink as arguments.

Ralf

2012-10-18 16:26:51

by Gerald Schaefer

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the final tree (tip/s390 trees related)

On Thu, 18 Oct 2012 17:22:01 +1100
Stephen Rothwell <[email protected]> wrote:

> Hi all,
>
> After merging the final tree, today's linux-next build (s390 allyesconfig)
> failed like this:
>
> mm/huge_memory.c:1424:2: error: implicit declaration of function 'pmd_pgprot' [-Werror=implicit-function-declaration]
> mm/huge_memory.c:1424:7: error: incompatible types when assigning to type 'pgprot_t' from type 'int'
>
> (see http://kisskb.ellerman.id.au/kisskb/buildresult/7383823/)
>
> Caused by commit 35d3d3427314 ("s390/thp: select
> HAVE_ARCH_TRANSPARENT_HUGEPAGE") from the s390 tree interacting with
> commit 93c9d633bd9e ("mm/thp: Preserve pgprot across huge page split")
> from the tip tree.
>
> N.B. Mips also selects HAVE_ARCH_TRANSPARENT_HUGEPAGE as of commit
> e21a828a1bba ("MIPS: Transparent Huge Pages support") from the mips tree
> and so will be broken in some configs now as well.
>
> Anyone have suggested merge fix patches I can apply?

Subject: [PATCH] s390/thp: implement pmd_pgprot() for s390

git commit "mm/thp: Preserve pgprot across huge page split" in
linux-next introduced a pmd_pgprot() function, which is missing on
s390, resulting in a compile error when transparent huge pages are
enabled. This patch adds an implementation of pmd_pgprot() for s390.

Signed-off-by: Gerald Schaefer <[email protected]>
---
arch/s390/include/asm/pgtable.h | 13 +++++++++++++
1 file changed, 13 insertions(+)

diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h
index f8887ab..2846920 100644
--- a/arch/s390/include/asm/pgtable.h
+++ b/arch/s390/include/asm/pgtable.h
@@ -1250,6 +1250,19 @@ static inline void set_pmd_at(struct mm_struct *mm, unsigned long addr,
*pmdp = entry;
}

+static inline pgprot_t pmd_pgprot(pmd_t pmd)
+{
+ pgprot_t prot = PAGE_RW;
+
+ if (pmd_val(pmd) & _SEGMENT_ENTRY_RO) {
+ if (pmd_val(pmd) & _SEGMENT_ENTRY_INV)
+ prot = PAGE_NONE;
+ else
+ prot = PAGE_RO;
+ }
+ return prot;
+}
+
static inline unsigned long massage_pgprot_pmd(pgprot_t pgprot)
{
unsigned long pgprot_pmd = 0;
--
1.7.11.7

2012-10-18 18:30:03

by Ingo Molnar

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the final tree (tip/s390 trees related)


* Stephen Rothwell <[email protected]> wrote:

> Hi all,
>
> After merging the final tree, today's linux-next build (s390 allyesconfig)
> failed like this:
>
> mm/huge_memory.c:1424:2: error: implicit declaration of function 'pmd_pgprot' [-Werror=implicit-function-declaration]
> mm/huge_memory.c:1424:7: error: incompatible types when assigning to type 'pgprot_t' from type 'int'
>
> (see http://kisskb.ellerman.id.au/kisskb/buildresult/7383823/)
>
> Caused by commit 35d3d3427314 ("s390/thp: select
> HAVE_ARCH_TRANSPARENT_HUGEPAGE") from the s390 tree interacting with
> commit 93c9d633bd9e ("mm/thp: Preserve pgprot across huge page split")
> from the tip tree.
>
> N.B. Mips also selects HAVE_ARCH_TRANSPARENT_HUGEPAGE as of commit
> e21a828a1bba ("MIPS: Transparent Huge Pages support") from the mips tree
> and so will be broken in some configs now as well.
>
> Anyone have suggested merge fix patches I can apply?

Resolved it for now by excluding those changes, will put them
back in once they are fixed.

Thanks,

Ingo

2012-10-19 02:56:36

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the final tree (tip/s390 trees related)

Hi Ralf,

On Thu, 18 Oct 2012 16:51:01 +0200 Ralf Baechle <[email protected]> wrote:
>
> On Thu, Oct 18, 2012 at 05:22:01PM +1100, Stephen Rothwell wrote:
>
> > After merging the final tree, today's linux-next build (s390 allyesconfig)
> > failed like this:
> >
> > mm/huge_memory.c:1424:2: error: implicit declaration of function 'pmd_pgprot' [-Werror=implicit-function-declaration]
> > mm/huge_memory.c:1424:7: error: incompatible types when assigning to type 'pgprot_t' from type 'int'
> >
> > (see http://kisskb.ellerman.id.au/kisskb/buildresult/7383823/)
> >
> > Caused by commit 35d3d3427314 ("s390/thp: select
> > HAVE_ARCH_TRANSPARENT_HUGEPAGE") from the s390 tree interacting with
> > commit 93c9d633bd9e ("mm/thp: Preserve pgprot across huge page split")
> > from the tip tree.
> >
> > N.B. Mips also selects HAVE_ARCH_TRANSPARENT_HUGEPAGE as of commit
> > e21a828a1bba ("MIPS: Transparent Huge Pages support") from the mips tree
> > and so will be broken in some configs now as well.
> >
> > Anyone have suggested merge fix patches I can apply?
>
> See below.

I have added that to linux-next today as a merge fix.

--
Cheers,
Stephen Rothwell [email protected]
http://www.canb.auug.org.au/~sfr/


Attachments:
(No filename) (1.21 kB)
(No filename) (836.00 B)
Download all attachments

2012-10-19 02:57:32

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the final tree (tip/s390 trees related)

Hi Gerald,

On Thu, 18 Oct 2012 18:26:42 +0200 Gerald Schaefer <[email protected]> wrote:
>
> On Thu, 18 Oct 2012 17:22:01 +1100
> Stephen Rothwell <[email protected]> wrote:
>
> > After merging the final tree, today's linux-next build (s390 allyesconfig)
> > failed like this:
> >
> > mm/huge_memory.c:1424:2: error: implicit declaration of function 'pmd_pgprot' [-Werror=implicit-function-declaration]
> > mm/huge_memory.c:1424:7: error: incompatible types when assigning to type 'pgprot_t' from type 'int'
> >
> > (see http://kisskb.ellerman.id.au/kisskb/buildresult/7383823/)
> >
> > Caused by commit 35d3d3427314 ("s390/thp: select
> > HAVE_ARCH_TRANSPARENT_HUGEPAGE") from the s390 tree interacting with
> > commit 93c9d633bd9e ("mm/thp: Preserve pgprot across huge page split")
> > from the tip tree.
> >
> > N.B. Mips also selects HAVE_ARCH_TRANSPARENT_HUGEPAGE as of commit
> > e21a828a1bba ("MIPS: Transparent Huge Pages support") from the mips tree
> > and so will be broken in some configs now as well.
> >
> > Anyone have suggested merge fix patches I can apply?
>
> Subject: [PATCH] s390/thp: implement pmd_pgprot() for s390
>
> git commit "mm/thp: Preserve pgprot across huge page split" in
> linux-next introduced a pmd_pgprot() function, which is missing on
> s390, resulting in a compile error when transparent huge pages are
> enabled. This patch adds an implementation of pmd_pgprot() for s390.
>
> Signed-off-by: Gerald Schaefer <[email protected]>

I have added that to linux-next today as a merge fix.

--
Cheers,
Stephen Rothwell [email protected]


Attachments:
(No filename) (1.59 kB)
(No filename) (836.00 B)
Download all attachments

2012-10-19 03:07:09

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the final tree (tip/s390 trees related)

Hi Ingo,

On Thu, 18 Oct 2012 20:29:53 +0200 Ingo Molnar <[email protected]> wrote:
>
> * Stephen Rothwell <[email protected]> wrote:
> >
> > After merging the final tree, today's linux-next build (s390 allyesconfig)
> > failed like this:
> >
> > mm/huge_memory.c:1424:2: error: implicit declaration of function 'pmd_pgprot' [-Werror=implicit-function-declaration]
> > mm/huge_memory.c:1424:7: error: incompatible types when assigning to type 'pgprot_t' from type 'int'
> >
> > (see http://kisskb.ellerman.id.au/kisskb/buildresult/7383823/)
> >
> > Caused by commit 35d3d3427314 ("s390/thp: select
> > HAVE_ARCH_TRANSPARENT_HUGEPAGE") from the s390 tree interacting with
> > commit 93c9d633bd9e ("mm/thp: Preserve pgprot across huge page split")
> > from the tip tree.
> >
> > N.B. Mips also selects HAVE_ARCH_TRANSPARENT_HUGEPAGE as of commit
> > e21a828a1bba ("MIPS: Transparent Huge Pages support") from the mips tree
> > and so will be broken in some configs now as well.
> >
> > Anyone have suggested merge fix patches I can apply?
>
> Resolved it for now by excluding those changes, will put them
> back in once they are fixed.

It looks as though you have not gone back far enough - you removed a
couple of merges of sched/numa, but there are more. I have two of the
problems resolved with merge patches that supply pmd_pgprot() for s390
and mips, but there is another problem with mips (see Ralf's other email).

Also, I suspect that if you do exclude all the sched/numa changes it will
make a mess of Andrew's mmotm (as it basically sits on top of linux-next).
--
Cheers,
Stephen Rothwell [email protected]


Attachments:
(No filename) (1.61 kB)
(No filename) (836.00 B)
Download all attachments

2012-10-19 21:37:38

by Ingo Molnar

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the final tree (tip/s390 trees related)


* Gerald Schaefer <[email protected]> wrote:

> On Thu, 18 Oct 2012 17:22:01 +1100
> Stephen Rothwell <[email protected]> wrote:
>
> > Hi all,
> >
> > After merging the final tree, today's linux-next build (s390 allyesconfig)
> > failed like this:
> >
> > mm/huge_memory.c:1424:2: error: implicit declaration of function 'pmd_pgprot' [-Werror=implicit-function-declaration]
> > mm/huge_memory.c:1424:7: error: incompatible types when assigning to type 'pgprot_t' from type 'int'
> >
> > (see http://kisskb.ellerman.id.au/kisskb/buildresult/7383823/)
> >
> > Caused by commit 35d3d3427314 ("s390/thp: select
> > HAVE_ARCH_TRANSPARENT_HUGEPAGE") from the s390 tree interacting with
> > commit 93c9d633bd9e ("mm/thp: Preserve pgprot across huge page split")
> > from the tip tree.
> >
> > N.B. Mips also selects HAVE_ARCH_TRANSPARENT_HUGEPAGE as of commit
> > e21a828a1bba ("MIPS: Transparent Huge Pages support") from the mips tree
> > and so will be broken in some configs now as well.
> >
> > Anyone have suggested merge fix patches I can apply?
>
> Subject: [PATCH] s390/thp: implement pmd_pgprot() for s390

Thanks Gerald! I'll merge this as well so that the semantic
conflict disappears from linux-next.

Thanks,

Ingo

2012-10-19 21:48:57

by Ingo Molnar

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the final tree (tip/s390 trees related)


* Ralf Baechle <[email protected]> wrote:

> On Thu, Oct 18, 2012 at 05:22:01PM +1100, Stephen Rothwell wrote:
>
> > After merging the final tree, today's linux-next build (s390 allyesconfig)
> > failed like this:
> >
> > mm/huge_memory.c:1424:2: error: implicit declaration of function 'pmd_pgprot' [-Werror=implicit-function-declaration]
> > mm/huge_memory.c:1424:7: error: incompatible types when assigning to type 'pgprot_t' from type 'int'
> >
> > (see http://kisskb.ellerman.id.au/kisskb/buildresult/7383823/)
> >
> > Caused by commit 35d3d3427314 ("s390/thp: select
> > HAVE_ARCH_TRANSPARENT_HUGEPAGE") from the s390 tree interacting with
> > commit 93c9d633bd9e ("mm/thp: Preserve pgprot across huge page split")
> > from the tip tree.
> >
> > N.B. Mips also selects HAVE_ARCH_TRANSPARENT_HUGEPAGE as of commit
> > e21a828a1bba ("MIPS: Transparent Huge Pages support") from the mips tree
> > and so will be broken in some configs now as well.
> >
> > Anyone have suggested merge fix patches I can apply?
>
> See below. There's further MIPS breakage in -next; more on than in a
> separate email.
>
> Ralf
>
> Signed-off-by: Ralf Baechle <[email protected]>

Thanks Ralf! I've applied it, with a changelog and a
Reported-by: Stephen Rothwell line - see the commit below.

Note that I moved the definition slightly up, so that regardless
of the order merging the commits don't create a conflict in
linux-next. If that fine with you I'll push it out that way.

(Looking at the other MIPS problem as well.)

Thanks,

Ingo


---------------->
>From 8cd7680d8b7241941fd51d83302677d58b447223 Mon Sep 17 00:00:00 2001
From: Ralf Baechle <[email protected]>
Date: Thu, 18 Oct 2012 16:51:01 +0200
Subject: [PATCH] MIPS/thp: Add pmd_pgprot() implementation

Resolve the semantic conflict between the new THP code
on MIPS and the new NUMA code, in linux-next, by adding
the pmd_pgprot() method needed by the NUMA code.

Reported-by: Stephen Rothwell <[email protected]>
Signed-off-by: Ralf Baechle <[email protected]>
Cc: Martin Schwidefsky <[email protected]>
Cc: Heiko Carstens <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
---
arch/mips/include/asm/pgtable.h | 2 ++
1 file changed, 2 insertions(+)

diff --git a/arch/mips/include/asm/pgtable.h b/arch/mips/include/asm/pgtable.h
index c02158b..bbe4cda 100644
--- a/arch/mips/include/asm/pgtable.h
+++ b/arch/mips/include/asm/pgtable.h
@@ -89,6 +89,8 @@ static inline int is_zero_pfn(unsigned long pfn)

extern void paging_init(void);

+#define pmd_pgprot(x) __pgprot(pmd_val(x) & ~_PAGE_CHG_MASK)
+
/*
* Conversion functions: convert a page and protection to a page entry,
* and a page entry and page directory to the page they refer to.

2012-10-19 21:53:34

by Peter Zijlstra

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the final tree (tip/s390 trees related)

On Thu, 2012-10-18 at 17:02 +0200, Ralf Baechle wrote:
> CC mm/huge_memory.o
> mm/huge_memory.c: In function ‘do_huge_pmd_prot_none’:
> mm/huge_memory.c:789:3: error: incompatible type for argument 3 of ‘update_mmu_cache’

That appears to have become update_mmu_cache_pmd(), which makes sense
given that there's now architectures that care about it.

2012-10-19 22:36:32

by Ingo Molnar

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the final tree (tip/s390 trees related)


* Peter Zijlstra <[email protected]> wrote:

> On Thu, 2012-10-18 at 17:02 +0200, Ralf Baechle wrote:
> > CC mm/huge_memory.o
> > mm/huge_memory.c: In function ???do_huge_pmd_prot_none???:
> > mm/huge_memory.c:789:3: error: incompatible type for argument 3 of ???update_mmu_cache???
>
> That appears to have become update_mmu_cache_pmd(), which
> makes sense given that there's now architectures that care
> about it.

Ok, I fixed it as per below. Does everyone agree?

Thanks,

Ingo

---------------->
>From 6e683978132907ff339e8a01a4d901c75709e62c Mon Sep 17 00:00:00 2001
From: Ingo Molnar <[email protected]>
Date: Sat, 20 Oct 2012 00:33:01 +0200
Subject: [PATCH] MIPS/thp: Fix update_mmu_cache() cache call

As per recent upstream commit:

b113da65785d mm: Add and use update_mmu_cache_pmd() in transparent huge page code.

The call in do_huge_pmd_prot_none() needs to call update_mmu_cache_pmd()
as well.

This resolves a MIPS build error triggered on linux-next.

Reported-by: Ralf Baechle <[email protected]>
Reported-by: Stephen Rothwell <[email protected]>
Acked-by: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
---
mm/huge_memory.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 8100c01..57c5018 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -770,7 +770,7 @@ fixup:
/* change back to regular protection */
entry = pmd_modify(entry, vma->vm_page_prot);
set_pmd_at(mm, haddr, pmd, entry);
- update_mmu_cache(vma, address, entry);
+ update_mmu_cache_pmd(vma, address, entry);

unlock:
spin_unlock(&mm->page_table_lock);

2012-10-19 22:39:46

by Ingo Molnar

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the final tree (tip/s390 trees related)


Actually, there's two sites - find the updated patch below.

Thanks,

Ingo

--------------->
>From 7fc4d49214dba401f4b92ed62da60a5b257a653a Mon Sep 17 00:00:00 2001
From: Ingo Molnar <[email protected]>
Date: Sat, 20 Oct 2012 00:33:01 +0200
Subject: [PATCH] MIPS/thp: Fix update_mmu_cache() cache call

As per recent upstream commit:

b113da65785d mm: Add and use update_mmu_cache_pmd() in transparent huge page code.

The call in do_huge_pmd_prot_none() needs to call update_mmu_cache_pmd()
as well.

This resolves a MIPS build error triggered on linux-next.

Reported-by: Ralf Baechle <[email protected]>
Reported-by: Stephen Rothwell <[email protected]>
Acked-by: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
---
mm/huge_memory.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 8100c01..1068e78 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -770,7 +770,7 @@ fixup:
/* change back to regular protection */
entry = pmd_modify(entry, vma->vm_page_prot);
set_pmd_at(mm, haddr, pmd, entry);
- update_mmu_cache(vma, address, entry);
+ update_mmu_cache_pmd(vma, address, entry);

unlock:
spin_unlock(&mm->page_table_lock);
@@ -846,7 +846,7 @@ migrate:
page_add_new_anon_rmap(new_page, vma, haddr);

set_pmd_at(mm, haddr, pmd, entry);
- update_mmu_cache(vma, address, entry);
+ update_mmu_cache_pmd(vma, address, entry);
page_remove_rmap(page);
spin_unlock(&mm->page_table_lock);

2012-10-19 22:43:54

by Ingo Molnar

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the final tree (tip/s390 trees related)


* Stephen Rothwell <[email protected]> wrote:

> Hi Ingo,
>
> On Thu, 18 Oct 2012 20:29:53 +0200 Ingo Molnar <[email protected]> wrote:
> >
> > * Stephen Rothwell <[email protected]> wrote:
> > >
> > > After merging the final tree, today's linux-next build (s390 allyesconfig)
> > > failed like this:
> > >
> > > mm/huge_memory.c:1424:2: error: implicit declaration of function 'pmd_pgprot' [-Werror=implicit-function-declaration]
> > > mm/huge_memory.c:1424:7: error: incompatible types when assigning to type 'pgprot_t' from type 'int'
> > >
> > > (see http://kisskb.ellerman.id.au/kisskb/buildresult/7383823/)
> > >
> > > Caused by commit 35d3d3427314 ("s390/thp: select
> > > HAVE_ARCH_TRANSPARENT_HUGEPAGE") from the s390 tree interacting with
> > > commit 93c9d633bd9e ("mm/thp: Preserve pgprot across huge page split")
> > > from the tip tree.
> > >
> > > N.B. Mips also selects HAVE_ARCH_TRANSPARENT_HUGEPAGE as of commit
> > > e21a828a1bba ("MIPS: Transparent Huge Pages support") from the mips tree
> > > and so will be broken in some configs now as well.
> > >
> > > Anyone have suggested merge fix patches I can apply?
> >
> > Resolved it for now by excluding those changes, will put them
> > back in once they are fixed.
>
> It looks as though you have not gone back far enough - you
> removed a couple of merges of sched/numa, but there are more.
> I have two of the problems resolved with merge patches that
> supply pmd_pgprot() for s390 and mips, but there is another
> problem with mips (see Ralf's other email).

Yeah. All of this should be resolved now in principle. Next time
you'll integrate linux-next is on Monday, right?

Thanks,

Ingo

2012-10-20 01:06:46

by Gerald Schaefer

[permalink] [raw]
Subject: [tip:numa/core] s390/thp: implement pmd_pgprot() for s390

Commit-ID: ca6cfbe6d25cdf9ed81cbf26c2146eda17a70472
Gitweb: http://git.kernel.org/tip/ca6cfbe6d25cdf9ed81cbf26c2146eda17a70472
Author: Gerald Schaefer <[email protected]>
AuthorDate: Thu, 18 Oct 2012 18:26:42 +0200
Committer: Ingo Molnar <[email protected]>
CommitDate: Fri, 19 Oct 2012 23:38:48 +0200

s390/thp: implement pmd_pgprot() for s390

Git commit "mm/thp: Preserve pgprot across huge page split"
introduced a pmd_pgprot() function, which is missing
on s390, resulting in a compile error in linux-next where
THP is enabled on s390 as well.

This patch adds an implementation of pmd_pgprot() for s390.

Reported-by: Stephen Rothwell <[email protected]>
Signed-off-by: Gerald Schaefer <[email protected]>
Cc: Martin Schwidefsky <[email protected]>
Cc: Heiko Carstens <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Ralf Baechle <[email protected]>
Link: http://lkml.kernel.org/r/20121018182642.2a541275@thinkpad
Signed-off-by: Ingo Molnar <[email protected]>
---
arch/s390/include/asm/pgtable.h | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h
index dd647c9..098fc5a 100644
--- a/arch/s390/include/asm/pgtable.h
+++ b/arch/s390/include/asm/pgtable.h
@@ -1240,6 +1240,19 @@ static inline void set_pmd_at(struct mm_struct *mm, unsigned long addr,
*pmdp = entry;
}

+static inline pgprot_t pmd_pgprot(pmd_t pmd)
+{
+ pgprot_t prot = PAGE_RW;
+
+ if (pmd_val(pmd) & _SEGMENT_ENTRY_RO) {
+ if (pmd_val(pmd) & _SEGMENT_ENTRY_INV)
+ prot = PAGE_NONE;
+ else
+ prot = PAGE_RO;
+ }
+ return prot;
+}
+
static inline unsigned long massage_pgprot_pmd(pgprot_t pgprot)
{
unsigned long pgprot_pmd = 0;

2012-10-20 01:07:41

by Ralf Baechle

[permalink] [raw]
Subject: [tip:numa/core] MIPS/thp: Add pmd_pgprot() implementation

Commit-ID: 8cd7680d8b7241941fd51d83302677d58b447223
Gitweb: http://git.kernel.org/tip/8cd7680d8b7241941fd51d83302677d58b447223
Author: Ralf Baechle <[email protected]>
AuthorDate: Thu, 18 Oct 2012 16:51:01 +0200
Committer: Ingo Molnar <[email protected]>
CommitDate: Fri, 19 Oct 2012 23:46:11 +0200

MIPS/thp: Add pmd_pgprot() implementation

Resolve the semantic conflict between the new THP code
on MIPS and the new NUMA code, in linux-next, by adding
the pmd_pgprot() method needed by the NUMA code.

Reported-by: Stephen Rothwell <[email protected]>
Signed-off-by: Ralf Baechle <[email protected]>
Cc: Martin Schwidefsky <[email protected]>
Cc: Heiko Carstens <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
---
arch/mips/include/asm/pgtable.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/mips/include/asm/pgtable.h b/arch/mips/include/asm/pgtable.h
index c02158b..bbe4cda 100644
--- a/arch/mips/include/asm/pgtable.h
+++ b/arch/mips/include/asm/pgtable.h
@@ -89,6 +89,8 @@ static inline int is_zero_pfn(unsigned long pfn)

extern void paging_init(void);

+#define pmd_pgprot(x) __pgprot(pmd_val(x) & ~_PAGE_CHG_MASK)
+
/*
* Conversion functions: convert a page and protection to a page entry,
* and a page entry and page directory to the page they refer to.

2012-10-20 01:08:38

by Ingo Molnar

[permalink] [raw]
Subject: [tip:numa/core] MIPS/thp: Fix update_mmu_cache() cache call

Commit-ID: 7fc4d49214dba401f4b92ed62da60a5b257a653a
Gitweb: http://git.kernel.org/tip/7fc4d49214dba401f4b92ed62da60a5b257a653a
Author: Ingo Molnar <[email protected]>
AuthorDate: Sat, 20 Oct 2012 00:33:01 +0200
Committer: Ingo Molnar <[email protected]>
CommitDate: Sat, 20 Oct 2012 00:39:02 +0200

MIPS/thp: Fix update_mmu_cache() cache call

As per recent upstream commit:

b113da65785d mm: Add and use update_mmu_cache_pmd() in transparent huge page code.

The call in do_huge_pmd_prot_none() needs to call update_mmu_cache_pmd()
as well.

This resolves a MIPS build error triggered on linux-next.

Reported-by: Ralf Baechle <[email protected]>
Reported-by: Stephen Rothwell <[email protected]>
Acked-by: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
---
mm/huge_memory.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 8100c01..1068e78 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -770,7 +770,7 @@ fixup:
/* change back to regular protection */
entry = pmd_modify(entry, vma->vm_page_prot);
set_pmd_at(mm, haddr, pmd, entry);
- update_mmu_cache(vma, address, entry);
+ update_mmu_cache_pmd(vma, address, entry);

unlock:
spin_unlock(&mm->page_table_lock);
@@ -846,7 +846,7 @@ migrate:
page_add_new_anon_rmap(new_page, vma, haddr);

set_pmd_at(mm, haddr, pmd, entry);
- update_mmu_cache(vma, address, entry);
+ update_mmu_cache_pmd(vma, address, entry);
page_remove_rmap(page);
spin_unlock(&mm->page_table_lock);

2012-10-20 02:31:33

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the final tree (tip/s390 trees related)

Hi Ingo,

On Sat, 20 Oct 2012 00:39:38 +0200 Ingo Molnar <[email protected]> wrote:
>
> From 7fc4d49214dba401f4b92ed62da60a5b257a653a Mon Sep 17 00:00:00 2001
> From: Ingo Molnar <[email protected]>
> Date: Sat, 20 Oct 2012 00:33:01 +0200
> Subject: [PATCH] MIPS/thp: Fix update_mmu_cache() cache call
>
> As per recent upstream commit:
>
> b113da65785d mm: Add and use update_mmu_cache_pmd() in transparent huge page code.
>
> The call in do_huge_pmd_prot_none() needs to call update_mmu_cache_pmd()
> as well.
>
> This resolves a MIPS build error triggered on linux-next.
>
> Reported-by: Ralf Baechle <[email protected]>
> Reported-by: Stephen Rothwell <[email protected]>

Just a small nit - I didn't actually report this one, just Ralf did.

Thanks for the fixes.

--
Cheers,
Stephen Rothwell [email protected]


Attachments:
(No filename) (849.00 B)
(No filename) (836.00 B)
Download all attachments

2012-10-20 02:32:41

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the final tree (tip/s390 trees related)

Hi Ingo,

On Sat, 20 Oct 2012 00:43:45 +0200 Ingo Molnar <[email protected]> wrote:
>
> * Stephen Rothwell <[email protected]> wrote:
>
> > It looks as though you have not gone back far enough - you
> > removed a couple of merges of sched/numa, but there are more.
> > I have two of the problems resolved with merge patches that
> > supply pmd_pgprot() for s390 and mips, but there is another
> > problem with mips (see Ralf's other email).
>
> Yeah. All of this should be resolved now in principle. Next time
> you'll integrate linux-next is on Monday, right?

Excellent, thanks. Yes, the next linux-next will be Monday (my time).

--
Cheers,
Stephen Rothwell [email protected]


Attachments:
(No filename) (712.00 B)
(No filename) (836.00 B)
Download all attachments

2012-10-28 13:10:22

by Ingo Molnar

[permalink] [raw]
Subject: [PATCH] s390: Add pmd_mknotpresent()


There's a related problem on s390: other THP implementations
have pmd_mknotpresent() while s390 not, resulting in:

mm/huge_memory.c:1543:2: error: implicit declaration of function 'pmd_mknotpresent'

The (untested!) patch below adds the s390 version of this
method.

Gerald, Martin, did I get the S390 details right?

Thanks,

Ingo

Signed-off-by: Ingo Molnar <[email protected]>
---
diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h
index 098fc5a..b820ff1 100644
--- a/arch/s390/include/asm/pgtable.h
+++ b/arch/s390/include/asm/pgtable.h
@@ -1310,6 +1310,12 @@ static inline pmd_t pmd_mkyoung(pmd_t pmd)
return pmd;
}

+static inline pmd_t pmd_mknotpresent(pmd_t pmd)
+{
+ pmd_val(pmd) &= ~_SEGMENT_ENTRY_ORIGIN;
+ return pmd;
+}
+
#define __HAVE_ARCH_PMDP_TEST_AND_CLEAR_YOUNG
static inline int pmdp_test_and_clear_young(struct vm_area_struct *vma,
unsigned long address, pmd_t *pmdp)

2012-10-28 17:17:16

by Ingo Molnar

[permalink] [raw]
Subject: [tip:numa/core] sched, numa, mm, s390/thp: Add pmd_mknotpresent()

Commit-ID: 9b718e758ac91f28b6cdd354ad5ee9c767daae74
Gitweb: http://git.kernel.org/tip/9b718e758ac91f28b6cdd354ad5ee9c767daae74
Author: Ingo Molnar <[email protected]>
AuthorDate: Sun, 28 Oct 2012 14:10:14 +0100
Committer: Ingo Molnar <[email protected]>
CommitDate: Sun, 28 Oct 2012 17:31:21 +0100

sched, numa, mm, s390/thp: Add pmd_mknotpresent()

We'd like to make use of pmd_mknotpresent() in mm/, but
not all architectures have it. This patch adds the s390
version.

Signed-off-by: Ingo Molnar <[email protected]>
Cc: Stephen Rothwell <[email protected]>
Cc: Martin Schwidefsky <[email protected]>
Cc: Heiko Carstens <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Ralf Baechle <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Gerald Schaefer <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
---
arch/s390/include/asm/pgtable.h | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h
index 098fc5a..b820ff1 100644
--- a/arch/s390/include/asm/pgtable.h
+++ b/arch/s390/include/asm/pgtable.h
@@ -1310,6 +1310,12 @@ static inline pmd_t pmd_mkyoung(pmd_t pmd)
return pmd;
}

+static inline pmd_t pmd_mknotpresent(pmd_t pmd)
+{
+ pmd_val(pmd) &= ~_SEGMENT_ENTRY_ORIGIN;
+ return pmd;
+}
+
#define __HAVE_ARCH_PMDP_TEST_AND_CLEAR_YOUNG
static inline int pmdp_test_and_clear_young(struct vm_area_struct *vma,
unsigned long address, pmd_t *pmdp)

2012-10-29 07:50:07

by Martin Schwidefsky

[permalink] [raw]
Subject: Re: [PATCH] s390: Add pmd_mknotpresent()

On Sun, 28 Oct 2012 14:10:14 +0100
Ingo Molnar <[email protected]> wrote:

>
> There's a related problem on s390: other THP implementations
> have pmd_mknotpresent() while s390 not, resulting in:
>
> mm/huge_memory.c:1543:2: error: implicit declaration of function 'pmd_mknotpresent'
>
> The (untested!) patch below adds the s390 version of this
> method.
>
> Gerald, Martin, did I get the S390 details right?

This won't work I'm afraid. S390 uses invalid bits which need to be set to
make an entry not present. Just setting the _SEGMENT_ENTRY_INV bit is not
good enough either, there is _HPAGE_TYPE_NONE to consider. The patch to fix
this for pmd_none & pmd_present just got added to the s390 tree on kernel.org:
https://git.kernel.org/?p=linux/kernel/git/s390/linux.git;a=shortlog;h=refs/heads/fixes

Now, if pmd_mknotpresent is supposed to make the entry invalid so that
pmd_present will return false the function needs to do two things,
1) set the _SEGMENT_ENTRY_INV bit, and 2) clear the _SEGMENT_ENTRY_RO bit.

> diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h
> index 098fc5a..b820ff1 100644
> --- a/arch/s390/include/asm/pgtable.h
> +++ b/arch/s390/include/asm/pgtable.h
> @@ -1310,6 +1310,12 @@ static inline pmd_t pmd_mkyoung(pmd_t pmd)
> return pmd;
> }
>
> +static inline pmd_t pmd_mknotpresent(pmd_t pmd)
> +{
> + pmd_val(pmd) &= ~_SEGMENT_ENTRY_ORIGIN;
> + return pmd;
> +}
> +
> #define __HAVE_ARCH_PMDP_TEST_AND_CLEAR_YOUNG
> static inline int pmdp_test_and_clear_young(struct vm_area_struct *vma,
> unsigned long address, pmd_t *pmdp)
>


--
blue skies,
Martin.

"Reality continues to ruin my life." - Calvin.

2012-10-29 11:05:32

by Ingo Molnar

[permalink] [raw]
Subject: Re: [PATCH] s390: Add pmd_mknotpresent()


* Martin Schwidefsky <[email protected]> wrote:

> On Sun, 28 Oct 2012 14:10:14 +0100
> Ingo Molnar <[email protected]> wrote:
>
> >
> > There's a related problem on s390: other THP implementations
> > have pmd_mknotpresent() while s390 not, resulting in:
> >
> > mm/huge_memory.c:1543:2: error: implicit declaration of function 'pmd_mknotpresent'
> >
> > The (untested!) patch below adds the s390 version of this
> > method.
> >
> > Gerald, Martin, did I get the S390 details right?
>
> This won't work I'm afraid. S390 uses invalid bits which need
> to be set to make an entry not present. Just setting the
> _SEGMENT_ENTRY_INV bit is not good enough either, there is
> _HPAGE_TYPE_NONE to consider. The patch to fix this for
> pmd_none & pmd_present just got added to the s390 tree on
> kernel.org:
>
> https://git.kernel.org/?p=linux/kernel/git/s390/linux.git;a=shortlog;h=refs/heads/fixes
>
> Now, if pmd_mknotpresent is supposed to make the entry invalid
> so that pmd_present will return false the function needs to do
> two things, 1) set the _SEGMENT_ENTRY_INV bit, and 2) clear
> the _SEGMENT_ENTRY_RO bit.

Would be nice if you could send me your suggested
pmd_mknotpresent().

(Writing it into the email would be enough, I can turn it into a
patch - but a patch would be welcome as well.)

Thanks,

Ingo

2012-10-29 11:30:22

by Martin Schwidefsky

[permalink] [raw]
Subject: Re: [PATCH] s390: Add pmd_mknotpresent()

On Mon, 29 Oct 2012 12:05:19 +0100
Ingo Molnar <[email protected]> wrote:

>
> * Martin Schwidefsky <[email protected]> wrote:
>
> > On Sun, 28 Oct 2012 14:10:14 +0100
> > Ingo Molnar <[email protected]> wrote:
> >
> > >
> > > There's a related problem on s390: other THP implementations
> > > have pmd_mknotpresent() while s390 not, resulting in:
> > >
> > > mm/huge_memory.c:1543:2: error: implicit declaration of function 'pmd_mknotpresent'
> > >
> > > The (untested!) patch below adds the s390 version of this
> > > method.
> > >
> > > Gerald, Martin, did I get the S390 details right?
> >
> > This won't work I'm afraid. S390 uses invalid bits which need
> > to be set to make an entry not present. Just setting the
> > _SEGMENT_ENTRY_INV bit is not good enough either, there is
> > _HPAGE_TYPE_NONE to consider. The patch to fix this for
> > pmd_none & pmd_present just got added to the s390 tree on
> > kernel.org:
> >
> > https://git.kernel.org/?p=linux/kernel/git/s390/linux.git;a=shortlog;h=refs/heads/fixes
> >
> > Now, if pmd_mknotpresent is supposed to make the entry invalid
> > so that pmd_present will return false the function needs to do
> > two things, 1) set the _SEGMENT_ENTRY_INV bit, and 2) clear
> > the _SEGMENT_ENTRY_RO bit.
>
> Would be nice if you could send me your suggested
> pmd_mknotpresent().
>
> (Writing it into the email would be enough, I can turn it into a
> patch - but a patch would be welcome as well.)

This would look like the following, the patch should apply to all recent
kernel version.
--
Subject: [PATCH] s390,mm: add pmd_mknotpresent

Fix the following build problem in huge_memory:

mm/huge_memory.c:1543:2: error: implicit declaration of function 'pmd_mknotpresent'

Signed-off-by: Martin Schwidefsky <[email protected]>
---
arch/s390/include/asm/pgtable.h | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h
index 335b601..4a84431 100644
--- a/arch/s390/include/asm/pgtable.h
+++ b/arch/s390/include/asm/pgtable.h
@@ -1326,6 +1326,13 @@ static inline pmd_t pmd_mkyoung(pmd_t pmd)
return pmd;
}

+static inline pmd_t pmd_mknotpresent(pmd_t pmd)
+{
+ pmd_val(pmd) |= _SEGMENT_ENTRY_INV;
+ pmd_val(pmd) &= ~_SEGMENT_ENTRY_RO;
+ return pmd;
+}
+
#define __HAVE_ARCH_PMDP_TEST_AND_CLEAR_YOUNG
static inline int pmdp_test_and_clear_young(struct vm_area_struct *vma,
unsigned long address, pmd_t *pmdp)
--
blue skies,
Martin.

"Reality continues to ruin my life." - Calvin.

2012-10-29 14:01:06

by Gerald Schaefer

[permalink] [raw]
Subject: Re: [PATCH] s390: Add pmd_mknotpresent()

On Sun, 28 Oct 2012 14:10:14 +0100
Ingo Molnar <[email protected]> wrote:

>
> There's a related problem on s390: other THP implementations
> have pmd_mknotpresent() while s390 not, resulting in:
>
> mm/huge_memory.c:1543:2: error: implicit declaration of function 'pmd_mknotpresent'
>
> The (untested!) patch below adds the s390 version of this
> method.
>
> Gerald, Martin, did I get the S390 details right?

The upstream thp patches for s390 fixed that by adding pmdp_invalidate() and
replacing the pmd_mknotpresent() in mm/huge_memory.c, see git commit 46dcde73.
The pmdp_invalidate() is already included linux-next, so it should be ok to
just change mm/huge_memory.c similar to upstream:

diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index f1c2679..842b6df 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -1537,8 +1537,7 @@ static int __split_huge_page_map(struct page *page,
* complete. The ptl also protects against concurrent faults due to
* making the pmd not-present.
*/
- set_pmd_at(mm, address, pmd, pmd_mknotpresent(*pmd));
- flush_tlb_range(vma, address, address + HPAGE_PMD_SIZE);
+ pmdp_invalidate(vma, address, pmd);
pmd_populate(mm, pmd, pgtable);
ret = 1;

With this, s390 does not need a pmd_mknotpresent(), and using
set_pmd_at(..., pmd_mknotpresent()) would be wrong on s390 anyway because
we need a flushing operation to change a valid pmd.


>
> Thanks,
>
> Ingo
>
> Signed-off-by: Ingo Molnar <[email protected]>
> ---
> diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h
> index 098fc5a..b820ff1 100644
> --- a/arch/s390/include/asm/pgtable.h
> +++ b/arch/s390/include/asm/pgtable.h
> @@ -1310,6 +1310,12 @@ static inline pmd_t pmd_mkyoung(pmd_t pmd)
> return pmd;
> }
>
> +static inline pmd_t pmd_mknotpresent(pmd_t pmd)
> +{
> + pmd_val(pmd) &= ~_SEGMENT_ENTRY_ORIGIN;
> + return pmd;
> +}
> +
> #define __HAVE_ARCH_PMDP_TEST_AND_CLEAR_YOUNG
> static inline int pmdp_test_and_clear_young(struct vm_area_struct *vma,
> unsigned long address, pmd_t *pmdp)
>

2012-10-30 07:26:07

by Ingo Molnar

[permalink] [raw]
Subject: Re: [PATCH] s390: Add pmd_mknotpresent()


* Gerald Schaefer <[email protected]> wrote:

> On Sun, 28 Oct 2012 14:10:14 +0100
> Ingo Molnar <[email protected]> wrote:
>
> >
> > There's a related problem on s390: other THP implementations
> > have pmd_mknotpresent() while s390 not, resulting in:
> >
> > mm/huge_memory.c:1543:2: error: implicit declaration of function 'pmd_mknotpresent'
> >
> > The (untested!) patch below adds the s390 version of this
> > method.
> >
> > Gerald, Martin, did I get the S390 details right?
>
> The upstream thp patches for s390 fixed that by adding pmdp_invalidate() and
> replacing the pmd_mknotpresent() in mm/huge_memory.c, see git commit 46dcde73.
> The pmdp_invalidate() is already included linux-next, so it should be ok to
> just change mm/huge_memory.c similar to upstream:
>
> diff --git a/mm/huge_memory.c b/mm/huge_memory.c
> index f1c2679..842b6df 100644
> --- a/mm/huge_memory.c
> +++ b/mm/huge_memory.c
> @@ -1537,8 +1537,7 @@ static int __split_huge_page_map(struct page *page,
> * complete. The ptl also protects against concurrent faults due to
> * making the pmd not-present.
> */
> - set_pmd_at(mm, address, pmd, pmd_mknotpresent(*pmd));
> - flush_tlb_range(vma, address, address + HPAGE_PMD_SIZE);
> + pmdp_invalidate(vma, address, pmd);
> pmd_populate(mm, pmd, pgtable);
> ret = 1;
>
> With this, s390 does not need a pmd_mknotpresent(), and using
> set_pmd_at(..., pmd_mknotpresent()) would be wrong on s390
> anyway because we need a flushing operation to change a valid
> pmd.

Ok, great - so to me it seems that once the two trees are merged
there's no extra change needed for s390 - so I dropped the
patch.

Thanks,

Ingo