diff options
| -rw-r--r-- | arch/x86/kernel/cpu/mcheck/mce_amd.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd.c b/arch/x86/kernel/cpu/mcheck/mce_amd.c index f438318ee800..eb771b9fc0cb 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_amd.c +++ b/arch/x86/kernel/cpu/mcheck/mce_amd.c | |||
| @@ -93,37 +93,37 @@ struct thresh_restart { | |||
| 93 | static void threshold_restart_bank(void *_tr) | 93 | static void threshold_restart_bank(void *_tr) |
| 94 | { | 94 | { |
| 95 | struct thresh_restart *tr = _tr; | 95 | struct thresh_restart *tr = _tr; |
| 96 | u32 mci_misc_hi, mci_misc_lo; | 96 | u32 hi, lo; |
| 97 | 97 | ||
| 98 | rdmsr(tr->b->address, mci_misc_lo, mci_misc_hi); | 98 | rdmsr(tr->b->address, lo, hi); |
| 99 | 99 | ||
| 100 | if (tr->b->threshold_limit < (mci_misc_hi & THRESHOLD_MAX)) | 100 | if (tr->b->threshold_limit < (hi & THRESHOLD_MAX)) |
| 101 | tr->reset = 1; /* limit cannot be lower than err count */ | 101 | tr->reset = 1; /* limit cannot be lower than err count */ |
| 102 | 102 | ||
| 103 | if (tr->reset) { /* reset err count and overflow bit */ | 103 | if (tr->reset) { /* reset err count and overflow bit */ |
| 104 | mci_misc_hi = | 104 | hi = |
| 105 | (mci_misc_hi & ~(MASK_ERR_COUNT_HI | MASK_OVERFLOW_HI)) | | 105 | (hi & ~(MASK_ERR_COUNT_HI | MASK_OVERFLOW_HI)) | |
| 106 | (THRESHOLD_MAX - tr->b->threshold_limit); | 106 | (THRESHOLD_MAX - tr->b->threshold_limit); |
| 107 | } else if (tr->old_limit) { /* change limit w/o reset */ | 107 | } else if (tr->old_limit) { /* change limit w/o reset */ |
| 108 | int new_count = (mci_misc_hi & THRESHOLD_MAX) + | 108 | int new_count = (hi & THRESHOLD_MAX) + |
| 109 | (tr->old_limit - tr->b->threshold_limit); | 109 | (tr->old_limit - tr->b->threshold_limit); |
| 110 | 110 | ||
| 111 | mci_misc_hi = (mci_misc_hi & ~MASK_ERR_COUNT_HI) | | 111 | hi = (hi & ~MASK_ERR_COUNT_HI) | |
| 112 | (new_count & THRESHOLD_MAX); | 112 | (new_count & THRESHOLD_MAX); |
| 113 | } | 113 | } |
| 114 | 114 | ||
| 115 | if (tr->set_lvt_off) { | 115 | if (tr->set_lvt_off) { |
| 116 | /* set new lvt offset */ | 116 | /* set new lvt offset */ |
| 117 | mci_misc_hi &= ~MASK_LVTOFF_HI; | 117 | hi &= ~MASK_LVTOFF_HI; |
| 118 | mci_misc_hi |= tr->lvt_off << 20; | 118 | hi |= tr->lvt_off << 20; |
| 119 | } | 119 | } |
| 120 | 120 | ||
| 121 | tr->b->interrupt_enable ? | 121 | tr->b->interrupt_enable ? |
| 122 | (mci_misc_hi = (mci_misc_hi & ~MASK_INT_TYPE_HI) | INT_TYPE_APIC) : | 122 | (hi = (hi & ~MASK_INT_TYPE_HI) | INT_TYPE_APIC) : |
| 123 | (mci_misc_hi &= ~MASK_INT_TYPE_HI); | 123 | (hi &= ~MASK_INT_TYPE_HI); |
| 124 | 124 | ||
| 125 | mci_misc_hi |= MASK_COUNT_EN_HI; | 125 | hi |= MASK_COUNT_EN_HI; |
| 126 | wrmsr(tr->b->address, mci_misc_lo, mci_misc_hi); | 126 | wrmsr(tr->b->address, lo, hi); |
| 127 | } | 127 | } |
| 128 | 128 | ||
| 129 | static void mce_threshold_block_init(struct threshold_block *b, int offset) | 129 | static void mce_threshold_block_init(struct threshold_block *b, int offset) |
