Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4f2e2903 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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



Commit b4cbb197 ("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@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 542a6724
Loading
Loading
Loading
Loading
+0 −4
Original line number Original line Diff line number Diff line
@@ -50,10 +50,6 @@ void unxlate_dev_mem_ptr(unsigned long phys, void *addr);
#define ioremap_nocache(addr, size)	ioremap(addr, size)
#define ioremap_nocache(addr, size)	ioremap(addr, size)
#define ioremap_wc			ioremap_nocache
#define ioremap_wc			ioremap_nocache


/* 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)

static inline void __iomem *ioremap(unsigned long offset, unsigned long size)
static inline void __iomem *ioremap(unsigned long offset, unsigned long size)
{
{
	return (void __iomem *) offset;
	return (void __iomem *) offset;
+4 −0
Original line number Original line Diff line number Diff line
@@ -57,6 +57,10 @@ extern unsigned long zero_page_mask;
	 (((unsigned long)(vaddr)) &zero_page_mask))))
	 (((unsigned long)(vaddr)) &zero_page_mask))))
#define __HAVE_COLOR_ZERO_PAGE
#define __HAVE_COLOR_ZERO_PAGE


/* 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__ */
#endif /* !__ASSEMBLY__ */


/*
/*