Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mips: fix PCI_IOBASE definition

After my previous patch, the ioport_map() function changed from
the lib/iomap.c version to the asm-generic/io.h version, which
requires a correct PCI_IOBASE definition.

Unfortunately the types are also different, so add the correct
definition for ioport_map() in asm/io.h and change the machine
specific ones to have the correct type.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

+11 -6
+5 -1
arch/mips/include/asm/io.h
··· 544 544 545 545 void __ioread64_copy(void *to, const void __iomem *from, size_t count); 546 546 547 - #ifdef CONFIG_PCI_DRIVERS_LEGACY 547 + #if defined(CONFIG_PCI) && defined(CONFIG_PCI_DRIVERS_LEGACY) 548 548 struct pci_dev; 549 549 void pci_iounmap(struct pci_dev *dev, void __iomem *addr); 550 550 #define pci_iounmap pci_iounmap 551 + #endif 552 + 553 + #ifndef PCI_IOBASE 554 + #define PCI_IOBASE ((void __iomem *)mips_io_port_base) 551 555 #endif 552 556 553 557 #include <asm-generic/io.h>
+3 -2
arch/mips/include/asm/mach-loongson64/spaces.h
··· 7 7 #endif /* CONFIG_64BIT */ 8 8 9 9 /* Skip 128k to trap NULL pointer dereferences */ 10 - #define PCI_IOBASE _AC(0xc000000000000000 + SZ_128K, UL) 10 + #define PCI_PORT_BASE _AC(0xc000000000000000 + SZ_128K, UL) 11 + #define PCI_IOBASE (void __iomem *)PCI_PORT_BASE 11 12 #define PCI_IOSIZE SZ_16M 12 - #define MAP_BASE (PCI_IOBASE + PCI_IOSIZE) 13 + #define MAP_BASE (PCI_PORT_BASE + PCI_IOSIZE) 13 14 14 15 #define IO_SPACE_LIMIT (PCI_IOSIZE - 1) 15 16
+1 -1
arch/mips/include/asm/mach-ralink/spaces.h
··· 2 2 #ifndef __ASM_MACH_RALINK_SPACES_H_ 3 3 #define __ASM_MACH_RALINK_SPACES_H_ 4 4 5 - #define PCI_IOBASE mips_io_port_base 5 + #define PCI_IOBASE (void __iomem *)mips_io_port_base 6 6 #define PCI_IOSIZE SZ_64K 7 7 #define IO_SPACE_LIMIT (PCI_IOSIZE - 1) 8 8
+2 -2
arch/mips/loongson64/init.c
··· 128 128 } 129 129 130 130 /* init base address of io space */ 131 - set_io_port_base(PCI_IOBASE); 131 + set_io_port_base((unsigned long)PCI_IOBASE); 132 132 133 133 if (loongson_sysconf.early_config) 134 134 loongson_sysconf.early_config(); ··· 178 178 return -EINVAL; 179 179 } 180 180 181 - vaddr = PCI_IOBASE + range->io_start; 181 + vaddr = (unsigned long)PCI_IOBASE + range->io_start; 182 182 183 183 vmap_page_range(vaddr, vaddr + size, hw_start, pgprot_device(PAGE_KERNEL)); 184 184