Split out unmaintained visws support.
Subsystems (3)
PATCH 1/1 Split out unmaintained visws support.
Linus,
The SGI vis workstation support has been unmaintained for moons.
I've even heard comments that it currently doesn't work. Patch below removes it from generic x86 setup, so it can bitrot somewhere else. If no-one steps up to maintain this by the time we reach 2.6.0pre, I vote for dropping it altogether.
Dave.
arch/i386/kernel/Makefile +3 -0
@@ -39,6 +40,9 @@ obj-$(CONFIG_SMP) += smp.o smpboot.o trampoline.o obj-$(CONFIG_X86_LOCAL_APIC) += mpparse.o apic.o nmi.o obj-$(CONFIG_X86_IO_APIC) += io_apic.o acpitable.o +ifdef CONFIG_VISWS +obj-y += setup-visws.o obj-$(CONFIG_X86_VISWS_APIC) += visws_apic.o +endif include $(TOPDIR)/Rules.make
arch/i386/kernel/setup-visws.c +126 -0
126 lines not on this page · raw message
arch/i386/kernel/setup.c +1 -125
138 lines not on this page · raw message
Signature · 2 lines
Dave Jones. http://www.codemonkey.org.uk SuSE Labs.
Quoted 5 lines · Dave Jones
The SGI vis workstation support has been unmaintained for moons.
I've even heard comments that it currently doesn't work. Patch below removes it from generic x86 setup, so it can bitrot somewhere else. If no-one steps up to maintain this by the time we reach 2.6.0pre, I vote for dropping it altogether.
This post gave me the impetus I needed to get my act together and post a patch I've had lying around for awhile, so here it is (against 2.4.17). It still needs a lot of work, but it allows my 320 to limp along at least. I've got a project page setup for it at
http://linux-visws.sourceforge.net if anyone's interested (and I hope some still are as there's lots of work to do). Any tips on ways to clean up the patch would be welcome (and should probably be discussed on [email protected]).
Thanks,
Jesse
arch/i386/config.in +2 -1
@@ -201,11 +201,12 @@ # Visual Workstation support is utterly broken. # If you want to see it working mail an VW540 to [email protected] 8) -#bool 'SGI Visual Workstation support' CONFIG_VISWS +bool 'SGI Visual Workstation support' CONFIG_VISWS if [ "$CONFIG_VISWS" = "y" ]; then define_bool CONFIG_X86_VISWS_APIC y define_bool CONFIG_X86_LOCAL_APIC y define_bool CONFIG_PCI y + define_bool CONFIG_VISWS_HACKS y else if [ "$CONFIG_SMP" = "y" ]; then define_bool CONFIG_X86_IO_APIC y
arch/i386/kernel/head.S +21 -0
@@ -42,6 +42,25 @@ * On entry, %esi points to the real-mode code as a 32-bit pointer. */ startup_32: +#ifdef CONFIG_VISWS_HACKS +ENTRY(stext) +ENTRY(_stext) +/* + * Initialize page tables + */ + movl $pg0-__PAGE_OFFSET,%edi /* initialize page tables */ + movl $007,%eax /* "007" doesn't mean with right to kill, but + PRESENT+RW+USER */ +2: stosl + add $0x1000,%eax + cmp $empty_zero_page-__PAGE_OFFSET,%edi + jne 2b + movl $0x101000,%eax + movl %eax,%cr3 + lgdt gdt_descr + lidt idt_descr +#endif + /* * Set segments to known values */
@@ -411,8 +430,10 @@ /* * Real beginning of normal "text" segment */ +#ifndef CONFIG_VISWS_HACKS ENTRY(stext) ENTRY(_stext) +#endif /* * This starts the data section. Note that the above is all
arch/i386/kernel/i8259.c +12 -11
@@ -52,7 +52,7 @@*/ BUILD_16_IRQS(0x0) -#ifdef CONFIG_X86_IO_APIC +#if defined(CONFIG_X86_IO_APIC ) || defined(CONFIG_X86_VISWS_APIC )/* * The IO-APIC gives us many more interrupt sources. Most of these * are unused but an SMP system is supposed to have enough memory ...
@@ -91,7 +91,7 @@* overflow. Linux uses the local APIC timer interrupt to get * a much simpler SMP time architecture: */ -#ifdef CONFIG_X86_LOCAL_APIC +#if defined(CONFIG_X86_LOCAL_APIC ) || defined(CONFIG_X86_VISWS_APIC ) BUILD_SMP_TIMER_INTERRUPT(apic_timer_interrupt,LOCAL_TIMER_VECTOR) BUILD_SMP_INTERRUPT(error_interrupt,ERROR_APIC_VECTOR)BUILD_SMP_INTERRUPT (spurious_interrupt,SPURIOUS_APIC_VECTOR )
@@ -109,7 +109,7 @@void (*interrupt[NR_IRQS ])(void ) = {IRQLIST_16 (0x0 ), -#ifdef CONFIG_X86_IO_APIC +#if defined(CONFIG_X86_IO_APIC) || defined(CONFIG_X86_VISWS_APIC)IRQLIST_16 (0x1 ),IRQLIST_16 (0x2 ),IRQLIST_16 (0x3 ),IRQLIST_16 (0x4 ),IRQLIST_16 (0x5 ),IRQLIST_16 (0x6 ),IRQLIST_16 (0x7 ), IRQLIST_16(0x8), IRQLIST_16(0x9), IRQLIST_16(0xa), IRQLIST_16(0xb),
@@ -407,7 +407,7 @@* IRQ2 is cascade interrupt to second interrupt controller */ -#ifndef CONFIG_VISWS +#ifndef CONFIG_X86_VISWS_APIC static struct irqaction irq2 = { no_action,0 ,0 ,"cascade" ,NULL ,NULL };#endif
@@ -444,11 +444,6 @@ {int i; -#ifndef CONFIG_X86_VISWS_APIC -init_ISA_irqs (); -#else -init_VISWS_APIC_irqs (); -#endif /* * Cover the whole vector space, no vector can escape * us. (some of these will be overridden and become
@@ -460,6 +455,12 @@set_intr_gate (vector, interrupt[i]); } +#ifndef CONFIG_X86_VISWS_APIC +init_ISA_irqs (); +#else +init_VISWS_APIC_irqs (); +#endif +#ifdef CONFIG_SMP /* * IRQ0 must be given a fixed assignment and initialized,
@@ -480,7 +481,7 @@set_intr_gate (CALL_FUNCTION_VECTOR , call_function_interrupt);#endif -#ifdef CONFIG_X86_LOCAL_APIC +#if defined(CONFIG_X86_LOCAL_APIC ) || defined(CONFIG_X86_VISWS_APIC )/* self generated IPI for local APIC timer */ set_intr_gate (LOCAL_TIMER_VECTOR , apic_timer_interrupt);
@@ -497,7 +498,7 @@outb_p (LATCH &0xff ,0x40 );/* LSB */ outb (LATCH >>8 ,0x40 );/* MSB */ -#ifndef CONFIG_VISWS +#ifndef CONFIG_X86_VISWS_APIC setup_irq (2 , &irq2);#endif
arch/i386/kernel/irq.c +12 -0
@@ -802,6 +802,13 @@unsigned long probe_irq_on (void ) { +#ifdef CONFIG_VISWS_HACKS +/* +* Probing won't work for many devices +* with Cobalt +*/ +return 0 ; +#else unsigned int i;irq_desc_t *desc;unsigned long val;
@@ -872,6 +879,7 @@ }return val; +#endif /* CONFIG_VISWS_HACKS */ }/*
@@ -943,6 +951,9 @@int probe_irq_off (unsigned long val) { +#ifdef CONFIG_VISWS_HACKS +return 0 ; +#else int i, irq_found, nr_irqs; nr_irqs =0 ;
@@ -970,6 +981,7 @@if (nr_irqs >1 ) irq_found = -irq_found;return irq_found; +#endif /* CONFIG_VISWS_HACKS */ }/* this was setup_x86_irq but it seems pretty generic */
arch/i386/kernel/mpparse.c +47 -12
159 lines not on this page · raw message
arch/i386/kernel/pci-i386.h +1 -1
@@ -4,7 +4,7 @@* (c) 1999 Martin Mares <[email protected]> */ -#undef DEBUG +#define DEBUG #ifdef DEBUG #define DBG(x...) printk(x)
arch/i386/kernel/pci-visws.c +20 -7
@@ -13,13 +13,17 @@#include <linux/irq.h> #include <asm/smp.h> -#include <asm/lithium.h> #include <asm/io.h> +#include <asm/sgi-lithium.h> #include "pci-i386.h" +#define DBG(x...) printk(x) +unsigned int pci_probe =0 ; +struct pci_fixup pcibios_fixups[] = { {0 } }; +/* * The VISWS uses configuration access type 1 only. */
@@ -96,10 +100,13 @@ pin = (pin +PCI_SLOT (dev->devfn)) %4 ; }else p = dev; - irq =visws_get_PCI_irq_vector (p->bus->number,PCI_SLOT (p->devfn), pin+1 ); + + irq =visws_get_PCI_irq_vector (p->bus->number, +PCI_SLOT (p->devfn), pin);if (irq >=0 ) dev->irq = irq; -DBG ("PCI IRQ: %s pin %d -> %d\n" , dev->slot_name, pin, irq); +DBG ("PCI IRQ: Bus %d, Slot %d, Pin %d -> %d\n" , + dev->bus->number,PCI_SLOT (p->devfn), pin, irq); } }
@@ -117,11 +124,12 @@void __init pcibios_init (void ) { -unsigned int sec_bus =li_pcib_read16 (LI_PCI_BUSNUM ) &0xff ; +unsigned int bus0 =li_pcib_read16 (LI_PCI_BUSNUM ) &0xff ; +unsigned int bus1 =li_pcia_read16 (LI_PCI_BUSNUM ) &0xff ; -printk ("PCI: Probing PCI hardware on host buses 00 and %02x\n" , sec_bus); -pci_scan_bus (0 , &visws_pci_ops,NULL ); -pci_scan_bus (sec_bus, &visws_pci_ops,NULL ); +DBG ("PCI: Probing PCI hardware on host buses %02x and %02x\n" , bus0, bus1); +pci_scan_bus (bus0, &visws_pci_ops,NULL ); +pci_scan_bus (bus1, &visws_pci_ops,NULL );pcibios_fixup_irqs ();pcibios_resource_survey (); }
@@ -138,4 +146,9 @@void __init pcibios_penalize_isa_irq (irq ) { +} + +unsigned int pcibios_assign_all_busses (void ) +{ +return (pci_probe &PCI_ASSIGN_ALL_BUSSES ) ?1 :0 ; }
arch/i386/kernel/process.c +43 -0
67 lines not on this page · raw message
arch/i386/kernel/setup.c +112 -33
245 lines not on this page · raw message
arch/i386/kernel/smp.c +2 -0
@@ -137,7 +137,9 @@/* * Wait for idle. */ +#ifndef CONFIG_VISWS_HACKS apic_wait_icr_idle (); +#endif /* * No need to touch the target chip field
arch/i386/kernel/smpboot.c +3 -3
@@ -1068,9 +1068,9 @@ smp_num_cpus =1 ; goto smp_done; } - -verify_local_APIC (); - +#ifndef CONFIG_VISWS_HACKS +verify_local_APIC (); +#endif /* * If SMP should be disabled, then really disable it! */
arch/i386/kernel/time.c +2 -6
@@ -56,7 +56,7 @@#include <linux/config.h> #include <asm/fixmap.h> -#include <asm/cobalt.h> +#include <asm/sgi-cobalt.h> /* * for x86_do_profile()
@@ -708,10 +708,6 @@/* Enable (unmask) the timer interrupt */ co_cpu_write (CO_CPU_CTRL ,co_cpu_read (CO_CPU_CTRL ) & ~CO_CTRL_TIMEMASK ); - -/* Wire cpu IDT entry to s/w handler (and Cobalt APIC to IDT) */ -setup_irq (CO_IRQ_TIMER , &irq0); -#else -setup_irq (0 , &irq0);#endif +setup_irq (0 , &irq0); }
arch/i386/kernel/trampoline.S +4 -0
@@ -56,7 +56,11 @@ lmsw %ax # into protected mode jmp flush_instr flush_instr: +#ifdef CONFIG_VISWS_HACKS + ljmpl $__KERNEL_CS, $0x0010002e +#else ljmpl $__KERNEL_CS, $0x00100000 +#endif # jump to startup_32 in arch/i386/kernel/head.S idt_48:
arch/i386/kernel/traps.c +8 -56
94 lines not on this page · raw message
arch/i386/kernel/visws_apic.c +258 -156
578 lines not on this page · raw message
drivers/net/eepro100.c +1 -0
@@ -302,6 +302,7 @@outw (val, port); } +#define USE_IO #ifndef USE_IO /* Currently alpha headers define in/out macros. Undefine them. 2000/03/30 SAW */
drivers/video/sgivwfb.c +14 -3
@@ -49,8 +49,8 @@*/ /* set by arch/i386/kernel/setup.c */ -u_long sgivwfb_mem_phys; -u_long sgivwfb_mem_size; +unsigned long sgivwfb_mem_phys; +unsigned long sgivwfb_mem_size;static volatile char *fbmem;static asregs *regs;
@@ -86,6 +86,18 @@ 0 /* par not activated */ }; +static struct sgivwfb_par par_current_new = { + {/* var (screeninfo) */ +/* 800x600, 16 bpp */ +800 ,600 ,800 ,600 ,0 ,0 ,16 ,0 , + {0 ,16 ,0 }, {0 ,16 ,0 }, {0 ,16 ,0 }, {0 ,0 ,0 }, +0 ,0 ,-1 ,-1 ,0 ,25000 ,88 ,40 ,23 ,1 ,128 ,4 , +0 ,FB_VMODE_NONINTERLACED + }, +0 ,/* timing_num */ +0 /* par not activated */ +}; +/* * Interface used by the world */
@@ -660,7 +672,6 @@/* XXX FIXME - should try to pick best refresh rate */ /* for now, pick closest dot-clock within 3MHz*/ -#error "Floating point not allowed in kernel" req_dot = (int )((1.0e3 /1.0e6 ) / (1.0e-12 * (float )var->pixclock));printk (KERN_INFO "sgivwfb: requested pixclock=%d ps (%d KHz)\n" , var->pixclock, req_dot);
fs/proc/proc_misc.c +15 -0
@@ -64,6 +64,9 @@#ifdef CONFIG_SGI_DS1286 extern int get_ds1286_status (char *);#endif +#ifdef CONFIG_X86_VISWS_APIC +extern int get_cobalt_entries (char *); +#endif static int proc_calc_metrics (char *page,char **start,off_t off,int count,int *eof,int len)
@@ -337,6 +340,15 @@ }#endif +#ifdef CONFIG_X86_VISWS_APIC +static int cobalt_read_proc (char *page,char **start,off_t off, +int count,int *eof,void *data) +{ +int len =get_cobalt_entries (page); +return proc_calc_metrics (page, start, off, count, eof, len); +} +#endif +static int filesystems_read_proc (char *page,char **start,off_t off,int count,int *eof,void *data) {
@@ -514,6 +526,9 @@ {"partitions", partitions_read_proc}, #if !defined(CONFIG_ARCH_S390) {"interrupts", interrupts_read_proc}, +#endif +#ifdef CONFIG_X86_VISWS_APIC + {"cobalt", cobalt_read_proc}, #endif {"filesystems", filesystems_read_proc}, {"dma", dma_read_proc},
include/asm-i386/cobalt.h +0 -117
117 lines not on this page · raw message
include/asm-i386/hw_irq.h +2 -1
@@ -59,7 +59,7 @@#define FIRST_SYSTEM_VECTOR 0xefextern int irq_vector[NR_IRQS ]; -#define IO_APIC_VECTOR (irq) irq_vector[irq] +#define IO_APIC_VECTOR (irq) irq_vector[irq]/* * Various low-level irq details needed by irq.c, process.c,
@@ -80,6 +80,7 @@extern void setup_IO_APIC (void );extern void disable_IO_APIC (void );extern void print_IO_APIC (void ); +extern int visws_get_PCI_irq_vector (int bus,int slot,int fn);extern int IO_APIC_get_PCI_irq_vector (int bus,int slot,int fn);extern void send_IPI (int dest,int vector);
include/asm-i386/lithium.h +0 -45
45 lines not on this page · raw message
include/asm-i386/sgi-cobalt.h +119 -0
119 lines not on this page · raw message
include/asm-i386/sgi-lithium.h +56 -0
56 lines not on this page · raw message
include/asm-i386/sgi-piix.h +113 -0
113 lines not on this page · raw message
include/asm-i386/sgi-vwdbe.h +305 -0
305 lines not on this page · raw message