[RFC PATCH] PPC32: Fix build failure caused by missing dirty pte handlers

Subsystems: linux for powerpc (32-bit and 64-bit), the rest

STALE3865d

5 messages, 3 authors, 2016-02-05 · open the first message on its own page

[RFC PATCH] PPC32: Fix build failure caused by missing dirty pte handlers

From: Pranith Kumar <hidden>
Date: 2016-01-25 14:23:15

In 4.5-rc1, I am getting a build failure as follows:

mm/memory.c: In function ‘do_swap_page’:
mm/memory.c:2573:9: error: implicit declaration of function ‘pte_mksoft_dirty’
[-Werror=implicit-function-declaration]
   pte = pte_mksoft_dirty(pte);

The soft dirty pte handlers are declared only for PPC64 on PPC_BOOK3S in
arch/powerpc/include/asm/book3s/64/hash.h and missing in the 32-bit arch.

Avoid this error by not setting HAVE_ARCH_SOFT_DIRTY for 32-bit system.

Signed-off-by: Pranith Kumar <redacted>
---
 arch/powerpc/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index e4824fd..21cb5c5 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -557,7 +557,7 @@ choice
 
 config PPC_4K_PAGES
 	bool "4k page size"
-	select HAVE_ARCH_SOFT_DIRTY if CHECKPOINT_RESTORE && PPC_BOOK3S
+	select HAVE_ARCH_SOFT_DIRTY if CHECKPOINT_RESTORE && PPC_BOOK3S && PPC64
 
 config PPC_16K_PAGES
 	bool "16k page size"
@@ -566,7 +566,7 @@ config PPC_16K_PAGES
 config PPC_64K_PAGES
 	bool "64k page size"
 	depends on !PPC_FSL_BOOK3E && (44x || PPC_STD_MMU_64 || PPC_BOOK3E_64)
-	select HAVE_ARCH_SOFT_DIRTY if CHECKPOINT_RESTORE && PPC_BOOK3S
+	select HAVE_ARCH_SOFT_DIRTY if CHECKPOINT_RESTORE && PPC_BOOK3S && PPC64
 
 config PPC_256K_PAGES
 	bool "256k page size"
-- 
2.7.0

Re: [RFC PATCH] PPC32: Fix build failure caused by missing dirty pte handlers

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2016-01-26 03:13:54

On Mon, 2016-01-25 at 09:22 -0500, Pranith Kumar wrote:
In 4.5-rc1, I am getting a build failure as follows:

mm/memory.c: In function ‘do_swap_page’:
mm/memory.c:2573:9: error: implicit declaration of function ‘pte_mksoft_dirty’
[-Werror=implicit-function-declaration]
   pte = pte_mksoft_dirty(pte);

The soft dirty pte handlers are declared only for PPC64 on PPC_BOOK3S in
arch/powerpc/include/asm/book3s/64/hash.h and missing in the 32-bit arch.

Avoid this error by not setting HAVE_ARCH_SOFT_DIRTY for 32-bit system.
It's building for me, what config are you using?

http://kisskb.ellerman.id.au/kisskb/buildresult/12597204/

cheers

Re: [RFC PATCH] PPC32: Fix build failure caused by missing dirty pte handlers

From: Pranith Kumar <hidden>
Date: 2016-01-26 05:45:39

On Mon, Jan 25, 2016 at 10:13 PM, Michael Ellerman [off-list ref] wrote:
On Mon, 2016-01-25 at 09:22 -0500, Pranith Kumar wrote:
quoted
In 4.5-rc1, I am getting a build failure as follows:

mm/memory.c: In function ‘do_swap_page’:
mm/memory.c:2573:9: error: implicit declaration of function ‘pte_mksoft_dirty’
[-Werror=implicit-function-declaration]
   pte = pte_mksoft_dirty(pte);

The soft dirty pte handlers are declared only for PPC64 on PPC_BOOK3S in
arch/powerpc/include/asm/book3s/64/hash.h and missing in the 32-bit arch.

Avoid this error by not setting HAVE_ARCH_SOFT_DIRTY for 32-bit system.
It's building for me, what config are you using?

http://kisskb.ellerman.id.au/kisskb/buildresult/12597204/
I am not sure where I messed up, but I am getting the following error now.
Config attached. The same patch fixes this error.

In file included from fs/proc/task_mmu.c:14:0:
include/linux/swapops.h: In function ‘pte_to_swp_entry’:
include/linux/swapops.h:69:6: error: implicit declaration of function
‘pte_swp_soft_dirty’ [-Werror=implicit-function-declaration]
  if (pte_swp_soft_dirty(pte))
      ^
