Commit d83ff0bb authored by Max Filippov's avatar Max Filippov Committed by Chris Zankel

xtensa: fix ibreakenable register update

Only set the register when there is at least one ibreak register,
otherwise the build fails:
	arch/xtensa/kernel/head.S:105: Error: invalid register 'ibreakenable'
	for 'wsr' instruction
	arch/xtensa/platforms/iss/setup.c:67: Error: invalid register
	'ibreakenable' for 'wsr' instruction
Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
Signed-off-by: default avatarChris Zankel <chris@zankel.net>
parent 74f5bf02
...@@ -86,7 +86,9 @@ ENTRY(_startup) ...@@ -86,7 +86,9 @@ ENTRY(_startup)
/* Clear debugging registers. */ /* Clear debugging registers. */
#if XCHAL_HAVE_DEBUG #if XCHAL_HAVE_DEBUG
#if XCHAL_NUM_IBREAK > 0
wsr a0, ibreakenable wsr a0, ibreakenable
#endif
wsr a0, icount wsr a0, icount
movi a1, 15 movi a1, 15
wsr a0, icountlevel wsr a0, icountlevel
......
...@@ -64,7 +64,9 @@ void platform_restart(void) ...@@ -64,7 +64,9 @@ void platform_restart(void)
"wsr a2, icountlevel\n\t" "wsr a2, icountlevel\n\t"
"movi a2, 0\n\t" "movi a2, 0\n\t"
"wsr a2, icount\n\t" "wsr a2, icount\n\t"
#if XCHAL_NUM_IBREAK > 0
"wsr a2, ibreakenable\n\t" "wsr a2, ibreakenable\n\t"
#endif
"wsr a2, lcount\n\t" "wsr a2, lcount\n\t"
"movi a2, 0x1f\n\t" "movi a2, 0x1f\n\t"
"wsr a2, ps\n\t" "wsr a2, ps\n\t"
......
...@@ -69,7 +69,9 @@ void platform_restart(void) ...@@ -69,7 +69,9 @@ void platform_restart(void)
"wsr a2, icountlevel\n\t" "wsr a2, icountlevel\n\t"
"movi a2, 0\n\t" "movi a2, 0\n\t"
"wsr a2, icount\n\t" "wsr a2, icount\n\t"
#if XCHAL_NUM_IBREAK > 0
"wsr a2, ibreakenable\n\t" "wsr a2, ibreakenable\n\t"
#endif
"wsr a2, lcount\n\t" "wsr a2, lcount\n\t"
"movi a2, 0x1f\n\t" "movi a2, 0x1f\n\t"
"wsr a2, ps\n\t" "wsr a2, ps\n\t"
......
...@@ -60,7 +60,9 @@ void platform_restart(void) ...@@ -60,7 +60,9 @@ void platform_restart(void)
"wsr a2, icountlevel\n\t" "wsr a2, icountlevel\n\t"
"movi a2, 0\n\t" "movi a2, 0\n\t"
"wsr a2, icount\n\t" "wsr a2, icount\n\t"
#if XCHAL_NUM_IBREAK > 0
"wsr a2, ibreakenable\n\t" "wsr a2, ibreakenable\n\t"
#endif
"wsr a2, lcount\n\t" "wsr a2, lcount\n\t"
"movi a2, 0x1f\n\t" "movi a2, 0x1f\n\t"
"wsr a2, ps\n\t" "wsr a2, ps\n\t"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment