ip27-irq-glue.S 949 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * This file is subject to the terms and conditions of the GNU General Public
  3. * License. See the file "COPYING" in the main directory of this archive
  4. * for more details.
  5. *
  6. * Copyright (C) 1999 Ralf Baechle
  7. * Copyright (C) 1999 Silicon Graphics, Inc.
  8. */
  9. #include <asm/asm.h>
  10. #include <asm/mipsregs.h>
  11. #include <asm/regdef.h>
  12. #include <asm/stackframe.h>
  13. .text
  14. .align 5
  15. NESTED(ip27_irq, PT_SIZE, sp)
  16. SAVE_ALL
  17. CLI
  18. mfc0 s0, CP0_CAUSE
  19. mfc0 t0, CP0_STATUS
  20. and s0, t0
  21. move a0, sp
  22. PTR_LA ra, ret_from_irq
  23. /* First check for RT interrupt. */
  24. andi t0, s0, CAUSEF_IP4
  25. bnez t0, ip4
  26. andi t0, s0, CAUSEF_IP2
  27. bnez t0, ip2
  28. andi t0, s0, CAUSEF_IP3
  29. bnez t0, ip3
  30. andi t0, s0, CAUSEF_IP5
  31. bnez t0, ip5
  32. andi t0, s0, CAUSEF_IP6
  33. bnez t0, ip6
  34. j ra
  35. ip2: j ip27_do_irq_mask0 # PI_INT_PEND_0 or CC_PEND_{A|B}
  36. ip3: j ip27_do_irq_mask1 # PI_INT_PEND_1
  37. ip4: j ip27_rt_timer_interrupt
  38. ip5: j ip27_prof_timer
  39. ip6: j ip27_hub_error
  40. END(ip27_irq)