diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-09-22 19:44:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-23 10:39:32 -0400 |
commit | e56770fbc48c1517f620f9f68e3f728e74d52bf5 (patch) | |
tree | 01080d2cd2ecc0ffab7181ccfe69561fda5f10ad /arch | |
parent | 2a9ad18deb2870a9968f50351a0d4b8cc2a04099 (diff) |
Blackfin: override text/data checking functions
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Robin Getz <rgetz@blackfin.uclinux.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/blackfin/include/asm/sections.h | 38 |
1 files changed, 35 insertions, 3 deletions
diff --git a/arch/blackfin/include/asm/sections.h b/arch/blackfin/include/asm/sections.h index e7fd0ecd73f7..ae4dae1e370b 100644 --- a/arch/blackfin/include/asm/sections.h +++ b/arch/blackfin/include/asm/sections.h | |||
@@ -1,9 +1,6 @@ | |||
1 | #ifndef _BLACKFIN_SECTIONS_H | 1 | #ifndef _BLACKFIN_SECTIONS_H |
2 | #define _BLACKFIN_SECTIONS_H | 2 | #define _BLACKFIN_SECTIONS_H |
3 | 3 | ||
4 | /* nothing to see, move along */ | ||
5 | #include <asm-generic/sections.h> | ||
6 | |||
7 | /* only used when MTD_UCLINUX */ | 4 | /* only used when MTD_UCLINUX */ |
8 | extern unsigned long memory_mtd_start, memory_mtd_end, mtd_size; | 5 | extern unsigned long memory_mtd_start, memory_mtd_end, mtd_size; |
9 | 6 | ||
@@ -15,4 +12,39 @@ extern char _stext_l1[], _etext_l1[], _sdata_l1[], _edata_l1[], _sbss_l1[], | |||
15 | _stext_l2[], _etext_l2[], _sdata_l2[], _edata_l2[], _sbss_l2[], | 12 | _stext_l2[], _etext_l2[], _sdata_l2[], _edata_l2[], _sbss_l2[], |
16 | _ebss_l2[], _l2_lma_start[]; | 13 | _ebss_l2[], _l2_lma_start[]; |
17 | 14 | ||
15 | #include <asm/mem_map.h> | ||
16 | |||
17 | /* Blackfin systems have discontinuous memory map and no virtualized memory */ | ||
18 | static inline int arch_is_kernel_text(unsigned long addr) | ||
19 | { | ||
20 | return | ||
21 | (L1_CODE_LENGTH && | ||
22 | addr >= (unsigned long)_stext_l1 && | ||
23 | addr < (unsigned long)_etext_l1) | ||
24 | || | ||
25 | (L2_LENGTH && | ||
26 | addr >= (unsigned long)_stext_l2 && | ||
27 | addr < (unsigned long)_etext_l2); | ||
28 | } | ||
29 | #define arch_is_kernel_text(addr) arch_is_kernel_text(addr) | ||
30 | |||
31 | static inline int arch_is_kernel_data(unsigned long addr) | ||
32 | { | ||
33 | return | ||
34 | (L1_DATA_A_LENGTH && | ||
35 | addr >= (unsigned long)_sdata_l1 && | ||
36 | addr < (unsigned long)_ebss_l1) | ||
37 | || | ||
38 | (L1_DATA_B_LENGTH && | ||
39 | addr >= (unsigned long)_sdata_b_l1 && | ||
40 | addr < (unsigned long)_ebss_b_l1) | ||
41 | || | ||
42 | (L2_LENGTH && | ||
43 | addr >= (unsigned long)_sdata_l2 && | ||
44 | addr < (unsigned long)_ebss_l2); | ||
45 | } | ||
46 | #define arch_is_kernel_data(addr) arch_is_kernel_data(addr) | ||
47 | |||
48 | #include <asm-generic/sections.h> | ||
49 | |||
18 | #endif | 50 | #endif |