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