From: Mike Frysinger Date: Tue, 22 Sep 2009 23:44:14 +0000 (-0700) Subject: asm/sections: add text/data checking functions for arches to override X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=00afe029aab03bd95eba210b5e74a252017c4692;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 --- diff --git a/include/asm-generic/sections.h b/include/asm-generic/sections.h index d083561337f2..b3bfabc258f3 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_ */