Kconfig cleanup (PARPORT_PC dependencies)
Subsystems (13)
PATCH 1/1 Kconfig cleanup (PARPORT_PC dependencies)
Remove messy dependencies from PARPORT_PC by having it depend on one Kconfig symbol (ARCH_MAY_HAVE_PC_PARPORT) and having architectures which need it declare ARCH_MAY_HAVE_PC_PARPORT in arch/*/Kconfig. New architectures are unlikely to need PARPORT_PC, so this avoids having an ever growing list of architectures to exclude. Those architectures which do declare ARCH_MAY_HAVE_PC_PARPORT in this patch are the ones which have an asm/parport.h.
--- arch/alpha/Kconfig | 3 +++ arch/arc/Kconfig | 3 +++ arch/arm/Kconfig | 3 +++ arch/ia64/Kconfig | 3 +++ arch/m68k/Kconfig | 4 ++++ arch/microblaze/Kconfig | 3 +++ arch/mips/Kconfig | 3 +++ arch/parisc/Kconfig | 3 +++ arch/powerpc/Kconfig | 3 +++ arch/sh/Kconfig | 3 +++ arch/sparc/Kconfig | 4 ++++ arch/tile/Kconfig | 3 +++ arch/unicore32/Kconfig | 3 +++ arch/x86/Kconfig | 3 +++ drivers/parport/Kconfig | 4 +--- 15 files changed, 45 insertions(+), 3 deletions(-)
arch/alpha/Kconfig +3 -0
@@ -520,6 +520,9 @@ config EISA config ARCH_MAY_HAVE_PC_FDC def_bool y +config ARCH_MAY_HAVE_PC_PARPORT + def_bool y + config SMP bool "Symmetric multi-processing support" depends on ALPHA_SABLE || ALPHA_LYNX || ALPHA_RAWHIDE || ALPHA_DP264 || ALPHA_WILDFIRE || ALPHA_TITAN || ALPHA_GENERIC || ALPHA_SHARK || ALPHA_MARVEL
arch/arc/Kconfig +3 -0
@@ -70,6 +70,9 @@ config HAVE_LATENCYTOP_SUPPORT config NO_DMA def_bool n +config ARCH_MAY_HAVE_PC_PARPORT + def_bool y + source "init/Kconfig" source "kernel/Kconfig.freezer"
arch/arm/Kconfig +3 -0
@@ -71,6 +71,9 @@ config ARM Europe. There is an ARM Linux project with a web page at <http://www.arm.linux.org.uk/>. +config ARCH_MAY_HAVE_PC_PARPORT + def_bool y + config ARM_HAS_SG_CHAIN bool
arch/ia64/Kconfig +3 -0
@@ -126,6 +126,9 @@ config AUDIT_ARCH bool default y +config ARCH_MAY_HAVE_PC_PARPORT + def_bool y + menuconfig PARAVIRT_GUEST bool "Paravirtualized guest support" depends on BROKEN
arch/m68k/Kconfig +4 -0
@@ -35,6 +35,10 @@ config ARCH_HAS_ILOG2_U32 config ARCH_HAS_ILOG2_U64 bool +config ARCH_MAY_HAVE_PC_PARPORT + depends on ISA + def_bool y + config GENERIC_HWEIGHT bool default y
arch/microblaze/Kconfig +3 -0
@@ -67,6 +67,9 @@ config LOCKDEP_SUPPORT config HAVE_LATENCYTOP_SUPPORT def_bool y +config ARCH_MAY_HAVE_PC_PARPORT + def_bool y + source "init/Kconfig" source "kernel/Kconfig.freezer"
arch/mips/Kconfig +3 -0
@@ -861,6 +861,9 @@ config FW_ARC config ARCH_MAY_HAVE_PC_FDC bool +config ARCH_MAY_HAVE_PC_PARPORT + def_bool y + config BOOT_RAW bool
arch/parisc/Kconfig +3 -0
@@ -102,6 +102,9 @@ config ARCH_MAY_HAVE_PC_FDC depends on BROKEN default y +config ARCH_MAY_HAVE_PC_PARPORT + def_bool y + source "init/Kconfig" source "kernel/Kconfig.freezer"
arch/powerpc/Kconfig +3 -0
@@ -169,6 +169,9 @@ config ARCH_MAY_HAVE_PC_FDC bool default !PPC_PSERIES || PCI +config ARCH_MAY_HAVE_PC_PARPORT + def_bool y + config PPC_OF def_bool y
arch/sh/Kconfig +3 -0
@@ -143,6 +143,9 @@ config HAVE_LATENCYTOP_SUPPORT config ARCH_HAS_ILOG2_U32 def_bool n +config ARCH_MAY_HAVE_PC_PARPORT + def_bool y + config ARCH_HAS_ILOG2_U64 def_bool n
arch/sparc/Kconfig +4 -0
@@ -197,6 +197,10 @@ config ARCH_MAY_HAVE_PC_FDC bool default y +config ARCH_MAY_HAVE_PC_PARPORT + depends on SPARC64 && PCI + def_bool y + config EMULATED_CMPXCHG bool default y if SPARC32
arch/tile/Kconfig +3 -0
@@ -88,6 +88,9 @@ config NEED_DMA_MAP_STATE config ARCH_HAS_DMA_SET_COHERENT_MASK bool +config ARCH_MAY_HAVE_PC_PARPORT + def_bool y + config LOCKDEP_SUPPORT def_bool y
arch/unicore32/Kconfig +3 -0
@@ -62,6 +62,9 @@ config GENERIC_CALIBRATE_DELAY config ARCH_MAY_HAVE_PC_FDC bool +config ARCH_MAY_HAVE_PC_PARPORT + def_bool y + config ZONE_DMA def_bool y
arch/x86/Kconfig +3 -0
@@ -180,6 +180,9 @@ config ARCH_MAY_HAVE_PC_FDC def_bool y depends on ISA_DMA_API +config ARCH_MAY_HAVE_PC_PARPORT + def_bool y + config RWSEM_XCHGADD_ALGORITHM def_bool y
drivers/parport/Kconfig +1 -3
@@ -35,9 +35,7 @@ if PARPORT config PARPORT_PC tristate "PC-style hardware" - depends on (!SPARC64 || PCI) && !SPARC32 && !M32R && !FRV && !S390 && \ - (!M68K || ISA) && !MN10300 && !AVR32 && !BLACKFIN && \ - !XTENSA && !CRIS && !H8300 + depends on ARCH_MAY_HAVE_PC_PARPORT ---help--- You should say Y here if you have a PC-style parallel port. All
Signature · 1 line
1.8.3.1
Quoted 9 lines · Mark Salter
Remove messy dependencies from
PARPORT_PCby having it depend on oneKconfigsymbol (ARCH_MAY_HAVE_PC_PARPORT) and having architectures which need it declareARCH_MAY_HAVE_PC_PARPORTinarch/*/Kconfig. New architectures are unlikely to needPARPORT_PC, so this avoids having an ever growing list of architectures to exclude. Those architectures which do declareARCH_MAY_HAVE_PC_PARPORTin this patch are the ones which have anasm/parport.h.Signed-off-by Mark Salter <[email protected]>
You can actually omit the arch/tile change, since as far as I know there's no way for tile to have PARPORT_PC.
Signature · 2 lines
Chris Metcalf, Tilera Corp. http://www.tilera.com
Quoted 9 lines · Chris Metcalf
Quoted 8 lines · Mark Salter
Remove messy dependencies from
PARPORT_PCby having it depend on oneKconfigsymbol (ARCH_MAY_HAVE_PC_PARPORT) and having architectures which need it declareARCH_MAY_HAVE_PC_PARPORTinarch/*/Kconfig. New architectures are unlikely to needPARPORT_PC, so this avoids having an ever growing list of architectures to exclude. Those architectures which do declareARCH_MAY_HAVE_PC_PARPORTin this patch are the ones which have anasm/parport.h.
Quoted 4 lines
Quoted 1 line
Signed-off-by Mark Salter <[email protected]>You can actually omit the
arch/tilechange, since as far as I know there's no way for tile to havePARPORT_PC.
Yeah, I thought that the list of architectures in the patch would end up being a superset of what was really needed. Especially for those which used the generic parport.h. I can drop tile from this patch but you may want to get rid of the parport.h from arch/tile/include/asm/Kbuild.
Quoted 9 lines · Mark Salter
Remove messy dependencies from
PARPORT_PCby having it depend on oneKconfigsymbol (ARCH_MAY_HAVE_PC_PARPORT) and having architectures which need it declareARCH_MAY_HAVE_PC_PARPORTinarch/*/Kconfig. New architectures are unlikely to needPARPORT_PC, so this avoids having an ever growing list of architectures to exclude. Those architectures which do declareARCH_MAY_HAVE_PC_PARPORTin this patch are the ones which have anasm/parport.h.Signed-off-by Mark Salter <[email protected]>
Thanks!
For the m68k part:
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
arch/alpha/Kconfig config EISA · line 525
Quoted 11 lines · Mark Salter
arch/alpha/Kconfig +3
-0@@ -520,6 +520,9 @@ config EISA config ARCH_MAY_HAVE_PC_FDC def_bool y +config ARCH_MAY_HAVE_PC_PARPORT + def_bool y +
r~
H. Peter Anvin
reviewerQuoted 7 lines · Mark Salter
drivers/parport/Kconfig +0
-0
drivers/parport/Kconfig if PARPORT · line 41
Quoted 10 lines
drivers/parport/Kconfig +1
-3@@ -35,9 +35,7 @@ if PARPORT config PARPORT_PC tristate "PC-style hardware" - depends on (!SPARC64 || PCI) && !SPARC32 && !M32R && !FRV && !S390 && \ - (!M68K || ISA) && !MN10300 && !AVR32 && !BLACKFIN && \ - !XTENSA && !CRIS && !H8300 + depends on ARCH_MAY_HAVE_PC_PARPORT ---help--- You should say Y here if you have a PC-style parallel port. All
I'm somewhat astonished that this driver is that problematic. It is really just a very basic PIO interface, at least in the absence of EPP/ECP.
It is, of course, also largely a dead interface at this point so it probably doesn't matter.
-hpa
Quoted 23 lines · H. Peter Anvin
Quoted 7 lines · Mark Salter
drivers/parport/Kconfig +0
-0drivers/parport/Kconfig if PARPORT · line 41
Quoted 10 lines
drivers/parport/Kconfig +1
-3@@ -35,9 +35,7 @@ if PARPORT config PARPORT_PC tristate "PC-style hardware" - depends on (!SPARC64 || PCI) && !SPARC32 && !M32R && !FRV && !S390 && \ - (!M68K || ISA) && !MN10300 && !AVR32 && !BLACKFIN && \ - !XTENSA && !CRIS && !H8300 + depends on ARCH_MAY_HAVE_PC_PARPORT ---help--- You should say Y here if you have a PC-style parallel port. AllI'm somewhat astonished that this driver is that problematic. It is really just a very basic PIO interface, at least in the absence of EPP/ECP.
Quoted 2 lines
It is, of course, also largely a dead interface at this point so it probably doesn't matter.
So, my collection of 'randconfig kernel crashers' has this exclusion and comment:
--- linux.orig/drivers/block/Kconfig
+++ linux/drivers/block/Kconfig
@@ -77,6 +77,11 @@ config GDROM
config PARIDE
tristate "Parallel port IDE device support" depends on PARPORT_PC
+
+ # the probe can hang during bootup on non-PARIDE boxes + depends on BROKEN_BOOT_ALLOWED + select BROKEN_BOOT if PARIDE = y
+
So at least some uses of PARPORT_PC are unsafe. (might easily be a bug in PARIDE)
Thanks,
Ingo
H. Peter Anvin
reviewerQuoted 18 lines · Ingo Molnar
Quoted 7 lines
I'm somewhat astonished that this driver is that problematic. It is really just a very basic PIO interface, at least in the absence of EPP/ECP.
It is, of course, also largely a dead interface at this point so it probably doesn't matter.
So, my collection of 'randconfig kernel crashers' has this exclusion and comment:
--- linux.orig/drivers/block/Kconfig
+++ linux/drivers/block/Kconfig
@@ -77,6 +77,11 @@ config GDROM
config PARIDE
tristate "Parallel port IDE device support" depends onPARPORT_PC
+
Quoted 8 lines
+ # the probe can hang during bootup on non-PARIDE boxes + depends on BROKEN_BOOT_ALLOWED + select BROKEN_BOOT if PARIDE = y+
So at least some uses of
PARPORT_PCare unsafe. (might easily be a bug in PARIDE)
That I would believe.
-hpa
Quoted 7 lines · Mark Salter
Remove messy dependencies from
PARPORT_PCby having it depend on oneKconfigsymbol (ARCH_MAY_HAVE_PC_PARPORT) and having architectures which need it declareARCH_MAY_HAVE_PC_PARPORTinarch/*/Kconfig. New architectures are unlikely to needPARPORT_PC, so this avoids having an ever growing list of architectures to exclude. Those architectures which do declareARCH_MAY_HAVE_PC_PARPORTin this patch are the ones which have anasm/parport.h.
It is much nicer if you provide a config symbol only once. And then let the architectures who want it select this symbol.
This is the pattern we use for similar things in many places today, so it is best to follow that pattern.
Sam
Quoted 9 lines · Sam Ravnborg
Quoted 7 lines · Mark Salter
Remove messy dependencies from
PARPORT_PCby having it depend on oneKconfigsymbol (ARCH_MAY_HAVE_PC_PARPORT) and having architectures which need it declareARCH_MAY_HAVE_PC_PARPORTinarch/*/Kconfig. New architectures are unlikely to needPARPORT_PC, so this avoids having an ever growing list of architectures to exclude. Those architectures which do declareARCH_MAY_HAVE_PC_PARPORTin this patch are the ones which have anasm/parport.h.
Quoted 5 lines
It is much nicer if you provide a config symbol only once. And then let the architectures who want it select this symbol.
This is the pattern we use for similar things in many places today, so it is best to follow that pattern.
Yes, and if you do, please be sensitive to the files you're editing. If you find yourself adding a "select" statement at the bottom of an already sorted list, then you're probably going to make someone less than happy.
(I've just re-sorted arch/arm/Kconfig's select statements after they've become mis-sorted - originally sorted alphabetically at akpm's request to avoid conflicts. It now has a comment at the end of the main list asking for new additions to be appropriately placed.)
Quoted 5 lines · Sam Ravnborg
It is much nicer if you provide a config symbol only once. And then let the architectures who want it select this symbol.
This is the pattern we use for similar things in many places today, so it is best to follow that pattern.
Okay, I'm ahead of you on that. I actually had two versions of the patch. The other uses select. If that is the preferred way these days, I'll go with it for V2 of the patch.
Quoted 10 lines · Mark Salter
Quoted 5 lines · Sam Ravnborg
It is much nicer if you provide a config symbol only once. And then let the architectures who want it select this symbol.
This is the pattern we use for similar things in many places today, so it is best to follow that pattern.
Okay, I'm ahead of you on that. I actually had two versions of the patch. The other uses select. If that is the preferred way these days, I'll go with it for V2 of the patch.
Perfect - please use this.
Sam