From bcc53d1adb47c183578593c97f3e04a635c5cc55 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 28 Oct 2008 11:03:09 +0800 Subject: [PATCH] --- yaml --- r: 126991 b: refs/heads/master c: 6ad2b84cf014d91a9dffa3f8edb008430fbdb445 h: refs/heads/master i: 126989: 11bc6e09660e4cfe93d0e94597c55b21cba00917 126987: eb69f7b3a81af173077d1e9181c85c742c5b4ad5 126983: 4da3274a1adb39ac0c883c7038e30375196ca995 126975: 5a5977599e8e4f8e2f284d41f6ae11c492c8faff v: v3 --- [refs] | 2 +- trunk/arch/blackfin/Kconfig | 11 +++++++++++ trunk/arch/blackfin/mach-common/entry.S | 21 +++++++++++++++------ 3 files changed, 27 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index 5f9bee1055f6..d0e968e91a76 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: fe8015ce2588e3ffe65284a2883703355804276e +refs/heads/master: 6ad2b84cf014d91a9dffa3f8edb008430fbdb445 diff --git a/trunk/arch/blackfin/Kconfig b/trunk/arch/blackfin/Kconfig index ac76baac1df3..e37e993431b9 100644 --- a/trunk/arch/blackfin/Kconfig +++ b/trunk/arch/blackfin/Kconfig @@ -667,6 +667,17 @@ config APP_STACK_L1 Currently only works with FLAT binaries. +config EXCEPTION_L1_SCRATCH + bool "Locate exception stack in L1 Scratch Memory" + default n + depends on !APP_STACK_L1 && !SYSCALL_TAB_L1 + help + Whenever an exception occurs, use the L1 Scratch memory for + stack storage. You cannot place the stacks of FLAT binaries + in L1 when using this option. + + If you don't use L1 Scratch, then you should say Y here. + comment "Speed Optimizations" config BFIN_INS_LOWOVERHEAD bool "ins[bwl] low overhead, higher interrupt latency" diff --git a/trunk/arch/blackfin/mach-common/entry.S b/trunk/arch/blackfin/mach-common/entry.S index bde6dc4e2614..ad4049882291 100644 --- a/trunk/arch/blackfin/mach-common/entry.S +++ b/trunk/arch/blackfin/mach-common/entry.S @@ -1539,14 +1539,23 @@ ENTRY(_sys_call_table) .endr END(_sys_call_table) -_exception_stack: - .rept 1024 - .long 0; - .endr -_exception_stack_top: - #if ANOMALY_05000261 /* Used by the assembly entry point to work around an anomaly. */ _last_cplb_fault_retx: .long 0; #endif + +#ifdef CONFIG_EXCEPTION_L1_SCRATCH +/* .section .l1.bss.scratch */ +.set _exception_stack_top, L1_SCRATCH_START + L1_SCRATCH_LENGTH +#else +#ifdef CONFIG_SYSCALL_TAB_L1 +.section .l1.bss +#else +.bss +#endif +_exception_stack: +.size _exception_stack, 1024 * 4 +.set _exception_stack_top, _exception_stack + 1024 * 4 +.size _exception_stack_top, 0 +#endif