Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Chris Zankel <chris@zankel.net>

authored by

Max Filippov and committed by
Chris Zankel
d83ff0bb 74f5bf02

+8
+2
arch/xtensa/kernel/head.S
··· 86 86 /* Clear debugging registers. */ 87 87 88 88 #if XCHAL_HAVE_DEBUG 89 + #if XCHAL_NUM_IBREAK > 0 89 90 wsr a0, ibreakenable 91 + #endif 90 92 wsr a0, icount 91 93 movi a1, 15 92 94 wsr a0, icountlevel
+2
arch/xtensa/platforms/iss/setup.c
··· 64 64 "wsr a2, icountlevel\n\t" 65 65 "movi a2, 0\n\t" 66 66 "wsr a2, icount\n\t" 67 + #if XCHAL_NUM_IBREAK > 0 67 68 "wsr a2, ibreakenable\n\t" 69 + #endif 68 70 "wsr a2, lcount\n\t" 69 71 "movi a2, 0x1f\n\t" 70 72 "wsr a2, ps\n\t"
+2
arch/xtensa/platforms/xt2000/setup.c
··· 69 69 "wsr a2, icountlevel\n\t" 70 70 "movi a2, 0\n\t" 71 71 "wsr a2, icount\n\t" 72 + #if XCHAL_NUM_IBREAK > 0 72 73 "wsr a2, ibreakenable\n\t" 74 + #endif 73 75 "wsr a2, lcount\n\t" 74 76 "movi a2, 0x1f\n\t" 75 77 "wsr a2, ps\n\t"
+2
arch/xtensa/platforms/xtfpga/setup.c
··· 60 60 "wsr a2, icountlevel\n\t" 61 61 "movi a2, 0\n\t" 62 62 "wsr a2, icount\n\t" 63 + #if XCHAL_NUM_IBREAK > 0 63 64 "wsr a2, ibreakenable\n\t" 65 + #endif 64 66 "wsr a2, lcount\n\t" 65 67 "movi a2, 0x1f\n\t" 66 68 "wsr a2, ps\n\t"