Lines Matching +full:static +full:- +full:enable
1 // SPDX-License-Identifier: MIT
15 static unsigned long mitigations __read_mostly = ~0UL;
21 static const char * const names[] = {
30 static int mitigations_set(const char *val, const struct kernel_param *kp) in mitigations_set()
41 return -ENOMEM; in mitigations_set()
44 bool enable = true; in mitigations_set() local
62 enable = !enable; in mitigations_set()
67 enable = !enable; in mitigations_set()
76 if (enable) in mitigations_set()
86 err = -EINVAL; in mitigations_set()
98 static int mitigations_get(char *buffer, const struct kernel_param *kp) in mitigations_get()
102 bool enable; in mitigations_get() local
107 if (local & BIT(BITS_PER_LONG - 1)) { in mitigations_get()
109 enable = false; in mitigations_get()
111 enable = true; in mitigations_get()
116 if ((local & BIT(i)) != enable) in mitigations_get()
119 count += scnprintf(buffer + count, PAGE_SIZE - count, in mitigations_get()
120 "%s%s,", enable ? "" : "!", names[i]); in mitigations_get()
123 buffer[count - 1] = '\n'; in mitigations_get()
127 static const struct kernel_param_ops ops = {
134 "Selectively enable security mitigations for all Intel® GPUs in the system.\n"
136 " auto -- enables all mitigations required for the platform [default]\n"
137 " off -- disables all mitigations\n"
139 "Individual mitigations can be enabled by passing a comma-separated string,\n"
140 "e.g. mitigations=residuals to enable only clearing residuals or\n"
146 " residuals -- clear all thread-local registers between contexts"