All of lore.kernel.org
 help / color / mirror / Atom feed
* linux-next: build failure after merge of the final tree (tip/s390 trees related)
@ 2012-10-18  6:22 Stephen Rothwell
  2012-10-18 14:51 ` Ralf Baechle
                   ` (3 more replies)
  0 siblings, 4 replies; 26+ messages in thread
From: Stephen Rothwell @ 2012-10-18  6:22 UTC (permalink / raw)
  To: Martin Schwidefsky, Heiko Carstens, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin, Peter Zijlstra
  Cc: linux-next, linux-kernel, Ralf Baechle

[-- Attachment #1: Type: text/plain, Size: 933 bytes --]

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                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: linux-next: build failure after merge of the final tree (tip/s390 trees related)
  2012-10-18  6:22 linux-next: build failure after merge of the final tree (tip/s390 trees related) Stephen Rothwell
@ 2012-10-18 14:51 ` Ralf Baechle
  2012-10-19  2:56   ` Stephen Rothwell
                     ` (3 more replies)
  2012-10-18 15:02 ` linux-next: build failure after merge of the final tree (tip/s390 trees related) Ralf Baechle
                   ` (2 subsequent siblings)
  3 siblings, 4 replies; 26+ messages in thread
From: Ralf Baechle @ 2012-10-18 14:51 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Martin Schwidefsky, Heiko Carstens, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin, Peter Zijlstra, linux-next, linux-kernel

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 <ralf@linux-mips.org>

 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);

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* Re: linux-next: build failure after merge of the final tree (tip/s390 trees related)
  2012-10-18  6:22 linux-next: build failure after merge of the final tree (tip/s390 trees related) Stephen Rothwell
  2012-10-18 14:51 ` Ralf Baechle
@ 2012-10-18 15:02 ` Ralf Baechle
  2012-10-19 21:52   ` Peter Zijlstra
  2012-10-18 16:26 ` Gerald Schaefer
  2012-10-18 18:29 ` linux-next: build failure after merge of the final tree (tip/s390 trees related) Ingo Molnar
  3 siblings, 1 reply; 26+ messages in thread
From: Ralf Baechle @ 2012-10-18 15:02 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Martin Schwidefsky, Heiko Carstens, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin, Peter Zijlstra, linux-next, linux-kernel

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 <a.p.zijlstra@chello.nl>
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

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: linux-next: build failure after merge of the final tree (tip/s390 trees related)
  2012-10-18  6:22 linux-next: build failure after merge of the final tree (tip/s390 trees related) Stephen Rothwell
  2012-10-18 14:51 ` Ralf Baechle
  2012-10-18 15:02 ` linux-next: build failure after merge of the final tree (tip/s390 trees related) Ralf Baechle
@ 2012-10-18 16:26 ` Gerald Schaefer
  2012-10-19  2:57   ` Stephen Rothwell
                     ` (3 more replies)
  2012-10-18 18:29 ` linux-next: build failure after merge of the final tree (tip/s390 trees related) Ingo Molnar
  3 siblings, 4 replies; 26+ messages in thread
From: Gerald Schaefer @ 2012-10-18 16:26 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Martin Schwidefsky, Heiko Carstens, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin, Peter Zijlstra, linux-next, linux-kernel,
	Ralf Baechle

On Thu, 18 Oct 2012 17:22:01 +1100
Stephen Rothwell <sfr@canb.auug.org.au> 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 <gerald.schaefer@de.ibm.com>
---
 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


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* Re: linux-next: build failure after merge of the final tree (tip/s390 trees related)
  2012-10-18  6:22 linux-next: build failure after merge of the final tree (tip/s390 trees related) Stephen Rothwell
                   ` (2 preceding siblings ...)
  2012-10-18 16:26 ` Gerald Schaefer
@ 2012-10-18 18:29 ` Ingo Molnar
  2012-10-19  3:07   ` Stephen Rothwell
  3 siblings, 1 reply; 26+ messages in thread
From: Ingo Molnar @ 2012-10-18 18:29 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Martin Schwidefsky, Heiko Carstens, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin, Peter Zijlstra, linux-next, linux-kernel,
	Ralf Baechle


* Stephen Rothwell <sfr@canb.auug.org.au> 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


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: linux-next: build failure after merge of the final tree (tip/s390 trees related)
  2012-10-18 14:51 ` Ralf Baechle
@ 2012-10-19  2:56   ` Stephen Rothwell
  2012-10-19 21:48   ` Ingo Molnar
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 26+ messages in thread
From: Stephen Rothwell @ 2012-10-19  2:56 UTC (permalink / raw)
  To: Ralf Baechle
  Cc: Martin Schwidefsky, Heiko Carstens, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin, Peter Zijlstra, linux-next, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1272 bytes --]

Hi Ralf,

On Thu, 18 Oct 2012 16:51:01 +0200 Ralf Baechle <ralf@linux-mips.org> 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                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: linux-next: build failure after merge of the final tree (tip/s390 trees related)
  2012-10-18 16:26 ` Gerald Schaefer
@ 2012-10-19  2:57   ` Stephen Rothwell
  2012-10-19 21:37   ` Ingo Molnar
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 26+ messages in thread
From: Stephen Rothwell @ 2012-10-19  2:57 UTC (permalink / raw)
  To: gerald.schaefer
  Cc: Martin Schwidefsky, Heiko Carstens, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin, Peter Zijlstra, linux-next, linux-kernel,
	Ralf Baechle

[-- Attachment #1: Type: text/plain, Size: 1665 bytes --]

Hi Gerald,

On Thu, 18 Oct 2012 18:26:42 +0200 Gerald Schaefer <gerald.schaefer@de.ibm.com> wrote:
>
> On Thu, 18 Oct 2012 17:22:01 +1100
> Stephen Rothwell <sfr@canb.auug.org.au> 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 <gerald.schaefer@de.ibm.com>

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

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: linux-next: build failure after merge of the final tree (tip/s390 trees related)
  2012-10-18 18:29 ` linux-next: build failure after merge of the final tree (tip/s390 trees related) Ingo Molnar
@ 2012-10-19  3:07   ` Stephen Rothwell
  2012-10-19 22:43     ` Ingo Molnar
  0 siblings, 1 reply; 26+ messages in thread
From: Stephen Rothwell @ 2012-10-19  3:07 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Martin Schwidefsky, Heiko Carstens, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin, Peter Zijlstra, linux-next, linux-kernel,
	Ralf Baechle, Andrew Morton

[-- Attachment #1: Type: text/plain, Size: 1687 bytes --]

Hi Ingo,

On Thu, 18 Oct 2012 20:29:53 +0200 Ingo Molnar <mingo@kernel.org> wrote:
>
> * Stephen Rothwell <sfr@canb.auug.org.au> 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                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: linux-next: build failure after merge of the final tree (tip/s390 trees related)
  2012-10-18 16:26 ` Gerald Schaefer
  2012-10-19  2:57   ` Stephen Rothwell
@ 2012-10-19 21:37   ` Ingo Molnar
  2012-10-20  1:06   ` [tip:numa/core] s390/thp: implement pmd_pgprot() for s390 tip-bot for Gerald Schaefer
  2012-10-28 13:10   ` [PATCH] s390: Add pmd_mknotpresent() Ingo Molnar
  3 siblings, 0 replies; 26+ messages in thread
From: Ingo Molnar @ 2012-10-19 21:37 UTC (permalink / raw)
  To: Gerald Schaefer
  Cc: Stephen Rothwell, Martin Schwidefsky, Heiko Carstens,
	Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
	linux-next, linux-kernel, Ralf Baechle


* Gerald Schaefer <gerald.schaefer@de.ibm.com> wrote:

> On Thu, 18 Oct 2012 17:22:01 +1100
> Stephen Rothwell <sfr@canb.auug.org.au> 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

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: linux-next: build failure after merge of the final tree (tip/s390 trees related)
  2012-10-18 14:51 ` Ralf Baechle
  2012-10-19  2:56   ` Stephen Rothwell
@ 2012-10-19 21:48   ` Ingo Molnar
  2012-10-20  1:07   ` [tip:numa/core] MIPS/thp: Add pmd_pgprot() implementation tip-bot for Ralf Baechle
  2012-10-20  1:08   ` [tip:numa/core] MIPS/thp: Fix update_mmu_cache() cache call tip-bot for Ingo Molnar
  3 siblings, 0 replies; 26+ messages in thread
From: Ingo Molnar @ 2012-10-19 21:48 UTC (permalink / raw)
  To: Ralf Baechle
  Cc: Stephen Rothwell, Martin Schwidefsky, Heiko Carstens,
	Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
	linux-next, linux-kernel


* Ralf Baechle <ralf@linux-mips.org> 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 <ralf@linux-mips.org>

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 <ralf@linux-mips.org>
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 <sfr@canb.auug.org.au>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20121018145101.GA17439@linux-mips.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 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.

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* Re: linux-next: build failure after merge of the final tree (tip/s390 trees related)
  2012-10-18 15:02 ` linux-next: build failure after merge of the final tree (tip/s390 trees related) Ralf Baechle
@ 2012-10-19 21:52   ` Peter Zijlstra
  2012-10-19 22:36     ` Ingo Molnar
  2012-10-19 22:39     ` Ingo Molnar
  0 siblings, 2 replies; 26+ messages in thread
From: Peter Zijlstra @ 2012-10-19 21:52 UTC (permalink / raw)
  To: Ralf Baechle
  Cc: Stephen Rothwell, Martin Schwidefsky, Heiko Carstens,
	Thomas Gleixner, Ingo Molnar, H. Peter Anvin, linux-next,
	linux-kernel

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.

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: linux-next: build failure after merge of the final tree (tip/s390 trees related)
  2012-10-19 21:52   ` Peter Zijlstra
@ 2012-10-19 22:36     ` Ingo Molnar
  2012-10-19 22:39     ` Ingo Molnar
  1 sibling, 0 replies; 26+ messages in thread
From: Ingo Molnar @ 2012-10-19 22:36 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Ralf Baechle, Stephen Rothwell, Martin Schwidefsky,
	Heiko Carstens, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	linux-next, linux-kernel


* Peter Zijlstra <peterz@infradead.org> 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 <mingo@kernel.org>
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 <ralf@linux-mips.org>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20121018145101.GA17439@linux-mips.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 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);


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* Re: linux-next: build failure after merge of the final tree (tip/s390 trees related)
  2012-10-19 21:52   ` Peter Zijlstra
  2012-10-19 22:36     ` Ingo Molnar
@ 2012-10-19 22:39     ` Ingo Molnar
  2012-10-20  2:31       ` Stephen Rothwell
  1 sibling, 1 reply; 26+ messages in thread
From: Ingo Molnar @ 2012-10-19 22:39 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Ralf Baechle, Stephen Rothwell, Martin Schwidefsky,
	Heiko Carstens, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	linux-next, linux-kernel


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

Thanks,

	Ingo

--------------->
>From 7fc4d49214dba401f4b92ed62da60a5b257a653a Mon Sep 17 00:00:00 2001
From: Ingo Molnar <mingo@kernel.org>
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 <ralf@linux-mips.org>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20121018145101.GA17439@linux-mips.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 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);
 


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* Re: linux-next: build failure after merge of the final tree (tip/s390 trees related)
  2012-10-19  3:07   ` Stephen Rothwell
@ 2012-10-19 22:43     ` Ingo Molnar
  2012-10-20  2:32       ` Stephen Rothwell
  0 siblings, 1 reply; 26+ messages in thread
From: Ingo Molnar @ 2012-10-19 22:43 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Martin Schwidefsky, Heiko Carstens, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin, Peter Zijlstra, linux-next, linux-kernel,
	Ralf Baechle, Andrew Morton


* Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi Ingo,
> 
> On Thu, 18 Oct 2012 20:29:53 +0200 Ingo Molnar <mingo@kernel.org> wrote:
> >
> > * Stephen Rothwell <sfr@canb.auug.org.au> 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

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [tip:numa/core] s390/thp: implement pmd_pgprot() for s390
  2012-10-18 16:26 ` Gerald Schaefer
  2012-10-19  2:57   ` Stephen Rothwell
  2012-10-19 21:37   ` Ingo Molnar
