aboutsummaryrefslogtreecommitdiff
path: root/arch/blackfin/kernel/process.c
diff options
context:
space:
mode:
authorJie Zhang <jie.zhang@analog.com>2008-10-28 15:57:49 +0800
committerBryan Wu <cooloney@kernel.org>2008-10-28 15:57:49 +0800
commitb2c2f30388c682520ae2d07c8852b4225dd4a4d7 (patch)
treed3df54438d368c27bbc269462cc495c1487dde47 /arch/blackfin/kernel/process.c
parent72edff8dd45fdee6e1a2bc431baefd8a5372f7cb (diff)
Blackfin arch: fix bug - shared lib function in L2 failed be called
Allow user space to access L2 SRAM. Signed-off-by: Jie Zhang <jie.zhang@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch/blackfin/kernel/process.c')
-rw-r--r--arch/blackfin/kernel/process.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c
index 77800dd83e5..0c3ea118b65 100644
--- a/arch/blackfin/kernel/process.c
+++ b/arch/blackfin/kernel/process.c
@@ -351,10 +351,15 @@ int _access_ok(unsigned long addr, unsigned long size)
return 1;
#endif
#if L1_DATA_B_LENGTH != 0
- if (addr >= L1_DATA_B_START
+ if (addr >= L1_DATA_B_START + (_ebss_b_l1 - _sdata_b_l1)
&& addr + size <= L1_DATA_B_START + L1_DATA_B_LENGTH)
return 1;
#endif
+#if L2_LENGTH != 0
+ if (addr >= L2_START + (_ebss_l2 - _stext_l2)
+ && addr + size <= L2_START + L2_LENGTH)
+ return 1;
+#endif
return 0;
}
EXPORT_SYMBOL(_access_ok);