Commit 4b40fcee authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Ingo Molnar

x86: __iomem annotations

Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent e9332cac
...@@ -81,7 +81,7 @@ void __iomem *__ioremap(unsigned long phys_addr, unsigned long size, ...@@ -81,7 +81,7 @@ void __iomem *__ioremap(unsigned long phys_addr, unsigned long size,
* Don't remap the low PCI/ISA area, it's always mapped.. * Don't remap the low PCI/ISA area, it's always mapped..
*/ */
if (phys_addr >= ISA_START_ADDRESS && last_addr < ISA_END_ADDRESS) if (phys_addr >= ISA_START_ADDRESS && last_addr < ISA_END_ADDRESS)
return (void __iomem *) phys_to_virt(phys_addr); return (__force void __iomem *)phys_to_virt(phys_addr);
/* /*
* Don't allow anybody to remap normal RAM that we're using.. * Don't allow anybody to remap normal RAM that we're using..
......
...@@ -70,7 +70,7 @@ static int ioremap_change_attr(unsigned long phys_addr, unsigned long size, ...@@ -70,7 +70,7 @@ static int ioremap_change_attr(unsigned long phys_addr, unsigned long size,
void __iomem *__ioremap(unsigned long phys_addr, unsigned long size, void __iomem *__ioremap(unsigned long phys_addr, unsigned long size,
unsigned long flags) unsigned long flags)
{ {
void *addr; void __iomem *addr;
struct vm_struct *area; struct vm_struct *area;
unsigned long offset, last_addr; unsigned long offset, last_addr;
pgprot_t pgprot; pgprot_t pgprot;
...@@ -101,7 +101,7 @@ void __iomem *__ioremap(unsigned long phys_addr, unsigned long size, ...@@ -101,7 +101,7 @@ void __iomem *__ioremap(unsigned long phys_addr, unsigned long size,
if (!area) if (!area)
return NULL; return NULL;
area->phys_addr = phys_addr; area->phys_addr = phys_addr;
addr = area->addr; addr = (void __iomem *) area->addr;
if (ioremap_page_range((unsigned long)addr, (unsigned long)addr + size, if (ioremap_page_range((unsigned long)addr, (unsigned long)addr + size,
phys_addr, pgprot)) { phys_addr, pgprot)) {
remove_vm_area((void *)(PAGE_MASK & (unsigned long) addr)); remove_vm_area((void *)(PAGE_MASK & (unsigned long) addr));
...@@ -111,7 +111,7 @@ void __iomem *__ioremap(unsigned long phys_addr, unsigned long size, ...@@ -111,7 +111,7 @@ void __iomem *__ioremap(unsigned long phys_addr, unsigned long size,
vunmap(addr); vunmap(addr);
return NULL; return NULL;
} }
return (__force void __iomem *) (offset + (char *)addr); return (void __iomem *) (offset + (char __iomem *)addr);
} }
EXPORT_SYMBOL(__ioremap); EXPORT_SYMBOL(__ioremap);
...@@ -152,7 +152,7 @@ void iounmap(volatile void __iomem *addr) ...@@ -152,7 +152,7 @@ void iounmap(volatile void __iomem *addr)
{ {
struct vm_struct *p, *o; struct vm_struct *p, *o;
if (addr <= high_memory) if ((void __force *)addr <= high_memory)
return; return;
if (addr >= phys_to_virt(ISA_START_ADDRESS) && if (addr >= phys_to_virt(ISA_START_ADDRESS) &&
addr < phys_to_virt(ISA_END_ADDRESS)) addr < phys_to_virt(ISA_END_ADDRESS))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment