Lines Matching +full:a +full:- +full:h
1 // SPDX-License-Identifier: GPL-2.0
2 #include <linux/linkage.h>
3 #include <linux/errno.h>
4 #include <linux/signal.h>
5 #include <linux/sched.h>
6 #include <linux/ioport.h>
7 #include <linux/interrupt.h>
8 #include <linux/irq.h>
9 #include <linux/timex.h>
10 #include <linux/random.h>
11 #include <linux/init.h>
12 #include <linux/kernel_stat.h>
13 #include <linux/syscore_ops.h>
14 #include <linux/bitops.h>
15 #include <linux/acpi.h>
16 #include <linux/io.h>
17 #include <linux/delay.h>
18 #include <linux/pgtable.h>
20 #include <linux/atomic.h>
21 #include <asm/timer.h>
22 #include <asm/hw_irq.h>
23 #include <asm/desc.h>
24 #include <asm/apic.h>
25 #include <asm/i8259.h>
28 * This is the 'legacy' 8259A Programmable Interrupt Controller,
40 * 8259A PIC functions to handle ISA devices:
44 * This contains the irq mask for both 8259A irq controllers,
49 * Not all IRQs can be routed through the IO-APIC, eg. on certain (older)
50 * boards the timer interrupt is not really connected to any IO-APIC pin,
51 * it's fed to the master 8259A's IR0 line only.
53 * Any '1' bit in this mask means the IRQ is routed through the IO-APIC.
75 mask_8259A_irq(data->irq); in disable_8259A_irq()
94 unmask_8259A_irq(data->irq); in enable_8259A_irq()
125 * 8259A registers is slow.
147 * Careful! The 8259A is a fragile beast, it pretty
154 unsigned int irq = data->irq; in mask_and_ack_8259A()
161 * to overdo spurious IRQ handling - it's usually a sign in mask_and_ack_8259A()
166 * usually resulting from the 8259A-1|2 PICs) occur in mask_and_ack_8259A()
167 * even if the IRQ is masked in the 8259A. Thus we in mask_and_ack_8259A()
168 * can check spurious 8259A IRQs without doing the in mask_and_ack_8259A()
180 inb(PIC_SLAVE_IMR); /* DUMMY - (do we need this?) */ in mask_and_ack_8259A()
184 /* 'Specific EOI' to master-IRQ2 */ in mask_and_ack_8259A()
187 inb(PIC_MASTER_IMR); /* DUMMY - (do we need this?) */ in mask_and_ack_8259A()
196 * this is the slow path - should happen rarely. in mask_and_ack_8259A()
201 * 8259A - not spurious, go handle it. in mask_and_ack_8259A()
213 "spurious 8259A interrupt: IRQ%d.\n", irq); in mask_and_ack_8259A()
227 .name = "XT-PIC",
263 /* Put the i8259A into a quiescent state that in i8259A_shutdown()
267 outb(0xff, PIC_MASTER_IMR); /* mask all of 8259A-1 */ in i8259A_shutdown()
268 outb(0xff, PIC_SLAVE_IMR); /* mask all of 8259A-2 */ in i8259A_shutdown()
283 outb(0xff, PIC_MASTER_IMR); /* mask all of 8259A-1 */ in mask_8259A()
284 outb(0xff, PIC_SLAVE_IMR); /* mask all of 8259A-2 */ in mask_8259A()
316 * there and let legacy_pic->init() initialize it for nothing. in probe_8259A()
326 * Check to see if we have a PIC. Mask all except the cascade and in probe_8259A()
327 * read back the value we just wrote. If we don't have a PIC, we in probe_8259A()
332 outb(0xff, PIC_SLAVE_IMR); /* mask all of 8259A-2 */ in probe_8259A()
352 outb(0xff, PIC_MASTER_IMR); /* mask all of 8259A-1 */ in init_8259A()
355 * outb_pic - this has to work on a wide range of PC hardware. in init_8259A()
357 outb_pic(0x11, PIC_MASTER_CMD); /* ICW1: select 8259A-1 init */ in init_8259A()
359 /* ICW2: 8259A-1 IR0-7 mapped to ISA_IRQ_VECTOR(0) */ in init_8259A()
362 /* 8259A-1 (the master) has a slave on IR2 */ in init_8259A()
370 outb_pic(0x11, PIC_SLAVE_CMD); /* ICW1: select 8259A-2 init */ in init_8259A()
372 /* ICW2: 8259A-2 IR0-7 mapped to ISA_IRQ_VECTOR(8) */ in init_8259A()
374 /* 8259A-2 is a slave on master's IR2 */ in init_8259A()
388 udelay(100); /* wait for 8259A to initialize */ in init_8259A()
397 * make i8259 a driver so that we can select pic functions at run time. the goal
398 * is to make x86 binary compatible among pc compatible and non-pc compatible