diff options
Diffstat (limited to 'post/lib_ppc/cr.c')
-rw-r--r-- | post/lib_ppc/cr.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/post/lib_ppc/cr.c b/post/lib_ppc/cr.c index 0bd9e74..2c7976a 100644 --- a/post/lib_ppc/cr.c +++ b/post/lib_ppc/cr.c @@ -248,6 +248,7 @@ int cpu_post_test_cr (void) int ret = 0; unsigned int i; unsigned long cr_sav; + int flag = disable_interrupts(); asm ( "mfcr %0" : "=r" (cr_sav) : ); @@ -347,6 +348,9 @@ int cpu_post_test_cr (void) asm ( "mtcr %0" : : "r" (cr_sav)); + if (flag) + enable_interrupts(); + return ret; } |