From 00afe029aab03bd95eba210b5e74a252017c4692 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 22 Sep 2009 16:44:14 -0700 Subject: asm/sections: add text/data checking functions for arches to override Some ports (like the Blackfin arch) have a discontiguous memory map which means there may be text or data that falls outside of the standard range of the start/end text/data symbols. Creating some helper functions allows these non-standard ports to declare these regions without adversely affecting anyone else. Signed-off-by: Mike Frysinger Cc: Ingo Molnar Cc: Robin Getz Cc: Sam Ravnborg Cc: Peter Zijlstra Cc: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-generic/sections.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/include/asm-generic/sections.h b/include/asm-generic/sections.h index d083561337f..b3bfabc258f 100644 --- a/include/asm-generic/sections.h +++ b/include/asm-generic/sections.h @@ -23,4 +23,20 @@ extern char __ctors_start[], __ctors_end[]; #define dereference_function_descriptor(p) (p) #endif +/* random extra sections (if any). Override + * in asm/sections.h */ +#ifndef arch_is_kernel_text +static inline int arch_is_kernel_text(unsigned long addr) +{ + return 0; +} +#endif + +#ifndef arch_is_kernel_data +static inline int arch_is_kernel_data(unsigned long addr) +{ + return 0; +} +#endif + #endif /* _ASM_GENERIC_SECTIONS_H_ */ -- cgit v1.2.3-70-g09d2