spi-topcliff-pch: add recovery processing in case wait-event timeout
[zen-stable.git] / arch / powerpc / include / asm / sections.h
bloba0f358d4a00cd57ba3b22fbbf1024c7daba65fa4
1 #ifndef _ASM_POWERPC_SECTIONS_H
2 #define _ASM_POWERPC_SECTIONS_H
3 #ifdef __KERNEL__
5 #include <linux/elf.h>
6 #include <linux/uaccess.h>
7 #include <asm-generic/sections.h>
9 #ifdef __powerpc64__
11 extern char __end_interrupts[];
13 static inline int in_kernel_text(unsigned long addr)
15 if (addr >= (unsigned long)_stext && addr < (unsigned long)__init_end)
16 return 1;
18 return 0;
21 static inline int overlaps_kernel_text(unsigned long start, unsigned long end)
23 return start < (unsigned long)__init_end &&
24 (unsigned long)_stext < end;
27 #undef dereference_function_descriptor
28 static inline void *dereference_function_descriptor(void *ptr)
30 struct ppc64_opd_entry *desc = ptr;
31 void *p;
33 if (!probe_kernel_address(&desc->funcaddr, p))
34 ptr = p;
35 return ptr;
38 #endif
40 #endif /* __KERNEL__ */
41 #endif /* _ASM_POWERPC_SECTIONS_H */