Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 164697
b: refs/heads/master
c: e56770f
h: refs/heads/master
i:
  164695: ba1b311
v: v3
  • Loading branch information
Mike Frysinger authored and Linus Torvalds committed Sep 23, 2009
1 parent 4df007c commit 4124dea
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2a9ad18deb2870a9968f50351a0d4b8cc2a04099
refs/heads/master: e56770fbc48c1517f620f9f68e3f728e74d52bf5
38 changes: 35 additions & 3 deletions trunk/arch/blackfin/include/asm/sections.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
#ifndef _BLACKFIN_SECTIONS_H
#define _BLACKFIN_SECTIONS_H

/* nothing to see, move along */
#include <asm-generic/sections.h>

/* only used when MTD_UCLINUX */
extern unsigned long memory_mtd_start, memory_mtd_end, mtd_size;

Expand All @@ -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[],
_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

0 comments on commit 4124dea

Please sign in to comment.