From: James S. <jsi...@us...> - 2001-11-26 18:17:41
|
Update of /cvsroot/linux-mips/linux/arch/mips/sgi/kernel In directory usw-pr-cvs1:/tmp/cvs-serv4706/arch/mips/sgi/kernel Modified Files: indy_int.c Added Files: Makefile indy_rtc.c indy_time.c setup.c Log Message: RTC fixes for SGI systems. --- NEW FILE: Makefile --- # # Makefile for the SGI specific kernel interface routines # under Linux. # # Note! Dependencies are done automagically by 'make dep', which also # removes any old dependencies. DON'T put your own dependencies here # unless it's something special (ie not a .c file). # # Note 2! The CFLAGS definitions are now in the main makefile... .S.s: $(CPP) $(CFLAGS) $< -o $*.s .S.o: $(CC) $(CFLAGS) -c $< -o $*.o O_TARGET := ip22-kern.o all: ip22-kern.o indyIRQ.o obj-y += indy_mc.o indy_sc.o indy_hpc.o indy_int.o indy_time.o indy_rtc.o \ system.o indyIRQ.o reset.o setup.o indyIRQ.o: indyIRQ.S include $(TOPDIR)/Rules.make --- NEW FILE: indy_time.c --- /* * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. * * Time operations for IP22 machines. Original code may come from * Ralf Baechle or David S. Miller (sorry guys, i'm really not sure) * * Copyright (C) 2001 by Ladislav Michl */ #include <linux/config.h> #include <linux/kernel.h> #include <linux/interrupt.h> #include <linux/kernel_stat.h> #include <asm/cpu.h> #include <asm/mipsregs.h> #include <asm/io.h> #include <asm/irq.h> #include <asm/time.h> #include <asm/ds1286.h> #include <asm/sgialib.h> #include <asm/sgi/sgint23.h> /* * note that mktime uses month from 1 to 12 while to_tm * uses 0 to 11. ask Jun Sun why! */ static unsigned long indy_rtc_get_time(void) { unsigned char yrs, mon, day, hrs, min, sec; unsigned char save_control; save_control = CMOS_READ(RTC_CMD); CMOS_WRITE((save_control|RTC_TE), RTC_CMD); sec = CMOS_READ(RTC_SECONDS); min = CMOS_READ(RTC_MINUTES); hrs = CMOS_READ(RTC_HOURS) & 0x1f; day = CMOS_READ(RTC_DATE); mon = CMOS_READ(RTC_MONTH) & 0x1f; yrs = CMOS_READ(RTC_YEAR); CMOS_WRITE(save_control, RTC_CMD); BCD_TO_BIN(sec); BCD_TO_BIN(min); BCD_TO_BIN(hrs); BCD_TO_BIN(day); BCD_TO_BIN(mon); BCD_TO_BIN(yrs); if (yrs < 45) yrs += 30; if ((yrs += 40) < 70) yrs += 100; return mktime((int)yrs + 1900, mon, day, hrs, min, sec); } static int indy_rtc_set_time(unsigned long tim) { struct rtc_time tm; unsigned char save_control; to_tm(tim, &tm); tm.tm_year -= 1900; tm.tm_mon += 1; if (tm.tm_year >= 100) tm.tm_year -= 100; BIN_TO_BCD(tm.tm_sec); BIN_TO_BCD(tm.tm_min); BIN_TO_BCD(tm.tm_hour); BIN_TO_BCD(tm.tm_mday); BIN_TO_BCD(tm.tm_mon); BIN_TO_BCD(tm.tm_year); save_control = CMOS_READ(RTC_CMD); CMOS_WRITE((save_control|RTC_TE), RTC_CMD); CMOS_WRITE(tm.tm_year, RTC_YEAR); CMOS_WRITE(tm.tm_mon, RTC_MONTH); CMOS_WRITE(tm.tm_mday, RTC_DATE); CMOS_WRITE(tm.tm_hour, RTC_HOURS); CMOS_WRITE(tm.tm_min, RTC_MINUTES); CMOS_WRITE(tm.tm_sec, RTC_SECONDS); CMOS_WRITE(0, RTC_HUNDREDTH_SECOND); CMOS_WRITE(save_control, RTC_CMD); return 0; } static unsigned long dosample(volatile unsigned char *tcwp, volatile unsigned char *tc2p) { unsigned long ct0, ct1; unsigned char msb, lsb; /* Start the counter. */ *tcwp = (SGINT_TCWORD_CNT2 | SGINT_TCWORD_CALL | SGINT_TCWORD_MRGEN); *tc2p = (SGINT_TCSAMP_COUNTER & 0xff); *tc2p = (SGINT_TCSAMP_COUNTER >> 8); /* Get initial counter invariant */ ct0 = read_32bit_cp0_register(CP0_COUNT); /* Latch and spin until top byte of counter2 is zero */ do { *tcwp = (SGINT_TCWORD_CNT2 | SGINT_TCWORD_CLAT); lsb = *tc2p; msb = *tc2p; ct1 = read_32bit_cp0_register(CP0_COUNT); } while(msb); /* Stop the counter. */ *tcwp = (SGINT_TCWORD_CNT2 | SGINT_TCWORD_CALL | SGINT_TCWORD_MSWST); /* * Return the difference, this is how far the r4k counter increments * for every 1/HZ seconds. We round off the nearest 1 MHz of master * clock (= 1000000 / 100 / 2 = 5000 count). */ return ((ct1 - ct0) / 5000) * 5000; } void indy_time_init(void) { /* Here we need to calibrate the cycle counter to at least be close. * We don't need to actually register the irq handler because that's * all done in indyIRQ.S. */ struct sgi_ioc_timers *p; volatile unsigned char *tcwp, *tc2p; unsigned long r4k_ticks[3]; unsigned long r4k_tick; /* Figure out the r4k offset, the algorithm is very simple * and works in _all_ cases as long as the 8254 counter * register itself works ok (as an interrupt driving timer * it does not because of bug, this is why we are using * the onchip r4k counter/compare register to serve this * purpose, but for r4k_offset calculation it will work * ok for us). There are other very complicated ways * of performing this calculation but this one works just * fine so I am not going to futz around. ;-) */ p = ioc_timers; tcwp = &p->tcword; tc2p = &p->tcnt2; printk("Calibrating system timer... "); dosample(tcwp, tc2p); /* Prime cache. */ dosample(tcwp, tc2p); /* Prime cache. */ /* Zero is NOT an option. */ do { r4k_ticks[0] = dosample (tcwp, tc2p); } while (!r4k_ticks[0]); do { r4k_ticks[1] = dosample (tcwp, tc2p); } while (!r4k_ticks[1]); if (r4k_ticks[0] != r4k_ticks[1]) { printk ("warning: timer counts differ, retrying..."); r4k_ticks[2] = dosample (tcwp, tc2p); if (r4k_ticks[2] == r4k_ticks[0] || r4k_ticks[2] == r4k_ticks[1]) r4k_tick = r4k_ticks[2]; else { printk ("disagreement, using average..."); r4k_tick = (r4k_ticks[0] + r4k_ticks[1] + r4k_ticks[2]) / 3; } } else r4k_tick = r4k_ticks[0]; printk("%d [%d.%02d MHz CPU]\n", (int) r4k_tick, (int) (r4k_tick / 5000), (int) (r4k_tick % 5000) / 50); mips_counter_frequency = r4k_tick * HZ; } /* Generic SGI handler for (spurious) 8254 interrupts */ void indy_8254timer_irq(struct pt_regs *regs) { int cpu = smp_processor_id(); int irq = SGI_8254_0_IRQ; irq_enter(cpu, irq); kstat.irqs[cpu][irq]++; printk("indy_8254timer_irq: Whoops, should not have gotten this IRQ\n"); prom_getchar(); ArcEnterInteractiveMode(); irq_exit(cpu, irq); } void indy_r4k_timer_interrupt(struct pt_regs *regs) { int cpu = smp_processor_id(); int irq = SGI_TIMER_IRQ; irq_enter(cpu, irq); kstat.irqs[cpu][irq]++; timer_interrupt(irq, NULL, regs); irq_exit(cpu, irq); if (softirq_pending(cpu)) do_softirq(); } extern int setup_irq(unsigned int irq, struct irqaction *irqaction); static void indy_timer_setup(struct irqaction *irq) { /* over-write the handler. we use our own way */ irq->handler = no_action; /* setup irqaction */ setup_irq(SGI_TIMER_IRQ, irq); } void sgitime_init(void) { /* * setup hookup function only when Indy Dallas chip driver * is included. */ rtc_get_time = indy_rtc_get_time; rtc_set_time = indy_rtc_set_time; board_time_init = indy_time_init; board_timer_setup = indy_timer_setup; } Index: indy_int.c =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/sgi/kernel/indy_int.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- indy_int.c 2001/11/14 16:17:58 1.4 +++ indy_int.c 2001/11/26 18:17:36 1.5 @@ -7,54 +7,26 @@ * Copyright (C) 1999 Andrew R. Baker (an...@ua...) * - Indigo2 changes * - Interrupt handling fixes + * Copyright (C) 2001 Ladislav Michl (la...@ps...) */ -#include <linux/init.h> -#include <linux/errno.h> +#include <linux/types.h> +#include <linux/init.h> #include <linux/kernel_stat.h> #include <linux/signal.h> #include <linux/sched.h> -#include <linux/types.h> #include <linux/interrupt.h> -#include <linux/ioport.h> -#include <linux/timex.h> -#include <linux/slab.h> -#include <linux/random.h> -#include <linux/smp.h> -#include <linux/smp_lock.h> -#include <asm/bitops.h> -#include <asm/bootinfo.h> -#include <asm/io.h> #include <asm/irq.h> #include <asm/mipsregs.h> -#include <asm/system.h> - -#include <asm/ptrace.h> -#include <asm/processor.h> -#include <asm/sgi/sgi.h> -#include <asm/sgi/sgihpc.h> -#include <asm/sgi/sgint23.h> -#include <asm/sgialib.h> +#include <asm/addrspace.h> #include <asm/gdb-stub.h> -/* - * Linux has a controller-independent x86 interrupt architecture. - * every controller has a 'controller-template', that is used - * by the main code to do the right thing. Each driver-visible - * interrupt source is transparently wired to the apropriate - * controller. Thus drivers need not be aware of the - * interrupt-controller. - * - * Various interrupt controllers we handle: 8259 PIC, SMP IO-APIC, - * PIIX4's internal 8259 PIC and SGI's Visual Workstation Cobalt (IO-)APIC. - * (IO-APICs assumed to be messaging to Pentium local-APICs) - * - * the code is designed to be easily extended with new/different - * interrupt controllers, without having to do assembly magic. - */ +#include <asm/sgi/sgint23.h> +#include <asm/sgi/sgihpc.h> /* #define DEBUG_SGINT */ +#undef I_REALLY_NEED_THIS_IRQ struct sgi_int2_regs *sgi_i2regs; struct sgi_int3_regs *sgi_i3regs; @@ -68,30 +40,23 @@ static char lc3msk_to_irqnr[256]; extern asmlinkage void indyIRQ(void); - -/* Local IRQ's are layed out logically like this: - * - * 0 --> 7 == local 0 interrupts - * 8 --> 15 == local 1 interrupts - * 16 --> 23 == vectored level 2 interrupts - * 24 --> 31 == vectored level 3 interrupts (not used) - * 32 --> 40 == vectored GIO interrupts - * 41 --> 52 == vectored HPCDMA interrupts - */ +extern void do_IRQ(int irq, struct pt_regs *regs); static void enable_local0_irq(unsigned int irq) { unsigned long flags; save_and_cli(flags); - ioc_icontrol->imask0 |= (1 << (irq - SGINT_LOCAL0)); + /* don't allow mappable interrupt to be enabled from setup_irq, + * we have our own way to do so */ + if (irq != SGI_MAP_0_IRQ) + ioc_icontrol->imask0 |= (1 << (irq - SGINT_LOCAL0)); restore_flags(flags); } static unsigned int startup_local0_irq(unsigned int irq) { enable_local0_irq(irq); - return 0; /* Never anything pending */ } @@ -129,14 +94,16 @@ unsigned long flags; save_and_cli(flags); - ioc_icontrol->imask1 |= (1 << (irq - SGINT_LOCAL1)); + /* don't allow mappable interrupt to be enabled from setup_irq, + * we have our own way to do so */ + if (irq != SGI_MAP_1_IRQ) + ioc_icontrol->imask1 |= (1 << (irq - SGINT_LOCAL1)); restore_flags(flags); } static unsigned int startup_local1_irq(unsigned int irq) { enable_local1_irq(irq); - return 0; /* Never anything pending */ } @@ -145,7 +112,7 @@ unsigned long flags; save_and_cli(flags); - ioc_icontrol->imask1 &= ~(1 << (irq- SGINT_LOCAL1)); + ioc_icontrol->imask1 &= ~(1 << (irq - SGINT_LOCAL1)); restore_flags(flags); } @@ -174,7 +141,7 @@ unsigned long flags; save_and_cli(flags); - enable_local0_irq(7); + ioc_icontrol->imask0 |= (1 << (SGI_MAP_0_IRQ - SGINT_LOCAL0)); ioc_icontrol->cmeimask0 |= (1 << (irq - SGINT_LOCAL2)); restore_flags(flags); } @@ -182,7 +149,6 @@ static unsigned int startup_local2_irq(unsigned int irq) { enable_local2_irq(irq); - return 0; /* Never anything pending */ } @@ -192,6 +158,8 @@ save_and_cli(flags); ioc_icontrol->cmeimask0 &= ~(1 << (irq - SGINT_LOCAL2)); + if (!ioc_icontrol->cmeimask0) + ioc_icontrol->imask0 &= ~(1 << (SGI_MAP_0_IRQ - SGINT_LOCAL0)); restore_flags(flags); } @@ -217,18 +185,21 @@ static void enable_local3_irq(unsigned int irq) { +#ifdef I_REALLY_NEED_THIS_IRQ unsigned long flags; - + save_and_cli(flags); - printk("Yeeee, got passed irq_nr %d at enable_local3_irq\n", irq); - panic("Invalid IRQ level!"); + ioc_icontrol->imask1 |= (1 << (SGI_MAP_1_IRQ - SGINT_LOCAL1)); + ioc_icontrol->cmeimask1 |= (1 << (irq - SGINT_LOCAL3)); restore_flags(flags); +#else + panic("Who need local 3 irq? see indy_int.c\n"); +#endif } static unsigned int startup_local3_irq(unsigned int irq) { enable_local3_irq(irq); - return 0; /* Never anything pending */ } @@ -237,12 +208,9 @@ unsigned long flags; save_and_cli(flags); - /* - * This way we'll see if anyone would ever want vectored level 3 - * interrupts. Highly unlikely. - */ - printk("Yeeee, got passed irq_nr %d at disable_local3_irq\n", irq); - panic("Invalid IRQ level!"); + ioc_icontrol->cmeimask1 &= ~(1 << (irq - SGINT_LOCAL3)); + if (!ioc_icontrol->cmeimask1) + ioc_icontrol->imask1 &= ~(1 << (SGI_MAP_1_IRQ - SGINT_LOCAL1)); restore_flags(flags); } @@ -266,80 +234,6 @@ NULL }; -void enable_gio_irq(unsigned int irq) -{ - /* XXX TODO XXX */ -} - -static unsigned int startup_gio_irq(unsigned int irq) -{ - enable_gio_irq(irq); - - return 0; /* Never anything pending */ -} - -void disable_gio_irq(unsigned int irq) -{ - /* XXX TODO XXX */ -} - -#define shutdown_gio_irq disable_gio_irq -#define mask_and_ack_gio_irq disable_gio_irq - -static void end_gio_irq (unsigned int irq) -{ - if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) - enable_gio_irq(irq); -} - -static struct hw_interrupt_type ip22_gio_irq_type = { - "IP22 GIO", - startup_gio_irq, - shutdown_gio_irq, - enable_gio_irq, - disable_gio_irq, - mask_and_ack_gio_irq, - end_gio_irq, - NULL -}; - -void enable_hpcdma_irq(unsigned int irq) -{ - /* XXX TODO XXX */ -} - -static unsigned int startup_hpcdma_irq(unsigned int irq) -{ - enable_hpcdma_irq(irq); - - return 0; /* Never anything pending */ -} - -void disable_hpcdma_irq(unsigned int irq) -{ - /* XXX TODO XXX */ -} - -#define shutdown_hpcdma_irq disable_hpcdma_irq -#define mask_and_ack_hpcdma_irq disable_hpcdma_irq - -static void end_hpcdma_irq (unsigned int irq) -{ - if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) - enable_hpcdma_irq(irq); -} - -static struct hw_interrupt_type ip22_hpcdma_irq_type = { - "IP22 HPC DMA", - startup_hpcdma_irq, - shutdown_hpcdma_irq, - enable_hpcdma_irq, - disable_hpcdma_irq, - mask_and_ack_hpcdma_irq, - end_hpcdma_irq, - NULL -}; - void indy_local0_irqdispatch(struct pt_regs *regs) { unsigned char mask = ioc_icontrol->istat0; @@ -369,16 +263,17 @@ mask &= ioc_icontrol->imask1; if (mask & ISTAT1_LIO3) { - printk("WHee: Got an LIO3 irq, winging it...\n"); +#ifndef I_REALLY_NEED_THIS_IRQ + printk("Whee: Got an LIO3 irq, winging it...\n"); +#endif mask2 = ioc_icontrol->vmeistat; mask2 &= ioc_icontrol->cmeimask1; - irq = lc3msk_to_irqnr[ioc_icontrol->vmeistat]; + irq = lc3msk_to_irqnr[mask2]; } else { irq = lc1msk_to_irqnr[mask]; } /* if irq == 0, then the interrupt has already been cleared */ - /* not sure if it is needed here, but it is needed for local0 */ if (irq) do_IRQ(irq, regs); return; @@ -387,16 +282,33 @@ void indy_buserror_irq(struct pt_regs *regs) { int cpu = smp_processor_id(); - int irq = 6; + int irq = SGI_BUSERR_IRQ; irq_enter(cpu, irq); - kstat.irqs[0][irq]++; + kstat.irqs[cpu][irq]++; die("Got a bus error IRQ, shouldn't happen yet\n", regs); printk("Spinning...\n"); while(1); irq_exit(cpu, irq); } +static struct irqaction local0_cascade = + { no_action, SA_INTERRUPT, 0, "local0 cascade", NULL, NULL }; +static struct irqaction local1_cascade = + { no_action, SA_INTERRUPT, 0, "local1 cascade", NULL, NULL }; +static struct irqaction buserr = + { no_action, SA_INTERRUPT, 0, "Bus Error", NULL, NULL }; +static struct irqaction map0_cascade = + { no_action, SA_INTERRUPT, 0, "mappable0 cascade", NULL, NULL }; +#ifdef I_REALLY_NEED_THIS_IRQ +static struct irqaction map1_cascade = + { no_action, SA_INTERRUPT, 0, "mappable1 cascade", NULL, NULL }; +#endif + +extern int setup_irq(unsigned int irq, struct irqaction *irqaction); +extern void mips_cpu_irq_init(u32 irq_base); +extern void init_generic_irq(void); + void __init init_IRQ(void) { int i; @@ -407,45 +319,45 @@ /* Init local mask --> irq tables. */ for (i = 0; i < 256; i++) { if (i & 0x80) { - lc0msk_to_irqnr[i] = 7; - lc1msk_to_irqnr[i] = 15; - lc2msk_to_irqnr[i] = 23; - lc3msk_to_irqnr[i] = 31; + lc0msk_to_irqnr[i] = SGINT_LOCAL0 + 7; + lc1msk_to_irqnr[i] = SGINT_LOCAL1 + 7; + lc2msk_to_irqnr[i] = SGINT_LOCAL2 + 7; + lc3msk_to_irqnr[i] = SGINT_LOCAL3 + 7; } else if (i & 0x40) { - lc0msk_to_irqnr[i] = 6; - lc1msk_to_irqnr[i] = 14; - lc2msk_to_irqnr[i] = 22; - lc3msk_to_irqnr[i] = 30; + lc0msk_to_irqnr[i] = SGINT_LOCAL0 + 6; + lc1msk_to_irqnr[i] = SGINT_LOCAL1 + 6; + lc2msk_to_irqnr[i] = SGINT_LOCAL2 + 6; + lc3msk_to_irqnr[i] = SGINT_LOCAL3 + 6; } else if (i & 0x20) { - lc0msk_to_irqnr[i] = 5; - lc1msk_to_irqnr[i] = 13; - lc2msk_to_irqnr[i] = 21; - lc3msk_to_irqnr[i] = 29; + lc0msk_to_irqnr[i] = SGINT_LOCAL0 + 5; + lc1msk_to_irqnr[i] = SGINT_LOCAL1 + 5; + lc2msk_to_irqnr[i] = SGINT_LOCAL2 + 5; + lc3msk_to_irqnr[i] = SGINT_LOCAL3 + 5; } else if (i & 0x10) { - lc0msk_to_irqnr[i] = 4; - lc1msk_to_irqnr[i] = 12; - lc2msk_to_irqnr[i] = 20; - lc3msk_to_irqnr[i] = 28; + lc0msk_to_irqnr[i] = SGINT_LOCAL0 + 4; + lc1msk_to_irqnr[i] = SGINT_LOCAL1 + 4; + lc2msk_to_irqnr[i] = SGINT_LOCAL2 + 4; + lc3msk_to_irqnr[i] = SGINT_LOCAL3 + 4; } else if (i & 0x08) { - lc0msk_to_irqnr[i] = 3; - lc1msk_to_irqnr[i] = 11; - lc2msk_to_irqnr[i] = 19; - lc3msk_to_irqnr[i] = 27; + lc0msk_to_irqnr[i] = SGINT_LOCAL0 + 3; + lc1msk_to_irqnr[i] = SGINT_LOCAL1 + 3; + lc2msk_to_irqnr[i] = SGINT_LOCAL2 + 3; + lc3msk_to_irqnr[i] = SGINT_LOCAL3 + 3; } else if (i & 0x04) { - lc0msk_to_irqnr[i] = 2; - lc1msk_to_irqnr[i] = 10; - lc2msk_to_irqnr[i] = 18; - lc3msk_to_irqnr[i] = 26; + lc0msk_to_irqnr[i] = SGINT_LOCAL0 + 2; + lc1msk_to_irqnr[i] = SGINT_LOCAL1 + 2; + lc2msk_to_irqnr[i] = SGINT_LOCAL2 + 2; + lc3msk_to_irqnr[i] = SGINT_LOCAL3 + 2; } else if (i & 0x02) { - lc0msk_to_irqnr[i] = 1; - lc1msk_to_irqnr[i] = 9; - lc2msk_to_irqnr[i] = 17; - lc3msk_to_irqnr[i] = 25; + lc0msk_to_irqnr[i] = SGINT_LOCAL0 + 1; + lc1msk_to_irqnr[i] = SGINT_LOCAL1 + 1; + lc2msk_to_irqnr[i] = SGINT_LOCAL2 + 1; + lc3msk_to_irqnr[i] = SGINT_LOCAL3 + 1; } else if (i & 0x01) { - lc0msk_to_irqnr[i] = 0; - lc1msk_to_irqnr[i] = 8; - lc2msk_to_irqnr[i] = 16; - lc3msk_to_irqnr[i] = 24; + lc0msk_to_irqnr[i] = SGINT_LOCAL0 + 0; + lc1msk_to_irqnr[i] = SGINT_LOCAL1 + 0; + lc2msk_to_irqnr[i] = SGINT_LOCAL2 + 0; + lc3msk_to_irqnr[i] = SGINT_LOCAL3 + 0; } else { lc0msk_to_irqnr[i] = 0; lc1msk_to_irqnr[i] = 0; @@ -474,6 +386,8 @@ set_except_vector(0, indyIRQ); init_generic_irq(); + /* init CPU irqs */ + mips_cpu_irq_init(SGINT_CPU); for (i = SGINT_LOCAL0; i < SGINT_END; i++) { hw_irq_controller *handler; @@ -484,16 +398,23 @@ handler = &ip22_local1_irq_type; else if (i < SGINT_LOCAL3) handler = &ip22_local2_irq_type; - else if (i < SGINT_GIO) + else handler = &ip22_local3_irq_type; - else if (i < SGINT_HPCDMA) - handler = &ip22_gio_irq_type; - else if (i < SGINT_END) - handler = &ip22_hpcdma_irq_type; irq_desc[i].status = IRQ_DISABLED; irq_desc[i].action = 0; irq_desc[i].depth = 1; irq_desc[i].handler = handler; } + + /* vector handler. this register the IRQ as non-sharable */ + setup_irq(SGI_LOCAL_0_IRQ, &local0_cascade); + setup_irq(SGI_LOCAL_1_IRQ, &local1_cascade); + setup_irq(SGI_BUSERR_IRQ, &buserr); + + /* cascade in cascade. i love Indy ;-) */ + setup_irq(SGI_MAP_0_IRQ, &map0_cascade); +#ifdef I_REALLY_NEED_THIS_IRQ + setup_irq(SGI_MAP_1_IRQ, &map1_cascade); +#endif } |