Lines Matching full:bank

31  * CMCI can be delivered to multiple cpus that share a machine check bank
32 * so we need to designate a single cpu to process errors logged in each bank
61 * MCi_CTL2 threshold for each bank when there is no storm.
62 * Default value for each bank may have been set by BIOS.
71 * bank because both corrected and uncorrected errors may be logged
72 * in the same bank and signalled with CMCI. The threshold only applies
138 static void cmci_set_threshold(int bank, int thresh) in cmci_set_threshold() argument
144 rdmsrl(MSR_IA32_MCx_CTL2(bank), val); in cmci_set_threshold()
146 wrmsrl(MSR_IA32_MCx_CTL2(bank), val | thresh); in cmci_set_threshold()
150 void mce_intel_handle_storm(int bank, bool on) in mce_intel_handle_storm() argument
153 cmci_set_threshold(bank, CMCI_STORM_THRESHOLD); in mce_intel_handle_storm()
155 cmci_set_threshold(bank, cmci_threshold[bank]); in mce_intel_handle_storm()
171 * ownership of a bank.
172 * 1: CPU already owns this bank
173 * 2: BIOS owns this bank
174 * 3: Some other CPU owns this bank
176 static bool cmci_skip_bank(int bank, u64 *val) in cmci_skip_bank() argument
180 if (test_bit(bank, owned)) in cmci_skip_bank()
184 if (test_bit(bank, mce_banks_ce_disabled)) in cmci_skip_bank()
187 rdmsrl(MSR_IA32_MCx_CTL2(bank), *val); in cmci_skip_bank()
191 clear_bit(bank, owned); in cmci_skip_bank()
192 __clear_bit(bank, this_cpu_ptr(mce_poll_banks)); in cmci_skip_bank()
201 * 1: If this bank is in storm mode from whichever CPU was
228 * Try to claim ownership of a bank.
230 static void cmci_claim_bank(int bank, u64 val, int bios_zero_thresh, int *bios_wrong_thresh) in cmci_claim_bank() argument
235 wrmsrl(MSR_IA32_MCx_CTL2(bank), val); in cmci_claim_bank()
236 rdmsrl(MSR_IA32_MCx_CTL2(bank), val); in cmci_claim_bank()
238 /* If the enable bit did not stick, this bank should be polled. */ in cmci_claim_bank()
240 WARN_ON(!test_bit(bank, this_cpu_ptr(mce_poll_banks))); in cmci_claim_bank()
241 storm->banks[bank].poll_only = true; in cmci_claim_bank()
246 set_bit(bank, (void *)this_cpu_ptr(&mce_banks_owned)); in cmci_claim_bank()
249 pr_notice("CPU%d BANK%d CMCI inherited storm\n", smp_processor_id(), bank); in cmci_claim_bank()
250 mce_inherit_storm(bank); in cmci_claim_bank()
251 cmci_storm_begin(bank); in cmci_claim_bank()
253 __clear_bit(bank, this_cpu_ptr(mce_poll_banks)); in cmci_claim_bank()
266 /* Save default threshold for each bank */ in cmci_claim_bank()
267 if (cmci_threshold[bank] == 0) in cmci_claim_bank()
268 cmci_threshold[bank] = val & MCI_CTL2_CMCI_THRESHOLD_MASK; in cmci_claim_bank()
321 static void __cmci_disable_bank(int bank) in __cmci_disable_bank() argument
325 if (!test_bit(bank, this_cpu_ptr(mce_banks_owned))) in __cmci_disable_bank()
327 rdmsrl(MSR_IA32_MCx_CTL2(bank), val); in __cmci_disable_bank()
329 wrmsrl(MSR_IA32_MCx_CTL2(bank), val); in __cmci_disable_bank()
330 __clear_bit(bank, this_cpu_ptr(mce_banks_owned)); in __cmci_disable_bank()
333 cmci_storm_end(bank); in __cmci_disable_bank()
384 void cmci_disable_bank(int bank) in cmci_disable_bank() argument
393 __cmci_disable_bank(bank); in cmci_disable_bank()
397 /* Bank polling function when CMCI is disabled. */
493 (m->bank == 0) && in intel_filter_mce()