diff options
author | Stefan Agner <stefan.agner@toradex.com> | 2019-11-12 13:57:30 +0100 |
---|---|---|
committer | Stefan Agner <stefan.agner@toradex.com> | 2019-11-12 13:57:30 +0100 |
commit | 401bf3f29b1aa6d9ca32bd3252fc9beabe93d80b (patch) | |
tree | 6dd86325823a9b44b6e696acbd077e68c47d3108 /arch/parisc | |
parent | 5a9c845fe261dec87f892f3fd3c2e32604d952c0 (diff) | |
parent | b260a0862e3a9fccdac23ec3b783911b098c1c74 (diff) |
Merge tag 'v5.3.10' into toradex_5.3.ytoradex_5.3.y
This is the 5.3.10 stable release
Diffstat (limited to 'arch/parisc')
-rw-r--r-- | arch/parisc/mm/ioremap.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/arch/parisc/mm/ioremap.c b/arch/parisc/mm/ioremap.c index 92a9b5f12f98..f29f682352f0 100644 --- a/arch/parisc/mm/ioremap.c +++ b/arch/parisc/mm/ioremap.c @@ -3,7 +3,7 @@ * arch/parisc/mm/ioremap.c * * (C) Copyright 1995 1996 Linus Torvalds - * (C) Copyright 2001-2006 Helge Deller <deller@gmx.de> + * (C) Copyright 2001-2019 Helge Deller <deller@gmx.de> * (C) Copyright 2005 Kyle McMartin <kyle@parisc-linux.org> */ @@ -84,7 +84,7 @@ void __iomem * __ioremap(unsigned long phys_addr, unsigned long size, unsigned l addr = (void __iomem *) area->addr; if (ioremap_page_range((unsigned long)addr, (unsigned long)addr + size, phys_addr, pgprot)) { - vfree(addr); + vunmap(addr); return NULL; } @@ -92,9 +92,11 @@ void __iomem * __ioremap(unsigned long phys_addr, unsigned long size, unsigned l } EXPORT_SYMBOL(__ioremap); -void iounmap(const volatile void __iomem *addr) +void iounmap(const volatile void __iomem *io_addr) { - if (addr > high_memory) - return vfree((void *) (PAGE_MASK & (unsigned long __force) addr)); + unsigned long addr = (unsigned long)io_addr & PAGE_MASK; + + if (is_vmalloc_addr((void *)addr)) + vunmap((void *)addr); } EXPORT_SYMBOL(iounmap); |