]>
git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blob - arch/powerpc/include/asm/sections.h
1 #ifndef _ASM_POWERPC_SECTIONS_H
2 #define _ASM_POWERPC_SECTIONS_H
6 #include <linux/uaccess.h>
7 #include <asm-generic/sections.h>
11 extern char __start_interrupts
[];
12 extern char __end_interrupts
[];
14 extern char __prom_init_toc_start
[];
15 extern char __prom_init_toc_end
[];
17 static inline int in_kernel_text(unsigned long addr
)
19 if (addr
>= (unsigned long)_stext
&& addr
< (unsigned long)__init_end
)
25 static inline int overlaps_interrupt_vector_text(unsigned long start
,
28 unsigned long real_start
, real_end
;
29 real_start
= __start_interrupts
- _stext
;
30 real_end
= __end_interrupts
- _stext
;
32 return start
< (unsigned long)__va(real_end
) &&
33 (unsigned long)__va(real_start
) < end
;
36 static inline int overlaps_kernel_text(unsigned long start
, unsigned long end
)
38 return start
< (unsigned long)__init_end
&&
39 (unsigned long)_stext
< end
;
42 #undef dereference_function_descriptor
43 static inline void *dereference_function_descriptor(void *ptr
)
45 struct ppc64_opd_entry
*desc
= ptr
;
48 if (!probe_kernel_address(&desc
->funcaddr
, p
))
55 #endif /* __KERNEL__ */
56 #endif /* _ASM_POWERPC_SECTIONS_H */