patch-2_6_7-vs1_9_1_12
[linux-2.6.git] / arch / sparc64 / kernel / chmc.c
index 6e39a10..2296525 100644 (file)
@@ -243,8 +243,9 @@ int chmc_getunumber(int syndrome_code,
 static u64 read_mcreg(struct mctrl_info *mp, unsigned long offset)
 {
        unsigned long ret;
+       int this_cpu = get_cpu();
 
-       if (mp->portid == smp_processor_id()) {
+       if (mp->portid == this_cpu) {
                __asm__ __volatile__("ldxa      [%1] %2, %0"
                                     : "=r" (ret)
                                     : "r" (offset), "i" (ASI_MCU_CTRL_REG));
@@ -254,6 +255,8 @@ static u64 read_mcreg(struct mctrl_info *mp, unsigned long offset)
                                     : "r" (mp->regs + offset),
                                       "i" (ASI_PHYS_BYPASS_EC_E));
        }
+       put_cpu();
+
        return ret;
 }