summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLiviu Dudau <Liviu.Dudau@arm.com>2014-09-29 15:29:20 +0100
committerBjorn Helgaas <bhelgaas@google.com>2014-09-30 09:42:44 -0600
commit112eeaa7f87bbd2925e919486bb504f8954fa675 (patch)
tree9a03aed0429ce92cf5fd218f14b3427bcc5e1ec1 /include
parent52addcf9d6669fa439387610bc65c92fa0980cef (diff)
downloadop-kernel-dev-112eeaa7f87bbd2925e919486bb504f8954fa675.zip
op-kernel-dev-112eeaa7f87bbd2925e919486bb504f8954fa675.tar.gz
asm-generic/io.h: Fix ioport_map() for !CONFIG_GENERIC_IOMAP
The !CONFIG_GENERIC_IOMAP version of ioport_map() is wrong. It returns a mapped, i.e., virtual, address that can start from zero and completely ignores the PCI_IOBASE and IO_SPACE_LIMIT that most architectures that use !CONFIG_GENERIC_MAP define. Tested-by: Tanmay Inamdar <tinamdar@apm.com> Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> Acked-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/io.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h
index 975e1cc..b8fdc57 100644
--- a/include/asm-generic/io.h
+++ b/include/asm-generic/io.h
@@ -331,7 +331,7 @@ static inline void iounmap(void __iomem *addr)
#ifndef CONFIG_GENERIC_IOMAP
static inline void __iomem *ioport_map(unsigned long port, unsigned int nr)
{
- return (void __iomem *) port;
+ return PCI_IOBASE + (port & IO_SPACE_LIMIT);
}
static inline void ioport_unmap(void __iomem *p)
OpenPOWER on IntegriCloud