Patchwork [3.5.y.z,extended,stable] Patch "s390: move dummy io_remap_pfn_range() to asm/pgtable.h" has been added to staging queue

mail settings
Submitter Luis Henriques
Date May 15, 2013, 10:34 a.m.
Message ID <>
Download mbox | patch
Permalink /patch/244008/
State New
Headers show


Luis Henriques - May 15, 2013, 10:34 a.m.
This is a note to let you know that I have just added a patch titled

    s390: move dummy io_remap_pfn_range() to asm/pgtable.h

to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree 
which can be found at:;a=shortlog;h=refs/heads/linux-3.5.y-queue

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.y.z tree, see



From 35d1fa338b8bd00ddff9218a57bddc2b510232db Mon Sep 17 00:00:00 2001
From: Linus Torvalds <>
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 <>
Cc: Heiko Carstens <>
Signed-off-by: Linus Torvalds <>
[ luis: backported to 3.5:
  - Took the patch 2nd hunk only, as the io_remap_pfn_range wasn't defined ]
Signed-off-by: Luis Henriques <>
 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 b322741..0d6400e 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__ */