summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorVineet Gupta <vgupta@synopsys.com>2014-04-17 17:13:26 +0530
committerVineet Gupta <vgupta@synopsys.com>2014-06-26 10:14:05 +0530
commitbef444a33004f4062930df1fc703a25dd6d7b460 (patch)
treeed7f20642c6319ca0d8c1841d97ad10fa1ba2f01 /arch
parentba25915fb2cd18152cb14b144dbe8bf2f2bd8e45 (diff)
downloadkernel-common-bef444a33004f4062930df1fc703a25dd6d7b460.tar.gz
kernel-common-bef444a33004f4062930df1fc703a25dd6d7b460.tar.bz2
kernel-common-bef444a33004f4062930df1fc703a25dd6d7b460.zip
ARC: optimize kernel bss clearing in early boot code
using ARC ZOL which reduces tot num of instructions by half Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arc/kernel/head.S7
-rw-r--r--arch/arc/kernel/vmlinux.lds.S2
2 files changed, 5 insertions, 4 deletions
diff --git a/arch/arc/kernel/head.S b/arch/arc/kernel/head.S
index 07a58f2d3077..4d2481bd8b98 100644
--- a/arch/arc/kernel/head.S
+++ b/arch/arc/kernel/head.S
@@ -77,10 +77,11 @@ stext:
; Clear BSS before updating any globals
; XXX: use ZOL here
mov r5, __bss_start
- mov r6, __bss_stop
+ sub r6, __bss_stop, r5
+ lsr.f lp_count, r6, 2
+ lpnz 1f
+ st.ab 0, [r5, 4]
1:
- st.ab 0, [r5,4]
- brlt r5, r6, 1b
; Uboot - kernel ABI
; r0 = [0] No uboot interaction, [1] cmdline in r2, [2] DTB in r2
diff --git a/arch/arc/kernel/vmlinux.lds.S b/arch/arc/kernel/vmlinux.lds.S
index 2555f5886af6..dd35bde39f69 100644
--- a/arch/arc/kernel/vmlinux.lds.S
+++ b/arch/arc/kernel/vmlinux.lds.S
@@ -116,7 +116,7 @@ SECTIONS
_edata = .;
- BSS_SECTION(0, 0, 0)
+ BSS_SECTION(4, 4, 4)
#ifdef CONFIG_ARC_DW2_UNWIND
. = ALIGN(PAGE_SIZE);