2019-07-28 20:25:48

by Denis Efremov (Oracle)

[permalink] [raw]
Subject: [PATCH 0/5] PCI: Convert pci_resource_to_user() to a weak function

Architectures currently define HAVE_ARCH_PCI_RESOURCE_TO_USER if they want
to provide their own pci_resource_to_user() implementation. This could be
simplified if we make the generic version a weak function. Thus,
architecture specific versions will automatically override the generic one.

Denis Efremov (5):
PCI: Convert pci_resource_to_user to a weak function
microblaze/PCI: Remove HAVE_ARCH_PCI_RESOURCE_TO_USER
mips/PCI: Remove HAVE_ARCH_PCI_RESOURCE_TO_USER
powerpc/PCI: Remove HAVE_ARCH_PCI_RESOURCE_TO_USER
spark/PCI: Remove HAVE_ARCH_PCI_RESOURCE_TO_USER

arch/microblaze/include/asm/pci.h | 2 --
arch/mips/include/asm/pci.h | 1 -
arch/powerpc/include/asm/pci.h | 2 --
arch/sparc/include/asm/pci.h | 2 --
drivers/pci/pci.c | 8 ++++++++
include/linux/pci.h | 18 +++---------------
6 files changed, 11 insertions(+), 22 deletions(-)

--
2.21.0



2019-07-28 20:26:19

by Denis Efremov (Oracle)

[permalink] [raw]
Subject: [PATCH 5/5] spark/PCI: Remove HAVE_ARCH_PCI_RESOURCE_TO_USER

The function pci_resource_to_user() was turned to a weak one. Thus,
spark-specific version will automatically override the generic one
and the HAVE_ARCH_PCI_RESOURCE_TO_USER macro should be removed.

Signed-off-by: Denis Efremov <[email protected]>
---
arch/sparc/include/asm/pci.h | 2 --
1 file changed, 2 deletions(-)

diff --git a/arch/sparc/include/asm/pci.h b/arch/sparc/include/asm/pci.h
index cfec79bb1831..4deddf430e5d 100644
--- a/arch/sparc/include/asm/pci.h
+++ b/arch/sparc/include/asm/pci.h
@@ -38,8 +38,6 @@ static inline int pci_proc_domain(struct pci_bus *bus)
#define arch_can_pci_mmap_io() 1
#define HAVE_ARCH_PCI_GET_UNMAPPED_AREA
#define get_pci_unmapped_area get_fb_unmapped_area
-
-#define HAVE_ARCH_PCI_RESOURCE_TO_USER
#endif /* CONFIG_SPARC64 */

#if defined(CONFIG_SPARC64) || defined(CONFIG_LEON_PCI)
--
2.21.0