This commit was manufactured by cvs2svn to create branch 'vserver'.
[linux-2.6.git] / arch / sparc64 / kernel / chmc.c
index 6e39a10..97cf912 100644 (file)
@@ -72,7 +72,7 @@ struct mctrl_info {
        struct obp_mem_layout   layout_prop;
        int                     layout_size;
 
-       void                    *regs;
+       void __iomem            *regs;
 
        u64                     timing_control1;
        u64                     timing_control2;
@@ -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;
 }