Patch from: Andrey Panin This trivial patch exports some functions from 8259.c file. Visws subarch needs them to handle interrupts from legacy devices connected to PIIX4 i8259s, which are in turn connected to SGI Cobalt APIC. arch/i386/kernel/i8259.c | 9 +++------ include/asm-i386/i8259.h | 17 +++++++++++++++++ 2 files changed, 20 insertions(+), 6 deletions(-) diff -puN arch/i386/kernel/i8259.c~visws-2 arch/i386/kernel/i8259.c --- 25/arch/i386/kernel/i8259.c~visws-2 Fri Feb 14 14:18:54 2003 +++ 25-akpm/arch/i386/kernel/i8259.c Fri Feb 14 14:18:54 2003 @@ -22,6 +22,7 @@ #include #include #include +#include #include @@ -47,7 +48,7 @@ static void end_8259A_irq (unsigned int void mask_and_ack_8259A(unsigned int); -static unsigned int startup_8259A_irq(unsigned int irq) +unsigned int startup_8259A_irq(unsigned int irq) { enable_8259A_irq(irq); return 0; /* never anything pending */ @@ -71,11 +72,7 @@ static struct hw_interrupt_type i8259A_i /* * This contains the irq mask for both 8259A irq controllers, */ -static unsigned int cached_irq_mask = 0xffff; - -#define __byte(x,y) (((unsigned char *)&(y))[x]) -#define cached_21 (__byte(0,cached_irq_mask)) -#define cached_A1 (__byte(1,cached_irq_mask)) +unsigned int cached_irq_mask = 0xffff; /* * Not all IRQs can be routed through the IO-APIC, eg. on certain (older) diff -puN /dev/null include/asm-i386/i8259.h --- /dev/null Thu Apr 11 07:25:15 2002 +++ 25-akpm/include/asm-i386/i8259.h Fri Feb 14 14:18:54 2003 @@ -0,0 +1,17 @@ +#ifndef __ASM_I8259_H__ +#define __ASM_I8259_H__ + +extern unsigned int cached_irq_mask; + +#define __byte(x,y) (((unsigned char *) &(y))[x]) +#define cached_21 (__byte(0, cached_irq_mask)) +#define cached_A1 (__byte(1, cached_irq_mask)) + +extern spinlock_t i8259A_lock; + +extern void init_8259A(int auto_eoi); +extern void enable_8259A_irq(unsigned int irq); +extern void disable_8259A_irq(unsigned int irq); +extern unsigned int startup_8259A_irq(unsigned int irq); + +#endif /* __ASM_I8259_H__ */ _