xtensa: initialize CPENABLE SR when core has one
authorMax Filippov <jcmvbkbc@gmail.com>
Mon, 10 Dec 2012 21:26:23 +0000 (01:26 +0400)
committerChris Zankel <chris@zankel.net>
Wed, 19 Dec 2012 05:10:25 +0000 (21:10 -0800)
XCHAL_CP_NUM is defined in variant/tie.h and it is not included by
head.S, leaving CPENABLE register uninitialised. XCHAL_HAVE_CP is
defined in variant/core.h to 1 when core has CPENABLE SR.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
arch/xtensa/kernel/head.S

index 0cd337a..91d9095 100644 (file)
@@ -124,7 +124,7 @@ ENTRY(_startup)
 
        /* Disable coprocessors. */
 
-#if XCHAL_CP_NUM > 0
+#if XCHAL_HAVE_CP
        wsr     a0, cpenable
 #endif