@ 2012-10-20  1:06   ` tip-bot for Gerald Schaefer
  2012-10-28 13:10   ` [PATCH] s390: Add pmd_mknotpresent() Ingo Molnar
  3 siblings, 0 replies; 26+ messages in thread
From: tip-bot for Gerald Schaefer @ 2012-10-20  1:06 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, peterz, schwidefsky, gerald.schaefer,
	ralf, heiko.carstens, tglx, sfr

Commit-ID:  ca6cfbe6d25cdf9ed81cbf26c2146eda17a70472
Gitweb:     http://git.kernel.org/tip/ca6cfbe6d25cdf9ed81cbf26c2146eda17a70472
Author:     Gerald Schaefer <gerald.schaefer@de.ibm.com>
AuthorDate: Thu, 18 Oct 2012 18:26:42 +0200
Committer:  Ingo Molnar <mingo@kernel.org>
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 <sfr@canb.auug.org.au>
Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Link: http://lkml.kernel.org/r/20121018182642.2a541275@thinkpad
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 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;

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [tip:numa/core] MIPS/thp: Add pmd_pgprot() implementation
  2012-10-18 14:51 ` Ralf Baechle
  2012-10-19  2:56   ` Stephen Rothwell
  2012-10-19 21:48   ` Ingo Molnar
@ 2012-10-20  1:07   ` tip-bot for Ralf Baechle
  2012-10-20  1:08   ` [tip:numa/core] MIPS/thp: Fix update_mmu_cache() cache call tip-bot for Ingo Molnar
  3 siblings, 0 replies; 26+ messages in thread
From: tip-bot for Ralf Baechle @ 2012-10-20  1:07 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, peterz, schwidefsky, ralf,
	heiko.carstens, tglx, sfr

Commit-ID:  8cd7680d8b7241941fd51d83302677d58b447223
Gitweb:     http://git.kernel.org/tip/8cd7680d8b7241941fd51d83302677d58b447223
Author:     Ralf Baechle <ralf@linux-mips.org>
AuthorDate: Thu, 18 Oct 2012 16:51:01 +0200
Committer:  Ingo Molnar <mingo@kernel.org>
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 <sfr@canb.auug.org.au>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20121018145101.GA17439@linux-mips.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 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.

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [tip:numa/core] MIPS/thp: Fix update_mmu_cache() cache call
  2012-10-18 14:51 ` Ralf Baechle
                     ` (2 preceding siblings ...)
  2012-10-20  1:07   ` [tip:numa/core] MIPS/thp: Add pmd_pgprot() implementation tip-bot for Ralf Baechle
