glue.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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. #include <linux/config.h>
  18. #ifdef __STDC__
  19. #define ____glue(name,fn) name##fn
  20. #else
  21. #define ____glue(name,fn) name/**/fn
  22. #endif
  23. #define __glue(name,fn) ____glue(name,fn)
  24. /*
  25. * Data Abort Model
  26. * ================
  27. *
  28. * We have the following to choose from:
  29. * arm6 - ARM6 style
  30. * arm7 - ARM7 style
  31. * v4_early - ARMv4 without Thumb early abort handler
  32. * v4t_late - ARMv4 with Thumb late abort handler
  33. * v4t_early - ARMv4 with Thumb early abort handler
  34. * v5tej_early - ARMv5 with Thumb and Java early abort handler
  35. * xscale - ARMv5 with Thumb with Xscale extensions
  36. * v6_early - ARMv6 generic early abort handler
  37. */
  38. #undef CPU_ABORT_HANDLER
  39. #undef MULTI_ABORT
  40. #if defined(CONFIG_CPU_ARM610)
  41. # ifdef CPU_ABORT_HANDLER
  42. # define MULTI_ABORT 1
  43. # else
  44. # define CPU_ABORT_HANDLER cpu_arm6_data_abort
  45. # endif
  46. #endif
  47. #if defined(CONFIG_CPU_ARM710)
  48. # ifdef CPU_ABORT_HANDLER
  49. # define MULTI_ABORT 1
  50. # else
  51. # define CPU_ABORT_HANDLER cpu_arm7_data_abort
  52. # endif
  53. #endif
  54. #ifdef CONFIG_CPU_ABRT_LV4T
  55. # ifdef CPU_ABORT_HANDLER
  56. # define MULTI_ABORT 1
  57. # else
  58. # define CPU_ABORT_HANDLER v4t_late_abort
  59. # endif
  60. #endif
  61. #ifdef CONFIG_CPU_ABRT_EV4
  62. # ifdef CPU_ABORT_HANDLER
  63. # define MULTI_ABORT 1
  64. # else
  65. # define CPU_ABORT_HANDLER v4_early_abort
  66. # endif
  67. #endif
  68. #ifdef CONFIG_CPU_ABRT_EV4T
  69. # ifdef CPU_ABORT_HANDLER
  70. # define MULTI_ABORT 1
  71. # else
  72. # define CPU_ABORT_HANDLER v4t_early_abort
  73. # endif
  74. #endif
  75. #ifdef CONFIG_CPU_ABRT_EV5TJ
  76. # ifdef CPU_ABORT_HANDLER
  77. # define MULTI_ABORT 1
  78. # else
  79. # define CPU_ABORT_HANDLER v5tj_early_abort
  80. # endif
  81. #endif
  82. #ifdef CONFIG_CPU_ABRT_EV5T
  83. # ifdef CPU_ABORT_HANDLER
  84. # define MULTI_ABORT 1
  85. # else
  86. # define CPU_ABORT_HANDLER v5t_early_abort
  87. # endif
  88. #endif
  89. #ifdef CONFIG_CPU_ABRT_EV6
  90. # ifdef CPU_ABORT_HANDLER
  91. # define MULTI_ABORT 1
  92. # else
  93. # define CPU_ABORT_HANDLER v6_early_abort
  94. # endif
  95. #endif
  96. #ifndef CPU_ABORT_HANDLER
  97. #error Unknown data abort handler type
  98. #endif
  99. #endif