Commit e56770fb authored by Mike Frysinger's avatar Mike Frysinger Committed by Linus Torvalds

Blackfin: override text/data checking functions

Signed-off-by: default avatarMike 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: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 2a9ad18d
#ifndef _BLACKFIN_SECTIONS_H #ifndef _BLACKFIN_SECTIONS_H
#define _BLACKFIN_SECTIONS_H #define _BLACKFIN_SECTIONS_H
/* nothing to see, move along */
#include <asm-generic/sections.h>
/* only used when MTD_UCLINUX */ /* only used when MTD_UCLINUX */
extern unsigned long memory_mtd_start, memory_mtd_end, mtd_size; extern unsigned long memory_mtd_start, memory_mtd_end, mtd_size;
...@@ -15,4 +12,39 @@ extern char _stext_l1[], _etext_l1[], _sdata_l1[], _edata_l1[], _sbss_l1[], ...@@ -15,4 +12,39 @@ extern char _stext_l1[], _etext_l1[], _sdata_l1[], _edata_l1[], _sbss_l1[],
_stext_l2[], _etext_l2[], _sdata_l2[], _edata_l2[], _sbss_l2[], _stext_l2[], _etext_l2[], _sdata_l2[], _edata_l2[], _sbss_l2[],
_ebss_l2[], _l2_lma_start[]; _ebss_l2[], _l2_lma_start[];
#include <asm/mem_map.h>
/* Blackfin systems have discontinuous memory map and no virtualized memory */
static inline int arch_is_kernel_text(unsigned long addr)
{
return
(L1_CODE_LENGTH &&
addr >= (unsigned long)_stext_l1 &&
addr < (unsigned long)_etext_l1)
||
(L2_LENGTH &&
addr >= (unsigned long)_stext_l2 &&
addr < (unsigned long)_etext_l2);
}
#define arch_is_kernel_text(addr) arch_is_kernel_text(addr)
static inline int arch_is_kernel_data(unsigned long addr)
{
return
(L1_DATA_A_LENGTH &&
addr >= (unsigned long)_sdata_l1 &&
addr < (unsigned long)_ebss_l1)
||
(L1_DATA_B_LENGTH &&
addr >= (unsigned long)_sdata_b_l1 &&
addr < (unsigned long)_ebss_b_l1)
||
(L2_LENGTH &&
addr >= (unsigned long)_sdata_l2 &&
addr < (unsigned long)_ebss_l2);
}
#define arch_is_kernel_data(addr) arch_is_kernel_data(addr)
#include <asm-generic/sections.h>
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment