Fix merge problems
[platform/kernel/u-boot.git] / post / lib_ppc / cmp.c
index 789a24c..13809d4 100644 (file)
@@ -36,8 +36,6 @@
  * the result in and the expected result.
  */
 
-#ifdef CONFIG_POST
-
 #include <post.h>
 #include "cpu_asm.h"
 
@@ -104,11 +102,12 @@ int cpu_post_test_cmp (void)
 {
     int ret = 0;
     unsigned int i;
+    int flag = disable_interrupts();
 
     for (i = 0; i < cpu_post_cmp_size && ret == 0; i++)
     {
        struct cpu_post_cmp_s *test = cpu_post_cmp_table + i;
-       unsigned long code[] =
+       unsigned long code[] =
        {
            ASM_2C(test->cmd, test->cr, 3, 4),
            ASM_MFCR(3),
@@ -126,8 +125,10 @@ int cpu_post_test_cmp (void)
        }
     }
 
+    if (flag)
+       enable_interrupts();
+
     return ret;
 }
 
 #endif
-#endif