ARM: Fix compile after delay page freeing patch
PATCH 1/1 ARM: Fix compile after delay page freeing patch
Commit 06824ba824b3e9f2fedb38bee79af0643198ed7f (ARM: tlb: delay page freeing for SMP and ARMv7 CPUs) causes the following compile error for at least omap1_defconfig:
In file included from arch/arm/mm/init.c:27:arch/arm/include/asm/tlb.h: In function 'tlb_flush_mmu':arch/arm/include/asm/tlb.h:101: error: implicit declaration of function 'release_pages' arch/arm/include/asm/tlb.h: In function 'tlb_remove_page':arch/arm/include/asm/tlb.h:165: error: implicit declaration of function 'page_cache_release'
Fix this by including pagemap.h.
arch/arm/mm/init.c +1 -0
@@ -19,6 +19,7 @@#include <linux/gfp.h> #include <linux/memblock.h> #include <linux/sort.h> +#include <linux/pagemap.h> #include <asm/mach-types.h> #include <asm/sections.h>
PATCH 1/1 ARM: Fix compile after delay page freeing patch
Hello.
Quoted 17 lines · Tony Lindgren
Commit
06824ba824b3e9f2fedb38bee79af0643198ed7f(ARM: tlb: delay page freeing for SMP and ARMv7 CPUs) causes the following compile error for at leastomap1_defconfig:In file included from
arch/arm/mm/init.c:27:arch/arm/include/asm/tlb.h: In function 'tlb_flush_mmu':arch/arm/include/asm/tlb.h:101: error: implicit declaration of function 'release_pages'arch/arm/include/asm/tlb.h: In function 'tlb_remove_page':arch/arm/include/asm/tlb.h:165: error: implicit declaration of function 'page_cache_release'Fix this by including
pagemap.h.Signed-off-by Tony Lindgren <[email protected]>
arch/arm/mm/init.c line 25
Quoted 7 lines
arch/arm/mm/init.c +1
-0@@ -19,6 +19,7 @@#include <linux/gfp.h> #include <linux/memblock.h> #include <linux/sort.h> +#include <linux/pagemap.h> #include <asm/mach-types.h> #include <asm/sections.h>
Shouldn't you be #including it into tlb.h instead?
WBR, Sergei
PATCH 1/1 ARM: Fix compile after delay page freeing patch
In reply to Tony LindgrenQuoted 9 lines · Tony Lindgren
Commit
06824ba824b3e9f2fedb38bee79af0643198ed7f(ARM: tlb: delay page freeing for SMP and ARMv7 CPUs) causes the following compile error for at leastomap1_defconfig:In file included from
arch/arm/mm/init.c:27:arch/arm/include/asm/tlb.h: In function 'tlb_flush_mmu':arch/arm/include/asm/tlb.h:101: error: implicit declaration of function 'release_pages'arch/arm/include/asm/tlb.h: In function 'tlb_remove_page':arch/arm/include/asm/tlb.h:165: error: implicit declaration of function 'page_cache_release'
Grant already mentioned this to me this evening.
This happens if you build with CONFIG_SWAP=n, and is something that the asm-generic/tlb.h also appears to suffer from. Why no one else has noticed this I've no idea.
Note that linux/swap.h has this comment:
/* only sparc can not include linux/pagemap.h in this file
* so leave page_cache_release and release_pages undeclared... */
#define free_page_and_swap_cache(page) \
page_cache_release(page)
#define free_pages_and_swap_cache(pages, nr) \
release_pages((pages), (nr), 0);which is rather annoying, because it makes the build error dependent on the configuration.
So, we should add linux/pagemap.h to both asm-generic/tlb.h and the ARM tlb.h as they both should suffer the same problem.
Note that arch/x86/mm/init.c and arch/x86/mm/pgtable.c both include asm/tlb.h without linux/pagemap.h, and use the generic version. I bet no one's tried building x86 with CONFIG_SWAP=n yet...
PATCH 1/1 ARM: Fix compile after delay page freeing patch
In reply to Sergei ShtylyovQuoted 18 lines · Sergei Shtylyov
Hello.
Quoted 14 lines · Tony Lindgren
Commit
06824ba824b3e9f2fedb38bee79af0643198ed7f(ARM: tlb: delay page freeing for SMP and ARMv7 CPUs) causes the following compile error for at leastomap1_defconfig:In file included from
arch/arm/mm/init.c:27:arch/arm/include/asm/tlb.h: In function 'tlb_flush_mmu':arch/arm/include/asm/tlb.h:101: error: implicit declaration of function 'release_pages'arch/arm/include/asm/tlb.h: In function 'tlb_remove_page':arch/arm/include/asm/tlb.h:165: error: implicit declaration of function 'page_cache_release'Fix this by including
pagemap.h.Signed-off-by Tony Lindgren <[email protected]>
Quoted 11 lines
arch/arm/mm/init.c line 24
Quoted 9 lines
arch/arm/mm/init.c +1
-0@@ -19,6 +19,7 @@#include <linux/gfp.h> #include <linux/memblock.h> #include <linux/sort.h> +#include <linux/pagemap.h> #include <asm/mach-types.h> #include <asm/sections.h> Shouldn't you be #including it into
tlb.hinstead?
Hmm, pagemap.h actually seems to be there in tlb.h, but in #ifndef CONFIG_MMU.
Tony
PATCH 1/1 ARM: Fix compile after delay page freeing patch
In reply to Sergei ShtylyovQuoted 7 lines · Sergei Shtylyov
Hello.
Quoted 3 lines · Tony Lindgren
Commit
06824ba824b3e9f2fedb38bee79af0643198ed7f(ARM: tlb: delay page freeing for SMP and ARMv7 CPUs) causes the following compile error for at leastomap1_defconfig:
I't not omap1_defconfig only, see
http://armlinux.simtec.co.uk/kautobuild/2.6.38-rc5-git6/index.html
Quoted 10 lines
Quoted 10 lines
In file included from
arch/arm/mm/init.c:27:arch/arm/include/asm/tlb.h: In function 'tlb_flush_mmu':arch/arm/include/asm/tlb.h:101: error: implicit declaration of function 'release_pages'arch/arm/include/asm/tlb.h: In function 'tlb_remove_page':arch/arm/include/asm/tlb.h:165: error: implicit declaration of function 'page_cache_release'Fix this by including
pagemap.h.Signed-off-by Tony Lindgren <[email protected]>
Quoted 11 lines
arch/arm/mm/init.c line 24
Quoted 9 lines
arch/arm/mm/init.c +1
-0@@ -19,6 +19,7 @@#include <linux/gfp.h> #include <linux/memblock.h> #include <linux/sort.h> +#include <linux/pagemap.h> #include <asm/mach-types.h> #include <asm/sections.h> Shouldn't you be #including it into
tlb.hinstead?
For me building arch/arm/mm/mmu.o fails, too. So Tony's patch doesn't help.
Adding the #include to arch/arm/include/asm/tlb.h works fine though.
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
PATCH 1/1 ARM: Fix compile after delay page freeing patch
In reply to Russell King - ARM LinuxHello Russell,
Quoted 3 lines · Russell King - ARM Linux
Note that
arch/x86/mm/init.candarch/x86/mm/pgtable.cboth includeasm/tlb.hwithoutlinux/pagemap.h, and use the generic version. I bet no one's tried building x86 withCONFIG_SWAP=nyet...
I did, and it doesn't fail.
include/asm-generic/tlb.h includes <asm/pgalloc.h> which for x86 includes <linux/pagemap.h>
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
PATCH 1/1 ARM: Fix compile after delay page freeing patch
Quoted 10 lines · Uwe Kleine-K?nig
Hello Russell,
Quoted 3 lines · Russell King - ARM Linux
Note that
arch/x86/mm/init.candarch/x86/mm/pgtable.cboth includeasm/tlb.hwithoutlinux/pagemap.h, and use the generic version. I bet no one's tried building x86 withCONFIG_SWAP=nyet...I did, and it doesn't fail.
include/asm-generic/tlb.hincludes <asm/pgalloc.h> which for x86 includes <linux/pagemap.h>
Maybe then we should add linux/pagemap.h to our asm/pgalloc.h.
PATCH 1/1 ARM: Fix compile after delay page freeing patch
In reply to Russell King - ARM LinuxQuoted 29 lines · Russell King - ARM Linux
Quoted 9 lines · Tony Lindgren
Commit
06824ba824b3e9f2fedb38bee79af0643198ed7f(ARM: tlb: delay page freeing for SMP and ARMv7 CPUs) causes the following compile error for at leastomap1_defconfig:In file included from
arch/arm/mm/init.c:27:arch/arm/include/asm/tlb.h: In function 'tlb_flush_mmu':arch/arm/include/asm/tlb.h:101: error: implicit declaration of function 'release_pages'arch/arm/include/asm/tlb.h: In function 'tlb_remove_page':arch/arm/include/asm/tlb.h:165: error: implicit declaration of function 'page_cache_release'Grant already mentioned this to me this evening.
This happens if you build with
CONFIG_SWAP=n, and is something that theasm-generic/tlb.halso appears to suffer from. Why no one else has noticed this I've no idea.Note that
linux/swap.hhas this comment:/* only sparc can not include
linux/pagemap.hin this file
* so leavepage_cache_releaseandrelease_pagesundeclared... */
#definefree_page_and_swap_cache(page)\
page_cache_release(page)#define free_pages_and_swap_cache(pages, nr) \ release_pages((pages), (nr), 0);which is rather annoying, because it makes the build error dependent on the configuration.
Quoted 6 lines
So, we should add
linux/pagemap.hto bothasm-generic/tlb.hand the ARMtlb.has they both should suffer the same problem.Note that
arch/x86/mm/init.candarch/x86/mm/pgtable.cboth includeasm/tlb.hwithoutlinux/pagemap.h, and use the generic version. I bet no one's tried building x86 withCONFIG_SWAP=nyet...
Looks like it's in arch/x86/mm/init_[32|64].c and pgtable[32|64].c though. So maybe we just need to patch either ARM tlb.h. Or patch the necessary .c files to include pagemap.h.
Regards,
Tony
PATCH 1/1 ARM: fix build failure
In reply to Russell King - ARM LinuxCommit
06824ba (ARM: tlb: delay page freeing for SMP and ARMv7 CPUs)
introduced a build failure for builds with CONFIG_SWAP=n:
In file included from arch/arm/mm/init.c:27:
arch/arm/include/asm/tlb.h: In function 'tlb_flush_mmu':
arch/arm/include/asm/tlb.h:101: error: implicit declaration of function 'release_pages' arch/arm/include/asm/tlb.h: In function 'tlb_remove_page':
arch/arm/include/asm/tlb.h:165: error: implicit declaration of function 'page_cache_release'
Fix that by #including <linux/pagemap.h> in <asm/pgalloc.h> as it's done by x86.
--- arch/arm/include/asm/pgalloc.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/include/asm/pgalloc.h +2 -0
@@ -10,6 +10,8 @@#ifndef _ASMARM_PGALLOC_H#define _ASMARM_PGALLOC_H +#include <linux/pagemap.h> +#include <asm/domain.h> #include <asm/pgtable-hwdef.h> #include <asm/processor.h>
Signature · 1 line
1.7.2.3
PATCH 1/1 ARM: fix build failure
Quoted 12 lines · Uwe Kleine-K?nig
Commit
06824ba (ARM: tlb: delay page freeing for SMP and ARMv7 CPUs)
introduced a build failure for builds with
CONFIG_SWAP=n:In file included from
arch/arm/mm/init.c:27:
arch/arm/include/asm/tlb.h: In function 'tlb_flush_mmu':
arch/arm/include/asm/tlb.h:101: error: implicit declaration of function 'release_pages'arch/arm/include/asm/tlb.h: In function 'tlb_remove_page':
arch/arm/include/asm/tlb.h:165: error: implicit declaration of function 'page_cache_release'
Quoted 4 lines
Fix that by #including <
linux/pagemap.h> in <asm/pgalloc.h> as it's done by x86.Signed-off-by Uwe Kleine-K?nig <[email protected]>
PATCH 1/1 ARM: fix build failure
In reply to Uwe Kleine-KönigLooks good. Can you stick it in the patch system please?
Quoted 36 lines · Uwe Kleine-K?nig
Commit
06824ba (ARM: tlb: delay page freeing for SMP and ARMv7 CPUs)
introduced a build failure for builds with
CONFIG_SWAP=n:In file included from
arch/arm/mm/init.c:27:
arch/arm/include/asm/tlb.h: In function 'tlb_flush_mmu':
arch/arm/include/asm/tlb.h:101: error: implicit declaration of function 'release_pages'arch/arm/include/asm/tlb.h: In function 'tlb_remove_page':
arch/arm/include/asm/tlb.h:165: error: implicit declaration of function 'page_cache_release'Fix that by #including <
linux/pagemap.h> in <asm/pgalloc.h> as it's done by x86.Signed-off-by Uwe Kleine-K?nig <[email protected]>--- arch/arm/include/asm/pgalloc.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)arch/arm/include/asm/pgalloc.h +2
-0@@ -10,6 +10,8 @@#ifndef _ASMARM_PGALLOC_H#define _ASMARM_PGALLOC_H +#include <linux/pagemap.h> +#include <asm/domain.h> #include <asm/pgtable-hwdef.h> #include <asm/processor.h> Signature · 1 line
1.7.2.3
PATCH 1/1 ARM: fix build failure
Quoted 1 line · Russell King - ARM Linux
Looks good. Can you stick it in the patch system please?
done as
http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=6757/1
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |