aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k
diff options
context:
space:
mode:
Diffstat (limited to 'arch/m68k')
-rw-r--r--arch/m68k/mac/baboon.c2
-rw-r--r--arch/m68k/mac/config.c5
-rw-r--r--arch/m68k/mac/iop.c2
-rw-r--r--arch/m68k/mac/macints.c496
-rw-r--r--arch/m68k/mac/oss.c14
-rw-r--r--arch/m68k/mac/psc.c10
-rw-r--r--arch/m68k/mac/via.c18
7 files changed, 150 insertions, 397 deletions
diff --git a/arch/m68k/mac/baboon.c b/arch/m68k/mac/baboon.c
index b19b7dd9bd21..6eaa881793d1 100644
--- a/arch/m68k/mac/baboon.c
+++ b/arch/m68k/mac/baboon.c
@@ -81,7 +81,7 @@ irqreturn_t baboon_irq(int irq, void *dev_id, struct pt_regs *regs)
81 for (i = 0, irq_bit = 1 ; i < 3 ; i++, irq_bit <<= 1) { 81 for (i = 0, irq_bit = 1 ; i < 3 ; i++, irq_bit <<= 1) {
82 if (events & irq_bit/* & baboon_active*/) { 82 if (events & irq_bit/* & baboon_active*/) {
83 baboon_active &= ~irq_bit; 83 baboon_active &= ~irq_bit;
84 mac_do_irq_list(IRQ_BABOON_0 + i, regs); 84 m68k_handle_int(IRQ_BABOON_0 + i, regs);
85 baboon_active |= irq_bit; 85 baboon_active |= irq_bit;
86 baboon->mb_ifr &= ~irq_bit; 86 baboon->mb_ifr &= ~irq_bit;
87 } 87 }
diff --git a/arch/m68k/mac/config.c b/arch/m68k/mac/config.c
index 7e04f2a695c0..5a9990e436bb 100644
--- a/arch/m68k/mac/config.c
+++ b/arch/m68k/mac/config.c
@@ -169,12 +169,7 @@ void __init config_mac(void)
169 169
170 mach_sched_init = mac_sched_init; 170 mach_sched_init = mac_sched_init;
171 mach_init_IRQ = mac_init_IRQ; 171 mach_init_IRQ = mac_init_IRQ;
172 mach_request_irq = mac_request_irq;
173 mach_free_irq = mac_free_irq;
174 enable_irq = mac_enable_irq;
175 disable_irq = mac_disable_irq;
176 mach_get_model = mac_get_model; 172 mach_get_model = mac_get_model;
177 mach_get_irq_list = show_mac_interrupts;
178 mach_gettimeoffset = mac_gettimeoffset; 173 mach_gettimeoffset = mac_gettimeoffset;
179#warning move to adb/via init 174#warning move to adb/via init
180#if 0 175#if 0
diff --git a/arch/m68k/mac/iop.c b/arch/m68k/mac/iop.c
index 9179a3798407..4c8ece7e64a3 100644
--- a/arch/m68k/mac/iop.c
+++ b/arch/m68k/mac/iop.c
@@ -317,7 +317,7 @@ void __init iop_register_interrupts(void)
317{ 317{
318 if (iop_ism_present) { 318 if (iop_ism_present) {
319 if (oss_present) { 319 if (oss_present) {
320 cpu_request_irq(OSS_IRQLEV_IOPISM, iop_ism_irq, 320 request_irq(OSS_IRQLEV_IOPISM, iop_ism_irq,
321 IRQ_FLG_LOCK, "ISM IOP", 321 IRQ_FLG_LOCK, "ISM IOP",
322 (void *) IOP_NUM_ISM); 322 (void *) IOP_NUM_ISM);
323 oss_irq_enable(IRQ_MAC_ADB); 323 oss_irq_enable(IRQ_MAC_ADB);
diff --git a/arch/m68k/mac/macints.c b/arch/m68k/mac/macints.c
index 73b39cd3f94c..694b14bb0de1 100644
--- a/arch/m68k/mac/macints.c
+++ b/arch/m68k/mac/macints.c
@@ -137,14 +137,6 @@
137#define DEBUG_SPURIOUS 137#define DEBUG_SPURIOUS
138#define SHUTUP_SONIC 138#define SHUTUP_SONIC
139 139
140/*
141 * The mac_irq_list array is an array of linked lists of irq_node_t nodes.
142 * Each node contains one handler to be called whenever the interrupt
143 * occurs, with fast handlers listed before slow handlers.
144 */
145
146irq_node_t *mac_irq_list[NUM_MAC_SOURCES];
147
148/* SCC interrupt mask */ 140/* SCC interrupt mask */
149 141
150static int scc_mask; 142static int scc_mask;
@@ -209,8 +201,8 @@ extern int baboon_irq_pending(int);
209 * SCC interrupt routines 201 * SCC interrupt routines
210 */ 202 */
211 203
212static void scc_irq_enable(int); 204static void scc_irq_enable(unsigned int);
213static void scc_irq_disable(int); 205static void scc_irq_disable(unsigned int);
214 206
215/* 207/*
216 * console_loglevel determines NMI handler function 208 * console_loglevel determines NMI handler function
@@ -221,21 +213,25 @@ irqreturn_t mac_debug_handler(int, void *, struct pt_regs *);
221 213
222/* #define DEBUG_MACINTS */ 214/* #define DEBUG_MACINTS */
223 215
216static void mac_enable_irq(unsigned int irq);
217static void mac_disable_irq(unsigned int irq);
218
219static struct irq_controller mac_irq_controller = {
220 .name = "mac",
221 .lock = SPIN_LOCK_UNLOCKED,
222 .enable = mac_enable_irq,
223 .disable = mac_disable_irq,
224};
225
224void mac_init_IRQ(void) 226void mac_init_IRQ(void)
225{ 227{
226 int i;
227
228#ifdef DEBUG_MACINTS 228#ifdef DEBUG_MACINTS
229 printk("mac_init_IRQ(): Setting things up...\n"); 229 printk("mac_init_IRQ(): Setting things up...\n");
230#endif 230#endif
231 /* Initialize the IRQ handler lists. Initially each list is empty, */
232
233 for (i = 0; i < NUM_MAC_SOURCES; i++) {
234 mac_irq_list[i] = NULL;
235 }
236
237 scc_mask = 0; 231 scc_mask = 0;
238 232
233 m68k_setup_irq_controller(&mac_irq_controller, IRQ_USER,
234 NUM_MAC_SOURCES - IRQ_USER);
239 /* Make sure the SONIC interrupt is cleared or things get ugly */ 235 /* Make sure the SONIC interrupt is cleared or things get ugly */
240#ifdef SHUTUP_SONIC 236#ifdef SHUTUP_SONIC
241 printk("Killing onboard sonic... "); 237 printk("Killing onboard sonic... ");
@@ -252,15 +248,16 @@ void mac_init_IRQ(void)
252 * at levels 1-7. Most of the work is done elsewhere. 248 * at levels 1-7. Most of the work is done elsewhere.
253 */ 249 */
254 250
255 if (oss_present) { 251 if (oss_present)
256 oss_register_interrupts(); 252 oss_register_interrupts();
257 } else { 253 else
258 via_register_interrupts(); 254 via_register_interrupts();
259 } 255 if (psc_present)
260 if (psc_present) psc_register_interrupts(); 256 psc_register_interrupts();
261 if (baboon_present) baboon_register_interrupts(); 257 if (baboon_present)
258 baboon_register_interrupts();
262 iop_register_interrupts(); 259 iop_register_interrupts();
263 cpu_request_irq(7, mac_nmi_handler, IRQ_FLG_LOCK, "NMI", 260 request_irq(IRQ_AUTO_7, mac_nmi_handler, 0, "NMI",
264 mac_nmi_handler); 261 mac_nmi_handler);
265#ifdef DEBUG_MACINTS 262#ifdef DEBUG_MACINTS
266 printk("mac_init_IRQ(): Done!\n"); 263 printk("mac_init_IRQ(): Done!\n");
@@ -268,104 +265,6 @@ void mac_init_IRQ(void)
268} 265}
269 266
270/* 267/*
271 * Routines to work with irq_node_t's on linked lists lifted from
272 * the Amiga code written by Roman Zippel.
273 */
274
275static inline void mac_insert_irq(irq_node_t **list, irq_node_t *node)
276{
277 unsigned long flags;
278 irq_node_t *cur;
279
280 if (!node->dev_id)
281 printk("%s: Warning: dev_id of %s is zero\n",
282 __FUNCTION__, node->devname);
283
284 local_irq_save(flags);
285
286 cur = *list;
287
288 if (node->flags & IRQ_FLG_FAST) {
289 node->flags &= ~IRQ_FLG_SLOW;
290 while (cur && cur->flags & IRQ_FLG_FAST) {
291 list = &cur->next;
292 cur = cur->next;
293 }
294 } else if (node->flags & IRQ_FLG_SLOW) {
295 while (cur) {
296 list = &cur->next;
297 cur = cur->next;
298 }
299 } else {
300 while (cur && !(cur->flags & IRQ_FLG_SLOW)) {
301 list = &cur->next;
302 cur = cur->next;
303 }
304 }
305
306 node->next = cur;
307 *list = node;
308
309 local_irq_restore(flags);
310}
311
312static inline void mac_delete_irq(irq_node_t **list, void *dev_id)
313{
314 unsigned long flags;
315 irq_node_t *node;
316
317 local_irq_save(flags);
318
319 for (node = *list; node; list = &node->next, node = *list) {
320 if (node->dev_id == dev_id) {
321 *list = node->next;
322 /* Mark it as free. */
323 node->handler = NULL;
324 local_irq_restore(flags);
325 return;
326 }
327 }
328 local_irq_restore(flags);
329 printk ("%s: tried to remove invalid irq\n", __FUNCTION__);
330}
331
332/*
333 * Call all the handlers for a given interrupt. Fast handlers are called
334 * first followed by slow handlers.
335 *
336 * This code taken from the original Amiga code written by Roman Zippel.
337 */
338
339void mac_do_irq_list(int irq, struct pt_regs *fp)
340{
341 irq_node_t *node, *slow_nodes;
342 unsigned long flags;
343
344 kstat_cpu(0).irqs[irq]++;
345
346#ifdef DEBUG_SPURIOUS
347 if (!mac_irq_list[irq] && (console_loglevel > 7)) {
348 printk("mac_do_irq_list: spurious interrupt %d!\n", irq);
349 return;
350 }
351#endif
352
353 /* serve first fast and normal handlers */
354 for (node = mac_irq_list[irq];
355 node && (!(node->flags & IRQ_FLG_SLOW));
356 node = node->next)
357 node->handler(irq, node->dev_id, fp);
358 if (!node) return;
359 local_save_flags(flags);
360 local_irq_restore((flags & ~0x0700) | (fp->sr & 0x0700));
361 /* if slow handlers exists, serve them now */
362 slow_nodes = node;
363 for (; node; node = node->next) {
364 node->handler(irq, node->dev_id, fp);
365 }
366}
367
368/*
369 * mac_enable_irq - enable an interrupt source 268 * mac_enable_irq - enable an interrupt source
370 * mac_disable_irq - disable an interrupt source 269 * mac_disable_irq - disable an interrupt source
371 * mac_clear_irq - clears a pending interrupt 270 * mac_clear_irq - clears a pending interrupt
@@ -374,265 +273,120 @@ void mac_do_irq_list(int irq, struct pt_regs *fp)
374 * These routines are just dispatchers to the VIA/OSS/PSC routines. 273 * These routines are just dispatchers to the VIA/OSS/PSC routines.
375 */ 274 */
376 275
377void mac_enable_irq (unsigned int irq) 276static void mac_enable_irq(unsigned int irq)
378{ 277{
379 int irq_src = IRQ_SRC(irq); 278 int irq_src = IRQ_SRC(irq);
380 279
381 switch(irq_src) { 280 switch(irq_src) {
382 case 1: via_irq_enable(irq); 281 case 1:
383 break; 282 via_irq_enable(irq);
384 case 2: 283 break;
385 case 7: if (oss_present) { 284 case 2:
386 oss_irq_enable(irq); 285 case 7:
387 } else { 286 if (oss_present)
388 via_irq_enable(irq); 287 oss_irq_enable(irq);
389 } 288 else
390 break; 289 via_irq_enable(irq);
391 case 3: 290 break;
392 case 4: 291 case 3:
393 case 5: 292 case 4:
394 case 6: if (psc_present) { 293 case 5:
395 psc_irq_enable(irq); 294 case 6:
396 } else if (oss_present) { 295 if (psc_present)
397 oss_irq_enable(irq); 296 psc_irq_enable(irq);
398 } else if (irq_src == 4) { 297 else if (oss_present)
399 scc_irq_enable(irq); 298 oss_irq_enable(irq);
400 } 299 else if (irq_src == 4)
401 break; 300 scc_irq_enable(irq);
402 case 8: if (baboon_present) { 301 break;
403 baboon_irq_enable(irq); 302 case 8:
404 } 303 if (baboon_present)
405 break; 304 baboon_irq_enable(irq);
305 break;
406 } 306 }
407} 307}
408 308
409void mac_disable_irq (unsigned int irq) 309static void mac_disable_irq(unsigned int irq)
410{ 310{
411 int irq_src = IRQ_SRC(irq); 311 int irq_src = IRQ_SRC(irq);
412 312
413 switch(irq_src) { 313 switch(irq_src) {
414 case 1: via_irq_disable(irq); 314 case 1:
415 break; 315 via_irq_disable(irq);
416 case 2: 316 break;
417 case 7: if (oss_present) { 317 case 2:
418 oss_irq_disable(irq); 318 case 7:
419 } else { 319 if (oss_present)
420 via_irq_disable(irq); 320 oss_irq_disable(irq);
421 } 321 else
422 break; 322 via_irq_disable(irq);
423 case 3: 323 break;
424 case 4: 324 case 3:
425 case 5: 325 case 4:
426 case 6: if (psc_present) { 326 case 5:
427 psc_irq_disable(irq); 327 case 6:
428 } else if (oss_present) { 328 if (psc_present)
429 oss_irq_disable(irq); 329 psc_irq_disable(irq);
430 } else if (irq_src == 4) { 330 else if (oss_present)
431 scc_irq_disable(irq); 331 oss_irq_disable(irq);
432 } 332 else if (irq_src == 4)
433 break; 333 scc_irq_disable(irq);
434 case 8: if (baboon_present) { 334 break;
435 baboon_irq_disable(irq); 335 case 8:
436 } 336 if (baboon_present)
437 break; 337 baboon_irq_disable(irq);
338 break;
438 } 339 }
439} 340}
440 341
441void mac_clear_irq( unsigned int irq ) 342void mac_clear_irq(unsigned int irq)
442{ 343{
443 switch(IRQ_SRC(irq)) { 344 switch(IRQ_SRC(irq)) {
444 case 1: via_irq_clear(irq); 345 case 1:
445 break; 346 via_irq_clear(irq);
446 case 2: 347 break;
447 case 7: if (oss_present) { 348 case 2:
448 oss_irq_clear(irq); 349 case 7:
449 } else { 350 if (oss_present)
450 via_irq_clear(irq); 351 oss_irq_clear(irq);
451 } 352 else
452 break; 353 via_irq_clear(irq);
453 case 3: 354 break;
454 case 4: 355 case 3:
455 case 5: 356 case 4:
456 case 6: if (psc_present) { 357 case 5:
457 psc_irq_clear(irq); 358 case 6:
458 } else if (oss_present) { 359 if (psc_present)
459 oss_irq_clear(irq); 360 psc_irq_clear(irq);
460 } 361 else if (oss_present)
461 break; 362 oss_irq_clear(irq);
462 case 8: if (baboon_present) { 363 break;
463 baboon_irq_clear(irq); 364 case 8:
464 } 365 if (baboon_present)
465 break; 366 baboon_irq_clear(irq);
367 break;
466 } 368 }
467} 369}
468 370
469int mac_irq_pending( unsigned int irq ) 371int mac_irq_pending(unsigned int irq)
470{ 372{
471 switch(IRQ_SRC(irq)) { 373 switch(IRQ_SRC(irq)) {
472 case 1: return via_irq_pending(irq); 374 case 1:
473 case 2: 375 return via_irq_pending(irq);
474 case 7: if (oss_present) { 376 case 2:
475 return oss_irq_pending(irq); 377 case 7:
476 } else { 378 if (oss_present)
477 return via_irq_pending(irq); 379 return oss_irq_pending(irq);
478 } 380 else
479 case 3: 381 return via_irq_pending(irq);
480 case 4: 382 case 3:
481 case 5: 383 case 4:
482 case 6: if (psc_present) { 384 case 5:
483 return psc_irq_pending(irq); 385 case 6:
484 } else if (oss_present) { 386 if (psc_present)
485 return oss_irq_pending(irq); 387 return psc_irq_pending(irq);
486 } 388 else if (oss_present)
487 } 389 return oss_irq_pending(irq);
488 return 0;
489}
490
491/*
492 * Add an interrupt service routine to an interrupt source.
493 * Returns 0 on success.
494 *
495 * FIXME: You can register interrupts on nonexistent source (ie PSC4 on a
496 * non-PSC machine). We should return -EINVAL in those cases.
497 */
498
499int mac_request_irq(unsigned int irq,
500 irqreturn_t (*handler)(int, void *, struct pt_regs *),
501 unsigned long flags, const char *devname, void *dev_id)
502{
503 irq_node_t *node;
504
505#ifdef DEBUG_MACINTS
506 printk ("%s: irq %d requested for %s\n", __FUNCTION__, irq, devname);
507#endif
508
509 if (irq < VIA1_SOURCE_BASE) {
510 return cpu_request_irq(irq, handler, flags, devname, dev_id);
511 }
512
513 if (irq >= NUM_MAC_SOURCES) {
514 printk ("%s: unknown irq %d requested by %s\n",
515 __FUNCTION__, irq, devname);
516 }
517
518 /* Get a node and stick it onto the right list */
519
520 if (!(node = new_irq_node())) return -ENOMEM;
521
522 node->handler = handler;
523 node->flags = flags;
524 node->dev_id = dev_id;
525 node->devname = devname;
526 node->next = NULL;
527 mac_insert_irq(&mac_irq_list[irq], node);
528
529 /* Now enable the IRQ source */
530
531 mac_enable_irq(irq);
532
533 return 0;
534}
535
536/*
537 * Removes an interrupt service routine from an interrupt source.
538 */
539
540void mac_free_irq(unsigned int irq, void *dev_id)
541{
542#ifdef DEBUG_MACINTS
543 printk ("%s: irq %d freed by %p\n", __FUNCTION__, irq, dev_id);
544#endif
545
546 if (irq < VIA1_SOURCE_BASE) {
547 cpu_free_irq(irq, dev_id);
548 return;
549 }
550
551 if (irq >= NUM_MAC_SOURCES) {
552 printk ("%s: unknown irq %d freed\n",
553 __FUNCTION__, irq);
554 return;
555 }
556
557 mac_delete_irq(&mac_irq_list[irq], dev_id);
558
559 /* If the list for this interrupt is */
560 /* empty then disable the source. */
561
562 if (!mac_irq_list[irq]) {
563 mac_disable_irq(irq);
564 }
565}
566
567/*
568 * Generate a pretty listing for /proc/interrupts
569 *
570 * By the time we're called the autovector interrupt list has already been
571 * generated, so we just need to do the machspec interrupts.
572 *
573 * 990506 (jmt) - rewritten to handle chained machspec interrupt handlers.
574 * Also removed display of num_spurious it is already
575 * displayed for us as autovector irq 0.
576 */
577
578int show_mac_interrupts(struct seq_file *p, void *v)
579{
580 int i;
581 irq_node_t *node;
582 char *base;
583
584 /* Don't do Nubus interrupts in this loop; we do them separately */
585 /* below so that we can print slot numbers instead of IRQ numbers */
586
587 for (i = VIA1_SOURCE_BASE ; i < NUM_MAC_SOURCES ; ++i) {
588
589 /* Nonexistant interrupt or nothing registered; skip it. */
590
591 if ((node = mac_irq_list[i]) == NULL) continue;
592 if (node->flags & IRQ_FLG_STD) continue;
593
594 base = "";
595 switch(IRQ_SRC(i)) {
596 case 1: base = "via1";
597 break;
598 case 2: if (oss_present) {
599 base = "oss";
600 } else {
601 base = "via2";
602 }
603 break;
604 case 3:
605 case 4:
606 case 5:
607 case 6: if (psc_present) {
608 base = "psc";
609 } else if (oss_present) {
610 base = "oss";
611 } else {
612 if (IRQ_SRC(i) == 4) base = "scc";
613 }
614 break;
615 case 7: base = "nbus";
616 break;
617 case 8: base = "bbn";
618 break;
619 }
620 seq_printf(p, "%4s %2d: %10u ", base, i, kstat_cpu(0).irqs[i]);
621
622 do {
623 if (node->flags & IRQ_FLG_FAST) {
624 seq_puts(p, "F ");
625 } else if (node->flags & IRQ_FLG_SLOW) {
626 seq_puts(p, "S ");
627 } else {
628 seq_puts(p, " ");
629 }
630 seq_printf(p, "%s\n", node->devname);
631 if ((node = node->next)) {
632 seq_puts(p, " ");
633 }
634 } while(node);
635
636 } 390 }
637 return 0; 391 return 0;
638} 392}
@@ -676,7 +430,7 @@ irqreturn_t mac_nmi_handler(int irq, void *dev_id, struct pt_regs *fp)
676 while (nmi_hold == 1) 430 while (nmi_hold == 1)
677 udelay(1000); 431 udelay(1000);
678 432
679 if ( console_loglevel >= 8 ) { 433 if (console_loglevel >= 8) {
680#if 0 434#if 0
681 show_state(); 435 show_state();
682 printk("PC: %08lx\nSR: %04x SP: %p\n", fp->pc, fp->sr, fp); 436 printk("PC: %08lx\nSR: %04x SP: %p\n", fp->pc, fp->sr, fp);
@@ -705,14 +459,16 @@ irqreturn_t mac_nmi_handler(int irq, void *dev_id, struct pt_regs *fp)
705 * done in hardware (only the PSC can do that.) 459 * done in hardware (only the PSC can do that.)
706 */ 460 */
707 461
708static void scc_irq_enable(int irq) { 462static void scc_irq_enable(unsigned int irq)
709 int irq_idx = IRQ_IDX(irq); 463{
464 int irq_idx = IRQ_IDX(irq);
710 465
711 scc_mask |= (1 << irq_idx); 466 scc_mask |= (1 << irq_idx);
712} 467}
713 468
714static void scc_irq_disable(int irq) { 469static void scc_irq_disable(unsigned int irq)
715 int irq_idx = IRQ_IDX(irq); 470{
471 int irq_idx = IRQ_IDX(irq);
716 472
717 scc_mask &= ~(1 << irq_idx); 473 scc_mask &= ~(1 << irq_idx);
718} 474}
@@ -747,6 +503,8 @@ void mac_scc_dispatch(int irq, void *dev_id, struct pt_regs *regs)
747 /* and since they're autovector interrupts they */ 503 /* and since they're autovector interrupts they */
748 /* pretty much kill the system. */ 504 /* pretty much kill the system. */
749 505
750 if (reg & 0x38) mac_do_irq_list(IRQ_SCCA, regs); 506 if (reg & 0x38)
751 if (reg & 0x07) mac_do_irq_list(IRQ_SCCB, regs); 507 m68k_handle_int(IRQ_SCCA, regs);
508 if (reg & 0x07)
509 m68k_handle_int(IRQ_SCCB, regs);
752} 510}
diff --git a/arch/m68k/mac/oss.c b/arch/m68k/mac/oss.c
index 333547692724..63e04365191f 100644
--- a/arch/m68k/mac/oss.c
+++ b/arch/m68k/mac/oss.c
@@ -67,15 +67,15 @@ void __init oss_init(void)
67 67
68void __init oss_register_interrupts(void) 68void __init oss_register_interrupts(void)
69{ 69{
70 cpu_request_irq(OSS_IRQLEV_SCSI, oss_irq, IRQ_FLG_LOCK, 70 request_irq(OSS_IRQLEV_SCSI, oss_irq, IRQ_FLG_LOCK,
71 "scsi", (void *) oss); 71 "scsi", (void *) oss);
72 cpu_request_irq(OSS_IRQLEV_IOPSCC, mac_scc_dispatch, IRQ_FLG_LOCK, 72 request_irq(OSS_IRQLEV_IOPSCC, mac_scc_dispatch, IRQ_FLG_LOCK,
73 "scc", mac_scc_dispatch); 73 "scc", mac_scc_dispatch);
74 cpu_request_irq(OSS_IRQLEV_NUBUS, oss_nubus_irq, IRQ_FLG_LOCK, 74 request_irq(OSS_IRQLEV_NUBUS, oss_nubus_irq, IRQ_FLG_LOCK,
75 "nubus", (void *) oss); 75 "nubus", (void *) oss);
76 cpu_request_irq(OSS_IRQLEV_SOUND, oss_irq, IRQ_FLG_LOCK, 76 request_irq(OSS_IRQLEV_SOUND, oss_irq, IRQ_FLG_LOCK,
77 "sound", (void *) oss); 77 "sound", (void *) oss);
78 cpu_request_irq(OSS_IRQLEV_VIA1, via1_irq, IRQ_FLG_LOCK, 78 request_irq(OSS_IRQLEV_VIA1, via1_irq, IRQ_FLG_LOCK,
79 "via1", (void *) via1); 79 "via1", (void *) via1);
80} 80}
81 81
@@ -113,7 +113,7 @@ irqreturn_t oss_irq(int irq, void *dev_id, struct pt_regs *regs)
113 oss->irq_pending &= ~OSS_IP_SOUND; 113 oss->irq_pending &= ~OSS_IP_SOUND;
114 } else if (events & OSS_IP_SCSI) { 114 } else if (events & OSS_IP_SCSI) {
115 oss->irq_level[OSS_SCSI] = OSS_IRQLEV_DISABLED; 115 oss->irq_level[OSS_SCSI] = OSS_IRQLEV_DISABLED;
116 mac_do_irq_list(IRQ_MAC_SCSI, regs); 116 m68k_handle_int(IRQ_MAC_SCSI, regs);
117 oss->irq_pending &= ~OSS_IP_SCSI; 117 oss->irq_pending &= ~OSS_IP_SCSI;
118 oss->irq_level[OSS_SCSI] = OSS_IRQLEV_SCSI; 118 oss->irq_level[OSS_SCSI] = OSS_IRQLEV_SCSI;
119 } else { 119 } else {
@@ -146,7 +146,7 @@ irqreturn_t oss_nubus_irq(int irq, void *dev_id, struct pt_regs *regs)
146 for (i = 0, irq_bit = 1 ; i < 6 ; i++, irq_bit <<= 1) { 146 for (i = 0, irq_bit = 1 ; i < 6 ; i++, irq_bit <<= 1) {
147 if (events & irq_bit) { 147 if (events & irq_bit) {
148 oss->irq_level[i] = OSS_IRQLEV_DISABLED; 148 oss->irq_level[i] = OSS_IRQLEV_DISABLED;
149 mac_do_irq_list(NUBUS_SOURCE_BASE + i, regs); 149 m68k_handle_int(NUBUS_SOURCE_BASE + i, regs);
150 oss->irq_pending &= ~irq_bit; 150 oss->irq_pending &= ~irq_bit;
151 oss->irq_level[i] = OSS_IRQLEV_NUBUS; 151 oss->irq_level[i] = OSS_IRQLEV_NUBUS;
152 } 152 }
diff --git a/arch/m68k/mac/psc.c b/arch/m68k/mac/psc.c
index e72384e43a1e..e26218091755 100644
--- a/arch/m68k/mac/psc.c
+++ b/arch/m68k/mac/psc.c
@@ -117,10 +117,10 @@ void __init psc_init(void)
117 117
118void __init psc_register_interrupts(void) 118void __init psc_register_interrupts(void)
119{ 119{
120 cpu_request_irq(3, psc_irq, IRQ_FLG_LOCK, "psc3", (void *) 0x30); 120 request_irq(IRQ_AUTO_3, psc_irq, 0, "psc3", (void *) 0x30);
121 cpu_request_irq(4, psc_irq, IRQ_FLG_LOCK, "psc4", (void *) 0x40); 121 request_irq(IRQ_AUTO_4, psc_irq, 0, "psc4", (void *) 0x40);
122 cpu_request_irq(5, psc_irq, IRQ_FLG_LOCK, "psc5", (void *) 0x50); 122 request_irq(IRQ_AUTO_5, psc_irq, 0, "psc5", (void *) 0x50);
123 cpu_request_irq(6, psc_irq, IRQ_FLG_LOCK, "psc6", (void *) 0x60); 123 request_irq(IRQ_AUTO_6, psc_irq, 0, "psc6", (void *) 0x60);
124} 124}
125 125
126/* 126/*
@@ -149,7 +149,7 @@ irqreturn_t psc_irq(int irq, void *dev_id, struct pt_regs *regs)
149 for (i = 0, irq_bit = 1 ; i < 4 ; i++, irq_bit <<= 1) { 149 for (i = 0, irq_bit = 1 ; i < 4 ; i++, irq_bit <<= 1) {
150 if (events & irq_bit) { 150 if (events & irq_bit) {
151 psc_write_byte(pIER, irq_bit); 151 psc_write_byte(pIER, irq_bit);
152 mac_do_irq_list(base_irq + i, regs); 152 m68k_handle_int(base_irq + i, regs);
153 psc_write_byte(pIFR, irq_bit); 153 psc_write_byte(pIFR, irq_bit);
154 psc_write_byte(pIER, irq_bit | 0x80); 154 psc_write_byte(pIER, irq_bit | 0x80);
155 } 155 }
diff --git a/arch/m68k/mac/via.c b/arch/m68k/mac/via.c
index a6e3814c8666..c4aa345d544e 100644
--- a/arch/m68k/mac/via.c
+++ b/arch/m68k/mac/via.c
@@ -253,21 +253,21 @@ void __init via_init_clock(irqreturn_t (*func)(int, void *, struct pt_regs *))
253void __init via_register_interrupts(void) 253void __init via_register_interrupts(void)
254{ 254{
255 if (via_alt_mapping) { 255 if (via_alt_mapping) {
256 cpu_request_irq(IRQ_AUTO_1, via1_irq, 256 request_irq(IRQ_AUTO_1, via1_irq,
257 IRQ_FLG_LOCK|IRQ_FLG_FAST, "software", 257 IRQ_FLG_LOCK|IRQ_FLG_FAST, "software",
258 (void *) via1); 258 (void *) via1);
259 cpu_request_irq(IRQ_AUTO_6, via1_irq, 259 request_irq(IRQ_AUTO_6, via1_irq,
260 IRQ_FLG_LOCK|IRQ_FLG_FAST, "via1", 260 IRQ_FLG_LOCK|IRQ_FLG_FAST, "via1",
261 (void *) via1); 261 (void *) via1);
262 } else { 262 } else {
263 cpu_request_irq(IRQ_AUTO_1, via1_irq, 263 request_irq(IRQ_AUTO_1, via1_irq,
264 IRQ_FLG_LOCK|IRQ_FLG_FAST, "via1", 264 IRQ_FLG_LOCK|IRQ_FLG_FAST, "via1",
265 (void *) via1); 265 (void *) via1);
266 } 266 }
267 cpu_request_irq(IRQ_AUTO_2, via2_irq, IRQ_FLG_LOCK|IRQ_FLG_FAST, 267 request_irq(IRQ_AUTO_2, via2_irq, IRQ_FLG_LOCK|IRQ_FLG_FAST,
268 "via2", (void *) via2); 268 "via2", (void *) via2);
269 if (!psc_present) { 269 if (!psc_present) {
270 cpu_request_irq(IRQ_AUTO_4, mac_scc_dispatch, IRQ_FLG_LOCK, 270 request_irq(IRQ_AUTO_4, mac_scc_dispatch, IRQ_FLG_LOCK,
271 "scc", mac_scc_dispatch); 271 "scc", mac_scc_dispatch);
272 } 272 }
273 request_irq(IRQ_MAC_NUBUS, via_nubus_irq, IRQ_FLG_LOCK|IRQ_FLG_FAST, 273 request_irq(IRQ_MAC_NUBUS, via_nubus_irq, IRQ_FLG_LOCK|IRQ_FLG_FAST,
@@ -424,7 +424,7 @@ irqreturn_t via1_irq(int irq, void *dev_id, struct pt_regs *regs)
424 for (i = 0, irq_bit = 1 ; i < 7 ; i++, irq_bit <<= 1) 424 for (i = 0, irq_bit = 1 ; i < 7 ; i++, irq_bit <<= 1)
425 if (events & irq_bit) { 425 if (events & irq_bit) {
426 via1[vIER] = irq_bit; 426 via1[vIER] = irq_bit;
427 mac_do_irq_list(VIA1_SOURCE_BASE + i, regs); 427 m68k_handle_int(VIA1_SOURCE_BASE + i, regs);
428 via1[vIFR] = irq_bit; 428 via1[vIFR] = irq_bit;
429 via1[vIER] = irq_bit | 0x80; 429 via1[vIER] = irq_bit | 0x80;
430 } 430 }
@@ -439,7 +439,7 @@ irqreturn_t via1_irq(int irq, void *dev_id, struct pt_regs *regs)
439 /* No, it won't be set. that's why we're doing this. */ 439 /* No, it won't be set. that's why we're doing this. */
440 via_irq_disable(IRQ_MAC_NUBUS); 440 via_irq_disable(IRQ_MAC_NUBUS);
441 via_irq_clear(IRQ_MAC_NUBUS); 441 via_irq_clear(IRQ_MAC_NUBUS);
442 mac_do_irq_list(IRQ_MAC_NUBUS, regs); 442 m68k_handle_int(IRQ_MAC_NUBUS, regs);
443 via_irq_enable(IRQ_MAC_NUBUS); 443 via_irq_enable(IRQ_MAC_NUBUS);
444 } 444 }
445#endif 445#endif
@@ -459,7 +459,7 @@ irqreturn_t via2_irq(int irq, void *dev_id, struct pt_regs *regs)
459 if (events & irq_bit) { 459 if (events & irq_bit) {
460 via2[gIER] = irq_bit; 460 via2[gIER] = irq_bit;
461 via2[gIFR] = irq_bit | rbv_clear; 461 via2[gIFR] = irq_bit | rbv_clear;
462 mac_do_irq_list(VIA2_SOURCE_BASE + i, regs); 462 m68k_handle_int(VIA2_SOURCE_BASE + i, regs);
463 via2[gIER] = irq_bit | 0x80; 463 via2[gIER] = irq_bit | 0x80;
464 } 464 }
465 return IRQ_HANDLED; 465 return IRQ_HANDLED;
@@ -481,7 +481,7 @@ irqreturn_t via_nubus_irq(int irq, void *dev_id, struct pt_regs *regs)
481 for (i = 0, irq_bit = 1 ; i < 7 ; i++, irq_bit <<= 1) { 481 for (i = 0, irq_bit = 1 ; i < 7 ; i++, irq_bit <<= 1) {
482 if (events & irq_bit) { 482 if (events & irq_bit) {
483 via_irq_disable(NUBUS_SOURCE_BASE + i); 483 via_irq_disable(NUBUS_SOURCE_BASE + i);
484 mac_do_irq_list(NUBUS_SOURCE_BASE + i, regs); 484 m68k_handle_int(NUBUS_SOURCE_BASE + i, regs);
485 via_irq_enable(NUBUS_SOURCE_BASE + i); 485 via_irq_enable(NUBUS_SOURCE_BASE + i);
486 } 486 }
487 } 487 }