CPUs coming online sync themselves with current MTRR state at an
appropriate point anyway.
It's not actually possible to have a newly booted CPU immediately have
in-sync MTRR state anyway. It has to be synced up as part of normal
CPU bootstrap procedure. Which is what we do.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
error = -EINVAL;
replace = -1;
- /* No CPU hotplug when we change MTRR entries */
- lock_cpu_hotplug();
/* Search for existing MTRR */
mutex_lock(&mtrr_mutex);
for (i = 0; i < num_var_ranges; ++i) {
error = i;
out:
mutex_unlock(&mtrr_mutex);
- unlock_cpu_hotplug();
return error;
}
return -ENXIO;
max = num_var_ranges;
- /* No CPU hotplug when we change MTRR entries */
- lock_cpu_hotplug();
mutex_lock(&mtrr_mutex);
if (reg < 0) {
/* Search for existing MTRR */
error = reg;
out:
mutex_unlock(&mtrr_mutex);
- unlock_cpu_hotplug();
return error;
}
/**
#define smp_processor_id() raw_smp_processor_id()
-/* No Xen contexts can be preempted by CPU hotplug. */
-#define lock_cpu_hotplug() ((void)0)
-#define unlock_cpu_hotplug() ((void)0)
-
int alloc_cpu_id(void);
#endif /* __XEN_SMP_H__ */