Skip to contentSkip to conversation

xen/cpu: Fix ARM build following c/s 597fbb8

PATCH In review Andrew Cooper 3 participants 3 messages Apr 8, 2019 – Apr 9, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen/cpu: Fix ARM build following c/s 597fbb8

c/s 597fbb8 "xen/timers: Fix memory leak with cpu unplug/plug" broke the ARM build by being the first patch to add park_offline_cpus to common code.

While it is currently specific to Intel hardware (for reasons of being able to handle machine check exceptions without an immediate system reset), it isn't inherently architecture specific, so define it to be false on ARM for now.

Add a comment in both smp.h headers explaining the intended behaviour of the option.

---
CC: Jan Beulich <[email protected]>
CC: Wei Liu <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Stefano Stabellini <[email protected]>
CC: Julien Grall <[email protected]>

This time build tested on ARM. Sorry!

---
 xen/include/asm-arm/smp.h | 6 ++++++
 xen/include/asm-x86/smp.h | 4 ++++
 2 files changed, 10 insertions(+)
xen/include/asm-arm/smp.h +6 -0
index 3c12268..fdbcefa 100644
@@ -14,6 +14,12 @@ DECLARE_PER_CPU(cpumask_var_t, cpu_core_mask);
 
 #define raw_smp_processor_id() (get_processor_id())
 
+/*
+ * Do we, for platform reasons, need to actually keep CPUs online when we
+ * would otherwise prefer them to be off?
+ */
+#define park_offline_cpus false
+
 extern void noreturn stop_cpu(void);
 
 extern int arch_smp_init(void);
xen/include/asm-x86/smp.h +4 -0
index 09c5545..9f533f9 100644
@@ -26,6 +26,10 @@ DECLARE_PER_CPU(cpumask_var_t, cpu_sibling_mask);
 DECLARE_PER_CPU(cpumask_var_t, cpu_core_mask);
 DECLARE_PER_CPU(cpumask_var_t, scratch_cpumask);
 
+/*
+ * Do we, for platform reasons, need to actually keep CPUs online when we
+ * would otherwise prefer them to be off?
+ */
 extern bool park_offline_cpus;
 
 void smp_send_nmi_allbutself(void);
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Reviewed-by on v1 1/1
#1 lore raw

Hi Andrew,

Quoted 11 lines · Andrew Cooper

c/s 597fbb8 "xen/timers: Fix memory leak with cpu unplug/plug" broke the ARM build by being the first patch to add park_offline_cpus to common code.

While it is currently specific to Intel hardware (for reasons of being able to handle machine check exceptions without an immediate system reset), it isn't inherently architecture specific, so define it to be false on ARM for now.

Add a comment in both smp.h headers explaining the intended behaviour of the option.

Cheers,

Quoted 46 lines

---
CC: Jan Beulich <[email protected]>
CC: Wei Liu <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Stefano Stabellini <[email protected]>
CC: Julien Grall <[email protected]>

This time build tested on ARM. Sorry!

---
  xen/include/asm-arm/smp.h | 6 ++++++
  xen/include/asm-x86/smp.h | 4 ++++
  2 files changed, 10 insertions(+)
xen/include/asm-arm/smp.h +6 -0
index 3c12268..fdbcefa 100644
@@ -14,6 +14,12 @@ DECLARE_PER_CPU(cpumask_var_t, cpu_core_mask);
 
  #define raw_smp_processor_id() (get_processor_id())
 
+/*
+ * Do we, for platform reasons, need to actually keep CPUs online when we
+ * would otherwise prefer them to be off?
+ */
+#define park_offline_cpus false
+
  extern void noreturn stop_cpu(void);
 
  extern int arch_smp_init(void);
xen/include/asm-x86/smp.h +4 -0
index 09c5545..9f533f9 100644
@@ -26,6 +26,10 @@ DECLARE_PER_CPU(cpumask_var_t, cpu_sibling_mask);
  DECLARE_PER_CPU(cpumask_var_t, cpu_core_mask);
  DECLARE_PER_CPU(cpumask_var_t, scratch_cpumask);
 
+/*
+ * Do we, for platform reasons, need to actually keep CPUs online when we
+ * would otherwise prefer them to be off?
+ */
  extern bool park_offline_cpus;
 
  void smp_send_nmi_allbutself(void);
Signature · 6 lines
Julien Grall

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Reviewed-by on v1 1/1
#2 lore raw
In reply to Andrew Cooper
Quoted 11 lines · Andrew Cooper

c/s 597fbb8 "xen/timers: Fix memory leak with cpu unplug/plug" broke the ARM build by being the first patch to add park_offline_cpus to common code.

While it is currently specific to Intel hardware (for reasons of being able to handle machine check exceptions without an immediate system reset), it isn't inherently architecture specific, so define it to be false on ARM for now.

Add a comment in both smp.h headers explaining the intended behaviour of the option.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel