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

Commit 6d63e73d authored by Paul Mundt's avatar Paul Mundt
Browse files

sh: Limit ioremap_prot() to 32bit pgprot parts.



Presently ioremap_prot() uses an unsigned long to pass the pgprot value
around. This results in the upper half of the pgprot being chomped when
using 64-bit pgprots on a 32-bit ABI (X2TLB and SH-5).

As the only users of ioremap_prot() are presently legacy parts, this
doesn't cause too much of an issue. In the future when the interface is
converted to use pgprot_t directly this can be re-enabled for the other
parts, too.

Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent f3360934
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -13,7 +13,6 @@ config SUPERH
	select HAVE_LMB
	select HAVE_LMB
	select HAVE_OPROFILE
	select HAVE_OPROFILE
	select HAVE_GENERIC_DMA_COHERENT
	select HAVE_GENERIC_DMA_COHERENT
	select HAVE_IOREMAP_PROT if MMU
	select HAVE_ARCH_TRACEHOOK
	select HAVE_ARCH_TRACEHOOK
	select HAVE_DMA_API_DEBUG
	select HAVE_DMA_API_DEBUG
	select HAVE_DMA_ATTRS
	select HAVE_DMA_ATTRS
@@ -36,6 +35,7 @@ config SUPERH32
	def_bool ARCH = "sh"
	def_bool ARCH = "sh"
	select HAVE_KPROBES
	select HAVE_KPROBES
	select HAVE_KRETPROBES
	select HAVE_KRETPROBES
	select HAVE_IOREMAP_PROT if MMU && !X2TLB
	select HAVE_FUNCTION_TRACER
	select HAVE_FUNCTION_TRACER
	select HAVE_FTRACE_MCOUNT_RECORD
	select HAVE_FTRACE_MCOUNT_RECORD
	select HAVE_DYNAMIC_FTRACE
	select HAVE_DYNAMIC_FTRACE
+2 −0
Original line number Original line Diff line number Diff line
@@ -321,11 +321,13 @@ ioremap_cache(unsigned long offset, unsigned long size)
	return __ioremap_mode(offset, size, PAGE_KERNEL);
	return __ioremap_mode(offset, size, PAGE_KERNEL);
}
}


#ifdef CONFIG_HAVE_IOREMAP_PROT
static inline void __iomem *
static inline void __iomem *
ioremap_prot(resource_size_t offset, unsigned long size, unsigned long flags)
ioremap_prot(resource_size_t offset, unsigned long size, unsigned long flags)
{
{
	return __ioremap_mode(offset, size, __pgprot(flags));
	return __ioremap_mode(offset, size, __pgprot(flags));
}
}
#endif


#define ioremap_nocache	ioremap
#define ioremap_nocache	ioremap
#define iounmap		__iounmap
#define iounmap		__iounmap