Lines Matching +full:- +full:alert

1 // SPDX-License-Identifier: GPL-2.0
3 * CPU-Measurement Counter Facility Support - Common Layer
21 /* Per-CPU event structure for the counter facility */
30 .alert = ATOMIC64_INIT(0),
38 /* Indicator whether the CPU-Measurement Counter Facility Support is ready */
41 /* CPU-measurement alerts for the counter facility */
43 unsigned int alert, unsigned long unused) in cpumf_measurement_alert() argument
47 if (!(alert & CPU_MF_INT_CF_MASK)) in cpumf_measurement_alert()
55 if (!(cpuhw->flags & PMU_F_RESERVED)) in cpumf_measurement_alert()
58 /* counter authorization change alert */ in cpumf_measurement_alert()
59 if (alert & CPU_MF_INT_CF_CACA) in cpumf_measurement_alert()
60 qctri(&cpuhw->info); in cpumf_measurement_alert()
62 /* loss of counter data alert */ in cpumf_measurement_alert()
63 if (alert & CPU_MF_INT_CF_LCDA) in cpumf_measurement_alert()
66 /* loss of MT counter data alert */ in cpumf_measurement_alert()
67 if (alert & CPU_MF_INT_CF_MTDA) in cpumf_measurement_alert()
71 /* store alert for special handling by in-kernel users */ in cpumf_measurement_alert()
72 atomic64_or(alert, &cpuhw->alert); in cpumf_measurement_alert()
83 memset(&cpuhw->info, 0, sizeof(cpuhw->info)); in cpum_cf_setup_cpu()
84 qctri(&cpuhw->info); in cpum_cf_setup_cpu()
85 cpuhw->flags |= PMU_F_RESERVED; in cpum_cf_setup_cpu()
89 cpuhw->flags &= ~PMU_F_RESERVED; in cpum_cf_setup_cpu()
103 /* Initialize the CPU-measurement counter facility */
115 /* Obtain the CPU-measurement alerts for the counter facility */
119 unsigned long alert; in kernel_cpumcf_alert() local
121 alert = atomic64_read(&cpuhw->alert); in kernel_cpumcf_alert()
123 atomic64_set(&cpuhw->alert, 0); in kernel_cpumcf_alert()
125 return alert; in kernel_cpumcf_alert()
129 /* Release the CPU-measurement counter facility */
169 if (info->cfvn >= 1) in cpum_cf_ctrset_size()
173 if (info->cfvn == 1) in cpum_cf_ctrset_size()
175 else if (info->cfvn >= 3) in cpum_cf_ctrset_size()
179 if (info->csvn >= 1 && info->csvn <= 5) in cpum_cf_ctrset_size()
181 else if (info->csvn == 6 || info->csvn == 7) in cpum_cf_ctrset_size()
185 if (info->csvn == 1) in cpum_cf_ctrset_size()
187 else if (info->csvn == 2) in cpum_cf_ctrset_size()
189 else if (info->csvn >= 3 && info->csvn <= 5) in cpum_cf_ctrset_size()
191 else if (info->csvn == 6 || info->csvn == 7) in cpum_cf_ctrset_size()
195 if (info->csvn > 3) in cpum_cf_ctrset_size()
210 return -ENODEV; in cpum_cf_init()
212 /* clear bit 15 of cr0 to unauthorize problem-state to in cpum_cf_init()
216 /* register handler for measurement-alert interruptions */ in cpum_cf_init()
220 pr_err("Registering for CPU-measurement alerts " in cpum_cf_init()