Skip to contentSkip to conversation

move bus (PCI, PCMCIA, EISA, rapdio) config to drivers/

PATCH In review Christoph Hellwig 5 participants 24 messages Oct 13, 2018 – Oct 17, 2018

Subsystems (35)
lore
Share & tools
lore
#0 lore raw

Hi all,

currently every architecture that wants to provide on of the common periphal busses needs to add some boilerplate code and include the
right Kconfig files. This series instead just selects the presence
(when needed) and then handles everything in the bus-specific Kconfig file under drivers/.

#1 lore raw

PATCH 1/8 aha152x: rename the PCMCIA define

We plan to enable building the pcmcia core and drivers, and the non-prefixed PCMCIA name clashes with some arch headers.

---
 drivers/scsi/aha152x.c             | 14 +++++++-------
 drivers/scsi/pcmcia/aha152x_core.c |  2 +-
 2 files changed, 8 insertions(+), 8 deletions(-)
drivers/scsi/aha152x.c +7 -7
index 4d7b0e0adbf7..301b3cad15f8 100644
@@ -269,7 +269,7 @@ static LIST_HEAD(aha152x_host_list);
 /* DEFINES */
 
 /* For PCMCIA cards, always use AUTOCONF */
-#if defined(PCMCIA) || defined(MODULE)
+#if defined(AHA152X_PCMCIA) || defined(MODULE)
 #if !defined(AUTOCONF)
 #define AUTOCONF
 #endif
@@ -297,7 +297,7 @@ CMD_INC_RESID(struct scsi_cmnd *cmd, int inc)
 
 #define DELAY_DEFAULT 1000
 
-#if defined(PCMCIA)
+#if defined(AHA152X_PCMCIA)
 #define IRQ_MIN 0
 #define IRQ_MAX 16
 #else
@@ -328,7 +328,7 @@ MODULE_AUTHOR("Jürgen Fischer");
 MODULE_DESCRIPTION(AHA152X_REVID);
 MODULE_LICENSE("GPL");
 
-#if !defined(PCMCIA)
+#if !defined(AHA152X_PCMCIA)
 #if defined(MODULE)
 static int io[] = {0, 0};
 module_param_hw_array(io, int, ioport, NULL, 0);
