glue.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. /*
  2. * linux/include/asm-arm/glue.h
  3. *
  4. * Copyright (C) 1997-1999 Russell King
  5. * Copyright (C) 2000-2002 Deep Blue Solutions Ltd.
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License version 2 as
  9. * published by the Free Software Foundation.
  10. *
  11. * This file provides the glue to stick the processor-specific bits
  12. * into the kernel in an efficient manner. The idea is to use branches
  13. * when we're only targetting one class of TLB, or indirect calls
  14. * when we're targetting multiple classes of TLBs.
  15. */
  16. #ifdef __KERNEL__
  17. #ifdef __STDC__
  18. #define ____glue(name,fn) name##fn
  19. #else
  20. #define ____glue(name,fn) name/**/fn
  21. #endif
  22. #define __glue(name,fn) ____glue(name,fn)
  23. /*
  24. * Data Abort Model
  25. * ================
  26. *
  27. * We have the following to choose from:
  28. * arm6 - ARM6 style
  29. * arm7 - ARM7 style
  30. * v4_early - ARMv4 without Thumb early abort handler
  31. * v4t_late - ARMv4 with Thumb late abort handler
  32. * v4t_early - ARMv4 with Thumb early abort handler
  33. * v5tej_early - ARMv5 with Thumb and Java early abort handler
  34. * xscale - ARMv5 with Thumb with Xscale extensions
  35. * v6_early - ARMv6 generic early abort handler
  36. */
  37. #undef CPU_ABORT_HANDLER
  38. #undef MULTI_ABORT
  39. #if defined(CONFIG_CPU_ARM610)
  40. # ifdef CPU_ABORT_HANDLER
  41. # define MULTI_ABORT 1
  42. # else
  43. # define CPU_ABORT_HANDLER cpu_arm6_data_abort
  44. # endif
  45. #endif
  46. #if defined(CONFIG_CPU_ARM710)
  47. # ifdef CPU_ABORT_HANDLER
  48. # define MULTI_ABORT 1
  49. # else
  50. # define CPU_ABORT_HANDLER cpu_arm7_data_abort
  51. # endif
  52. #endif
  53. #ifdef CONFIG_CPU_ABRT_LV4T
  54. # ifdef CPU_ABORT_HANDLER
  55. # define MULTI_ABORT 1
  56. # else
  57. # define CPU_ABORT_HANDLER v4t_late_abort
  58. # endif
  59. #endif
  60. #ifdef CONFIG_CPU_ABRT_EV4
  61. # ifdef CPU_ABORT_HANDLER
  62. # define MULTI_ABORT 1
  63. # else
  64. # define CPU_ABORT_HANDLER v4_early_abort
  65. # endif
  66. #endif
  67. #ifdef CONFIG_CPU_ABRT_EV4T
  68. # ifdef CPU_ABORT_HANDLER
  69. # define MULTI_ABORT 1
  70. # else
  71. # define CPU_ABORT_HANDLER v4t_early_abort
  72. # endif
  73. #endif
  74. #ifdef CONFIG_CPU_ABRT_EV5TJ
  75. # ifdef CPU_ABORT_HANDLER
  76. # define MULTI_ABORT 1
  77. # else
  78. # define CPU_ABORT_HANDLER v5tj_early_abort
  79. # endif
  80. #endif
  81. #ifdef CONFIG_CPU_ABRT_EV5T
  82. # ifdef CPU_ABORT_HANDLER
  83. # define MULTI_ABORT 1
  84. # else
  85. # define CPU_ABORT_HANDLER v5t_early_abort
  86. # endif
  87. #endif
  88. #ifdef CONFIG_CPU_ABRT_EV6
  89. # ifdef CPU_ABORT_HANDLER
  90. # define MULTI_ABORT 1
  91. # else
  92. # define CPU_ABORT_HANDLER v6_early_abort
  93. # endif
  94. #endif
  95. #ifndef CPU_ABORT_HANDLER
  96. #error Unknown data abort handler type
  97. #endif
  98. #endif