--- zzzz-none-000/linux-3.10.107/lib/iomap.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/lib/iomap.c 2021-02-04 17:41:59.000000000 +0000 @@ -5,6 +5,7 @@ */ #include #include +#include #include @@ -70,26 +71,31 @@ unsigned int ioread8(void __iomem *addr) { - IO_COND(addr, return inb(port), return readb(addr)); + uncached_logk_pc(LOGK_READL, __builtin_return_address(0), addr); + IO_COND(addr, return inb(port), return readb_no_log(addr)); return 0xff; } unsigned int ioread16(void __iomem *addr) { - IO_COND(addr, return inw(port), return readw(addr)); + uncached_logk_pc(LOGK_READL, __builtin_return_address(0), addr); + IO_COND(addr, return inw(port), return readw_no_log(addr)); return 0xffff; } unsigned int ioread16be(void __iomem *addr) { + uncached_logk_pc(LOGK_READL, __builtin_return_address(0), addr); IO_COND(addr, return pio_read16be(port), return mmio_read16be(addr)); return 0xffff; } unsigned int ioread32(void __iomem *addr) { - IO_COND(addr, return inl(port), return readl(addr)); + uncached_logk_pc(LOGK_READL, __builtin_return_address(0), addr); + IO_COND(addr, return inl(port), return readl_no_log(addr)); return 0xffffffff; } unsigned int ioread32be(void __iomem *addr) { + uncached_logk_pc(LOGK_READL, __builtin_return_address(0), addr); IO_COND(addr, return pio_read32be(port), return mmio_read32be(addr)); return 0xffffffff; } @@ -111,22 +117,27 @@ void iowrite8(u8 val, void __iomem *addr) { - IO_COND(addr, outb(val,port), writeb(val, addr)); + uncached_logk_pc(LOGK_WRITEL, __builtin_return_address(0), addr); + IO_COND(addr, outb(val, port), writeb_no_log(val, addr)); } void iowrite16(u16 val, void __iomem *addr) { - IO_COND(addr, outw(val,port), writew(val, addr)); + uncached_logk_pc(LOGK_WRITEL, __builtin_return_address(0), addr); + IO_COND(addr, outw(val, port), writew_no_log(val, addr)); } void iowrite16be(u16 val, void __iomem *addr) { + uncached_logk_pc(LOGK_WRITEL, __builtin_return_address(0), addr); IO_COND(addr, pio_write16be(val,port), mmio_write16be(val, addr)); } void iowrite32(u32 val, void __iomem *addr) { - IO_COND(addr, outl(val,port), writel(val, addr)); + uncached_logk_pc(LOGK_WRITEL, __builtin_return_address(0), addr); + IO_COND(addr, outl(val, port), writel_no_log(val, addr)); } void iowrite32be(u32 val, void __iomem *addr) { + uncached_logk_pc(LOGK_WRITEL, __builtin_return_address(0), addr); IO_COND(addr, pio_write32be(val,port), mmio_write32be(val, addr)); } EXPORT_SYMBOL(iowrite8); @@ -224,7 +235,7 @@ EXPORT_SYMBOL(iowrite16_rep); EXPORT_SYMBOL(iowrite32_rep); -#ifdef CONFIG_HAS_IOPORT +#ifdef CONFIG_HAS_IOPORT_MAP /* Create a virtual mapping cookie for an IO port range */ void __iomem *ioport_map(unsigned long port, unsigned int nr) { @@ -239,7 +250,7 @@ } EXPORT_SYMBOL(ioport_map); EXPORT_SYMBOL(ioport_unmap); -#endif /* CONFIG_HAS_IOPORT */ +#endif /* CONFIG_HAS_IOPORT_MAP */ #ifdef CONFIG_PCI /* Hide the details if this is a MMIO or PIO address space and just do what