On Wed, 2013-07-24 at 00:36 -0400, Zhouping Liu wrote: > Hi all, > > I hit the following compiling error on latest stable tree with linux-3.4.y branch on s390x machine: > > ---------------- snip --------------- > CHK include/linux/version.h > CHK include/generated/utsrelease.h > CALL scripts/checksyscalls.sh > CHK include/generated/compile.h > CC mm/memory.o > mm/memory.c: In function ‘vm_iomap_memory’: > mm/memory.c:2375:2: error: implicit declaration of function ‘io_remap_pfn_range’ [-Werror=implicit-function-declaration] > return io_remap_pfn_range(vma, vma->vm_start, pfn, vm_len, vma->vm_page_prot); > ^ > cc1: some warnings being treated as errors > make[1]: *** [mm/memory.o] Error 1 > make: *** [mm] Error 2 > > I checked codes, and find the function 'io_remap_pfn_range' in s390x was introduced by commit cd24834130a since 3.8-rc1, > but it didn't be backported to 3.4-stable yet, how to deal with this? This is what I used in 3.2; it might work for 3.4 as well. Ben. --- From: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> Date: Wed, 17 Apr 2013 08:46:19 -0700 Subject: [PATCH] s390: move dummy io_remap_pfn_range() to asm/pgtable.h commit 4f2e29031e6c67802e7370292dd050fd62f337ee upstream. Commit b4cbb197c7e7 ("vm: add vm_iomap_memory() helper function") added a helper function wrapper around io_remap_pfn_range(), and every other architecture defined it in <asm/pgtable.h>. The s390 choice of <asm/io.h> may make sense, but is not very convenient for this case, and gratuitous differences like that cause unexpected errors like this: mm/memory.c: In function 'vm_iomap_memory': mm/memory.c:2439:2: error: implicit declaration of function 'io_remap_pfn_range' [-Werror=implicit-function-declaration] Glory be the kbuild test robot who noticed this, bisected it, and reported it to the guilty parties (ie me). Cc: Martin Schwidefsky <schwidefsky@xxxxxxxxxx> Cc: Heiko Carstens <heiko.carstens@xxxxxxxxxx> Signed-off-by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> [bwh: Backported to 3.2: the macro was not defined, so this is an addition and not a move] Signed-off-by: Ben Hutchings <ben@xxxxxxxxxxxxxxx> --- arch/s390/include/asm/pgtable.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h index 4f289ff..5aaf0bf 100644 --- a/arch/s390/include/asm/pgtable.h +++ b/arch/s390/include/asm/pgtable.h @@ -67,6 +67,10 @@ static inline int is_zero_pfn(unsigned long pfn) #define my_zero_pfn(addr) page_to_pfn(ZERO_PAGE(addr)) +/* TODO: s390 cannot support io_remap_pfn_range... */ +#define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ + remap_pfn_range(vma, vaddr, pfn, size, prot) + #endif /* !__ASSEMBLY__ */ /* -- Ben Hutchings Once a job is fouled up, anything done to improve it makes it worse.
Attachment:
signature.asc
Description: This is a digitally signed message part