@@ -391,7 +391,7 @@ static struct isapnp_device_id id_table[] = {
 MODULE_DEVICE_TABLE(isapnp, id_table);
 #endif /* ISAPNP */
 
-#endif /* !PCMCIA */
+#endif /* !AHA152X_PCMCIA */
 
 static struct scsi_host_template aha152x_driver_template;
 
@@ -863,7 +863,7 @@ void aha152x_release(struct Scsi_Host *shpnt)
 	if (shpnt->irq)
 		free_irq(shpnt->irq, shpnt);
 
-#if !defined(PCMCIA)
+#if !defined(AHA152X_PCMCIA)
 	if (shpnt->io_port)
 		release_region(shpnt->io_port, IO_RANGE);
 #endif
@@ -2924,7 +2924,7 @@ static struct scsi_host_template aha152x_driver_template = {
 	.slave_alloc			= aha152x_adjust_queue,
 };
 
-#if !defined(PCMCIA)
+#if !defined(AHA152X_PCMCIA)
 static int setup_count;
 static struct aha152x_setup setup[2];
 
@@ -3392,4 +3392,4 @@ static int __init aha152x_setup(char *str)
 __setup("aha152x=", aha152x_setup);
 #endif
 
-#endif /* !PCMCIA */
+#endif /* !AHA152X_PCMCIA */
drivers/scsi/pcmcia/aha152x_core.c +1 -1
index dba3716511c5..24b89228b241 100644
@@ -1,3 +1,3 @@
-#define PCMCIA	1
+#define AHA152X_PCMCIA 1
 #define AHA152X_STAT 1
 #include "aha152x.c"
Signature · 1 line
2.19.1
#2 lore raw

Re: [PATCH 1/8] aha152x: rename the PCMCIA define

Quoted 2 lines · Christoph Hellwig

We plan to enable building the pcmcia core and drivers, and the non-prefixed PCMCIA name clashes with some arch headers.

In the followup PCMCIA patch, you capitalized "PCMCIA core".

#3 lore raw

PATCH 2/8 powerpc: simplify CONFIG_PCI_QSPAN Kconfig magic

In reply to Christoph Hellwig

The way how CONFIG_PCI_QSPAN selects the CONFIG_PCI default is highly unusual and gets in the way of moving CONFIG_PCI into drivers/pci/Kconfig. Simplify it by just having it depend on CONFIG_PCI.

---
 arch/powerpc/Kconfig | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/powerpc/Kconfig +1 -2
index a80669209155..6fa6f92edb7f 100644
@@ -955,7 +955,6 @@ config PCI
 	bool "PCI support" if PPC_PCI_CHOICE
 	default y if !40x && !CPM2 && !PPC_8xx && !PPC_83xx \
 		&& !PPC_85xx && !PPC_86xx && !GAMECUBE_COMMON
-	default PCI_QSPAN if PPC_8xx
 	select GENERIC_PCI_IOMAP
 	help
 	  Find out whether your system includes a PCI bus. PCI is the name of
@@ -971,7 +970,7 @@ config PCI_SYSCALL
 
 config PCI_QSPAN
 	bool "QSpan PCI"
-	depends on PPC_8xx
+	depends on PPC_8xx && PCI
 	select PPC_I8259
 	help
 	  Say Y here if you have a system based on a Motorola 8xx-series
Signature · 1 line
2.19.1
#4 lore raw

Re: [PATCH 2/8] powerpc: simplify CONFIG_PCI_QSPAN Kconfig magic

Quoted 33 lines · Christoph Hellwig

The way how CONFIG_PCI_QSPAN selects the CONFIG_PCI default is highly unusual and gets in the way of moving CONFIG_PCI into drivers/pci/Kconfig. Simplify it by just having it depend on CONFIG_PCI.

---
 arch/powerpc/Kconfig | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/powerpc/Kconfig +1 -3
index a80669209155..6fa6f92edb7f 100644
@@ -955,7 +955,6 @@ config PCI
        bool "PCI support" if PPC_PCI_CHOICE
        default y if !40x && !CPM2 && !PPC_8xx && !PPC_83xx \
                && !PPC_85xx && !PPC_86xx && !GAMECUBE_COMMON
-       default PCI_QSPAN if PPC_8xx
        select GENERIC_PCI_IOMAP
        help
          Find out whether your system includes a PCI bus. PCI is the name of
@@ -971,7 +970,7 @@ config PCI_SYSCALL
 
 config PCI_QSPAN
        bool "QSpan PCI"
-       depends on PPC_8xx
+       depends on PPC_8xx && PCI
        select PPC_I8259
        help
          Say Y here if you have a system based on a Motorola 8xx-series
--
Quoted 2 lines

2.19.1

'git grep' did not get any other hit.

masahiro@pug:~/ref/linux$ git grep PCI_QSPAN
arch/powerpc/Kconfig:   default PCI_QSPAN if PPC_8xx
arch/powerpc/Kconfig:config PCI_QSPAN

With your patch, PCI_QSPAN will become
a dead config option.

How about removing it entirely?

--
Best Regards
Masahiro Yamada

#5 lore raw

Re: [PATCH 2/8] powerpc: simplify CONFIG_PCI_QSPAN Kconfig magic

Quoted 10 lines · Masahiro Yamada

'git grep' did not get any other hit.

masahiro@pug:~/ref/linux$ git grep PCI_QSPAN
arch/powerpc/Kconfig:   default PCI_QSPAN if PPC_8xx
arch/powerpc/Kconfig:config PCI_QSPAN

With your patch, PCI_QSPAN will become
a dead config option.

How about removing it entirely?

Yes, it should just go away. Thanks!

#6 lore raw

PATCH 3/8 powerpc: PCI_MSI needs PCI

In reply to Christoph Hellwig

Various powerpc boards select the PCI_MSI config option without selecting PCI, resulting in potentially not compilable configurations if the by default enabled PCI option is disabled. Explicitly select PCI to ensure we always have valid configs.

---
 arch/powerpc/platforms/40x/Kconfig | 1 +
 arch/powerpc/platforms/44x/Kconfig | 3 +++
 2 files changed, 4 insertions(+)
arch/powerpc/platforms/40x/Kconfig +1 -0
index 60254a321a91..d5361e63e0bb 100644
@@ -33,6 +33,7 @@ config KILAUEA
 	select 405EX
 	select PPC40x_SIMPLE
 	select PPC4xx_PCI_EXPRESS
+	select PCI
 	select PCI_MSI
 	select PPC4xx_MSI
 	help
arch/powerpc/platforms/44x/Kconfig +3 -0
index a6011422b861..70856a213663 100644
@@ -24,6 +24,7 @@ config BLUESTONE
 	default n
 	select PPC44x_SIMPLE
 	select APM821xx
+	select PCI
 	select PCI_MSI
 	select PPC4xx_MSI
 	select PPC4xx_PCI_EXPRESS
@@ -78,6 +79,7 @@ config KATMAI
 	select 440SPe
 	select PCI
 	select PPC4xx_PCI_EXPRESS
+	select PCI
 	select PCI_MSI
 	select PPC4xx_MSI
 	help
@@ -219,6 +221,7 @@ config AKEBONO
 	select SWIOTLB
 	select 476FPE
 	select PPC4xx_PCI_EXPRESS
+	select PCI
 	select PCI_MSI
 	select PPC4xx_HSTA_MSI
 	select I2C
Signature · 1 line
2.19.1
#7 lore raw

PATCH 4/8 pci: consolidate PCI config entry in drivers/pci

In reply to Christoph Hellwig

There is no good reason to duplicate the PCI menu in every architecture. Instead provide a selectable HAS_PCI symbol that indicates availability of PCI support and the handle the rest in drivers/pci.

Note that for powerpc we now select HAS_PCI globally instead of the convoluted mess of conditional or or non-conditional support per board, similar to what we do e.g. on x86. For alpha PCI is selected for the non-jensen configs as it was the default before, and a lot of code does not compile without PCI enabled. On other architectures with limited PCI support that wasn't as complicated I've left the selection as-is.

---
 arch/alpha/Kconfig                     | 15 ++-------
 arch/arc/Kconfig                       | 20 ------------
 arch/arc/plat-axs10x/Kconfig           |  2 +-
 arch/arc/plat-hsdk/Kconfig             |  2 +-
 arch/arm/Kconfig                       | 19 ++----------
 arch/arm/mach-ks8695/Kconfig           | 10 +++---
 arch/arm/mach-pxa/Kconfig              |  2 +-
 arch/arm64/Kconfig                     | 10 +-----
 arch/hexagon/Kconfig                   |  3 --
 arch/ia64/Kconfig                      |  9 +-----
 arch/m68k/Kconfig.bus                  | 11 -------
 arch/m68k/Kconfig.cpu                  |  1 +
 arch/microblaze/Kconfig                |  6 +---
 arch/mips/Kconfig                      | 43 +++++++++-----------------
 arch/mips/alchemy/Kconfig              |  6 ++--
 arch/mips/ath25/Kconfig                |  2 +-
 arch/mips/ath79/Kconfig                |  8 ++---
 arch/mips/bcm63xx/Kconfig              | 14 ++++-----
 arch/mips/lantiq/Kconfig               |  2 +-
 arch/mips/loongson64/Kconfig           |  6 ++--
 arch/mips/pmcs-msp71xx/Kconfig         | 10 +++---
 arch/mips/ralink/Kconfig               |  8 ++---
 arch/mips/sibyte/Kconfig               | 10 +++---
 arch/mips/txx9/Kconfig                 |  8 ++---
 arch/mips/vr41xx/Kconfig               |  8 ++---
 arch/parisc/Kconfig                    |  1 +
 arch/powerpc/Kconfig                   | 25 ++++-----------
 arch/powerpc/platforms/44x/Kconfig     |  2 +-
 arch/powerpc/platforms/512x/Kconfig    |  2 +-
 arch/powerpc/platforms/52xx/Kconfig    |  2 +-
 arch/powerpc/platforms/83xx/Kconfig    |  2 +-
 arch/powerpc/platforms/85xx/Kconfig    |  2 +-
 arch/powerpc/platforms/86xx/Kconfig    |  4 +--
 arch/powerpc/platforms/Kconfig         |  2 +-
 arch/powerpc/platforms/Kconfig.cputype |  4 +--
 arch/powerpc/platforms/ps3/Kconfig     |  2 +-
 arch/riscv/Kconfig                     | 17 +---------
 arch/s390/Kconfig                      | 23 +++++---------
 arch/sh/Kconfig                        | 19 ++----------
 arch/sh/boards/Kconfig                 | 30 +++++++++---------
 arch/sparc/Kconfig                     | 15 +--------
 arch/um/Kconfig                        |  3 --
 arch/unicore32/Kconfig                 | 11 +------
 arch/x86/Kconfig                       | 12 +------
 arch/xtensa/Kconfig                    | 16 +---------
 drivers/Kconfig                        |  4 +++
 drivers/parisc/Kconfig                 | 11 -------
 drivers/pci/Kconfig                    | 12 +++++++
 48 files changed, 139 insertions(+), 317 deletions(-)
arch/alpha/Kconfig +3 -12
index 5b4f88363453..ca40746ffa18 100644
@@ -6,6 +6,8 @@ config ALPHA
 	select ARCH_MIGHT_HAVE_PC_SERIO
 	select ARCH_NO_PREEMPT
 	select ARCH_USE_CMPXCHG_LOCKREF
+	select HAS_PCI if !ALPHA_JENSEN
+	select PCI if !ALPHA_JENSEN
 	select HAVE_AOUT
 	select HAVE_IDE
 	select HAVE_OPROFILE
@@ -15,6 +17,7 @@ config ALPHA
 	select NEED_SG_DMA_LENGTH
 	select VIRT_TO_BUS
 	select GENERIC_IRQ_PROBE
+	select GENERIC_PCI_IOMAP if PCI
 	select AUTO_IRQ_AFFINITY if SMP
 	select GENERIC_IRQ_SHOW
 	select ARCH_WANT_IPC_PARSE_VERSION
@@ -319,17 +322,6 @@ config ISA_DMA_API
 	bool
 	default y
 
-config PCI
-	bool
-	depends on !ALPHA_JENSEN
-	select GENERIC_PCI_IOMAP
-	default y
-	help
-	  Find out whether you have a PCI motherboard. PCI is the name of a
-	  bus system, i.e. the way the CPU talks to the other stuff inside
-	  your box. Other bus systems are ISA, EISA, MicroChannel (MCA) or
-	  VESA. If you have PCI, say Y, otherwise N.
-
 config PCI_DOMAINS
 	bool
 	default y
@@ -681,7 +673,6 @@ config HZ
 	default 1200 if HZ_1200
 	default 1024
 
-source "drivers/pci/Kconfig"
 source "drivers/eisa/Kconfig"
 
 source "drivers/pcmcia/Kconfig"
arch/arc/Kconfig +0 -20
index a045f3086047..55a6953e9239 100644
@@ -53,9 +53,6 @@ config ARC
 config ARCH_HAS_CACHE_LINE_SIZE
 	def_bool y
 
-config MIGHT_HAVE_PCI
-	bool
-
 config TRACE_IRQFLAGS_SUPPORT
 	def_bool y
 
@@ -555,24 +552,7 @@ config FORCE_MAX_ZONEORDER
 	default "12" if ARC_HUGEPAGE_16M
 	default "11"
 
-menu "Bus Support"
-
-config PCI
-	bool "PCI support" if MIGHT_HAVE_PCI
-	help
-	  PCI is the name of a bus system, i.e., the way the CPU talks to
-	  the other stuff inside your box.  Find out if your board/platform
-	  has PCI.
-
-	  Note: PCIe support for Synopsys Device will be available only
-	  when HAPS DX is configured with PCIe RC bitmap. If you have PCI,
-	  say Y, otherwise N.
-
 config PCI_SYSCALL
 	def_bool PCI
 
-source "drivers/pci/Kconfig"
-
-endmenu
-
 source "kernel/power/Kconfig"
arch/arc/plat-axs10x/Kconfig +1 -1
index 4e0df7b7a248..33e759233be8 100644
@@ -11,7 +11,7 @@ menuconfig ARC_PLAT_AXS10X
 	select DW_APB_ICTL
 	select GPIO_DWAPB
 	select OF_GPIO
-	select MIGHT_HAVE_PCI
+	select HAS_PCI
 	select GENERIC_IRQ_CHIP
 	select GPIOLIB
 	select AXS101 if ISA_ARCOMPACT
arch/arc/plat-hsdk/Kconfig +1 -1
index 9356753c2ed8..c213ac5a45b5 100644
@@ -11,4 +11,4 @@ menuconfig ARC_SOC_HSDK
 	select ARC_HAS_ACCL_REGS
 	select CLK_HSDK
 	select RESET_HSDK
-	select MIGHT_HAVE_PCI
+	select HAS_PCI
arch/arm/Kconfig +3 -16
index e8cd55a5b04c..a166ccdfdf86 100644
@@ -149,9 +149,6 @@ config ARM_DMA_IOMMU_ALIGNMENT
 
 endif
 
-config MIGHT_HAVE_PCI
-	bool
-
 config SYS_SUPPORTS_APM_EMULATION
 	bool
 
@@ -335,7 +332,7 @@ config ARCH_MULTIPLATFORM
 	select COMMON_CLK
 	select GENERIC_CLOCKEVENTS
 	select GENERIC_IRQ_MULTI_HANDLER
-	select MIGHT_HAVE_PCI
+	select HAS_PCI
 	select PCI_DOMAINS if PCI
 	select SPARSE_IRQ
 	select USE_OF
@@ -451,7 +448,7 @@ config ARCH_IXP4XX
 	select DMABOUNCE if PCI
 	select GENERIC_CLOCKEVENTS
 	select GPIOLIB
-	select MIGHT_HAVE_PCI
+	select HAS_PCI
 	select NEED_MACH_IO_H
 	select USB_EHCI_BIG_ENDIAN_DESC
 	select USB_EHCI_BIG_ENDIAN_MMIO
@@ -464,7 +461,7 @@ config ARCH_DOVE
 	select GENERIC_CLOCKEVENTS
 	select GENERIC_IRQ_MULTI_HANDLER
 	select GPIOLIB
-	select MIGHT_HAVE_PCI
+	select HAS_PCI
 	select MVEBU_MBUS
 	select PINCTRL
 	select PINCTRL_DOVE
@@ -1231,14 +1228,6 @@ config ISA_DMA
 config ISA_DMA_API
 	bool
 
-config PCI
-	bool "PCI support" if MIGHT_HAVE_PCI
-	help
-	  Find out whether you have a PCI motherboard. PCI is the name of a
-	  bus system, i.e. the way the CPU talks to the other stuff inside
-	  your box. Other bus systems are ISA, EISA, MicroChannel (MCA) or
-	  VESA. If you have PCI, say Y, otherwise N.
-
 config PCI_DOMAINS
 	bool "Support for multiple PCI domains"
 	depends on PCI
@@ -1267,8 +1256,6 @@ config PCI_HOST_ITE8152
 	default y
 	select DMABOUNCE
 
-source "drivers/pci/Kconfig"
-
 source "drivers/pcmcia/Kconfig"
 
 endmenu
arch/arm/mach-ks8695/Kconfig +5 -5
index a545976bdbd6..b14541bf31bd 100644
@@ -4,7 +4,7 @@ menu "Kendin/Micrel KS8695 Implementations"
 
 config MACH_KS8695
 	bool "KS8695 development board"
-	select MIGHT_HAVE_PCI
+	select HAS_PCI
 	help
 	  Say 'Y' here if you want your kernel to run on the original
 	  Kendin-Micrel KS8695 development board.
@@ -52,7 +52,7 @@ config MACH_CM4002
 
 config MACH_CM4008
 	bool "OpenGear CM4008"
-	select MIGHT_HAVE_PCI
+	select HAS_PCI
 	help
 	  Say 'Y' here if you want your kernel to support the OpenGear
 	  CM4008 Console Server. See http://www.opengear.com for more
@@ -60,7 +60,7 @@ config MACH_CM4008
 
 config MACH_CM41xx
 	bool "OpenGear CM41xx"
-	select MIGHT_HAVE_PCI
+	select HAS_PCI
 	help
 	  Say 'Y' here if you want your kernel to support the OpenGear
 	  CM4016 or CM4048 Console Servers. See http://www.opengear.com for
@@ -68,7 +68,7 @@ config MACH_CM41xx
 
 config MACH_IM4004
 	bool "OpenGear IM4004"
-	select MIGHT_HAVE_PCI
+	select HAS_PCI
 	help
 	  Say 'Y' here if you want your kernel to support the OpenGear
 	  IM4004 Secure Access Server. See http://www.opengear.com for
@@ -76,7 +76,7 @@ config MACH_IM4004
 
 config MACH_IM42xx
 	bool "OpenGear IM42xx"
-	select MIGHT_HAVE_PCI
+	select HAS_PCI
 	help
 	  Say 'Y' here if you want your kernel to support the OpenGear
 	  IM4216 or IM4248 Console Servers. See http://www.opengear.com for
arch/arm/mach-pxa/Kconfig +1 -1
index a68b34183107..f8d8716636ad 100644
@@ -125,7 +125,7 @@ config MACH_ARMCORE
 	bool "CompuLab CM-X255/CM-X270 modules"
 	select ARCH_HAS_DMA_SET_COHERENT_MASK if PCI
 	select IWMMXT
-	select MIGHT_HAVE_PCI
+	select HAS_PCI
 	select NEED_MACH_IO_H if PCI
 	select PXA25x
 	select PXA27x
arch/arm64/Kconfig +1 -9
index 1b1a0e95c751..c6a3f705d47b 100644
@@ -98,6 +98,7 @@ config ARM64
 	select GENERIC_TIME_VSYSCALL
 	select HANDLE_DOMAIN_IRQ
 	select HARDIRQS_SW_RESEND
+	select HAS_PCI
 	select HAVE_ACPI_APEI if (ACPI && EFI)
 	select HAVE_ALIGNED_STRUCT_PAGE if SLUB
 	select HAVE_ARCH_AUDITSYSCALL
@@ -284,13 +285,6 @@ source "arch/arm64/Kconfig.platforms"
 
 menu "Bus support"
 
-config PCI
-	bool "PCI support"
-	help
-	  This feature enables support for PCI bus system. If you say Y
-	  here, the kernel will include drivers and infrastructure code
-	  to support PCI bus devices.
-
 config PCI_DOMAINS
 	def_bool PCI
 
@@ -300,8 +294,6 @@ config PCI_DOMAINS_GENERIC
 config PCI_SYSCALL
 	def_bool PCI
 
-source "drivers/pci/Kconfig"
-
 endmenu
 
 menu "Kernel Features"
arch/hexagon/Kconfig +0 -3
index 89a4b22f34d9..1bc856c61ed8 100644
@@ -44,9 +44,6 @@ config FRAME_POINTER
 config LOCKDEP_SUPPORT
 	def_bool y
 
-config PCI
-	def_bool n
-
 config EARLY_PRINTK
 	def_bool y
 
arch/ia64/Kconfig +1 -8
index 8b4a0c1748c0..272614773c97 100644
@@ -50,6 +50,7 @@ config IA64
 	select HAVE_MOD_ARCH_SPECIFIC
 	select MODULES_USE_ELF_RELA
 	select ARCH_USE_CMPXCHG_LOCKREF
+	select HAS_PCI if !IA64_HP_SIM
 	select HAVE_ARCH_AUDITSYSCALL
 	select NEED_DMA_MAP_STATE
 	select NEED_SG_DMA_LENGTH
@@ -546,20 +547,12 @@ if !IA64_HP_SIM
 
 menu "Bus options (PCI, PCMCIA)"
 
-config PCI
-	bool "PCI support"
-	help
-	  Real IA-64 machines all have PCI/PCI-X/PCI Express busses.  Say Y
-	  here unless you are using a simulator without PCI support.
-
 config PCI_DOMAINS
 	def_bool PCI
 
 config PCI_SYSCALL
 	def_bool PCI
 
-source "drivers/pci/Kconfig"
-
 source "drivers/pcmcia/Kconfig"
 
 endmenu
arch/m68k/Kconfig.bus +0 -11
index aef698fa50e5..8cb0604b195b 100644
@@ -63,17 +63,6 @@ source "drivers/zorro/Kconfig"
 
 endif
 
-config PCI
-	bool "PCI support"
-	depends on M54xx
-	help
-	  Enable the PCI bus. Support for the PCI bus hardware built into the
-	  ColdFire 547x and 548x processors.
-
-if PCI
-source "drivers/pci/Kconfig"
-endif
-
 if !MMU
 
 config ISA_DMA_API
arch/m68k/Kconfig.cpu +1 -0
index 21f00349af52..aea0bc963ab8 100644
@@ -299,6 +299,7 @@ config M53xx
 	bool
 
 config M54xx
+	select HAS_PCI
 	bool
 
 endif # COLDFIRE
arch/microblaze/Kconfig +1 -5
index ace5c5bf1836..5ad416e17d9e 100644
@@ -29,6 +29,7 @@ config MICROBLAZE
 	select HAVE_FUNCTION_GRAPH_TRACER
 	select HAVE_FUNCTION_TRACER
 	select NO_BOOTMEM
+	select HAS_PCI
 	select HAVE_MEMBLOCK
 	select HAVE_MEMBLOCK_NODE_MAP
 	select HAVE_OPROFILE
@@ -268,9 +269,6 @@ endmenu
 
 menu "Bus Options"
 
-config PCI
-	bool "PCI support"
-
 config PCI_DOMAINS
 	def_bool PCI
 
@@ -284,6 +282,4 @@ config PCI_XILINX
 	bool "Xilinx PCI host bridge support"
 	depends on PCI
 
-source "drivers/pci/Kconfig"
-
 endmenu
arch/mips/Kconfig +15 -28

145 lines not on this page · raw message

arch/mips/alchemy/Kconfig +3 -3
index 7d73f7f4202b..78e015a9b165 100644
@@ -14,7 +14,7 @@ choice
 
 config MIPS_MTX1
 	bool "4G Systems MTX-1 board"
-	select HW_HAS_PCI
+	select HAS_PCI
 	select ALCHEMY_GPIOINT_AU1000
 	select SYS_SUPPORTS_LITTLE_ENDIAN
 	select SYS_HAS_EARLY_PRINTK
@@ -22,7 +22,7 @@ config MIPS_MTX1
 config MIPS_DB1XXX
 	bool "Alchemy DB1XXX / PB1XXX boards"
 	select GPIOLIB
-	select HW_HAS_PCI
+	select HAS_PCI
 	select SYS_SUPPORTS_LITTLE_ENDIAN
 	select SYS_HAS_EARLY_PRINTK
 	help
@@ -40,7 +40,7 @@ config MIPS_XXS1500
 config MIPS_GPR
 	bool "Trapeze ITS GPR board"
 	select ALCHEMY_GPIOINT_AU1000
-	select HW_HAS_PCI
+	select HAS_PCI
 	select SYS_SUPPORTS_LITTLE_ENDIAN
 	select SYS_HAS_EARLY_PRINTK
 
arch/mips/ath25/Kconfig +1 -1
index 2c1dfd06c366..59b8fd9b6179 100644
@@ -13,6 +13,6 @@ config PCI_AR2315
 	bool "Atheros AR2315 PCI controller support"
 	depends on SOC_AR2315
 	select ARCH_HAS_PHYS_TO_DMA
-	select HW_HAS_PCI
+	select HAS_PCI
 	select PCI
 	default y
arch/mips/ath79/Kconfig +4 -4
index 9547cf1ea38d..7c4af384f191 100644
@@ -75,11 +75,11 @@ config ATH79_MACH_UBNT_XM
 endmenu
 
 config SOC_AR71XX
-	select HW_HAS_PCI
+	select HAS_PCI
 	def_bool n
 
 config SOC_AR724X
-	select HW_HAS_PCI
+	select HAS_PCI
 	select PCI_AR724X if PCI
 	def_bool n
 
@@ -90,12 +90,12 @@ config SOC_AR933X
 	def_bool n
 
 config SOC_AR934X
-	select HW_HAS_PCI
+	select HAS_PCI
 	select PCI_AR724X if PCI
 	def_bool n
 
 config SOC_QCA955X
-	select HW_HAS_PCI
+	select HAS_PCI
 	select PCI_AR724X if PCI
 	def_bool n
 
arch/mips/bcm63xx/Kconfig +7 -7
index 96ed735a4f4a..dc82ad30f4d2 100644
@@ -5,17 +5,17 @@ menu "CPU support"
 config BCM63XX_CPU_3368
 	bool "support 3368 CPU"
 	select SYS_HAS_CPU_BMIPS4350
-	select HW_HAS_PCI
+	select HAS_PCI
 
 config BCM63XX_CPU_6328
 	bool "support 6328 CPU"
 	select SYS_HAS_CPU_BMIPS4350
-	select HW_HAS_PCI
+	select HAS_PCI
 
 config BCM63XX_CPU_6338
 	bool "support 6338 CPU"
 	select SYS_HAS_CPU_BMIPS32_3300
-	select HW_HAS_PCI
+	select HAS_PCI
 
 config BCM63XX_CPU_6345
 	bool "support 6345 CPU"
@@ -24,22 +24,22 @@ config BCM63XX_CPU_6345
 config BCM63XX_CPU_6348
 	bool "support 6348 CPU"
 	select SYS_HAS_CPU_BMIPS32_3300
-	select HW_HAS_PCI
+	select HAS_PCI
 
 config BCM63XX_CPU_6358
 	bool "support 6358 CPU"
 	select SYS_HAS_CPU_BMIPS4350
-	select HW_HAS_PCI
+	select HAS_PCI
 
 config BCM63XX_CPU_6362
 	bool "support 6362 CPU"
 	select SYS_HAS_CPU_BMIPS4350
-	select HW_HAS_PCI
+	select HAS_PCI
 
 config BCM63XX_CPU_6368
 	bool "support 6368 CPU"
 	select SYS_HAS_CPU_BMIPS4350
-	select HW_HAS_PCI
+	select HAS_PCI
 endmenu
 
 source "arch/mips/bcm63xx/boards/Kconfig"
arch/mips/lantiq/Kconfig +1 -1
index 8e3a1fc2bc39..3c6916c6e0a8 100644
@@ -19,7 +19,7 @@ config SOC_AMAZON_SE
 config SOC_XWAY
 	bool "XWAY"
 	select SOC_TYPE_XWAY
-	select HW_HAS_PCI
+	select HAS_PCI
 	select MFD_SYSCON
 	select MFD_CORE
 
arch/mips/loongson64/Kconfig +3 -3
index c865b4b9b775..816ef9d6101d 100644
@@ -15,7 +15,7 @@ config LEMOTE_FULOONG2E
 	select DMA_NONCOHERENT
 	select BOOT_ELF32
 	select BOARD_SCACHE
-	select HW_HAS_PCI
+	select HAS_PCI
 	select I8259
 	select ISA
 	select IRQ_MIPS_CPU
@@ -46,7 +46,7 @@ config LEMOTE_MACH2F
 	select DMA_NONCOHERENT
 	select GENERIC_ISA_DMA_SUPPORT_BROKEN
 	select HAVE_CLK
-	select HW_HAS_PCI
+	select HAS_PCI
 	select I8259
 	select IRQ_MIPS_CPU
 	select ISA
@@ -74,7 +74,7 @@ config LOONGSON_MACH3X
 	select CSRC_R4K
 	select CEVT_R4K
 	select CPU_HAS_WB
-	select HW_HAS_PCI
+	select HAS_PCI
 	select ISA
 	select HT_PCI
 	select I8259
arch/mips/pmcs-msp71xx/Kconfig +5 -5
index d319bc0c3df6..c00af0d5e795 100644
@@ -6,25 +6,25 @@ choice
 config PMC_MSP4200_EVAL
 	bool "PMC-Sierra MSP4200 Eval Board"
 	select IRQ_MSP_SLP
-	select HW_HAS_PCI
+	select HAS_PCI
 	select MIPS_L1_CACHE_SHIFT_4
 
 config PMC_MSP4200_GW
 	bool "PMC-Sierra MSP4200 VoIP Gateway"
 	select IRQ_MSP_SLP
-	select HW_HAS_PCI
+	select HAS_PCI
 
 config PMC_MSP7120_EVAL
 	bool "PMC-Sierra MSP7120 Eval Board"
 	select SYS_SUPPORTS_MULTITHREADING
 	select IRQ_MSP_CIC
-	select HW_HAS_PCI
+	select HAS_PCI
 
 config PMC_MSP7120_GW
 	bool "PMC-Sierra MSP7120 Residential Gateway"
 	select SYS_SUPPORTS_MULTITHREADING
 	select IRQ_MSP_CIC
-	select HW_HAS_PCI
+	select HAS_PCI
 	select MSP_HAS_USB
 	select MSP_ETH
 
@@ -32,7 +32,7 @@ config PMC_MSP7120_FPGA
 	bool "PMC-Sierra MSP7120 FPGA"
 	select SYS_SUPPORTS_MULTITHREADING
 	select IRQ_MSP_CIC
-	select HW_HAS_PCI
+	select HAS_PCI
 
 endchoice
 
arch/mips/ralink/Kconfig +4 -4
index 1f9cb0e3c79a..8b7413fe04a8 100644
@@ -27,18 +27,18 @@ choice
 	config SOC_RT288X
 		bool "RT288x"
 		select MIPS_L1_CACHE_SHIFT_4
-		select HW_HAS_PCI
+		select HAS_PCI
 
 	config SOC_RT305X
 		bool "RT305x"
 
 	config SOC_RT3883
 		bool "RT3883"
-		select HW_HAS_PCI
+		select HAS_PCI
 
 	config SOC_MT7620
 		bool "MT7620/8"
-		select HW_HAS_PCI
+		select HAS_PCI
 
 	config SOC_MT7621
 		bool "MT7621"
@@ -50,7 +50,7 @@ choice
 		select MIPS_GIC
 		select COMMON_CLK
 		select CLKSRC_MIPS_GIC
-		select HW_HAS_PCI
+		select HAS_PCI
 endchoice
 
 choice
arch/mips/sibyte/Kconfig +5 -5
index 7ec278d72096..0583331ba54e 100644
@@ -3,7 +3,7 @@ config SIBYTE_SB1250
 	bool
 	select CEVT_SB1250
 	select CSRC_SB1250
-	select HW_HAS_PCI
+	select HAS_PCI
 	select IRQ_MIPS_CPU
 	select SIBYTE_ENABLE_LDT_IF_PCI
 	select SIBYTE_HAS_ZBUS_PROFILING
@@ -23,7 +23,7 @@ config SIBYTE_BCM1125
 	bool
 	select CEVT_SB1250
 	select CSRC_SB1250
-	select HW_HAS_PCI
+	select HAS_PCI
 	select IRQ_MIPS_CPU
 	select SIBYTE_BCM112X
 	select SIBYTE_HAS_ZBUS_PROFILING
@@ -33,7 +33,7 @@ config SIBYTE_BCM1125H
 	bool
 	select CEVT_SB1250
 	select CSRC_SB1250
-	select HW_HAS_PCI
+	select HAS_PCI
 	select IRQ_MIPS_CPU
 	select SIBYTE_BCM112X
 	select SIBYTE_ENABLE_LDT_IF_PCI
@@ -52,7 +52,7 @@ config SIBYTE_BCM1x80
 	bool
 	select CEVT_BCM1480
 	select CSRC_BCM1480
-	select HW_HAS_PCI
+	select HAS_PCI
 	select IRQ_MIPS_CPU
 	select SIBYTE_HAS_ZBUS_PROFILING
 	select SIBYTE_SB1xxx_SOC
@@ -62,7 +62,7 @@ config SIBYTE_BCM1x55
 	bool
 	select CEVT_BCM1480
 	select CSRC_BCM1480
-	select HW_HAS_PCI
+	select HAS_PCI
 	select IRQ_MIPS_CPU
 	select SIBYTE_SB1xxx_SOC
 	select SIBYTE_HAS_ZBUS_PROFILING
arch/mips/txx9/Kconfig +4 -4
index d2509c93f0ee..cf5a49c513d4 100644
@@ -59,7 +59,7 @@ config SOC_TX3927
 	bool
 	select CEVT_TXX9
 	select HAS_TXX9_SERIAL
-	select HW_HAS_PCI
+	select HAS_PCI
 	select IRQ_TXX9
 	select GPIO_TXX9
 
@@ -67,7 +67,7 @@ config SOC_TX4927
 	bool
 	select CEVT_TXX9
 	select HAS_TXX9_SERIAL
-	select HW_HAS_PCI
+	select HAS_PCI
 	select IRQ_TXX9
 	select PCI_TX4927
 	select GPIO_TXX9
@@ -77,7 +77,7 @@ config SOC_TX4938
 	bool
 	select CEVT_TXX9
 	select HAS_TXX9_SERIAL
-	select HW_HAS_PCI
+	select HAS_PCI
 	select IRQ_TXX9
 	select PCI_TX4927
 	select GPIO_TXX9
@@ -87,7 +87,7 @@ config SOC_TX4939
 	bool
 	select CEVT_TXX9
 	select HAS_TXX9_SERIAL
-	select HW_HAS_PCI
+	select HAS_PCI
 	select PCI_TX4927
 	select HAS_TXX9_ACLC
 
arch/mips/vr41xx/Kconfig +4 -4
index 992c988b83b0..01f37c35fa19 100644
@@ -30,7 +30,7 @@ config TANBAC_TB022X
 	select CSRC_R4K
 	select DMA_NONCOHERENT
 	select IRQ_MIPS_CPU
-	select HW_HAS_PCI
+	select HAS_PCI
 	select SYS_SUPPORTS_32BIT_KERNEL
 	select SYS_SUPPORTS_LITTLE_ENDIAN
 	help
@@ -46,7 +46,7 @@ config VICTOR_MPC30X
 	select CSRC_R4K
 	select DMA_NONCOHERENT
 	select IRQ_MIPS_CPU
-	select HW_HAS_PCI
+	select HAS_PCI
 	select PCI_VR41XX
 	select SYS_SUPPORTS_32BIT_KERNEL
 	select SYS_SUPPORTS_LITTLE_ENDIAN
@@ -57,7 +57,7 @@ config ZAO_CAPCELLA
 	select CSRC_R4K
 	select DMA_NONCOHERENT
 	select IRQ_MIPS_CPU
-	select HW_HAS_PCI
+	select HAS_PCI
 	select PCI_VR41XX
 	select SYS_SUPPORTS_32BIT_KERNEL
 	select SYS_SUPPORTS_LITTLE_ENDIAN
@@ -99,6 +99,6 @@ endchoice
 
 config PCI_VR41XX
 	bool "Add PCI control unit support of NEC VR4100 series"
-	depends on MACH_VR41XX && HW_HAS_PCI
+	depends on MACH_VR41XX && HAS_PCI
 	default y
 	select PCI
arch/parisc/Kconfig +1 -0
index 8e6d83f79e72..6b946eea90ee 100644
@@ -19,6 +19,7 @@ config PARISC
 	select NO_BOOTMEM
 	select BUG
 	select BUILDTIME_EXTABLE_SORT
+	select HAS_PCI
 	select HAVE_PERF_EVENTS
 	select HAVE_KERNEL_BZIP2
 	select HAVE_KERNEL_GZIP
arch/powerpc/Kconfig +6 -19
index 6fa6f92edb7f..0713375e1127 100644
@@ -168,10 +168,16 @@ config PPC
 	select GENERIC_CPU_VULNERABILITIES	if PPC_BARRIER_NOSPEC
 	select GENERIC_IRQ_SHOW
 	select GENERIC_IRQ_SHOW_LEVEL
+	select GENERIC_PCI_IOMAP		if PCI
 	select GENERIC_SMP_IDLE_THREAD
 	select GENERIC_STRNCPY_FROM_USER
 	select GENERIC_STRNLEN_USER
 	select GENERIC_TIME_VSYSCALL
+	# Platforms that what PCI turned unconditionally just do select PCI
+	# in their config node, otherwise allow the user to enable it.
+	# This means we can enable PCI even on platforms that don't support
+	# it, which is harmless except for wasted memory.
+	select HAS_PCI
 	select HAVE_ARCH_AUDITSYSCALL
 	select HAVE_ARCH_JUMP_LABEL
 	select HAVE_ARCH_KGDB
@@ -945,23 +951,6 @@ config FSL_GTM
 config MCA
 	bool
 
-# Platforms that what PCI turned unconditionally just do select PCI
-# in their config node.  Platforms that want to choose at config
-# time should select PPC_PCI_CHOICE
-config PPC_PCI_CHOICE
-	bool
-
-config PCI
-	bool "PCI support" if PPC_PCI_CHOICE
-	default y if !40x && !CPM2 && !PPC_8xx && !PPC_83xx \
-		&& !PPC_85xx && !PPC_86xx && !GAMECUBE_COMMON
-	select GENERIC_PCI_IOMAP
-	help
-	  Find out whether your system includes a PCI bus. PCI is the name of
-	  a bus system, i.e. the way the CPU talks to the other stuff inside
-	  your box.  If you say Y here, the kernel will include drivers and
-	  infrastructure code to support PCI bus devices.
-
 config PCI_DOMAINS
 	def_bool PCI
 
@@ -982,8 +971,6 @@ config PCI_8260
 	select PPC_INDIRECT_PCI
 	default y
 
-source "drivers/pci/Kconfig"
-
 source "drivers/pcmcia/Kconfig"
 
 config HAS_RAPIDIO
arch/powerpc/platforms/44x/Kconfig +1 -1
index 70856a213663..000efce8191b 100644
@@ -272,7 +272,7 @@ config XILINX_VIRTEX440_GENERIC_BOARD
 config XILINX_ML510
 	bool "Xilinx ML510 extra support"
 	depends on XILINX_VIRTEX440_GENERIC_BOARD
-	select PPC_PCI_CHOICE
+	select HAS_PCI
 	select XILINX_PCI if PCI
 	select PPC_INDIRECT_PCI if PCI
 	select PPC_I8259 if PCI
arch/powerpc/platforms/512x/Kconfig +1 -1
index b59eab6cbb1b..afc0a7f62cd9 100644
@@ -5,7 +5,7 @@ config PPC_MPC512x
 	select COMMON_CLK
 	select FSL_SOC
 	select IPIC
-	select PPC_PCI_CHOICE
+	select HAS_PCI
 	select FSL_PCI if PCI
 	select USB_EHCI_BIG_ENDIAN_MMIO if USB_EHCI_HCD
 	select USB_EHCI_BIG_ENDIAN_DESC if USB_EHCI_HCD
arch/powerpc/platforms/52xx/Kconfig +1 -1
index 55a587070342..557379857de5 100644
@@ -3,7 +3,7 @@ config PPC_MPC52xx
 	bool "52xx-based boards"
 	depends on 6xx
 	select COMMON_CLK
-	select PPC_PCI_CHOICE
+	select HAS_PCI
 
 config PPC_MPC5200_SIMPLE
 	bool "Generic support for simple MPC5200 based boards"
arch/powerpc/platforms/83xx/Kconfig +1 -1
index 071f53b0c0a0..32c70d6dee1e 100644
@@ -3,7 +3,7 @@ menuconfig PPC_83xx
 	bool "83xx-based boards"
 	depends on 6xx
 	select PPC_UDBG_16550
-	select PPC_PCI_CHOICE
+	select HAS_PCI
 	select FSL_PCI if PCI
 	select FSL_SOC
 	select IPIC
arch/powerpc/platforms/85xx/Kconfig +1 -1
index 68920d42b4bc..8438ac3f5c70 100644
@@ -5,7 +5,7 @@ menuconfig FSL_SOC_BOOKE
 	select FSL_SOC
 	select PPC_UDBG_16550
 	select MPIC
-	select PPC_PCI_CHOICE
+	select HAS_PCI
 	select FSL_PCI if PCI
 	select SERIAL_8250_EXTENDED if SERIAL_8250
 	select SERIAL_8250_SHARE_IRQ if SERIAL_8250
arch/powerpc/platforms/86xx/Kconfig +2 -2
index bcd179d3ed92..bbdf5b8d871a 100644
@@ -70,7 +70,7 @@ endif
 
 config MPC8641
 	bool
-	select PPC_PCI_CHOICE
+	select HAS_PCI
 	select FSL_PCI if PCI
 	select PPC_UDBG_16550
 	select MPIC
@@ -79,7 +79,7 @@ config MPC8641
 
 config MPC8610
 	bool
-	select PPC_PCI_CHOICE
+	select HAS_PCI
 	select FSL_PCI if PCI
 	select PPC_UDBG_16550
 	select MPIC
arch/powerpc/platforms/Kconfig +1 -1
index 14ef17e10ec9..6887739b6568 100644
@@ -285,7 +285,7 @@ config CPM2
 	bool "Enable support for the CPM2 (Communications Processor Module)"
 	depends on (FSL_SOC_BOOKE && PPC32) || 8260
 	select CPM
-	select PPC_PCI_CHOICE
+	select HAS_PCI
 	select GPIOLIB
 	help
 	  The CPM2 (Communications Processor Module) is a coprocessor on
arch/powerpc/platforms/Kconfig.cputype +2 -2
index 6c6a7c72cae4..0b0a2cceea64 100644
@@ -40,14 +40,14 @@ config 40x
 	select PPC_DCR_NATIVE
 	select PPC_UDBG_16550
 	select 4xx_SOC
-	select PPC_PCI_CHOICE
+	select HAS_PCI
 
 config 44x
 	bool "AMCC 44x, 46x or 47x"
 	select PPC_DCR_NATIVE
 	select PPC_UDBG_16550
 	select 4xx_SOC
-	select PPC_PCI_CHOICE
+	select HAS_PCI
 	select PHYS_64BIT
 
 config E200
arch/powerpc/platforms/ps3/Kconfig +1 -1
index 6f7525555b19..804a8924d421 100644
@@ -6,7 +6,7 @@ config PPC_PS3
 	select USB_OHCI_LITTLE_ENDIAN
 	select USB_OHCI_BIG_ENDIAN_MMIO
 	select USB_EHCI_BIG_ENDIAN_MMIO
-	select PPC_PCI_CHOICE
+	select HAS_PCI
 	help
 	  This option enables support for the Sony PS3 game console
 	  and other platforms using the PS3 hypervisor.  Enabling this
arch/riscv/Kconfig +1 -16
index a344980287a5..6eb31a0698ac 100644
@@ -38,6 +38,7 @@ config RISCV
 	select RISCV_ISA_A if SMP
 	select SPARSE_IRQ
 	select SYSCTL_EXCEPTION_TRACE
+	select HAS_PCI
 	select HAVE_ARCH_TRACEHOOK
 	select MODULES_USE_ELF_RELA if MODULES
 	select THREAD_INFO_IN_TASK
@@ -216,28 +217,12 @@ source "kernel/Kconfig.hz"
 
 endmenu
 
-menu "Bus support"
-
-config PCI
-	bool "PCI support"
-	select PCI_MSI
-	help
-	  This feature enables support for PCI bus system. If you say Y
-	  here, the kernel will include drivers and infrastructure code
-	  to support PCI bus devices.
-
-	  If you don't know what to do here, say Y.
-
 config PCI_DOMAINS
 	def_bool PCI
 
 config PCI_DOMAINS_GENERIC
 	def_bool PCI
 
-source "drivers/pci/Kconfig"
-
-endmenu
-
 menu "Power management options"
 
 source kernel/power/Kconfig
arch/s390/Kconfig +8 -15
index 9a9c7a6fe925..3491a084cf55 100644
@@ -121,6 +121,7 @@ config S390
 	select HAVE_ARCH_AUDITSYSCALL
 	select HAVE_ARCH_JUMP_LABEL
 	select CPU_NO_EFFICIENT_FFS if !HAVE_MARCH_Z9_109_FEATURES
+	select HAS_PCI
 	select HAVE_ARCH_SECCOMP_FILTER
 	select HAVE_ARCH_SOFT_DIRTY
 	select HAVE_ARCH_TRACEHOOK
@@ -165,10 +166,15 @@ config S390
 	select HAVE_RSEQ
 	select HAVE_SYSCALL_TRACEPOINTS
 	select HAVE_VIRT_CPU_ACCOUNTING
+	select IOMMU_HELPER		if PCI
+	select IOMMU_SUPPORT		if PCI
 	select MODULES_USE_ELF_RELA
+	select NEED_DMA_MAP_STATE	if PCI
+	select NEED_SG_DMA_LENGTH	if PCI
 	select NO_BOOTMEM
 	select OLD_SIGACTION
 	select OLD_SIGSUSPEND3
+	select PCI_MSI			if PCI
 	select SPARSE_IRQ
 	select SYSCTL_EXCEPTION_TRACE
 	select THREAD_INFO_IN_TASK
@@ -698,17 +704,6 @@ config QDIO
 
 	  If unsure, say Y.
 
-menuconfig PCI
-	bool "PCI support"
-	select PCI_MSI
-	select IOMMU_HELPER
-	select IOMMU_SUPPORT
-	select NEED_DMA_MAP_STATE
-	select NEED_SG_DMA_LENGTH
-
-	help
-	  Enable PCI support.
-
 if PCI
 
 config PCI_NR_FUNCTIONS
@@ -719,13 +714,11 @@ config PCI_NR_FUNCTIONS
 	  This allows you to specify the maximum number of PCI functions which
 	  this kernel will support.
 
-source "drivers/pci/Kconfig"
-
-endif	# PCI
-
 config PCI_DOMAINS
 	def_bool PCI
 
+endif	# PCI
+
 config HAS_IOMEM
 	def_bool PCI
 
arch/sh/Kconfig +3 -16
index 1fb7b6d72baf..2ff6855811a5 100644
@@ -41,13 +41,16 @@ config SUPERH
 	select GENERIC_IDLE_POLL_SETUP
 	select GENERIC_CLOCKEVENTS
 	select GENERIC_CMOS_UPDATE if SH_SH03 || SH_DREAMCAST
+	select GENERIC_PCI_IOMAP if PCI
 	select GENERIC_SCHED_CLOCK
 	select GENERIC_STRNCPY_FROM_USER
 	select GENERIC_STRNLEN_USER
 	select HAVE_MOD_ARCH_SPECIFIC if DWARF_UNWINDER
 	select MODULES_USE_ELF_RELA
+	select NO_GENERIC_PCI_IOPORT_MAP if PCI
 	select OLD_SIGSUSPEND
 	select OLD_SIGACTION
+	select PCI_DOMAINS if PCI
 	select HAVE_ARCH_AUDITSYSCALL
 	select HAVE_FUTEX_CMPXCHG if FUTEX
 	select HAVE_NMI
@@ -131,9 +134,6 @@ config SYS_SUPPORTS_SMP
 config SYS_SUPPORTS_NUMA
 	bool
 
-config SYS_SUPPORTS_PCI
-	bool
-
 config STACKTRACE_SUPPORT
 	def_bool y
 
@@ -858,22 +858,9 @@ config MAPLE
 	 Dreamcast with a serial line terminal or a remote network
 	 connection.
 
-config PCI
-	bool "PCI support"
-	depends on SYS_SUPPORTS_PCI
-	select PCI_DOMAINS
-	select GENERIC_PCI_IOMAP
-	select NO_GENERIC_PCI_IOPORT_MAP
-	help
-	  Find out whether you have a PCI motherboard. PCI is the name of a
-	  bus system, i.e. the way the CPU talks to the other stuff inside
-	  your box. If you have PCI, say Y, otherwise N.
-
 config PCI_DOMAINS
 	bool
 
-source "drivers/pci/Kconfig"
-
 source "drivers/pcmcia/Kconfig"
 
 endmenu
arch/sh/boards/Kconfig +15 -15
index 6394b4f0a69b..7d74abbbf7f4 100644
@@ -101,7 +101,7 @@ config SH_7751_SOLUTION_ENGINE
 config SH_7780_SOLUTION_ENGINE
 	bool "SolutionEngine7780"
 	select SOLUTION_ENGINE
-	select SYS_SUPPORTS_PCI
+	select HAS_PCI
 	depends on CPU_SUBTYPE_SH7780
 	help
 	  Select 7780 SolutionEngine if configuring for a Renesas SH7780
@@ -129,7 +129,7 @@ config SH_HP6XX
 
 config SH_DREAMCAST
 	bool "Dreamcast"
-	select SYS_SUPPORTS_PCI
+	select HAS_PCI
 	depends on CPU_SUBTYPE_SH7091
 	help
 	  Select Dreamcast if configuring for a SEGA Dreamcast.
@@ -139,7 +139,7 @@ config SH_SH03
 	bool "Interface CTP/PCI-SH03"
 	depends on CPU_SUBTYPE_SH7751
 	select CPU_HAS_IPR_IRQ
-	select SYS_SUPPORTS_PCI
+	select HAS_PCI
 	help
 	  CTP/PCI-SH03 is a CPU module computer that is produced
 	  by Interface Corporation.
@@ -149,7 +149,7 @@ config SH_SECUREEDGE5410
 	bool "SecureEdge5410"
 	depends on CPU_SUBTYPE_SH7751R
 	select CPU_HAS_IPR_IRQ
-	select SYS_SUPPORTS_PCI
+	select HAS_PCI
 	help
 	  Select SecureEdge5410 if configuring for a SnapGear SH board.
 	  This includes both the OEM SecureEdge products as well as the
@@ -158,7 +158,7 @@ config SH_SECUREEDGE5410
 config SH_RTS7751R2D
 	bool "RTS7751R2D"
 	depends on CPU_SUBTYPE_SH7751R
-	select SYS_SUPPORTS_PCI
+	select HAS_PCI
 	select IO_TRAPPED if MMU
 	help
 	  Select RTS7751R2D if configuring for a Renesas Technology
@@ -176,7 +176,7 @@ config SH_RSK
 config SH_SDK7780
 	bool "SDK7780R3"
 	depends on CPU_SUBTYPE_SH7780
-	select SYS_SUPPORTS_PCI
+	select HAS_PCI
 	help
 	  Select SDK7780 if configuring for a Renesas SH7780 SDK7780R3
 	  evaluation board.
@@ -184,7 +184,7 @@ config SH_SDK7780
 config SH_SDK7786
 	bool "SDK7786"
 	depends on CPU_SUBTYPE_SH7786
-	select SYS_SUPPORTS_PCI
+	select HAS_PCI
 	select NO_IOPORT_MAP if !PCI
 	select HAVE_SRAM_POOL
 	select REGULATOR_FIXED_VOLTAGE if REGULATOR
@@ -195,7 +195,7 @@ config SH_SDK7786
 config SH_HIGHLANDER
 	bool "Highlander"
 	depends on CPU_SUBTYPE_SH7780 || CPU_SUBTYPE_SH7785
-	select SYS_SUPPORTS_PCI
+	select HAS_PCI
 	select IO_TRAPPED if MMU
 
 config SH_SH7757LCR
@@ -207,7 +207,7 @@ config SH_SH7757LCR
 config SH_SH7785LCR
 	bool "SH7785LCR"
 	depends on CPU_SUBTYPE_SH7785
-	select SYS_SUPPORTS_PCI
+	select HAS_PCI
 
 config SH_SH7785LCR_29BIT_PHYSMAPS
 	bool "SH7785LCR 29bit physmaps"
@@ -229,7 +229,7 @@ config SH_URQUELL
 	bool "Urquell"
 	depends on CPU_SUBTYPE_SH7786
 	select GPIOLIB
-	select SYS_SUPPORTS_PCI
+	select HAS_PCI
 	select NO_IOPORT_MAP if !PCI
 
 config SH_MIGOR
@@ -302,7 +302,7 @@ config SH_SH4202_MICRODEV
 config SH_LANDISK
 	bool "LANDISK"
 	depends on CPU_SUBTYPE_SH7751R
-	select SYS_SUPPORTS_PCI
+	select HAS_PCI
 	help
 	  I-O DATA DEVICE, INC. "LANDISK Series" support.
 
@@ -310,7 +310,7 @@ config SH_TITAN
 	bool "TITAN"
 	depends on CPU_SUBTYPE_SH7751R
 	select CPU_HAS_IPR_IRQ
-	select SYS_SUPPORTS_PCI
+	select HAS_PCI
 	help
 	  Select Titan if you are configuring for a Nimble Microsystems
 	  NetEngine NP51R.
@@ -325,7 +325,7 @@ config SH_SHMIN
 config SH_LBOX_RE2
 	bool "L-BOX RE2"
 	depends on CPU_SUBTYPE_SH7751R
-	select SYS_SUPPORTS_PCI
+	select HAS_PCI
 	help
 	  Select L-BOX RE2 if configuring for the NTT COMWARE L-BOX RE2.
 
@@ -346,7 +346,7 @@ config SH_MAGIC_PANEL_R2
 config SH_CAYMAN
 	bool "Hitachi Cayman"
 	depends on CPU_SUBTYPE_SH5_101 || CPU_SUBTYPE_SH5_103
-	select SYS_SUPPORTS_PCI
+	select HAS_PCI
 	select ARCH_MIGHT_HAVE_PC_SERIO
 
 config SH_POLARIS
@@ -380,7 +380,7 @@ config SH_APSH4A3A
 config SH_APSH4AD0A
 	bool "AP-SH4AD-0A"
 	select SH_ALPHA_BOARD
-	select SYS_SUPPORTS_PCI
+	select HAS_PCI
 	select REGULATOR_FIXED_VOLTAGE if REGULATOR
 	depends on CPU_SUBTYPE_SH7786
 	help
arch/sparc/Kconfig +1 -14
index e6f2a38d2e61..2a4943f9765e 100644
@@ -16,6 +16,7 @@ config SPARC
 	select ARCH_MIGHT_HAVE_PC_SERIO
 	select OF
 	select OF_PROMTREE
+	select HAS_PCI
 	select HAVE_IDE
 	select HAVE_OPROFILE
 	select HAVE_ARCH_KGDB if !SMP || SPARC64
@@ -474,18 +475,6 @@ config SUN_LDOMS
 	  Say Y here is you want to support virtual devices via
 	  Logical Domains.
 
-config PCI
-	bool "Support for PCI and PS/2 keyboard/mouse"
-	help
-	  Find out whether your system includes a PCI bus. PCI is the name of
-	  a bus system, i.e. the way the CPU talks to the other stuff inside
-	  your box.  If you say Y here, the kernel will include drivers and
-	  infrastructure code to support PCI bus devices.
-
-	  CONFIG_PCI is needed for all JavaStation's (including MrCoffee),
-	  CP-1200, JavaEngine-1, Corona, Red October, and Serengeti SGSC.
-	  All of these platforms are extremely obscure, so say N if unsure.
-
 config PCI_DOMAINS
 	def_bool PCI if SPARC64
 
@@ -520,8 +509,6 @@ config SPARC_GRPCI2
 	help
 	  Say Y here to include the GRPCI2 Host Bridge Driver.
 
-source "drivers/pci/Kconfig"
-
 source "drivers/pcmcia/Kconfig"
 
 config SUN_OPENPROMFS
arch/um/Kconfig +0 -3
index 6b9938919f0b..de982541a059 100644
@@ -31,9 +31,6 @@ config ISA
 config SBUS
 	bool
 
-config PCI
-	bool
-
 config PCMCIA
 	bool
 
arch/unicore32/Kconfig +1 -10
index 60eae744d8fd..d90a78f1143a 100644
@@ -4,6 +4,7 @@ config UNICORE32
 	select ARCH_HAS_DEVMEM_IS_ALLOWED
 	select ARCH_MIGHT_HAVE_PC_PARPORT
 	select ARCH_MIGHT_HAVE_PC_SERIO
+	select HAS_PCI
 	select HAVE_MEMBLOCK
 	select HAVE_GENERIC_DMA_COHERENT
 	select HAVE_KERNEL_GZIP
@@ -119,16 +120,6 @@ endmenu
 
 menu "Bus support"
 
-config PCI
-	bool "PCI Support"
-	help
-	  Find out whether you have a PCI motherboard. PCI is the name of a
-	  bus system, i.e. the way the CPU talks to the other stuff inside
-	  your box. Other bus systems are ISA, EISA, MicroChannel (MCA) or
-	  VESA. If you have PCI, say Y, otherwise N.
-
-source "drivers/pci/Kconfig"
-
 source "drivers/pcmcia/Kconfig"
 
 endmenu
arch/x86/Kconfig +1 -11
index 1a0be022f91d..7cbc656f47e7 100644
@@ -113,6 +113,7 @@ config X86
 	select GENERIC_STRNLEN_USER
 	select GENERIC_TIME_VSYSCALL
 	select HARDLOCKUP_CHECK_TIMESTAMP	if X86_64
+	select HAS_PCI
 	select HAVE_ACPI_APEI			if ACPI
 	select HAVE_ACPI_APEI_NMI		if ACPI
 	select HAVE_ALIGNED_STRUCT_PAGE		if SLUB
@@ -2567,15 +2568,6 @@ endmenu
 
 menu "Bus options (PCI etc.)"
 
-config PCI
-	bool "PCI support"
-	default y
-	---help---
-	  Find out whether you have a PCI motherboard. PCI is the name of a
-	  bus system, i.e. the way the CPU talks to the other stuff inside
-	  your box. Other bus systems are ISA, EISA, MicroChannel (MCA) or
-	  VESA. If you have PCI, say Y, otherwise N.
-
 choice
 	prompt "PCI access mode"
 	depends on X86_32 && PCI
@@ -2658,8 +2650,6 @@ config PCI_CNB20LE_QUIRK
 
 	  You should say N unless you know you need this.
 
-source "drivers/pci/Kconfig"
-
 config ISA_BUS
 	bool "ISA bus support on modern systems" if EXPERT
 	help
arch/xtensa/Kconfig +1 -15
index b9ad83a0ee5d..22abeb236863 100644
@@ -20,6 +20,7 @@ config XTENSA
 	select GENERIC_PCI_IOMAP
 	select GENERIC_SCHED_CLOCK
 	select GENERIC_STRNCPY_FROM_USER if KASAN
+	select HAS_PCI
 	select HAVE_ARCH_KASAN if MMU
 	select HAVE_DEBUG_KMEMLEAK
 	select HAVE_DMA_CONTIGUOUS
@@ -384,21 +385,6 @@ config XTENSA_CALIBRATE_CCOUNT
 config SERIAL_CONSOLE
 	def_bool n
 
-menu "Bus options"
-
-config PCI
-	bool "PCI support"
-	default y
-	help
-	  Find out whether you have a PCI motherboard. PCI is the name of a
-	  bus system, i.e. the way the CPU talks to the other stuff inside
-	  your box. Other bus systems are ISA, EISA, MicroChannel (MCA) or
-	  VESA. If you have PCI, say Y, otherwise N.
-
-source "drivers/pci/Kconfig"
-
-endmenu
-
 menu "Platform options"
 
 choice
drivers/Kconfig +4 -0
index ab4d43923c4d..059573823387 100644
@@ -1,7 +1,11 @@
 # SPDX-License-Identifier: GPL-2.0
 menu "Device Drivers"
 
+# Keep I/O buses first
+
 source "drivers/amba/Kconfig"
+source "drivers/pci/Kconfig"
+
 
 source "drivers/base/Kconfig"
 
drivers/parisc/Kconfig +0 -11
index 5a48b5606110..5bbfea1a019c 100644
@@ -63,17 +63,6 @@ config ISA
 	  If you want to plug an ISA card into your EISA bus, say Y here.
 	  Most people should say N.
 
-config PCI
-	bool "PCI support"
-	help
-	  All recent HP machines have PCI slots, and you should say Y here
-	  if you have a recent machine.  If you are convinced you do not have
-	  PCI slots in your machine (eg a 712), then you may say "N" here.
-	  Beware that some GSC cards have a Dino onboard and PCI inside them,
-	  so it may be safest to say "Y" anyway.
-
-source "drivers/pci/Kconfig"
-
 config GSC_DINO
 	bool "GSCtoPCI/Dino PCI support"
 	depends on PCI && GSC
drivers/pci/Kconfig +12 -0
index 56ff8f6d31fc..229a518b68cd 100644
@@ -3,6 +3,18 @@
 # PCI configuration
 #
 
+config HAS_PCI
+	bool
+
+menuconfig PCI
+	bool "PCI support"
+	depends on HAS_PCI
+
+	help
+	  This option enables support for the PCI local bus, including
+	  support for PCI-X and the fundations for PCI Express support.
+	  Say 'Y' here unless you know what you are doing.
+
 source "drivers/pci/pcie/Kconfig"
 
 config PCI_MSI
Signature · 1 line
2.19.1
#8 lore raw

Re: [PATCH 4/8] pci: consolidate PCI config entry in drivers/pci

Quoted 4 lines · Christoph Hellwig

There is no good reason to duplicate the PCI menu in every architecture. Instead provide a selectable HAS_PCI symbol that indicates availability of PCI support and the handle the rest in drivers/pci.

I think HAVE_ is a preferred prefix in this case according to this doc:
https://github.com/masahir0y/linux/blob/v4.19-rc4/Documentation/kbuild/kconfig-language.txt#L448

It is true we have some options with HAS_ prefix, but the majority is HAVE_.

masahiro@pug:~/ref/linux$ find . -name 'Kconfig*' | xargs grep 'config
HAS_' | wc
      9      18     355
masahiro@pug:~/ref/linux$ find . -name 'Kconfig*' | xargs grep 'config
HAVE_' | wc
    177     354    8182
Quoted 20 lines

Note that for powerpc we now select HAS_PCI globally instead of the convoluted mess of conditional or or non-conditional support per board, similar to what we do e.g. on x86. For alpha PCI is selected for the non-jensen configs as it was the default before, and a lot of code does not compile without PCI enabled. On other architectures with limited PCI support that wasn't as complicated I've left the selection as-is.

---

arch/powerpc/Kconfig +0 -0
index 6fa6f92edb7f..0713375e1127 100644
@@ -168,10 +168,16 @@ config PPC
        select GENERIC_CPU_VULNERABILITIES      if PPC_BARRIER_NOSPEC
        select GENERIC_IRQ_SHOW
        select GENERIC_IRQ_SHOW_LEVEL

arch/powerpc/Kconfig config PPC · line 180

Quoted 10 lines
arch/powerpc/Kconfig +6 -0
+       select GENERIC_PCI_IOMAP                if PCI
        select GENERIC_SMP_IDLE_THREAD
        select GENERIC_STRNCPY_FROM_USER
        select GENERIC_STRNLEN_USER
        select GENERIC_TIME_VSYSCALL
+       # Platforms that what PCI turned unconditionally just do select PCI
+       # in their config node, otherwise allow the user to enable it.
+       # This means we can enable PCI even on platforms that don't support
+       # it, which is harmless except for wasted memory.
+       select HAS_PCI

If you do this for entire powerpc,
the other 'select HAS_PCI' addtions to arch/powerpc/platforms/*/Kconfig look redundant.

Quoted 13 lines
arch/riscv/Kconfig +1 -0
index a344980287a5..6eb31a0698ac 100644
@@ -38,6 +38,7 @@ config RISCV
        select RISCV_ISA_A if SMP
        select SPARSE_IRQ
        select SYSCTL_EXCEPTION_TRACE
+       select HAS_PCI
        select HAVE_ARCH_TRACEHOOK
        select MODULES_USE_ELF_RELA if MODULES
        select THREAD_INFO_IN_TASK

arch/riscv/Kconfig source "kernel/Kconfig.hz" · line 223

Quoted 8 lines
arch/riscv/Kconfig +0 -5
@@ -216,28 +217,12 @@ source "kernel/Kconfig.hz"
 
 endmenu
 
-menu "Bus support"
-
-config PCI
-       bool "PCI support"
-       select PCI_MSI

I think this 'select PCI_MSI' for riscv was lost.

Quoted 36 lines
arch/riscv/Kconfig +0 -11
-       help
-         This feature enables support for PCI bus system. If you say Y
-         here, the kernel will include drivers and infrastructure code
-         to support PCI bus devices.
-
-         If you don't know what to do here, say Y.
-
 config PCI_DOMAINS
        def_bool PCI
 
 config PCI_DOMAINS_GENERIC
        def_bool PCI
 
-source "drivers/pci/Kconfig"
-
-endmenu
-
 menu "Power management options"
 
 source kernel/power/Kconfig
arch/x86/Kconfig +1 -0
index 1a0be022f91d..7cbc656f47e7 100644
@@ -113,6 +113,7 @@ config X86
        select GENERIC_STRNLEN_USER
        select GENERIC_TIME_VSYSCALL
        select HARDLOCKUP_CHECK_TIMESTAMP       if X86_64
+       select HAS_PCI
        select HAVE_ACPI_APEI                   if ACPI
        select HAVE_ACPI_APEI_NMI               if ACPI
        select HAVE_ALIGNED_STRUCT_PAGE         if SLUB

arch/x86/Kconfig endmenu · line 2572

Quoted 6 lines
arch/x86/Kconfig +0 -3
@@ -2567,15 +2568,6 @@ endmenu
 
 menu "Bus options (PCI etc.)"
 
-config PCI
-       bool "PCI support"
-       default y

The default is y for x86 (and xtensa as well).

With this patch, the default will be flipped.

I think most of people want to use PCI for x86, and this change will make people upset.

Will you update arch/{x86,xtensa}/configs/*_defconfig?

Quoted 114 lines
arch/x86/Kconfig +0 -8
-       ---help---
-         Find out whether you have a PCI motherboard. PCI is the name of a
-         bus system, i.e. the way the CPU talks to the other stuff inside
-         your box. Other bus systems are ISA, EISA, MicroChannel (MCA) or
-         VESA. If you have PCI, say Y, otherwise N.
-
 choice
        prompt "PCI access mode"
        depends on X86_32 && PCI
@@ -2658,8 +2650,6 @@ config PCI_CNB20LE_QUIRK
 
          You should say N unless you know you need this.
 
-source "drivers/pci/Kconfig"
-
 config ISA_BUS
        bool "ISA bus support on modern systems" if EXPERT
        help
arch/xtensa/Kconfig +1 -15
index b9ad83a0ee5d..22abeb236863 100644
@@ -20,6 +20,7 @@ config XTENSA
        select GENERIC_PCI_IOMAP
        select GENERIC_SCHED_CLOCK
        select GENERIC_STRNCPY_FROM_USER if KASAN
+       select HAS_PCI
        select HAVE_ARCH_KASAN if MMU
        select HAVE_DEBUG_KMEMLEAK
        select HAVE_DMA_CONTIGUOUS
@@ -384,21 +385,6 @@ config XTENSA_CALIBRATE_CCOUNT
 config SERIAL_CONSOLE
        def_bool n
 
-menu "Bus options"
-
-config PCI
-       bool "PCI support"
-       default y
-       help
-         Find out whether you have a PCI motherboard. PCI is the name of a
-         bus system, i.e. the way the CPU talks to the other stuff inside
-         your box. Other bus systems are ISA, EISA, MicroChannel (MCA) or
-         VESA. If you have PCI, say Y, otherwise N.
-
-source "drivers/pci/Kconfig"
-
-endmenu
-
 menu "Platform options"
 
 choice
drivers/Kconfig +4 -0
index ab4d43923c4d..059573823387 100644
@@ -1,7 +1,11 @@
 # SPDX-License-Identifier: GPL-2.0
 menu "Device Drivers"
 
+# Keep I/O buses first
+
 source "drivers/amba/Kconfig"
+source "drivers/pci/Kconfig"
+
 
 source "drivers/base/Kconfig"
 
drivers/parisc/Kconfig +0 -11
index 5a48b5606110..5bbfea1a019c 100644
@@ -63,17 +63,6 @@ config ISA
          If you want to plug an ISA card into your EISA bus, say Y here.
          Most people should say N.
 
-config PCI
-       bool "PCI support"
-       help
-         All recent HP machines have PCI slots, and you should say Y here
-         if you have a recent machine.  If you are convinced you do not have
-         PCI slots in your machine (eg a 712), then you may say "N" here.
-         Beware that some GSC cards have a Dino onboard and PCI inside them,
-         so it may be safest to say "Y" anyway.
-
-source "drivers/pci/Kconfig"
-
 config GSC_DINO
        bool "GSCtoPCI/Dino PCI support"
        depends on PCI && GSC
drivers/pci/Kconfig +12 -1
index 56ff8f6d31fc..229a518b68cd 100644
@@ -3,6 +3,18 @@
 # PCI configuration
 #
 
+config HAS_PCI
+       bool
+
+menuconfig PCI
+       bool "PCI support"
+       depends on HAS_PCI
+
+       help
+         This option enables support for the PCI local bus, including
+         support for PCI-X and the fundations for PCI Express support.
+         Say 'Y' here unless you know what you are doing.
+
 source "drivers/pci/pcie/Kconfig"
 
 config PCI_MSI
--
Quoted 2 lines

2.19.1

--
Best Regards
Masahiro Yamada

#9 lore raw

Re: [PATCH 4/8] pci: consolidate PCI config entry in drivers/pci

Quoted 2 lines · Masahiro Yamada

I think HAVE_ is a preferred prefix in this case according to this doc:
https://github.com/masahir0y/linux/blob/v4.19-rc4/Documentation/kbuild/kconfig-language.txt#L448

Ok, I'll switch everything to HAVE_*

Quoted 3 lines

If you do this for entire powerpc,
the other 'select HAS_PCI' addtions to
arch/powerpc/platforms/*/Kconfig look redundant.

I'll drop them.

Quoted 6 lines

arch/riscv/Kconfig source "kernel/Kconfig.hz" · line 223

Quoted 3 lines
arch/riscv/Kconfig +0 -3
-config PCI
-       bool "PCI support"
-       select PCI_MSI

I think this 'select PCI_MSI' for riscv was lost.

Indeed, fixed.

Quoted 7 lines

arch/x86/Kconfig endmenu · line 2572

Quoted 5 lines

menu "Bus options (PCI etc.)"

arch/x86/Kconfig +0 -3
-config PCI
-       bool "PCI support"
-       default y
Quoted 8 lines

The default is y for x86 (and xtensa as well).

With this patch, the default will be flipped.

I think most of people want to use PCI for x86,
and this change will make people upset.

Will you update arch/{x86,xtensa}/configs/*_defconfig?

Yes. Alternatively we could add a new ARCH_PCI_DEFAULT symbol, that architectures could select if they want PCI by default. Does anyone thing this is a good idea?

#10 lore raw

Re: [PATCH 4/8] pci: consolidate PCI config entry in drivers/pci

Quoted 33 lines · Christoph Hellwig
Quoted 2 lines · Masahiro Yamada

I think HAVE_ is a preferred prefix in this case according to this doc:
https://github.com/masahir0y/linux/blob/v4.19-rc4/Documentation/kbuild/kconfig-language.txt#L448

Ok, I'll switch everything to HAVE_*

Quoted 3 lines

If you do this for entire powerpc,
the other 'select HAS_PCI' addtions to
arch/powerpc/platforms/*/Kconfig look redundant.

I'll drop them.

Quoted 6 lines

arch/riscv/Kconfig source "kernel/Kconfig.hz" · line 223

Quoted 3 lines
arch/riscv/Kconfig +0 -3
-config PCI
-       bool "PCI support"
-       select PCI_MSI

I think this 'select PCI_MSI' for riscv was lost.

Indeed, fixed.

Quoted 11 lines

arch/x86/Kconfig endmenu · line 2572

Quoted 5 lines

menu "Bus options (PCI etc.)"

arch/x86/Kconfig +0 -3
-config PCI
-       bool "PCI support"
-       default y

The default is y for x86 (and xtensa as well).

With this patch, the default will be flipped.

Quoted 8 lines
Quoted 4 lines

I think most of people want to use PCI for x86,
and this change will make people upset.

Will you update arch/{x86,xtensa}/configs/*_defconfig?

Yes. Alternatively we could add a new ARCH_PCI_DEFAULT symbol, that architectures could select if they want PCI by default. Does anyone thing this is a good idea?

No, I do not want to see such an ugly config option.

Instead, you can use 'imply' keyword to set the default y.

config X86

       ...
       imply    PCI

But, personally, I'd like the defconfig files updated.

Signature · 2 lines
Best Regards
Masahiro Yamada
Acked-by on v1 4/8
#11 lore raw

Re: [PATCH 4/8] pci: consolidate PCI config entry in drivers/pci

In reply to Christoph Hellwig

s/^pci: /PCI: / in subject

Quoted 10 lines · Christoph Hellwig

There is no good reason to duplicate the PCI menu in every architecture. Instead provide a selectable HAS_PCI symbol that indicates availability of PCI support and the handle the rest in drivers/pci.

Note that for powerpc we now select HAS_PCI globally instead of the convoluted mess of conditional or or non-conditional support per board, similar to what we do e.g. on x86. For alpha PCI is selected for the non-jensen configs as it was the default before, and a lot of code does not compile without PCI enabled. On other architectures with limited PCI support that wasn't as complicated I've left the selection as-is.

Thanks for doing this. It's a great cleanup. I know you have a few things you're cleaning up, but add my:

when you do that.

#12 lore raw

PATCH 5/8 pcmcia: allow PCMCIA support independent of the architecture

In reply to Christoph Hellwig

There is nothing architecture specific in the PCMCIA core, so allow building it everywhere. The actual host controllers will depend on ISA, PCI or a specific SOC.

---
 arch/alpha/Kconfig     | 2 --
 arch/arm/Kconfig       | 2 --
 arch/ia64/Kconfig      | 2 --
 arch/m68k/Kconfig.bus  | 2 --
 arch/mips/Kconfig      | 2 --
 arch/powerpc/Kconfig   | 2 --
 arch/sh/Kconfig        | 2 --
 arch/sparc/Kconfig     | 2 --
 arch/unicore32/Kconfig | 6 ------
 arch/x86/Kconfig       | 2 --
 arch/xtensa/Kconfig    | 2 --
 drivers/Kconfig        | 1 +
 drivers/parisc/Kconfig | 2 --
 drivers/pcmcia/Kconfig | 1 +
 14 files changed, 2 insertions(+), 28 deletions(-)
arch/alpha/Kconfig +0 -2
index ca40746ffa18..73a7558c71bd 100644
@@ -675,8 +675,6 @@ config HZ
 
 source "drivers/eisa/Kconfig"
 
-source "drivers/pcmcia/Kconfig"
-
 config SRM_ENV
 	tristate "SRM environment through procfs"
 	depends on PROC_FS
arch/arm/Kconfig +0 -2
index a166ccdfdf86..0339c074147f 100644
@@ -1256,8 +1256,6 @@ config PCI_HOST_ITE8152
 	default y
 	select DMABOUNCE
 
-source "drivers/pcmcia/Kconfig"
-
 endmenu
 
 menu "Kernel Features"
arch/ia64/Kconfig +0 -2
index 272614773c97..8c5b486cabf9 100644
@@ -553,8 +553,6 @@ config PCI_DOMAINS
 config PCI_SYSCALL
 	def_bool PCI
 
-source "drivers/pcmcia/Kconfig"
-
 endmenu
 
 endif
arch/m68k/Kconfig.bus +0 -2
index 8cb0604b195b..9d0a3a23d50e 100644
@@ -68,6 +68,4 @@ if !MMU
 config ISA_DMA_API
         def_bool !M5272
 
-source "drivers/pcmcia/Kconfig"
-
 endif
arch/mips/Kconfig +0 -2
index 83361add48ca..fc74fd685e6a 100644
@@ -3090,8 +3090,6 @@ config ZONE_DMA
 config ZONE_DMA32
 	bool
 
-source "drivers/pcmcia/Kconfig"
-
 config HAS_RAPIDIO
 	bool
 	default n
arch/powerpc/Kconfig +0 -2
index 0713375e1127..8959ce594b08 100644
@@ -971,8 +971,6 @@ config PCI_8260
 	select PPC_INDIRECT_PCI
 	default y
 
-source "drivers/pcmcia/Kconfig"
-
 config HAS_RAPIDIO
 	bool
 	default n
arch/sh/Kconfig +0 -2
index 2ff6855811a5..ce9487139155 100644
@@ -861,8 +861,6 @@ config MAPLE
 config PCI_DOMAINS
 	bool
 
-source "drivers/pcmcia/Kconfig"
-
 endmenu
 
 menu "Power management options (EXPERIMENTAL)"
arch/sparc/Kconfig +0 -2
index 2a4943f9765e..09e408c81b37 100644
@@ -509,8 +509,6 @@ config SPARC_GRPCI2
 	help
 	  Say Y here to include the GRPCI2 Host Bridge Driver.
 
-source "drivers/pcmcia/Kconfig"
-
 config SUN_OPENPROMFS
 	tristate "Openprom tree appears in /proc/openprom"
 	help
arch/unicore32/Kconfig +0 -6
index d90a78f1143a..ef500e199e03 100644
@@ -118,12 +118,6 @@ config UNICORE_FPU_F64
 
 endmenu
 
-menu "Bus support"
-
-source "drivers/pcmcia/Kconfig"
-
-endmenu
-
 menu "Kernel Features"
 
 source "kernel/Kconfig.hz"
arch/x86/Kconfig +0 -2
index 7cbc656f47e7..dc48280bdac9 100644
@@ -2810,8 +2810,6 @@ config AMD_NB
 	def_bool y
 	depends on CPU_SUP_AMD && PCI
 
-source "drivers/pcmcia/Kconfig"
-
 config RAPIDIO
 	tristate "RapidIO support"
 	depends on PCI
arch/xtensa/Kconfig +0 -2
index 22abeb236863..44ffcd6dabd4 100644
@@ -517,8 +517,6 @@ config FORCE_MAX_ZONEORDER
 	  This config option is actually maximum order plus one. For example,
 	  a value of 11 means that the largest free memory block is 2^10 pages.
 
-source "drivers/pcmcia/Kconfig"
-
 config PLATFORM_WANT_DEFAULT_MEM
 	def_bool n
 
drivers/Kconfig +1 -0
index 059573823387..58ee88c36cf5 100644
@@ -5,6 +5,7 @@ menu "Device Drivers"
 
 source "drivers/amba/Kconfig"
 source "drivers/pci/Kconfig"
+source "drivers/pcmcia/Kconfig"
 
 
 source "drivers/base/Kconfig"
drivers/parisc/Kconfig +0 -2
index 5bbfea1a019c..1a55763d1245 100644
@@ -92,8 +92,6 @@ config IOMMU_SBA
 	depends on PCI_LBA
 	default PCI_LBA
 
-source "drivers/pcmcia/Kconfig"
-
 endmenu
 
 menu "PA-RISC specific drivers"
drivers/pcmcia/Kconfig +1 -0
index cbbe4a285b48..c9bdbb463a7e 100644
@@ -4,6 +4,7 @@
 
 menuconfig PCCARD
 	tristate "PCCard (PCMCIA/CardBus) support"
+	depends on !UML
 	---help---
 	  Say Y here if you want to attach PCMCIA- or PC-cards to your Linux
 	  computer.  These are credit-card size devices such as network cards,
Signature · 1 line
2.19.1
maintainer Acked-by on v1 5/8
#13 lore raw

Re: [PATCH 5/8] pcmcia: allow PCMCIA support independent of the architecture

Quoted 5 lines · Christoph Hellwig

There is nothing architecture specific in the PCMCIA core, so allow building it everywhere. The actual host controllers will depend on ISA, PCI or a specific SOC.

Looks good to me, though I'm interested on any subtle (build) breakage when this gets exposure in -next. Will you push this patch upstream directly, or should it go in via the pcmcia tree? If it is the former, feel free to add

Thanks,
Dominik

#14 lore raw

Re: [PATCH 5/8] pcmcia: allow PCMCIA support independent of the architecture

Quoted 10 lines · Dominik Brodowski
Quoted 5 lines · Christoph Hellwig

There is nothing architecture specific in the PCMCIA core, so allow building it everywhere. The actual host controllers will depend on ISA, PCI or a specific SOC.

Looks good to me, though I'm interested on any subtle (build) breakage when this gets exposure in -next. Will you push this patch upstream directly, or should it go in via the pcmcia tree? If it is the former, feel free to add

The patches in the series depend on each other (just in terms of context). I suspect the best would be to get it into the kbuild tree.

It has survived the build bot, which found some interesting issues in the other patches (as well as the !UML dependency), but if more issues show I can keep you in the loop.

#15 lore raw

PATCH 6/8 rapidio: consolidate RAPIDIO config entry in drivers/rapidio

In reply to Christoph Hellwig

There is no good reason to duplicate the RAPIDIO menu in various architectures. Instead provide a selectable HAS_RAPIDIO symbol that indicates native availability of RAPIDIO support and the handle the rest in drivers/pci. This also means we now provide support for PCI(e) to Rapidio bridges for every architecture instead of a limited subset.

---
 arch/mips/Kconfig       | 13 -------------
 arch/powerpc/Kconfig    | 13 -------------
 arch/x86/Kconfig        | 10 ----------
 drivers/Kconfig         |  1 +
 drivers/rapidio/Kconfig | 11 +++++++++++
 5 files changed, 12 insertions(+), 36 deletions(-)
arch/mips/Kconfig +0 -13
index fc74fd685e6a..70a9e09329bb 100644
@@ -3090,19 +3090,6 @@ config ZONE_DMA
 config ZONE_DMA32
 	bool
 
-config HAS_RAPIDIO
-	bool
-	default n
-
-config RAPIDIO
-	tristate "RapidIO support"
-	depends on HAS_RAPIDIO || PCI
-	help
-	  If you say Y here, the kernel will include drivers and
-	  infrastructure code to support RapidIO interconnect devices.
-
-source "drivers/rapidio/Kconfig"
-
 endmenu
 
 config TRAD_SIGNALS
arch/powerpc/Kconfig +0 -13
index 8959ce594b08..b1c3a47f1f30 100644
@@ -971,17 +971,6 @@ config PCI_8260
 	select PPC_INDIRECT_PCI
 	default y
 
-config HAS_RAPIDIO
-	bool
-	default n
-
-config RAPIDIO
-	tristate "RapidIO support"
-	depends on HAS_RAPIDIO || PCI
-	help
-	  If you say Y here, the kernel will include drivers and
-	  infrastructure code to support RapidIO interconnect devices.
-
 config FSL_RIO
 	bool "Freescale Embedded SRIO Controller support"
 	depends on RAPIDIO = y && HAS_RAPIDIO
@@ -990,8 +979,6 @@ config FSL_RIO
 	  Include support for RapidIO controller on Freescale embedded
 	  processors (MPC8548, MPC8641, etc).
 
-source "drivers/rapidio/Kconfig"
-
 endmenu
 
 config NONSTATIC_KERNEL
arch/x86/Kconfig +0 -10
index dc48280bdac9..f731ad1a043a 100644
@@ -2810,16 +2810,6 @@ config AMD_NB
 	def_bool y
 	depends on CPU_SUP_AMD && PCI
 
-config RAPIDIO
-	tristate "RapidIO support"
-	depends on PCI
-	default n
-	help
-	  If enabled this option will include drivers and the core
-	  infrastructure code to support RapidIO interconnect devices.
-
-source "drivers/rapidio/Kconfig"
-
 config X86_SYSFB
 	bool "Mark VGA/VBE/EFI FB as generic system framebuffer"
 	help
drivers/Kconfig +1 -0
index 58ee88c36cf5..065d308fcb00 100644
@@ -6,6 +6,7 @@ menu "Device Drivers"
 source "drivers/amba/Kconfig"
 source "drivers/pci/Kconfig"
 source "drivers/pcmcia/Kconfig"
+source "drivers/rapidio/Kconfig"
 
 
 source "drivers/base/Kconfig"
drivers/rapidio/Kconfig +11 -0
index d6d2f20c4597..102f4989c11a 100644
@@ -1,6 +1,17 @@
 #
 # RapidIO configuration
 #
+
+config HAS_RAPIDIO
+	bool
+
+menuconfig RAPIDIO
+	tristate "RapidIO support"
+	depends on HAS_RAPIDIO || PCI
+	help
+	  If you say Y here, the kernel will include drivers and
+	  infrastructure code to support RapidIO interconnect devices.
+
 source "drivers/rapidio/devices/Kconfig"
 
 config RAPIDIO_DISC_TIMEOUT
Signature · 1 line
2.19.1
#16 lore raw

PATCH 7/8 eisa: consolidate EISA Kconfig entry in drivers/eisa

In reply to Christoph Hellwig

Let architectures opt into EISA support by selecting HAS_EISA and handle everything else in drivers/eisa.

---
 arch/alpha/Kconfig     |  8 +++-----
 arch/arm/Kconfig       | 16 +---------------
 arch/mips/Kconfig      | 31 +++++--------------------------
 arch/powerpc/Kconfig   |  3 ---
 arch/x86/Kconfig       | 19 +------------------
 drivers/eisa/Kconfig   | 21 ++++++++++++++++++++-
 drivers/parisc/Kconfig | 11 +----------
 7 files changed, 31 insertions(+), 78 deletions(-)
arch/alpha/Kconfig +3 -5
index 73a7558c71bd..6a9be9cb74e6 100644
@@ -6,6 +6,9 @@ config ALPHA
 	select ARCH_MIGHT_HAVE_PC_SERIO
 	select ARCH_NO_PREEMPT
 	select ARCH_USE_CMPXCHG_LOCKREF
+	select HAS_EISA if ALPHA_GENERIC || ALPHA_JENSEN || ALPHA_ALCOR || \
+				ALPHA_MIKASA || ALPHA_SABLE || ALPHA_LYNX || \
+				ALPHA_NORITAKE || ALPHA_RAWHIDE
 	select HAS_PCI if !ALPHA_JENSEN
 	select PCI if !ALPHA_JENSEN
 	select HAVE_AOUT
@@ -518,11 +521,6 @@ config ALPHA_SRM
 
 	  If unsure, say N.
 
-config EISA
-	bool
-	depends on ALPHA_GENERIC || ALPHA_JENSEN || ALPHA_ALCOR || ALPHA_MIKASA || ALPHA_SABLE || ALPHA_LYNX || ALPHA_NORITAKE || ALPHA_RAWHIDE
-	default y
-
 config ARCH_MAY_HAVE_PC_FDC
 	def_bool y
 
arch/arm/Kconfig +1 -15
index 0339c074147f..1903f73d42e7 100644
@@ -49,6 +49,7 @@ config ARM
 	select GENERIC_STRNLEN_USER
 	select HANDLE_DOMAIN_IRQ
 	select HARDIRQS_SW_RESEND
+	select HAS_EISA
 	select HAVE_ARCH_AUDITSYSCALL if (AEABI && !OABI_COMPAT)
 	select HAVE_ARCH_BITREVERSE if (CPU_32v7M || CPU_32v7) && !CPU_32v6
 	select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL && !CPU_ENDIAN_BE32 && MMU
@@ -162,21 +163,6 @@ config HAVE_PROC_CPU
 config NO_IOPORT_MAP
 	bool
 
-config EISA
-	bool
-	---help---
-	  The Extended Industry Standard Architecture (EISA) bus was
-	  developed as an open alternative to the IBM MicroChannel bus.
-
-	  The EISA bus provided some of the features of the IBM MicroChannel
-	  bus while maintaining backward compatibility with cards made for
-	  the older ISA bus.  The EISA bus saw limited use between 1988 and
-	  1995 when it was made obsolete by the PCI bus.
-
-	  Say Y here if you are building a kernel for an EISA-based machine.
-
-	  Otherwise, say N.
-
 config SBUS
 	bool
 
arch/mips/Kconfig +5 -26
index 70a9e09329bb..b3e6b2adf510 100644
@@ -23,6 +23,7 @@ config MIPS
 	select GENERIC_CPU_AUTOPROBE
 	select GENERIC_IRQ_PROBE
 	select GENERIC_IRQ_SHOW
+	select GENERIC_ISA_DMA if EISA
 	select GENERIC_LIB_ASHLDI3
 	select GENERIC_LIB_ASHRDI3
 	select GENERIC_LIB_CMPDI2
@@ -72,6 +73,7 @@ config MIPS
 	select HAVE_SYSCALL_TRACEPOINTS
 	select HAVE_VIRT_CPU_ACCOUNTING_GEN if 64BIT || !SMP
 	select IRQ_FORCED_THREADING
+	select ISA if EISA
 	select MODULES_USE_ELF_RELA if MODULES && 64BIT
 	select MODULES_USE_ELF_REL if MODULES
 	select PCI_DOMAINS if PCI
@@ -634,7 +636,7 @@ config SGI_IP22
 	select CSRC_R4K
 	select DEFAULT_SGI_PARTITION
 	select DMA_NONCOHERENT
-	select HW_HAS_EISA
+	select HAS_EISA
 	select I8253
 	select I8259
 	select IP22_CPU_SCACHE
@@ -699,7 +701,7 @@ config SGI_IP28
 	select DMA_NONCOHERENT
 	select GENERIC_ISA_DMA_SUPPORT_BROKEN
 	select IRQ_MIPS_CPU
-	select HW_HAS_EISA
+	select HAS_EISA
 	select I8253
 	select I8259
 	select SGI_HAS_I8042
@@ -843,7 +845,7 @@ config SNI_RM
 	select DMA_NONCOHERENT
 	select GENERIC_ISA_DMA
 	select HAVE_PCSPKR_PLATFORM
-	select HW_HAS_EISA
+	select HAS_EISA
 	select HAS_PCI
 	select IRQ_MIPS_CPU
 	select I8253
@@ -2991,9 +2993,6 @@ config MIPS_AUTO_PFN_OFFSET
 
 menu "Bus options (PCI, PCMCIA, EISA, ISA, TC)"
 
-config HW_HAS_EISA
-	bool
-
 config HT_PCI
 	bool "Support for HT-linked PCI"
 	default y
@@ -3027,26 +3026,6 @@ config PCI_DRIVERS_LEGACY
 config ISA
 	bool
 
-config EISA
-	bool "EISA support"
-	depends on HW_HAS_EISA
-	select ISA
-	select GENERIC_ISA_DMA
-	---help---
-	  The Extended Industry Standard Architecture (EISA) bus was
-	  developed as an open alternative to the IBM MicroChannel bus.
-
-	  The EISA bus provided some of the features of the IBM MicroChannel
-	  bus while maintaining backward compatibility with cards made for
-	  the older ISA bus.  The EISA bus saw limited use between 1988 and
-	  1995 when it was made obsolete by the PCI bus.
-
-	  Say Y here if you are building a kernel for an EISA-based machine.
-
-	  Otherwise, say N.
-
-source "drivers/eisa/Kconfig"
-
 config TC
 	bool "TURBOchannel support"
 	depends on MACH_DECSTATION
arch/powerpc/Kconfig +0 -3
index b1c3a47f1f30..f0ea460653cd 100644
@@ -900,9 +900,6 @@ config PPC_INDIRECT_PCI
 	default y if 40x || 44x
 	default n
 
-config EISA
-	bool
-
 config SBUS
 	bool
 
arch/x86/Kconfig +1 -18
index f731ad1a043a..6a4fb550a206 100644
@@ -113,6 +113,7 @@ config X86
 	select GENERIC_STRNLEN_USER
 	select GENERIC_TIME_VSYSCALL
 	select HARDLOCKUP_CHECK_TIMESTAMP	if X86_64
+	select HAS_EISA
 	select HAS_PCI
 	select HAVE_ACPI_APEI			if ACPI
 	select HAVE_ACPI_APEI_NMI		if ACPI
@@ -2680,24 +2681,6 @@ config ISA
 	  (MCA) or VESA.  ISA is an older system, now being displaced by PCI;
 	  newer boards don't support it.  If you have ISA, say Y, otherwise N.
 
-config EISA
-	bool "EISA support"
-	depends on ISA
-	---help---
-	  The Extended Industry Standard Architecture (EISA) bus was
-	  developed as an open alternative to the IBM MicroChannel bus.
-
-	  The EISA bus provided some of the features of the IBM MicroChannel
-	  bus while maintaining backward compatibility with cards made for
-	  the older ISA bus.  The EISA bus saw limited use between 1988 and
-	  1995 when it was made obsolete by the PCI bus.
-
-	  Say Y here if you are building a kernel for an EISA-based machine.
-
-	  Otherwise, say N.
-
-source "drivers/eisa/Kconfig"
-
 config SCx200
 	tristate "NatSemi SCx200 support"
 	---help---
drivers/eisa/Kconfig +20 -1
index 2705284f6223..bd35daffee3b 100644
@@ -1,6 +1,26 @@
 #
 # EISA configuration
 #
+
+config HAS_EISA
+	bool
+
+menuconfig EISA
+	bool "EISA support"
+	depends on HAS_EISA
+	---help---
+	  The Extended Industry Standard Architecture (EISA) bus was
+	  developed as an open alternative to the IBM MicroChannel bus.
+
+	  The EISA bus provided some of the features of the IBM MicroChannel
+	  bus while maintaining backward compatibility with cards made for
+	  the older ISA bus.  The EISA bus saw limited use between 1988 and
+	  1995 when it was made obsolete by the PCI bus.
+
+	  Say Y here if you are building a kernel for an EISA-based machine.
+
+	  Otherwise, say N.
+
 config EISA_VLB_PRIMING
 	bool "Vesa Local Bus priming"
 	depends on X86 && EISA
@@ -53,4 +73,3 @@ config EISA_NAMES
 	  names.
 
 	  When in doubt, say Y.
-
drivers/parisc/Kconfig +1 -10
index 1a55763d1245..09c5e59f5374 100644
@@ -2,6 +2,7 @@ menu "Bus options (PCI, PCMCIA, EISA, GSC, ISA)"
 
 config GSC
 	bool "VSC/GSC/HSC bus support"
+	select HAS_EISA
 	default y
 	help
 	  The VSC, GSC and HSC busses were used from the earliest 700-series
@@ -46,16 +47,6 @@ config GSC_WAX
 	  used), a HIL interface chip and is also known to be used as the
 	  GSC bridge for an X.25 GSC card.
 
-config EISA
-	bool "EISA support"
-	depends on GSC
-	help
-	  Say Y here if you have an EISA bus in your machine.  This code
-	  supports both the Mongoose & Wax EISA adapters.  It is sadly
-	  incomplete and lacks support for card-to-host DMA.
-
-source "drivers/eisa/Kconfig"
-
 config ISA
 	bool "ISA support"
 	depends on EISA
Signature · 1 line
2.19.1
#17 lore raw

Re: [PATCH 7/8] eisa: consolidate EISA Kconfig entry in drivers/eisa

Quoted 6 lines · Christoph Hellwig

Let architectures opt into EISA support by selecting HAS_EISA and handle everything else in drivers/eisa.

---

How about HAVE_EISA ?

You forgot to add
source "drivers/eisa/Kconfig" to drivers/Kconfig

You forgot to delete the one
from arch/alpha/Kconfig

Quoted 24 lines
 arch/alpha/Kconfig     |  8 +++-----
 arch/arm/Kconfig       | 16 +---------------
 arch/mips/Kconfig      | 31 +++++--------------------------
 arch/powerpc/Kconfig   |  3 ---
 arch/x86/Kconfig       | 19 +------------------
 drivers/eisa/Kconfig   | 21 ++++++++++++++++++++-
 drivers/parisc/Kconfig | 11 +----------
 7 files changed, 31 insertions(+), 78 deletions(-)
arch/alpha/Kconfig +3 -0
index 73a7558c71bd..6a9be9cb74e6 100644
@@ -6,6 +6,9 @@ config ALPHA
        select ARCH_MIGHT_HAVE_PC_SERIO
        select ARCH_NO_PREEMPT
        select ARCH_USE_CMPXCHG_LOCKREF
+       select HAS_EISA if ALPHA_GENERIC || ALPHA_JENSEN || ALPHA_ALCOR || \
+                               ALPHA_MIKASA || ALPHA_SABLE || ALPHA_LYNX || \
+                               ALPHA_NORITAKE || ALPHA_RAWHIDE
        select HAS_PCI if !ALPHA_JENSEN
        select PCI if !ALPHA_JENSEN
        select HAVE_AOUT

arch/alpha/Kconfig config ALPHA_SRM · line 525

Quoted 8 lines
arch/alpha/Kconfig +0 -5
@@ -518,11 +521,6 @@ config ALPHA_SRM
 
          If unsure, say N.
 
-config EISA
-       bool
-       depends on ALPHA_GENERIC || ALPHA_JENSEN || ALPHA_ALCOR || ALPHA_MIKASA || ALPHA_SABLE || ALPHA_LYNX || ALPHA_NORITAKE || ALPHA_RAWHIDE
-       default y
-

Better to add CONFIG_EISA=y to arch/alpha/defconfig to not flip the default?

--
Best Regards
Masahiro Yamada

#18 lore raw

PATCH 8/8 kconfig: remove CONFIG_MCA leftovers

In reply to Christoph Hellwig
---
 arch/powerpc/Kconfig | 4 ----
 drivers/scsi/Kconfig | 6 +++---
 2 files changed, 3 insertions(+), 7 deletions(-)
arch/powerpc/Kconfig +0 -4
index f0ea460653cd..8b9edf7caf96 100644
@@ -944,10 +944,6 @@ config FSL_GTM
 	help
 	  Freescale General-purpose Timers support
 
-# Yes MCA RS/6000s exist but Linux-PPC does not currently support any
-config MCA
-	bool
-
 config PCI_DOMAINS
 	def_bool PCI
 
drivers/scsi/Kconfig +3 -3
index 7c097006c54d..d3734c54aec9 100644
@@ -535,7 +535,7 @@ config SCSI_HPTIOP
 
 config SCSI_BUSLOGIC
 	tristate "BusLogic SCSI support"
-	depends on (PCI || ISA || MCA) && SCSI && ISA_DMA_API && VIRT_TO_BUS
+	depends on (PCI || ISA) && SCSI && ISA_DMA_API && VIRT_TO_BUS
 	---help---
 	  This is support for BusLogic MultiMaster and FlashPoint SCSI Host
 	  Adapters. Consult the SCSI-HOWTO, available from
@@ -1142,12 +1142,12 @@ config SCSI_LPFC_DEBUG_FS
 
 config SCSI_SIM710
 	tristate "Simple 53c710 SCSI support (Compaq, NCR machines)"
-	depends on (EISA || MCA) && SCSI
+	depends on EISA && SCSI
 	select SCSI_SPI_ATTRS
 	---help---
 	  This driver is for NCR53c710 based SCSI host adapters.
 
-	  It currently supports Compaq EISA cards and NCR MCA cards
+	  It currently supports Compaq EISA cards.
 
 config SCSI_DC395x
 	tristate "Tekram DC395(U/UW/F) and DC315(U) SCSI support"
Signature · 1 line
2.19.1
#19 lore raw

Re: [PATCH 8/8] kconfig: remove CONFIG_MCA leftovers

Quoted 3 lines · Christoph Hellwig

---

Can you use "powerpc:" or something
for the subject line?

I'd like to see "kconfig:" only for patches
that touch the scripts/kconfig/ directory.

Quoted 50 lines
 arch/powerpc/Kconfig | 4 ----
 drivers/scsi/Kconfig | 6 +++---
 2 files changed, 3 insertions(+), 7 deletions(-)
arch/powerpc/Kconfig +0 -4
index f0ea460653cd..8b9edf7caf96 100644
@@ -944,10 +944,6 @@ config FSL_GTM
        help
          Freescale General-purpose Timers support
 
-# Yes MCA RS/6000s exist but Linux-PPC does not currently support any
-config MCA
-       bool
-
 config PCI_DOMAINS
        def_bool PCI
 
drivers/scsi/Kconfig +3 -4
index 7c097006c54d..d3734c54aec9 100644
@@ -535,7 +535,7 @@ config SCSI_HPTIOP
 
 config SCSI_BUSLOGIC
        tristate "BusLogic SCSI support"
-       depends on (PCI || ISA || MCA) && SCSI && ISA_DMA_API && VIRT_TO_BUS
+       depends on (PCI || ISA) && SCSI && ISA_DMA_API && VIRT_TO_BUS
        ---help---
          This is support for BusLogic MultiMaster and FlashPoint SCSI Host
          Adapters. Consult the SCSI-HOWTO, available from
@@ -1142,12 +1142,12 @@ config SCSI_LPFC_DEBUG_FS
 
 config SCSI_SIM710
        tristate "Simple 53c710 SCSI support (Compaq, NCR machines)"
-       depends on (EISA || MCA) && SCSI
+       depends on EISA && SCSI
        select SCSI_SPI_ATTRS
        ---help---
          This driver is for NCR53c710 based SCSI host adapters.
 
-         It currently supports Compaq EISA cards and NCR MCA cards
+         It currently supports Compaq EISA cards.
 
 config SCSI_DC395x
        tristate "Tekram DC395(U/UW/F) and DC315(U) SCSI support"
--

2.19.1

Signature · 2 lines
Best Regards
Masahiro Yamada
#20 lore raw

Re: [PATCH 8/8] kconfig: remove CONFIG_MCA leftovers

Quoted 11 lines · Masahiro Yamada
Quoted 3 lines · Christoph Hellwig

---

Can you use "powerpc:" or something
for the subject line?

I'd like to see "kconfig:" only for patches
that touch the scripts/kconfig/ directory.

Sorry, I missed this for v2. Will fix it up for the next version or let you fix it up if there isn't one.

#21 lore raw
In reply to Christoph Hellwig
Quoted 7 lines · Christoph Hellwig

Hi all,

currently every architecture that wants to provide on of the common periphal busses needs to add some boilerplate code and include the
right Kconfig files. This series instead just selects the presence
(when needed) and then handles everything in the bus-specific Kconfig file under drivers/.

Nice cleanup.

#22 lore raw
In reply to Christoph Hellwig
Quoted 9 lines · Christoph Hellwig

Hi all,

currently every architecture that wants to provide on of the common periphal busses needs to add some boilerplate code and include the
right Kconfig files. This series instead just selects the presence
(when needed) and then handles everything in the bus-specific Kconfig file under drivers/.

Thanks for great work again.

However, I suspect some breakages
(not testing yet, just quick review by my eyes.)

I left some comments in individual patches.

--
Best Regards
Masahiro Yamada

#23 lore raw
Quoted 6 lines

Thanks for great work again.

However, I suspect some breakages
(not testing yet, just quick review by my eyes.)

I left some comments in individual patches.

Thanks. I've updated the git tree based on your comments.