sections.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _ASM_IA64_SECTIONS_H
  3. #define _ASM_IA64_SECTIONS_H
  4. /*
  5. * Copyright (C) 1998-2003 Hewlett-Packard Co
  6. * David Mosberger-Tang <davidm@hpl.hp.com>
  7. */
  8. #include <linux/elf.h>
  9. #include <linux/uaccess.h>
  10. #include <asm-generic/sections.h>
  11. extern char __phys_per_cpu_start[];
  12. #ifdef CONFIG_SMP
  13. extern char __cpu0_per_cpu[];
  14. #endif
  15. extern char __start___vtop_patchlist[], __end___vtop_patchlist[];
  16. extern char __start___rse_patchlist[], __end___rse_patchlist[];
  17. extern char __start___mckinley_e9_bundles[], __end___mckinley_e9_bundles[];
  18. extern char __start___phys_stack_reg_patchlist[], __end___phys_stack_reg_patchlist[];
  19. extern char __start_gate_section[];
  20. extern char __start_gate_mckinley_e9_patchlist[], __end_gate_mckinley_e9_patchlist[];
  21. extern char __start_gate_vtop_patchlist[], __end_gate_vtop_patchlist[];
  22. extern char __start_gate_fsyscall_patchlist[], __end_gate_fsyscall_patchlist[];
  23. extern char __start_gate_brl_fsys_bubble_down_patchlist[], __end_gate_brl_fsys_bubble_down_patchlist[];
  24. extern char __start_unwind[], __end_unwind[];
  25. extern char __start_ivt_text[], __end_ivt_text[];
  26. #define HAVE_DEREFERENCE_FUNCTION_DESCRIPTOR 1
  27. #undef dereference_function_descriptor
  28. static inline void *dereference_function_descriptor(void *ptr)
  29. {
  30. struct fdesc *desc = ptr;
  31. void *p;
  32. if (!probe_kernel_address(&desc->ip, p))
  33. ptr = p;
  34. return ptr;
  35. }
  36. #undef dereference_kernel_function_descriptor
  37. static inline void *dereference_kernel_function_descriptor(void *ptr)
  38. {
  39. if (ptr < (void *)__start_opd || ptr >= (void *)__end_opd)
  40. return ptr;
  41. return dereference_function_descriptor(ptr);
  42. }
  43. #endif /* _ASM_IA64_SECTIONS_H */