12 #include <linux/kernel.h>
13 #include <linux/types.h>
15 #include <linux/sched.h>
16 #include <linux/pci.h>
18 #include <linux/bitops.h>
20 #include <asm/ptrace.h>
24 #include <asm/mmu_context.h>
26 #include <asm/pgtable.h>
29 #include <asm/tlbflush.h>
37 static int cached_irq_mask;
40 noritake_update_irq_hw(
int irq,
int mask)
53 noritake_update_irq_hw(d->
irq, cached_irq_mask |= 1 << (d->
irq - 16));
59 noritake_update_irq_hw(d->
irq, cached_irq_mask &= ~(1 << (d->
irq - 16)));
62 static struct irq_chip noritake_irq_type = {
64 .irq_unmask = noritake_enable_irq,
65 .irq_mask = noritake_disable_irq,
66 .irq_mask_ack = noritake_disable_irq,
70 noritake_device_interrupt(
unsigned long vector)
76 pld = (((
unsigned long)
inw(0x54c) << 32)
77 | ((
unsigned long)
inw(0x54a) << 16)
78 | ((
unsigned long)
inb(0xa0) << 8)
97 noritake_srm_device_interrupt(
unsigned long vector)
101 irq = (vector - 0x800) >> 4;
119 noritake_init_irq(
void)
124 alpha_mv.device_interrupt = noritake_srm_device_interrupt;
129 for (i = 16; i < 48; ++
i) {
130 irq_set_chip_and_handler(i, &noritake_irq_type,
202 { 16+1, 16+1, 16+1, 16+1, 16+1},
203 { -1, -1, -1, -1, -1},
204 { -1, -1, -1, -1, -1},
205 { -1, -1, -1, -1, -1},
206 { -1, -1, -1, -1, -1},
207 { -1, -1, -1, -1, -1},
208 { 16+2, 16+2, 16+3, 32+2, 32+3},
209 { 16+4, 16+4, 16+5, 32+4, 32+5},
210 { 16+6, 16+6, 16+7, 32+6, 32+7},
211 { 16+8, 16+8, 16+9, 32+8, 32+9},
214 { 16+1, 16+1, 16+1, 16+1, 16+1},
215 { 16+8, 16+8, 16+9, 32+8, 32+9},
216 {16+10, 16+10, 16+11, 32+10, 32+11},
217 {16+12, 16+12, 16+13, 32+12, 32+13},
218 {16+14, 16+14, 16+15, 32+14, 32+15},
220 const long min_idsel = 5, max_idsel = 19, irqs_per_slot = 5;
229 if (dev->
bus->number == 0) {
247 dev = dev->
bus->self;
250 }
while (dev->
bus->self);
256 #if defined(CONFIG_ALPHA_GENERIC) || !defined(CONFIG_ALPHA_PRIMO)
258 noritake_apecs_machine_check(
unsigned long vector,
unsigned long la_ptr)
260 #define MCHK_NO_DEVSEL 0x205U
261 #define MCHK_NO_TABT 0x204U
266 mchk_header = (
struct el_common *)la_ptr;
276 code = mchk_header->
code;
279 && (code == MCHK_NO_DEVSEL
280 || code == MCHK_NO_TABT)));
289 #if defined(CONFIG_ALPHA_GENERIC) || !defined(CONFIG_ALPHA_PRIMO)
290 struct alpha_machine_vector noritake_mv
__initmv = {
291 .vector_name =
"Noritake",
295 .machine_check = noritake_apecs_machine_check,
301 .device_interrupt = noritake_device_interrupt,
304 .init_irq = noritake_init_irq,
307 .pci_map_irq = noritake_map_irq,
308 .pci_swizzle = noritake_swizzle,
313 #if defined(CONFIG_ALPHA_GENERIC) || defined(CONFIG_ALPHA_PRIMO)
314 struct alpha_machine_vector noritake_primo_mv __initmv = {
315 .vector_name =
"Noritake-Primo",
325 .device_interrupt = noritake_device_interrupt,
328 .init_irq = noritake_init_irq,
332 .pci_map_irq = noritake_map_irq,
333 .pci_swizzle = noritake_swizzle,