x86: drop EISA support from x86_32 builds
Subsystems (4)
cover x86: drop EISA support from x86_32 builds
When we deleted MCA bus support close to three years ago, Linus ack'd it and said "Maybe we could some day remove EISA support too.." [1]
For the older arch who are frozen in time (from a hardware perspective) they might not be ready/willing to drop EISA support yet. However that does not mean that we can't start dropping on a per arch basis for where it really makes sense to do so. Quoting from the 3rd patch here:
The Kconfig text says it all, with "The EISA bus saw limited use between 1988 and 1995 when it was made obsolete by the PCI bus."
That means typically 486/586 CPUs in the 33-166MHz range, and 8-64MB of installed RAM in typical EISA machines of that era. With the additional cost, they were also typically rare, and not getting widescale deployment.
Given that it is 20 years on since its demise, and the above specs might seem just barely acceptable for a wireless router today, lets stop forcing everyone to build EISA infrastructure and assoc. drivers during their routine build coverage testing for no value whatsoever.
We'd already removed some obsolete 10Mbit EISA network drivers in commit bca94cffabf5c9f2399da34eab00bd534bf3735b ("drivers/net: delete 8390 based EISA drivers") over two years ago for the same reason.
If we don't immediately expire EISA completely, we can at least limit its impact and support/testing overhead to the arch like alpha and parisc that are essentially frozen in time from a hardware perspective.
In doing this, we see that we essentially had two EISA/ELCR (Edge/Level Control Register) functions, and so we rename the remaining one to not have EISA mentioned in its name (since it really is not EISA specific).
We also dip into the EISA code itself, since there was a Kconfig option in there that was specific to a single 486 VESA local bus hardware configuration that won't be found outside of the x86 architecture.
Finally, we clobber all x86 specific blocks of code that were within the CONFIG_EISA ifdef, and drop the x86 Kconfig block that pulled it into the x86_32 builds to complete the process.
Overall, we shed some lines of code, and exposure to some Kconfig variations, which is a small win, even if might be a hopeless battle.
Paul.
[1] https://lkml.org/lkml/2012/5/17/278
---
Paul Gortmaker (3):
x86: renane eisa_set_level_irq to elcr_set_level_irq
x86: delete EISA_VLB_PRIMING Kconfig option and code
x86: drop support for 1995 era EISA based platforms
Documentation/eisa.txt | 4 ++-- arch/x86/Kconfig | 18 -------------- arch/x86/include/asm/hw_irq.h | 3 +-- arch/x86/include/asm/mpspec.h | 4 ---- arch/x86/kernel/acpi/boot.c | 8 +------ arch/x86/kernel/apic/io_apic.c | 54 ------------------------------------------ arch/x86/kernel/mpparse.c | 11 +-------- arch/x86/kernel/traps.c | 13 ---------- arch/x86/pci/irq.c | 13 +++++----- drivers/acpi/pci_irq.c | 2 +- drivers/eisa/Kconfig | 10 -------- drivers/eisa/eisa-bus.c | 10 -------- drivers/eisa/virtual_root.c | 2 +- 13 files changed, 14 insertions(+), 138 deletions(-)
Signature · 1 line
2.2.1
PATCH 1/3 x86: rename eisa_set_level_irq to elcr_set_level_irq
This routine has been around for over a decade, but with EISA being dead and abandoned for about twice that long, the name can be kind of confusing. The function is going at the PIC Edge/Level Configuration Registers (ELCR), so rename it as such and mentally decouple it from the long since dead EISA bus.
--- arch/x86/include/asm/hw_irq.h | 3 +-- arch/x86/kernel/acpi/boot.c | 2 +- arch/x86/pci/irq.c | 13 +++++++------ 3 files changed, 9 insertions(+), 9 deletions(-)
arch/x86/include/asm/hw_irq.h +1 -2
@@ -163,8 +163,7 @@ static inline void unlock_vector_lock(void) {}extern atomic_t irq_err_count;extern atomic_t irq_mis_count; -/* EISA */ -extern void eisa_set_level_irq (unsigned int irq); +extern void elcr_set_level_irq (unsigned int irq);/* SMP */ extern __visible void smp_apic_timer_interrupt(struct pt_regs *);
arch/x86/kernel/acpi/boot.c +1 -1
@@ -647,7 +647,7 @@ static int acpi_register_gsi_pic(struct device *dev, u32 gsi,* Make sure all (legacy) PCI IRQs are set as level-triggered. */ if (trigger ==ACPI_LEVEL_SENSITIVE ) -eisa_set_level_irq (gsi); +elcr_set_level_irq (gsi);#endif return gsi;
arch/x86/pci/irq.c +7 -6
@@ -146,19 +146,20 @@ static void __init pirq_peer_trick(void)/* * Code for querying and setting of IRQ routes on various interrupt routers. +* PIC Edge/Level Control Registers (ELCR) 0x4d0 & 0x4d1. */ -void eisa_set_level_irq (unsigned int irq) +void elcr_set_level_irq (unsigned int irq) {unsigned char mask =1 << (irq &7 );unsigned int port =0x4d0 + (irq >>3 );unsigned char val; -static u16 eisa_irq_mask; +static u16 elcr_irq_mask; -if (irq >=16 || (1 << irq) & eisa_irq_mask) +if (irq >=16 || (1 << irq) & elcr_irq_mask)return ; - eisa_irq_mask |= (1 << irq); + elcr_irq_mask |= (1 << irq);printk (KERN_DEBUG "PCI: setting IRQ %u as level-triggered\n" , irq); val =inb (port);if (!(val & mask)) {
@@ -965,11 +966,11 @@ static int pcibios_lookup_irq(struct pci_dev *dev, int assign) }else if (r->get && (irq = r->get (pirq_router_dev, dev, pirq)) && \ ((!(pci_probe &PCI_USE_PIRQ_MASK )) || ((1 << irq) & mask))) { msg ="found" ; -eisa_set_level_irq (irq); +elcr_set_level_irq (irq); }else if (newirq && r->set && (dev->class >>8 ) !=PCI_CLASS_DISPLAY_VGA ) {if (r->set (pirq_router_dev, dev, pirq, newirq)) { -eisa_set_level_irq (newirq); +elcr_set_level_irq (newirq); msg ="assigned" ; irq = newirq; }
Signature · 1 line
2.2.1
PATCH 2/3 x86: delete EISA_VLB_PRIMING Kconfig option and code
In reply to Paul GortmakerThere was one instance of a VLB card which would emulate an EISA ID response ID when primed with a certain I/O handshake.
Since (a) VLB was largely confined to 486 vintage motherboards from the early/mid 1990s and (b) there was only one card that needed this and (c) we are dropping EISA support from x86, everything relating to this option can be removed w/o impacting any other architectures that might be unwilling to drop EISA support just yet.
--- Documentation/eisa.txt | 4 ++-- drivers/eisa/Kconfig | 10 ---------- drivers/eisa/eisa-bus.c | 10 ---------- drivers/eisa/virtual_root.c | 2 +- 4 files changed, 3 insertions(+), 23 deletions(-)
Documentation/eisa.txt +2 -2
@@ -172,8 +172,8 @@ virtual_root.force_probe : Force the probing code to probe EISA slots even when it cannot find an EISA compliant mainboard (nothing appears on slot 0). Defaults to 0 -(don't force), and set to 1 (force probing) when either -CONFIG_ALPHA_JENSEN or CONFIG_EISA_VLB_PRIMING are set. +(don't force), and set to 1 (force probing) when CONFIG_ALPHA_JENSEN +is set. ** Random notes :
drivers/eisa/Kconfig +0 -10
@@ -1,16 +1,6 @@ # # EISA configuration # -config EISA_VLB_PRIMING - bool "Vesa Local Bus priming" - depends on X86 && EISA - default n - ---help--- - Activate this option if your system contains a Vesa Local - Bus (VLB) card that identify itself as an EISA card (such as - the Adaptec AHA-284x). - - When in doubt, say N. config EISA_PCI_EISA bool "Generic PCI/EISA bridge"
drivers/eisa/eisa-bus.c +0 -10
@@ -81,16 +81,6 @@ static char __init *decode_eisa_sig(unsigned long addr)int i;for (i =0 ; i <4 ; i++) { -#ifdef CONFIG_EISA_VLB_PRIMING -/* -* This ugly stuff is used to wake up VL-bus cards -* (AHA-284x is the only known example), so we can -* read the EISA id. -* -* Thankfully, this only exists on x86... -*/ -outb (0x80 + i, addr); -#endif sig[i] =inb (addr + i);if (!i && (sig[0 ] &0x80 ))
drivers/eisa/virtual_root.c +1 -1
@@ -14,7 +14,7 @@#include <linux/moduleparam.h> #include <linux/init.h> -#if defined(CONFIG_ALPHA_JENSEN ) || defined(CONFIG_EISA_VLB_PRIMING ) +#if defined(CONFIG_ALPHA_JENSEN )#define EISA_FORCE_PROBE_DEFAULT 1#else #define EISA_FORCE_PROBE_DEFAULT 0
Signature · 1 line
2.2.1
PATCH 3/3 x86: drop support for 1995 era EISA based platforms
In reply to Paul GortmakerThe Kconfig text says it all, with "The EISA bus saw limited use between 1988 and 1995 when it was made obsolete by the PCI bus."
That means typically 486/586 CPUs in the 33-166MHz range, and 8-64MB of installed RAM in typical EISA machines of that era. With the additional cost, they were also typically rare, and not getting widescale deployment.
Given that it is 20 years on since its demise, and the above specs might seem just barely acceptable for a wireless router today, lets stop forcing everyone to build EISA infrastructure and assoc. drivers during their routine build coverage testing for no value whatsoever.
We'd already removed some obsolete 10Mbit EISA network drivers in commit bca94cffabf5c9f2399da34eab00bd534bf3735b ("drivers/net: delete 8390 based EISA drivers") over two years ago for the same reason.
If we don't immediately expire EISA completely, we can at least limit its impact and support/testing overhead to the arch like alpha and parisc that are essentially frozen in time from a hardware perspective.
--- arch/x86/Kconfig | 18 -------------- arch/x86/include/asm/mpspec.h | 4 ---- arch/x86/kernel/acpi/boot.c | 6 ----- arch/x86/kernel/apic/io_apic.c | 54 ------------------------------------------ arch/x86/kernel/mpparse.c | 11 +-------- arch/x86/kernel/traps.c | 13 ---------- drivers/acpi/pci_irq.c | 2 +- 7 files changed, 2 insertions(+), 106 deletions(-)
arch/x86/Kconfig +0 -18
@@ -2291,24 +2291,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---
arch/x86/include/asm/mpspec.h +0 -4
@@ -33,10 +33,6 @@ extern unsigned int def_to_bigsmp;#endif /* CONFIG_X86_64 */ -#ifdef CONFIG_EISA -extern int mp_bus_id_to_type[MAX_MP_BUSSES ]; -#endif - extern DECLARE_BITMAP(mp_bus_not_pci, MAX_MP_BUSSES);extern unsigned int boot_cpu_physical_apicid;
arch/x86/kernel/acpi/boot.c +0 -6
@@ -1072,12 +1072,6 @@ static void __init mp_config_acpi_legacy_irqs(void)int i;struct mpc_intsrc mp_irq; -#ifdef CONFIG_EISA -/* -* Fabricate the legacy ISA bus (bus #31). -*/ - mp_bus_id_to_type[MP_ISA_BUS ] =MP_BUS_ISA ; -#endif set_bit (MP_ISA_BUS , mp_bus_not_pci);pr_debug ("Bus #%d is ISA\n" ,MP_ISA_BUS );
arch/x86/kernel/apic/io_apic.c +0 -54
78 lines not on this page · raw message
arch/x86/kernel/mpparse.c +1 -10
@@ -95,20 +95,11 @@ static void __init MP_bus_info(struct mpc_bus *m)#endif set_bit (m->busid, mp_bus_not_pci); -if (strncmp (str,BUSTYPE_ISA ,sizeof (BUSTYPE_ISA ) -1 ) ==0 ) { -#ifdef CONFIG_EISA - mp_bus_id_to_type[m->busid] =MP_BUS_ISA ; -#endif - }else if (strncmp (str,BUSTYPE_PCI ,sizeof (BUSTYPE_PCI ) -1 ) ==0 ) { +if (strncmp (str,BUSTYPE_PCI ,sizeof (BUSTYPE_PCI ) -1 ) ==0 ) {if (x86_init.mpparse.mpc_oem_pci_bus) x86_init.mpparse.mpc_oem_pci_bus (m);clear_bit (m->busid, mp_bus_not_pci); -#ifdef CONFIG_EISA - mp_bus_id_to_type[m->busid] = MP_BUS_PCI; - }else if (strncmp (str,BUSTYPE_EISA ,sizeof (BUSTYPE_EISA ) -1 ) ==0 ) { - mp_bus_id_to_type[m->busid] =MP_BUS_EISA ; -#endif }else pr_warn ("Unknown bustype %s - ignoring\n" , str); }
arch/x86/kernel/traps.c +0 -13
@@ -37,11 +37,6 @@#include <linux/smp.h> #include <linux/io.h> -#ifdef CONFIG_EISA -#include <linux/ioport.h> -#include <linux/eisa.h> -#endif -#if defined(CONFIG_EDAC )#include <linux/edac.h> #endif
@@ -876,14 +871,6 @@ void __init trap_init(void) {int i; -#ifdef CONFIG_EISA -void __iomem *p =early_ioremap (0x0FFFD9 ,4 ); - -if (readl (p) =='E' + ('I' <<8 ) + ('S' <<16 ) + ('A' <<24 )) - EISA_bus =1 ; -early_iounmap (p,4 ); -#endif -set_intr_gate (X86_TRAP_DE , divide_error);set_intr_gate_ist (X86_TRAP_NMI , &nmi,NMI_STACK );/* int4 can be called from all */
drivers/acpi/pci_irq.c +1 -1
@@ -370,7 +370,7 @@ static struct acpi_prt_entry *acpi_pci_irq_lookup(struct pci_dev *dev, int pin)return NULL ; } -#if IS_ENABLED (CONFIG_ISA ) ||IS_ENABLED (CONFIG_EISA ) +#if IS_ENABLED (CONFIG_ISA )static int acpi_isa_register_gsi (struct pci_dev *dev) {u32 dev_gsi;
Signature · 1 line
2.2.1
Re: [PATCH 3/3] x86: drop support for 1995 era EISA based platforms
Quoted 17 lines · Paul Gortmaker
The
Kconfigtext says it all, with "The EISA bus saw limited use between 1988 and 1995 when it was made obsolete by the PCI bus."That means typically 486/586 CPUs in the 33-166MHz range, and 8-64MB of installed RAM in typical EISA machines of that era. With the additional cost, they were also typically rare, and not getting widescale deployment.
Given that it is 20 years on since its demise, and the above specs might seem just barely acceptable for a wireless router today, lets stop forcing everyone to build EISA infrastructure and assoc. drivers during their routine build coverage testing for no value whatsoever.
We'd already removed some obsolete 10Mbit EISA network drivers in commit
bca94cffabf5c9f2399da34eab00bd534bf3735b("drivers/net: delete 8390 based EISA drivers") over two years ago for the same reason.
Quoted 6 lines
If we don't immediately expire EISA completely, we can at least limit its impact and support/testing overhead to the arch like alpha and parisc that are essentially frozen in time from a hardware perspective.
Signed-off-by Paul Gortmaker <[email protected]>---
Well, I'd like to keep my x86 box up and alive, to support EISA FDDI
equipment I maintain if nothing else -- which in particular means the current head version of Linux, not some ancient branch.
Is the maintenance overhead for this stuff really that high? The amount
of code you're dropping here does not really impress me. And it's almost exclusively APIC stuff that's straightforward and I can probably give it some attention too -- as you may have been aware I have some experience in this area, especially where older hardware is concerned. Unfortunately my EISA box is UP, so I can't offer run-time validation for APIC/SMP code at the moment, but as I say, this is really plain stuff.
I don't require that everyone around the planet validates EISA support of
course -- if that is what really concerns you (quite validly, IMHO), then how about a configuration option instead to annotate more exotic stuff with, so that people who have, say, commercial interest in Linux only, can tick it off and care of what brings them income only?
Maciej
Re: [PATCH 3/3] x86: drop support for 1995 era EISA based platforms
Quoted 4 lines · Maciej W. Rozycki
Well, I'd like to keep my x86 box up and alive, to support EISA FDDI
equipment I maintain if nothing else -- which in particular means the current head version of Linux, not some ancient branch.
So if we actually have a user, and it works, then no, we're not removing EISA support. It's not like it hurts us or is in some way fundamentally broken, like the old i386 code was (i386 kernel page fault semantics really were broken, and the lack of some instructions made it more painful to maintain than needed - not like EISA at all, which is just a pure add-on on the side).
Linus
Re: [PATCH 3/3] x86: drop support for 1995 era EISA based platforms
Quoted 10 lines · Linus Torvalds
Quoted 3 lines
Well, I'd like to keep my x86 box up and alive, to support EISA FDDI
equipment I maintain if nothing else -- which in particular means the current head version of Linux, not some ancient branch.So if we actually have a user, and it works, then no, we're not removing EISA support. It's not like it hurts us or is in some way fundamentally broken, like the old i386 code was (i386 kernel page fault semantics really were broken, and the lack of some instructions made it more painful to maintain than needed - not like EISA at all, which is just a pure add-on on the side).
Thanks. Last version I tried was 3.18.0-rc1-next-20141023 sometime last
November. It worked just fine, booted to the multiuser mode with no issue. I'll have to refresh the build sometime.
It's a plain EISA box, no PCI. The EISA FDDI board referred works fine
(it uses our DMA API for bus mastering) as does an ISA 3c509B Ethernet adapter configured for the EISA mode. The card supports it -- it looks like a true EISA board to software then, there's no need to poke at random port I/O locations anymore to detect it -- as does our driver.
I have a small patch outstanding to reserve the BIOS area at 0xffff0000
(used at reset as per the x86 architecture definition) so that systems that do not support the 0xe820 call do not attempt to allocate MMIO in that range. It may matter for some old PCI systems as well, I suppose. I just need to verify it does not cause a conflict with systems that do support that call.
Other than that it seems maintenance-free to me.
Maciej