From: Keir Fraser Date: Tue, 1 Jun 2010 09:56:07 +0000 (+0100) Subject: x86 mtrr: Remove (noop) lock_cpu_hotplug(). X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~12043 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f55efa2b1848289293fa813ecbe2a1ddb24fe5ed;p=xen.git x86 mtrr: Remove (noop) lock_cpu_hotplug(). 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 --- diff --git a/xen/arch/x86/cpu/mtrr/main.c b/xen/arch/x86/cpu/mtrr/main.c index f99054468c..75d9a6b2b9 100644 --- a/xen/arch/x86/cpu/mtrr/main.c +++ b/xen/arch/x86/cpu/mtrr/main.c @@ -365,8 +365,6 @@ int mtrr_add_page(unsigned long base, unsigned long size, 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) { @@ -422,7 +420,6 @@ int mtrr_add_page(unsigned long base, unsigned long size, error = i; out: mutex_unlock(&mtrr_mutex); - unlock_cpu_hotplug(); return error; } @@ -511,8 +508,6 @@ int mtrr_del_page(int reg, unsigned long base, unsigned long size) 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 */ @@ -553,7 +548,6 @@ int mtrr_del_page(int reg, unsigned long base, unsigned long size) error = reg; out: mutex_unlock(&mtrr_mutex); - unlock_cpu_hotplug(); return error; } /** diff --git a/xen/include/xen/smp.h b/xen/include/xen/smp.h index 7eac790bf7..6d7dca4211 100644 --- a/xen/include/xen/smp.h +++ b/xen/include/xen/smp.h @@ -61,10 +61,6 @@ static inline int on_each_cpu( #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__ */