Merge tag 'trace-rv-7.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace

Pull runtime verifier fix from Steven Rostedt:

- Fix multiple definition of __pcpu_unique_da_mon_this

After refactoring monitors, we used static per-cpu variables with the
same names across different per-cpu monitors. This is explicitly
disallowed for modules on some architectures (alpha) or if
CONFIG_DEBUG_FORCE_WEAK_PER_CPU is enabled (e.g. Fedora's debug
kernel). Make sure all those variables have different names to avoid
compilation issues.

* tag 'trace-rv-7.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
rv: Fix multiple definition of __pcpu_unique_da_mon_this

+11 -5
+11 -5
include/rv/da_monitor.h
··· 20 20 #include <linux/bug.h> 21 21 #include <linux/sched.h> 22 22 23 + /* 24 + * Per-cpu variables require a unique name although static in some 25 + * configurations (e.g. CONFIG_DEBUG_FORCE_WEAK_PER_CPU or alpha modules). 26 + */ 27 + #define DA_MON_NAME CONCATENATE(da_mon_, MONITOR_NAME) 28 + 23 29 static struct rv_monitor rv_this; 24 30 25 31 static void react(enum states curr_state, enum events event) ··· 189 183 /* 190 184 * global monitor (a single variable) 191 185 */ 192 - static struct da_monitor da_mon_this; 186 + static struct da_monitor DA_MON_NAME; 193 187 194 188 /* 195 189 * da_get_monitor - return the global monitor address 196 190 */ 197 191 static struct da_monitor *da_get_monitor(void) 198 192 { 199 - return &da_mon_this; 193 + return &DA_MON_NAME; 200 194 } 201 195 202 196 /* ··· 229 223 /* 230 224 * per-cpu monitor variables 231 225 */ 232 - static DEFINE_PER_CPU(struct da_monitor, da_mon_this); 226 + static DEFINE_PER_CPU(struct da_monitor, DA_MON_NAME); 233 227 234 228 /* 235 229 * da_get_monitor - return current CPU monitor address 236 230 */ 237 231 static struct da_monitor *da_get_monitor(void) 238 232 { 239 - return this_cpu_ptr(&da_mon_this); 233 + return this_cpu_ptr(&DA_MON_NAME); 240 234 } 241 235 242 236 /* ··· 248 242 int cpu; 249 243 250 244 for_each_cpu(cpu, cpu_online_mask) { 251 - da_mon = per_cpu_ptr(&da_mon_this, cpu); 245 + da_mon = per_cpu_ptr(&DA_MON_NAME, cpu); 252 246 da_monitor_reset(da_mon); 253 247 } 254 248 }