Skip to content

Commit

Permalink
ia64: rename ioremap_nocache to ioremap_uc
Browse files Browse the repository at this point in the history
On ia64 ioremap_nocache fails if attributes don't match.  Not other
architectures does this, and we plan to get rid of ioremap_nocache.
So get rid of the special semantics and define ioremap_nocache in
terms of ioremap as no portable driver could rely on the behavior
anyway.

However x86 implements ioremap_uc in a similar way as the ia64
version of ioremap_nocache, in that it ignores the firmware tables.
Switch ia64 to override ioremap_uc instead.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
  • Loading branch information
Christoph Hellwig committed Nov 11, 2019
1 parent 315e521 commit fded182
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions arch/ia64/include/asm/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -256,16 +256,16 @@ static inline void outsl(unsigned long port, const void *src,
# ifdef __KERNEL__

extern void __iomem * ioremap(unsigned long offset, unsigned long size);
extern void __iomem * ioremap_nocache (unsigned long offset, unsigned long size);
extern void __iomem * ioremap_uc(unsigned long offset, unsigned long size);
extern void iounmap (volatile void __iomem *addr);
static inline void __iomem * ioremap_cache (unsigned long phys_addr, unsigned long size)
{
return ioremap(phys_addr, size);
}
#define ioremap ioremap
#define ioremap_nocache ioremap_nocache
#define ioremap_nocache ioremap
#define ioremap_cache ioremap_cache
#define ioremap_uc ioremap_nocache
#define ioremap_uc ioremap_uc
#define iounmap iounmap

/*
Expand Down
4 changes: 2 additions & 2 deletions arch/ia64/mm/ioremap.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,14 @@ ioremap (unsigned long phys_addr, unsigned long size)
EXPORT_SYMBOL(ioremap);

void __iomem *
ioremap_nocache (unsigned long phys_addr, unsigned long size)
ioremap_uc(unsigned long phys_addr, unsigned long size)
{
if (kern_mem_attribute(phys_addr, size) & EFI_MEMORY_WB)
return NULL;

return __ioremap_uc(phys_addr);
}
EXPORT_SYMBOL(ioremap_nocache);
EXPORT_SYMBOL(ioremap_uc);

void
early_iounmap (volatile void __iomem *addr, unsigned long size)
Expand Down

0 comments on commit fded182

Please sign in to comment.