From 2f68dbbf2e1b3f89d15ba6f64921424b9be62447 Mon Sep 17 00:00:00 2001 From: Robert Daniels Date: Mon, 30 Aug 2004 22:16:13 -0700 Subject: [PATCH] [ARM] Fix VMALLOC range check in IXP4xx I/O routines I found a problem in the implementation of io.h for the ixp425. It wasn't letting me access memory at VMALLOC_START, only after it. I've included a patch to fix this problem. This patch is for the 2.4.x kernel, but it looks like it needs fixing in the 2.6.x kernel as well. Signed-off-by: Deepak Saxena --- include/asm-arm/arch-ixp4xx/io.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/asm-arm/arch-ixp4xx/io.h b/include/asm-arm/arch-ixp4xx/io.h index 91d25c25d6b79..5400ab0ba5f09 100644 --- a/include/asm-arm/arch-ixp4xx/io.h +++ b/include/asm-arm/arch-ixp4xx/io.h @@ -73,7 +73,7 @@ __ixp4xx_iounmap(void *addr) { extern void __iounmap(void *addr); - if ((u32)addr > VMALLOC_START) + if ((u32)addr >= VMALLOC_START) __iounmap(addr); } @@ -101,7 +101,7 @@ __ixp4xx_writeb(u8 value, u32 addr) { u32 n, byte_enables, data; - if (addr > VMALLOC_START) { + if (addr >= VMALLOC_START) { __raw_writeb(value, addr); return; } @@ -124,7 +124,7 @@ __ixp4xx_writew(u16 value, u32 addr) { u32 n, byte_enables, data; - if (addr > VMALLOC_START) { + if (addr >= VMALLOC_START) { __raw_writew(value, addr); return; } @@ -145,7 +145,7 @@ __ixp4xx_writesw(u32 bus_addr, u16 *vaddr, int count) static inline void __ixp4xx_writel(u32 value, u32 addr) { - if (addr > VMALLOC_START) { + if (addr >= VMALLOC_START) { __raw_writel(value, addr); return; } @@ -165,7 +165,7 @@ __ixp4xx_readb(u32 addr) { u32 n, byte_enables, data; - if (addr > VMALLOC_START) + if (addr >= VMALLOC_START) return __raw_readb(addr); n = addr % 4; @@ -188,7 +188,7 @@ __ixp4xx_readw(u32 addr) { u32 n, byte_enables, data; - if (addr > VMALLOC_START) + if (addr >= VMALLOC_START) return __raw_readw(addr); n = addr % 4; @@ -211,7 +211,7 @@ __ixp4xx_readl(u32 addr) { u32 data; - if (addr > VMALLOC_START) + if (addr >= VMALLOC_START) return __raw_readl(addr); if (ixp4xx_pci_read(addr, NP_CMD_MEMREAD, &data)) -- 2.53.0