--- zzzz-none-000/linux-4.9.276/arch/mips/include/asm/io.h 2021-07-20 14:21:16.000000000 +0000 +++ falcon-5530-750/linux-4.9.276/arch/mips/include/asm/io.h 2023-04-05 08:19:00.000000000 +0000 @@ -185,6 +185,7 @@ if (flags == _CACHE_UNCACHED) base = (u64) IO_BASE; return (void __iomem *) (unsigned long) (base + offset); +#ifndef CONFIG_SOC_GRX500 } else if (__builtin_constant_p(offset) && __builtin_constant_p(size) && __builtin_constant_p(flags)) { phys_addr_t phys_addr, last_addr; @@ -204,6 +205,7 @@ flags == _CACHE_UNCACHED) return (void __iomem *) (unsigned long)CKSEG1ADDR(phys_addr); +#endif } return __ioremap(offset, size, flags); @@ -285,9 +287,11 @@ #define __IS_KSEG1(addr) (((unsigned long)(addr) & ~0x1fffffffUL) == CKSEG1) +#ifndef CONFIG_SOC_GRX500 if (cpu_has_64bit_addresses || (__builtin_constant_p(addr) && __IS_KSEG1(addr))) return; +#endif __iounmap(addr); @@ -323,7 +327,7 @@ if (irq) \ local_irq_save(__flags); \ __asm__ __volatile__( \ - ".set arch=r4000" "\t\t# __writeq""\n\t" \ + ".set arch=mips64r2" "\t\t# __writeq""\n\t" \ "dsll32 %L0, %L0, 0" "\n\t" \ "dsrl32 %L0, %L0, 0" "\n\t" \ "dsll32 %M0, %M0, 0" "\n\t" \ @@ -353,7 +357,7 @@ if (irq) \ local_irq_save(__flags); \ __asm__ __volatile__( \ - ".set arch=r4000" "\t\t# __readq" "\n\t" \ + ".set arch=mips64r2" "\t\t# __readq" "\n\t" \ "ld %L0, %1" "\n\t" \ "dsra32 %M0, %L0, 0" "\n\t" \ "sll %L0, %L0, 0" "\n\t" \