aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2008-12-17 01:33:43 -0500
committerPaul Mundt <lethal@linux-sh.org>2008-12-22 04:44:47 -0500
commit740a3e677b70181d5e2b1458a27891209e3bf635 (patch)
tree9b5de2213f9a6ca036398bbc411a9982444d4351 /arch/sh
parent8a655053ca1593dd160dac2a4ee638fdec037d86 (diff)
sh: Enable skipping of bss on debug platforms for sh32 also.
This enables the same functionality that sh64 has for sh32. When running on simulated hardware or via remote memory via the debug interface, memory is gauranteed to be zero on boot already, and skipping the zeroing of BSS has measurable boot time benefits. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh')
-rw-r--r--arch/sh/Kconfig.debug15
-rw-r--r--arch/sh/kernel/head_32.S12
2 files changed, 22 insertions, 5 deletions
diff --git a/arch/sh/Kconfig.debug b/arch/sh/Kconfig.debug
index 834a2d24342b..eef2fa940ce0 100644
--- a/arch/sh/Kconfig.debug
+++ b/arch/sh/Kconfig.debug
@@ -98,6 +98,18 @@ config IRQSTACKS
98 for handling hard and soft interrupts. This can help avoid 98 for handling hard and soft interrupts. This can help avoid
99 overflowing the process kernel stacks. 99 overflowing the process kernel stacks.
100 100
101config SH_NO_BSS_INIT
102 bool "Avoid zeroing BSS (to speed-up startup on suitable platforms)"
103 depends on DEBUG_KERNEL
104 default n
105 help
106 If running in painfully slow environments, such as an RTL
107 simulation or from remote memory via SHdebug, where the memory
108 can already be gauranteed to ber zeroed on boot, say Y.
109
110 For all other cases, say N. If this option seems perplexing, or
111 you aren't sure, say N.
112
101config MORE_COMPILE_OPTIONS 113config MORE_COMPILE_OPTIONS
102 bool "Add any additional compile options" 114 bool "Add any additional compile options"
103 help 115 help
@@ -125,9 +137,6 @@ config SH_ALPHANUMERIC
125 bool "Enable debug outputs to on-board alphanumeric display" 137 bool "Enable debug outputs to on-board alphanumeric display"
126 depends on SH_CAYMAN 138 depends on SH_CAYMAN
127 139
128config SH_NO_BSS_INIT
129 bool "Avoid zeroing BSS (to speed-up startup on suitable platforms)"
130
131endif 140endif
132 141
133endmenu 142endmenu
diff --git a/arch/sh/kernel/head_32.S b/arch/sh/kernel/head_32.S
index ae0a382a82eb..788605ff7088 100644
--- a/arch/sh/kernel/head_32.S
+++ b/arch/sh/kernel/head_32.S
@@ -80,8 +80,14 @@ ENTRY(_stext)
80 mov.l 7f, r0 80 mov.l 7f, r0
81 ldc r0, r7_bank ! ... and initial thread_info 81 ldc r0, r7_bank ! ... and initial thread_info
82#endif 82#endif
83 83
84 ! Clear BSS area 84#ifndef CONFIG_SH_NO_BSS_INIT
85 /*
86 * Don't clear BSS if running on slow platforms such as an RTL simulation,
87 * remote memory via SHdebug link, etc. For these the memory can be guaranteed
88 * to be all zero on boot anyway.
89 */
90 ! Clear BSS area
85#ifdef CONFIG_SMP 91#ifdef CONFIG_SMP
86 mov.l 3f, r0 92 mov.l 3f, r0
87 cmp/eq #0, r0 ! skip clear if set to zero 93 cmp/eq #0, r0 ! skip clear if set to zero
@@ -97,6 +103,8 @@ ENTRY(_stext)
97 mov.l r0,@-r2 103 mov.l r0,@-r2
98 104
9910: 10510:
106#endif
107
100 ! Additional CPU initialization 108 ! Additional CPU initialization
101 mov.l 6f, r0 109 mov.l 6f, r0
102 jsr @r0 110 jsr @r0