[ARM] mm 10: allow memory type to be specified with ioremap
__ioremap() took a set of page table flags (specifically the cacheable and bufferable bits) to control the mapping type. However, with the advent of ARMv6, this is far too limited. Replace the page table flags with a memory type index, so that the desired attributes can be selected from the mem_type table. Finally, to prevent silent miscompilation due to the differing arguments, rename the __ioremap() and __ioremap_pfn() functions. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
committed by
Russell King
parent
0af92befeb
commit
3603ab2b62
@@ -62,21 +62,21 @@ void flush_dcache_page(struct page *page)
|
||||
}
|
||||
EXPORT_SYMBOL(flush_dcache_page);
|
||||
|
||||
void __iomem *__ioremap_pfn(unsigned long pfn, unsigned long offset,
|
||||
size_t size, unsigned long flags)
|
||||
void __iomem *__arm_ioremap_pfn(unsigned long pfn, unsigned long offset,
|
||||
size_t size, unsigned int mtype)
|
||||
{
|
||||
if (pfn >= (0x100000000ULL >> PAGE_SHIFT))
|
||||
return NULL;
|
||||
return (void __iomem *) (offset + (pfn << PAGE_SHIFT));
|
||||
}
|
||||
EXPORT_SYMBOL(__ioremap_pfn);
|
||||
EXPORT_SYMBOL(__arm_ioremap_pfn);
|
||||
|
||||
void __iomem *__ioremap(unsigned long phys_addr, size_t size,
|
||||
unsigned long flags)
|
||||
void __iomem *__arm_ioremap(unsigned long phys_addr, size_t size,
|
||||
unsigned int mtype)
|
||||
{
|
||||
return (void __iomem *)phys_addr;
|
||||
}
|
||||
EXPORT_SYMBOL(__ioremap);
|
||||
EXPORT_SYMBOL(__arm_ioremap);
|
||||
|
||||
void __iounmap(volatile void __iomem *addr)
|
||||
{
|
||||
|
Reference in New Issue
Block a user