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

sparc: merge 32-bit and 64-bit version of pci.h

There are enough common defintions that a single header seems nicer.

Also drop the pointless <linux/dma-mapping.h> include.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: David S. Miller <davem@davemloft.net>
Acked-by: Sam Ravnborg <sam@ravnborg.org>

+49 -88
+49 -4
arch/sparc/include/asm/pci.h
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 2 #ifndef ___ASM_SPARC_PCI_H 3 3 #define ___ASM_SPARC_PCI_H 4 - #if defined(__sparc__) && defined(__arch64__) 5 - #include <asm/pci_64.h> 4 + 5 + 6 + /* Can be used to override the logic in pci_scan_bus for skipping 7 + * already-configured bus numbers - to be used for buggy BIOSes 8 + * or architectures with incomplete PCI setup by the loader. 9 + */ 10 + #define pcibios_assign_all_busses() 0 11 + 12 + #define PCIBIOS_MIN_IO 0UL 13 + #define PCIBIOS_MIN_MEM 0UL 14 + 15 + #define PCI_IRQ_NONE 0xffffffff 16 + 17 + 18 + #ifdef CONFIG_SPARC64 19 + 20 + /* PCI IOMMU mapping bypass support. */ 21 + 22 + /* PCI 64-bit addressing works for all slots on all controller 23 + * types on sparc64. However, it requires that the device 24 + * can drive enough of the 64 bits. 25 + */ 26 + #define PCI64_REQUIRED_MASK (~(u64)0) 27 + #define PCI64_ADDR_BASE 0xfffc000000000000UL 28 + 29 + /* Return the index of the PCI controller for device PDEV. */ 30 + int pci_domain_nr(struct pci_bus *bus); 31 + static inline int pci_proc_domain(struct pci_bus *bus) 32 + { 33 + return 1; 34 + } 35 + 36 + /* Platform support for /proc/bus/pci/X/Y mmap()s. */ 37 + #define HAVE_PCI_MMAP 38 + #define arch_can_pci_mmap_io() 1 39 + #define HAVE_ARCH_PCI_GET_UNMAPPED_AREA 40 + #define get_pci_unmapped_area get_fb_unmapped_area 41 + 42 + #define HAVE_ARCH_PCI_RESOURCE_TO_USER 43 + #endif /* CONFIG_SPARC64 */ 44 + 45 + #if defined(CONFIG_SPARC64) || defined(CONFIG_LEON_PCI) 46 + static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) 47 + { 48 + return PCI_IRQ_NONE; 49 + } 6 50 #else 7 - #include <asm/pci_32.h> 51 + #include <asm-generic/pci.h> 8 52 #endif 9 - #endif 53 + 54 + #endif /* ___ASM_SPARC_PCI_H */
-32
arch/sparc/include/asm/pci_32.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 2 - #ifndef __SPARC_PCI_H 3 - #define __SPARC_PCI_H 4 - 5 - #ifdef __KERNEL__ 6 - 7 - #include <linux/dma-mapping.h> 8 - 9 - /* Can be used to override the logic in pci_scan_bus for skipping 10 - * already-configured bus numbers - to be used for buggy BIOSes 11 - * or architectures with incomplete PCI setup by the loader. 12 - */ 13 - #define pcibios_assign_all_busses() 0 14 - 15 - #define PCIBIOS_MIN_IO 0UL 16 - #define PCIBIOS_MIN_MEM 0UL 17 - 18 - #define PCI_IRQ_NONE 0xffffffff 19 - 20 - #endif /* __KERNEL__ */ 21 - 22 - #ifndef CONFIG_LEON_PCI 23 - /* generic pci stuff */ 24 - #include <asm-generic/pci.h> 25 - #else 26 - static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) 27 - { 28 - return PCI_IRQ_NONE; 29 - } 30 - #endif 31 - 32 - #endif /* __SPARC_PCI_H */
-52
arch/sparc/include/asm/pci_64.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 2 - #ifndef __SPARC64_PCI_H 3 - #define __SPARC64_PCI_H 4 - 5 - #ifdef __KERNEL__ 6 - 7 - #include <linux/dma-mapping.h> 8 - 9 - /* Can be used to override the logic in pci_scan_bus for skipping 10 - * already-configured bus numbers - to be used for buggy BIOSes 11 - * or architectures with incomplete PCI setup by the loader. 12 - */ 13 - #define pcibios_assign_all_busses() 0 14 - 15 - #define PCIBIOS_MIN_IO 0UL 16 - #define PCIBIOS_MIN_MEM 0UL 17 - 18 - #define PCI_IRQ_NONE 0xffffffff 19 - 20 - /* PCI IOMMU mapping bypass support. */ 21 - 22 - /* PCI 64-bit addressing works for all slots on all controller 23 - * types on sparc64. However, it requires that the device 24 - * can drive enough of the 64 bits. 25 - */ 26 - #define PCI64_REQUIRED_MASK (~(u64)0) 27 - #define PCI64_ADDR_BASE 0xfffc000000000000UL 28 - 29 - /* Return the index of the PCI controller for device PDEV. */ 30 - 31 - int pci_domain_nr(struct pci_bus *bus); 32 - static inline int pci_proc_domain(struct pci_bus *bus) 33 - { 34 - return 1; 35 - } 36 - 37 - /* Platform support for /proc/bus/pci/X/Y mmap()s. */ 38 - 39 - #define HAVE_PCI_MMAP 40 - #define arch_can_pci_mmap_io() 1 41 - #define HAVE_ARCH_PCI_GET_UNMAPPED_AREA 42 - #define get_pci_unmapped_area get_fb_unmapped_area 43 - 44 - static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) 45 - { 46 - return PCI_IRQ_NONE; 47 - } 48 - 49 - #define HAVE_ARCH_PCI_RESOURCE_TO_USER 50 - #endif /* __KERNEL__ */ 51 - 52 - #endif /* __SPARC64_PCI_H */