11 #include <linux/kernel.h>
12 #include <linux/types.h>
14 #include <linux/sched.h>
15 #include <linux/pci.h>
17 #include <linux/bitops.h>
19 #include <asm/ptrace.h>
23 #include <asm/mmu_context.h>
25 #include <asm/pgtable.h>
28 #include <asm/tlbflush.h>
37 static int cached_irq_mask;
40 mikasa_update_irq_hw(
int mask)
48 mikasa_update_irq_hw(cached_irq_mask |= 1 << (d->
irq - 16));
52 mikasa_disable_irq(
struct irq_data *d)
54 mikasa_update_irq_hw(cached_irq_mask &= ~(1 << (d->
irq - 16)));
57 static struct irq_chip mikasa_irq_type = {
59 .irq_unmask = mikasa_enable_irq,
60 .irq_mask = mikasa_disable_irq,
61 .irq_mask_ack = mikasa_disable_irq,
65 mikasa_device_interrupt(
unsigned long vector)
71 pld = (((~
inw(0x534) & 0x0000ffff
UL) << 16)
72 | (((
unsigned long)
inb(0xa0)) << 8)
98 mikasa_update_irq_hw(0);
100 for (i = 16; i < 32; ++
i) {
101 irq_set_chip_and_handler(i, &mikasa_irq_type,
153 {16+12, 16+12, 16+12, 16+12, 16+12},
154 { -1, -1, -1, -1, -1},
155 { -1, -1, -1, -1, -1},
156 { -1, -1, -1, -1, -1},
157 { -1, -1, -1, -1, -1},
158 { 16+0, 16+0, 16+1, 16+2, 16+3},
159 { 16+4, 16+4, 16+5, 16+6, 16+7},
160 { 16+8, 16+8, 16+9, 16+10, 16+11},
162 const long min_idsel = 6, max_idsel = 13, irqs_per_slot = 5;
167 #if defined(CONFIG_ALPHA_GENERIC) || !defined(CONFIG_ALPHA_PRIMO)
169 mikasa_apecs_machine_check(
unsigned long vector,
unsigned long la_ptr)
171 #define MCHK_NO_DEVSEL 0x205U
172 #define MCHK_NO_TABT 0x204U
177 mchk_header = (
struct el_common *)la_ptr;
187 code = mchk_header->
code;
190 && (code == MCHK_NO_DEVSEL
191 || code == MCHK_NO_TABT)));
200 #if defined(CONFIG_ALPHA_GENERIC) || !defined(CONFIG_ALPHA_PRIMO)
202 .vector_name =
"Mikasa",
206 .machine_check = mikasa_apecs_machine_check,
212 .device_interrupt = mikasa_device_interrupt,
215 .init_irq = mikasa_init_irq,
218 .pci_map_irq = mikasa_map_irq,
224 #if defined(CONFIG_ALPHA_GENERIC) || defined(CONFIG_ALPHA_PRIMO)
225 struct alpha_machine_vector mikasa_primo_mv __initmv = {
226 .vector_name =
"Mikasa-Primo",
236 .device_interrupt = mikasa_device_interrupt,
239 .init_irq = mikasa_init_irq,
243 .pci_map_irq = mikasa_map_irq,