exception.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #ifndef _ASM_POWERPC_ISERIES_EXCEPTION_H
  2. #define _ASM_POWERPC_ISERIES_EXCEPTION_H
  3. /*
  4. * Extracted from head_64.S
  5. *
  6. * PowerPC version
  7. * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
  8. *
  9. * Rewritten by Cort Dougan (cort@cs.nmt.edu) for PReP
  10. * Copyright (C) 1996 Cort Dougan <cort@cs.nmt.edu>
  11. * Adapted for Power Macintosh by Paul Mackerras.
  12. * Low-level exception handlers and MMU support
  13. * rewritten by Paul Mackerras.
  14. * Copyright (C) 1996 Paul Mackerras.
  15. *
  16. * Adapted for 64bit PowerPC by Dave Engebretsen, Peter Bergner, and
  17. * Mike Corrigan {engebret|bergner|mikejc}@us.ibm.com
  18. *
  19. * This file contains the low-level support and setup for the
  20. * PowerPC-64 platform, including trap and interrupt dispatch.
  21. *
  22. * This program is free software; you can redistribute it and/or
  23. * modify it under the terms of the GNU General Public License
  24. * as published by the Free Software Foundation; either version
  25. * 2 of the License, or (at your option) any later version.
  26. */
  27. #include <asm/exception-64s.h>
  28. #define EXCEPTION_PROLOG_ISERIES_1 \
  29. mfmsr r10; \
  30. ld r12,PACALPPACAPTR(r13); \
  31. ld r11,LPPACASRR0(r12); \
  32. ld r12,LPPACASRR1(r12); \
  33. ori r10,r10,MSR_RI; \
  34. mtmsrd r10,1
  35. #define STD_EXCEPTION_ISERIES(label, area) \
  36. .globl label##_iSeries; \
  37. label##_iSeries: \
  38. HMT_MEDIUM; \
  39. mtspr SPRN_SPRG_SCRATCH0,r13; /* save r13 */ \
  40. EXCEPTION_PROLOG_1(area); \
  41. EXCEPTION_PROLOG_ISERIES_1; \
  42. b label##_common
  43. #define MASKABLE_EXCEPTION_ISERIES(label) \
  44. .globl label##_iSeries; \
  45. label##_iSeries: \
  46. HMT_MEDIUM; \
  47. mtspr SPRN_SPRG_SCRATCH0,r13; /* save r13 */ \
  48. EXCEPTION_PROLOG_1(PACA_EXGEN); \
  49. lbz r10,PACASOFTIRQEN(r13); \
  50. cmpwi 0,r10,0; \
  51. beq- label##_iSeries_masked; \
  52. EXCEPTION_PROLOG_ISERIES_1; \
  53. b label##_common; \
  54. #endif /* _ASM_POWERPC_ISERIES_EXCEPTION_H */