@ 2012-10-20  1:08   ` tip-bot for Ingo Molnar
  3 siblings, 0 replies; 26+ messages in thread
From: tip-bot for Ingo Molnar @ 2012-10-20  1:08 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, ralf, peterz, sfr, tglx

Commit-ID:  7fc4d49214dba401f4b92ed62da60a5b257a653a
Gitweb:     http://git.kernel.org/tip/7fc4d49214dba401f4b92ed62da60a5b257a653a
Author:     Ingo Molnar <mingo@kernel.org>
AuthorDate: Sat, 20 Oct 2012 00:33:01 +0200
Committer:  Ingo Molnar <mingo@kernel.org>
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 <ralf@linux-mips.org>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20121018145101.GA17439@linux-mips.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 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);
 

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* Re: linux-next: build failure after merge of the final tree (tip/s390 trees related)
  2012-10-19 22:39     ` Ingo Molnar
@ 2012-10-20  2:31       ` Stephen Rothwell
  0 siblings, 0 replies; 26+ messages in thread
From: Stephen Rothwell @ 2012-10-20  2:31 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Peter Zijlstra, Ralf Baechle, Martin Schwidefsky, Heiko Carstens,
	Thomas Gleixner, Ingo Molnar, H. Peter Anvin, linux-next,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 877 bytes --]

Hi Ingo,

On Sat, 20 Oct 2012 00:39:38 +0200 Ingo Molnar <mingo@kernel.org> wrote:
>
> From 7fc4d49214dba401f4b92ed62da60a5b257a653a Mon Sep 17 00:00:00 2001
> From: Ingo Molnar <mingo@kernel.org>
> 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 <ralf@linux-mips.org>
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>

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

Thanks for the fixes.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: linux-next: build failure after merge of the final tree (tip/s390 trees related)
  2012-10-19 22:43     ` Ingo Molnar
@ 2012-10-20  2:32       ` Stephen Rothwell
  0 siblings, 0 replies; 26+ messages in thread
From: Stephen Rothwell @ 2012-10-20  2:32 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Martin Schwidefsky, Heiko Carstens, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin, Peter Zijlstra, linux-next, linux-kernel,
	Ralf Baechle, Andrew Morton

[-- Attachment #1: Type: text/plain, Size: 732 bytes --]

Hi Ingo,

On Sat, 20 Oct 2012 00:43:45 +0200 Ingo Molnar <mingo@kernel.org> wrote:
>
> * Stephen Rothwell <sfr@canb.auug.org.au> 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                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCH] s390: Add pmd_mknotpresent()
  2012-10-18 16:26 ` Gerald Schaefer
                     ` (2 preceding siblings ...)
  2012-10-20  1:06   ` [tip:numa/core] s390/thp: implement pmd_pgprot() for s390 tip-bot for Gerald Schaefer
@ 2012-10-28 13:10   ` Ingo Molnar
  2012-10-28 17:16     ` [tip:numa/core] sched, numa, mm, s390/thp: " tip-bot for Ingo Molnar
                       ` (2 more replies)
  3 siblings, 3 replies; 26+ messages in thread
From: Ingo Molnar @ 2012-10-28 13:10 UTC (permalink / raw)
  To: Gerald Schaefer
  Cc: Stephen Rothwell, Martin Schwidefsky, Heiko Carstens,
	Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
	linux-next, linux-kernel, Ralf Baechle, Peter Zijlstra


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 <mingo@kernel.org>
---
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)

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [tip:numa/core] sched, numa, mm, s390/thp: Add pmd_mknotpresent()
  2012-10-28 13:10   ` [PATCH] s390: Add pmd_mknotpresent() Ingo Molnar
@ 2012-10-28 17:16     ` tip-bot for Ingo Molnar
  2012-10-29  7:49     ` [PATCH] s390: " Martin Schwidefsky
  2012-10-29 14:00     ` Gerald Schaefer
  2 siblings, 0 replies; 26+ messages in thread
From: tip-bot for Ingo Molnar @ 2012-10-28 17:16 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, a.p.zijlstra, peterz, schwidefsky,
	gerald.schaefer, ralf, heiko.carstens, tglx, sfr

Commit-ID:  9b718e758ac91f28b6cdd354ad5ee9c767daae74
Gitweb:     http://git.kernel.org/tip/9b718e758ac91f28b6cdd354ad5ee9c767daae74
Author:     Ingo Molnar <mingo@kernel.org>
AuthorDate: Sun, 28 Oct 2012 14:10:14 +0100
Committer:  Ingo Molnar <mingo@kernel.org>
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 <mingo@kernel.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Link: http://lkml.kernel.org/r/20121028131014.GA10754@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 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)

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* Re: [PATCH] s390: Add pmd_mknotpresent()
  2012-10-28 13:10   ` [PATCH] s390: Add pmd_mknotpresent() Ingo Molnar
  2012-10-28 17:16     ` [tip:numa/core] sched, numa, mm, s390/thp: " tip-bot for Ingo Molnar
@ 2012-10-29  7:49     ` Martin Schwidefsky
  2012-10-29 11:05       ` Ingo Molnar
  2012-10-29 14:00     ` Gerald Schaefer
  2 siblings, 1 reply; 26+ messages in thread
From: Martin Schwidefsky @ 2012-10-29  7:49 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Gerald Schaefer, Stephen Rothwell, Heiko Carstens,
	Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
	linux-next, linux-kernel, Ralf Baechle, Peter Zijlstra

On Sun, 28 Oct 2012 14:10:14 +0100
Ingo Molnar <mingo@kernel.org> 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.


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH] s390: Add pmd_mknotpresent()
  2012-10-29  7:49     ` [PATCH] s390: " Martin Schwidefsky
@ 2012-10-29 11:05       ` Ingo Molnar
  2012-10-29 11:30         ` Martin Schwidefsky
  0 siblings, 1 reply; 26+ messages in thread
From: Ingo Molnar @ 2012-10-29 11:05 UTC (permalink / raw)
  To: Martin Schwidefsky
  Cc: Gerald Schaefer, Stephen Rothwell, Heiko Carstens,
	Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
	linux-next, linux-kernel, Ralf Baechle, Peter Zijlstra


* Martin Schwidefsky <schwidefsky@de.ibm.com> wrote:

> On Sun, 28 Oct 2012 14:10:14 +0100
> Ingo Molnar <mingo@kernel.org> 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

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH] s390: Add pmd_mknotpresent()
  2012-10-29 11:05       ` Ingo Molnar
@ 2012-10-29 11:30         ` Martin Schwidefsky
  0 siblings, 0 replies; 26+ messages in thread
From: Martin Schwidefsky @ 2012-10-29 11:30 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Gerald Schaefer, Stephen Rothwell, Heiko Carstens,
	Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
	linux-next, linux-kernel, Ralf Baechle, Peter Zijlstra

On Mon, 29 Oct 2012 12:05:19 +0100
Ingo Molnar <mingo@kernel.org> wrote:

> 
> * Martin Schwidefsky <schwidefsky@de.ibm.com> wrote:
> 
> > On Sun, 28 Oct 2012 14:10:14 +0100
> > Ingo Molnar <mingo@kernel.org> 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 <schwidefsky@de.ibm.com>
---
 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.


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* Re: [PATCH] s390: Add pmd_mknotpresent()
  2012-10-28 13:10   ` [PATCH] s390: Add pmd_mknotpresent() Ingo Molnar
  2012-10-28 17:16     ` [tip:numa/core] sched, numa, mm, s390/thp: " tip-bot for Ingo Molnar
  2012-10-29  7:49     ` [PATCH] s390: " Martin Schwidefsky
@ 2012-10-29 14:00     ` Gerald Schaefer
  2012-10-30  7:25       ` Ingo Molnar
  2 siblings, 1 reply; 26+ messages in thread
From: Gerald Schaefer @ 2012-10-29 14:00 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Stephen Rothwell, Martin Schwidefsky, Heiko Carstens,
	Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
	linux-next, linux-kernel, Ralf Baechle, Peter Zijlstra

On Sun, 28 Oct 2012 14:10:14 +0100
Ingo Molnar <mingo@kernel.org> 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 <mingo@kernel.org>
> ---
> 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)
> 


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* Re: [PATCH] s390: Add pmd_mknotpresent()
  2012-10-29 14:00     ` Gerald Schaefer
@ 2012-10-30  7:25       ` Ingo Molnar
  0 siblings, 0 replies; 26+ messages in thread
From: Ingo Molnar @ 2012-10-30  7:25 UTC (permalink / raw)
  To: Gerald Schaefer
  Cc: Stephen Rothwell, Martin Schwidefsky, Heiko Carstens,
	Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
	linux-next, linux-kernel, Ralf Baechle, Peter Zijlstra


* Gerald Schaefer <gerald.schaefer@de.ibm.com> wrote:

> On Sun, 28 Oct 2012 14:10:14 +0100
> Ingo Molnar <mingo@kernel.org> 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

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2012-10-30  7:26 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-18  6:22 linux-next: build failure after merge of the final tree (tip/s390 trees related) Stephen Rothwell
2012-10-18 14:51 ` Ralf Baechle
2012-10-19  2:56   ` Stephen Rothwell
2012-10-19 21:48   ` Ingo Molnar
2012-10-20  1:07   ` [tip:numa/core] MIPS/thp: Add pmd_pgprot() implementation tip-bot for Ralf Baechle
2012-10-20  1:08   ` [tip:numa/core] MIPS/thp: Fix update_mmu_cache() cache call tip-bot for Ingo Molnar
2012-10-18 15:02 ` linux-next: build failure after merge of the final tree (tip/s390 trees related) Ralf Baechle
2012-10-19 21:52   ` Peter Zijlstra
2012-10-19 22:36     ` Ingo Molnar
2012-10-19 22:39     ` Ingo Molnar
2012-10-20  2:31       ` Stephen Rothwell
2012-10-18 16:26 ` Gerald Schaefer
2012-10-19  2:57   ` Stephen Rothwell
2012-10-19 21:37   ` Ingo Molnar
2012-10-20  1:06   ` [tip:numa/core] s390/thp: implement pmd_pgprot() for s390 tip-bot for Gerald Schaefer
2012-10-28 13:10   ` [PATCH] s390: Add pmd_mknotpresent() Ingo Molnar
2012-10-28 17:16     ` [tip:numa/core] sched, numa, mm, s390/thp: " tip-bot for Ingo Molnar
2012-10-29  7:49     ` [PATCH] s390: " Martin Schwidefsky
2012-10-29 11:05       ` Ingo Molnar
2012-10-29 11:30         ` Martin Schwidefsky
2012-10-29 14:00     ` Gerald Schaefer
2012-10-30  7:25       ` Ingo Molnar
2012-10-18 18:29 ` linux-next: build failure after merge of the final tree (tip/s390 trees related) Ingo Molnar
2012-10-19  3:07   ` Stephen Rothwell
2012-10-19 22:43     ` Ingo Molnar
2012-10-20  2:32       ` Stephen Rothwell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.