include/linux/swapops.h:70:9: error: implicit declaration of function
‘pte_swp_clear_soft_dirty’ [-Werror=implicit-function-declaration]
   pte = pte_swp_clear_soft_dirty(pte);
         ^
fs/proc/task_mmu.c: In function ‘clear_soft_dirty’:
fs/proc/task_mmu.c:876:11: error: implicit declaration of function
‘pte_clear_soft_dirty’ [-Werror=implicit-function-declaration]
   ptent = pte_clear_soft_dirty(ptent);
           ^
fs/proc/task_mmu.c: In function ‘pte_to_pagemap_entry’:
fs/proc/task_mmu.c:1158:7: error: implicit declaration of function
‘pte_soft_dirty’ [-Werror=implicit-function-declaration]
   if (pte_soft_dirty(pte))
       ^
cc1: some warnings being treated as errors



-- 
Pranith

Re: [RFC PATCH] PPC32: Fix build failure caused by missing dirty pte handlers

From: Pranith Kumar <hidden>
Date: 2016-01-27 22:17:29

On Tue, Jan 26, 2016 at 12:45 AM, Pranith Kumar [off-list ref] wrote:
On Mon, Jan 25, 2016 at 10:13 PM, Michael Ellerman [off-list ref] wrote:
quoted
On Mon, 2016-01-25 at 09:22 -0500, Pranith Kumar wrote:
quoted
In 4.5-rc1, I am getting a build failure as follows:

mm/memory.c: In function ‘do_swap_page’:
mm/memory.c:2573:9: error: implicit declaration of function ‘pte_mksoft_dirty’
[-Werror=implicit-function-declaration]
   pte = pte_mksoft_dirty(pte);

The soft dirty pte handlers are declared only for PPC64 on PPC_BOOK3S in
arch/powerpc/include/asm/book3s/64/hash.h and missing in the 32-bit arch.

Avoid this error by not setting HAVE_ARCH_SOFT_DIRTY for 32-bit system.
It's building for me, what config are you using?

http://kisskb.ellerman.id.au/kisskb/buildresult/12597204/
Found the original config file too. Please find it attached here.


-- 
Pranith

Re: [RFC PATCH] PPC32: Fix build failure caused by missing dirty pte handlers

From: Luis Henriques <hidden>
Date: 2016-02-05 16:04:09

On Mon, Jan 25, 2016 at 09:22:58AM -0500, Pranith Kumar wrote:
In 4.5-rc1, I am getting a build failure as follows:

mm/memory.c: In function ‘do_swap_page’:
mm/memory.c:2573:9: error: implicit declaration of function ‘pte_mksoft_dirty’
[-Werror=implicit-function-declaration]
   pte = pte_mksoft_dirty(pte);

The soft dirty pte handlers are declared only for PPC64 on PPC_BOOK3S in
arch/powerpc/include/asm/book3s/64/hash.h and missing in the 32-bit arch.

Avoid this error by not setting HAVE_ARCH_SOFT_DIRTY for 32-bit system.
I am seeing this build failure too and I can confirm that this patch fixes
it.  I would just add a

Fixes: 7207f43665b8 ("powerpc/mm: Add page soft dirty tracking")

to this patch.  Feel free to add my 'Tested-by:'.

Cheers,
--
Luís

quoted hunk
Signed-off-by: Pranith Kumar <redacted>
---
 arch/powerpc/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index e4824fd..21cb5c5 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -557,7 +557,7 @@ choice
 
 config PPC_4K_PAGES
 	bool "4k page size"
-	select HAVE_ARCH_SOFT_DIRTY if CHECKPOINT_RESTORE && PPC_BOOK3S
+	select HAVE_ARCH_SOFT_DIRTY if CHECKPOINT_RESTORE && PPC_BOOK3S && PPC64
 
 config PPC_16K_PAGES
 	bool "16k page size"
@@ -566,7 +566,7 @@ config PPC_16K_PAGES
 config PPC_64K_PAGES
 	bool "64k page size"
 	depends on !PPC_FSL_BOOK3E && (44x || PPC_STD_MMU_64 || PPC_BOOK3E_64)
-	select HAVE_ARCH_SOFT_DIRTY if CHECKPOINT_RESTORE && PPC_BOOK3S
+	select HAVE_ARCH_SOFT_DIRTY if CHECKPOINT_RESTORE && PPC_BOOK3S && PPC64
 
 config PPC_256K_PAGES
 	bool "256k page size"
-- 
2.7.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help