Skip to contentSkip to conversation

arm: introduce psci_smp_ops and use them on Xen

PATCH Superseded Stefano Stabellini 7 participants 46 messages Apr 5, 2013 – Apr 25, 2013

Subsystems (3)

v6 of 11 Superseded Latest is v11 →

lore
Share & tools
lore
#0 lore raw

v6 cover arm: introduce psci_smp_ops and use them on Xen

Hi all,
this is the sixth version of the patch series to move virt_smp_ops out of mach-virt and make it a generic set of reusable PSCI based smp_ops. psci_smp_ops are preferred over the platform smp_ops.
I added a patch to introduce smp_init to this series.
In the last patch I am using smp_init to switch to psci_smp_ops if Xen is detected on the platform.

Jon Medhurst (1):
ARM: Enable selection of SMP operations at boot time

Stefano Stabellini (3):
arm: introduce psci_smp_ops
arm: prefer psci_smp_ops over mdesc->smp xen/arm: introduce xen_early_init, use PSCI on xen

 arch/arm/Kconfig                      |    1 +
 arch/arm/include/asm/mach/arch.h      |    3 +
 arch/arm/include/asm/psci.h           |   29 ++++++++++++++
 arch/arm/include/asm/xen/hypervisor.h |    6 +++
 arch/arm/kernel/Makefile              |    5 ++-
 arch/arm/kernel/psci.c                |    7 +--
 arch/arm/kernel/psci_smp.c            |   67 +++++++++++++++++++++++++++++++++
 arch/arm/kernel/setup.c               |   12 +++++-
 arch/arm/mach-virt/Makefile           |    1 -
 arch/arm/mach-virt/platsmp.c          |   58 ----------------------------
 arch/arm/mach-virt/virt.c             |    3 -
 arch/arm/xen/enlighten.c              |   36 ++++++++++++++----
 12 files changed, 152 insertions(+), 76 deletions(-)

git://xenbits.xen.org/people/sstabellini/linux-pvhvm.git 3.9-rc3-smp-6

Cheers,

Stefano

#1 lore raw

PATCH v6 1/4 arm: introduce psci_smp_ops

Rename virt_smp_ops to psci_smp_ops and move them to arch/arm/kernel/psci_smp.c. Remove mach-virt/platsmp.c, now unused.
Compile psci_smp if CONFIG_ARM_PSCI and CONFIG_SMP.

Add a cpu_die smp_op based on psci_ops.cpu_off.

Initialize PSCI before setting smp_ops in setup_arch. Use psci_smp_ops if the platform doesn't provide its own smp_ops.

Changes in v6:
- fixed return values for psci_smp_available and psci_init ifndef CONFIG_ARM_PSCI.

Changes in v5:
- document psci_operations;
- psci_init returns NULL.

CC will.deacon at arm.com
CC arnd at arndb.de
CC marc.zyngier at arm.com
CC linux at arm.linux.org.uk
CC nico at linaro.org
---
 arch/arm/include/asm/psci.h  |   29 ++++++++++++++++++
 arch/arm/kernel/Makefile     |    5 ++-
 arch/arm/kernel/psci.c       |    7 ++--
 arch/arm/kernel/psci_smp.c   |   67 ++++++++++++++++++++++++++++++++++++++++++
 arch/arm/kernel/setup.c      |    7 ++++-
 arch/arm/mach-virt/Makefile  |    1 -
 arch/arm/mach-virt/platsmp.c |   58 ------------------------------------
 arch/arm/mach-virt/virt.c    |    3 --
 8 files changed, 109 insertions(+), 68 deletions(-)
 create mode 100644 arch/arm/kernel/psci_smp.c
 delete mode 100644 arch/arm/mach-virt/platsmp.c
arch/arm/include/asm/psci.h +29 -0
index ce0dbe7..fa44417 100644
@@ -23,6 +23,26 @@ struct psci_power_state {
 	u8	affinity_level;
 };
 
+/*
+ * cpu_suspend   Suspend the execution on a CPU
+ * @state        we don't currently describe affinity levels, so just pass 0.
+ * @entry_point  the first instruction to be executed on return
+ * returns 0  success, < 0 on failure
+ *
+ * cpu_off       Power down a CPU
+ * @state        we don't currently describe affinity levels, so just pass 0.
+ * no return on successful call
+ *
+ * cpu_on        Power up a CPU
+ * @cpuid        cpuid of target CPU, as from MPIDR
+ * @entry_point  the first instruction to be executed on return
+ * returns 0  success, < 0 on failure
+ *
+ * migrate       Migrate the context to a different CPU
+ * @cpuid        cpuid of target CPU, as from MPIDR
+ * returns 0  success, < 0 on failure
+ *
+ */
 struct psci_operations {
 	int (*cpu_suspend)(struct psci_power_state state,
 			   unsigned long entry_point);
@@ -32,5 +52,14 @@ struct psci_operations {
 };
 
 extern struct psci_operations psci_ops;
+extern struct smp_operations psci_smp_ops;
+
+#ifdef CONFIG_ARM_PSCI
+void psci_init(void);
+bool psci_smp_available(void);
+#else
+static inline void psci_init(void) { }
+static inline bool psci_smp_available(void) { return false; }
+#endif
 
 #endif /* __ASM_ARM_PSCI_H */
arch/arm/kernel/Makefile +4 -1
index 5f3338e..dd9d90a 100644
@@ -82,6 +82,9 @@ obj-$(CONFIG_DEBUG_LL)	+= debug.o
 obj-$(CONFIG_EARLY_PRINTK)	+= early_printk.o
 
 obj-$(CONFIG_ARM_VIRT_EXT)	+= hyp-stub.o
-obj-$(CONFIG_ARM_PSCI)		+= psci.o
+ifeq ($(CONFIG_ARM_PSCI),y)
+obj-y				+= psci.o
+obj-$(CONFIG_SMP)		+= psci_smp.o
+endif
 
 extra-y := $(head-y) vmlinux.lds
arch/arm/kernel/psci.c +3 -4
index 3653164..4693188 100644
@@ -158,7 +158,7 @@ static const struct of_device_id psci_of_match[] __initconst = {
 	{},
 };
 
-static int __init psci_init(void)
+void __init psci_init(void)
 {
 	struct device_node *np;
 	const char *method;
@@ -166,7 +166,7 @@ static int __init psci_init(void)
 
 	np = of_find_matching_node(NULL, psci_of_match);
 	if (!np)
-		return 0;
+		return;
 
 	pr_info("probing function IDs from device-tree\n");
 
@@ -206,6 +206,5 @@ static int __init psci_init(void)
 
 out_put_node:
 	of_node_put(np);
-	return 0;
+	return;
 }
-early_initcall(psci_init);
arch/arm/kernel/psci_smp.c new file +67 -0

67 lines not on this page · raw message

arch/arm/kernel/setup.c +6 -1
index 3f6cbb2..341efaa 100644
@@ -36,6 +36,7 @@
 #include <asm/cputype.h>
 #include <asm/elf.h>
 #include <asm/procinfo.h>
+#include <asm/psci.h>
 #include <asm/sections.h>
 #include <asm/setup.h>
 #include <asm/smp_plat.h>
@@ -766,9 +767,13 @@ void __init setup_arch(char **cmdline_p)
 	unflatten_device_tree();
 
 	arm_dt_init_cpu_maps();
+	psci_init();
 #ifdef CONFIG_SMP
 	if (is_smp()) {
-		smp_set_ops(mdesc->smp);
+		if (mdesc->smp)
+			smp_set_ops(mdesc->smp);
+		else if (psci_smp_available())
+			smp_set_ops(&psci_smp_ops);
 		smp_init_cpus();
 	}
 #endif
arch/arm/mach-virt/Makefile +0 -1
index 042afc1..7ddbfa6 100644
@@ -3,4 +3,3 @@
 #
 
 obj-y					:= virt.o
-obj-$(CONFIG_SMP)			+= platsmp.o
arch/arm/mach-virt/platsmp.c deleted +0 -58

58 lines not on this page · raw message

arch/arm/mach-virt/virt.c +0 -3
index 528c05e..c417752 100644
@@ -44,12 +44,9 @@ static const char *virt_dt_match[] = {
 	NULL
 };
 
-extern struct smp_operations virt_smp_ops;
-
 DT_MACHINE_START(VIRT, "Dummy Virtual Machine")
 	.init_irq	= irqchip_init,
 	.init_time	= virt_timer_init,
 	.init_machine	= virt_init,
-	.smp		= smp_ops(virt_smp_ops),
 	.dt_compat	= virt_dt_match,
 MACHINE_END
Signature · 1 line
1.7.2.5
#2 lore raw

Re: [PATCH v6 1/4] arm: introduce psci_smp_ops

arch/arm/kernel/setup.c void __init setup_arch(char **cmdline_p) · line 776

Quoted 8 lines · Stefano Stabellini
arch/arm/kernel/setup.c +5 -1
+	psci_init();
 #ifdef CONFIG_SMP
 	if (is_smp()) {
-		smp_set_ops(mdesc->smp);
+		if (mdesc->smp)
+			smp_set_ops(mdesc->smp);
+		else if (psci_smp_available())
+			smp_set_ops(&psci_smp_ops);

So, I have a vague recollection that the ordering of the above got discussed but I can't find it amongst the 21k of messages so far this year.

The above looks weird to me. Surely this should be:

		if (psci_smp_available())
			smp_set_ops(&psci_smp_ops);
		else if (mdesc->smp)
			smp_set_ops(mdesc->ops);

This means that if PSCI is available, and provides a set of operations, we override whatever the platform has statically provided.

Remember, we're trying to move away from using "mdesc"s for platform stuff, relying on things like DT and such like. We really should not be going for mdesc-overriding-newstuff but newstuff-overriding-mdesc.

Now, if the psci stuff can't be relied upon to provide the correct functionality, then that's a separate problem which needs addressing differently.

This should allow the Xen problem to be resolved, because Xen will provide the PSCI operations, and it's correct in that case to override the platform's SMP operations.

#3 lore raw

Re: [PATCH v6 1/4] arm: introduce psci_smp_ops

Quoted 20 lines · Russell King - ARM Linux

arch/arm/kernel/setup.c void __init setup_arch(char **cmdline_p) · line 776

Quoted 8 lines · Stefano Stabellini
arch/arm/kernel/setup.c +5 -1
+	psci_init();
 #ifdef CONFIG_SMP
 	if (is_smp()) {
-		smp_set_ops(mdesc->smp);
+		if (mdesc->smp)
+			smp_set_ops(mdesc->smp);
+		else if (psci_smp_available())
+			smp_set_ops(&psci_smp_ops);

So, I have a vague recollection that the ordering of the above got discussed but I can't find it amongst the 21k of messages so far this year.

The above looks weird to me. Surely this should be:

		if (psci_smp_available())
			smp_set_ops(&psci_smp_ops);
		else if (mdesc->smp)
			smp_set_ops(mdesc->ops);
Quoted 6 lines

This means that if PSCI is available, and provides a set of operations, we override whatever the platform has statically provided.

Remember, we're trying to move away from using "mdesc"s for platform stuff, relying on things like DT and such like. We really should not be going for mdesc-overriding-newstuff but newstuff-overriding-mdesc.

That's correct, in fact if you look at the next patch you'll see that it changes the order.

I introduced the mechanism first and changed the priority later - it should help bisectability.
I can fold the two patches into one if you prefer.

Quoted 7 lines

Now, if the psci stuff can't be relied upon to provide the correct functionality, then that's a separate problem which needs addressing differently.

This should allow the Xen problem to be resolved, because Xen will provide the PSCI operations, and it's correct in that case to override the platform's SMP operations.

Yes, increasing the priority of PSCI helps Xen a lot.
In order to completely solve the issue for Xen though, another patch is needed (http://marc.info/?l=linux-kernel&m=136630106201968&w=2) because of the introduction of smp_init.

#4 lore raw

Re: [PATCH v6 1/4] arm: introduce psci_smp_ops

Quoted 28 lines · Stefano Stabellini
Quoted 20 lines · Russell King - ARM Linux

arch/arm/kernel/setup.c void __init setup_arch(char **cmdline_p) · line 776

Quoted 8 lines · Stefano Stabellini
arch/arm/kernel/setup.c +5 -1
+	psci_init();
 #ifdef CONFIG_SMP
 	if (is_smp()) {
-		smp_set_ops(mdesc->smp);
+		if (mdesc->smp)
+			smp_set_ops(mdesc->smp);
+		else if (psci_smp_available())
+			smp_set_ops(&psci_smp_ops);

So, I have a vague recollection that the ordering of the above got discussed but I can't find it amongst the 21k of messages so far this year.

The above looks weird to me. Surely this should be:

		if (psci_smp_available())
			smp_set_ops(&psci_smp_ops);
		else if (mdesc->smp)
			smp_set_ops(mdesc->ops);
Quoted 6 lines

This means that if PSCI is available, and provides a set of operations, we override whatever the platform has statically provided.

Remember, we're trying to move away from using "mdesc"s for platform stuff, relying on things like DT and such like. We really should not be going for mdesc-overriding-newstuff but newstuff-overriding-mdesc.

Quoted 6 lines

That's correct, in fact if you look at the next patch you'll see that it changes the order.

I introduced the mechanism first and changed the priority later - it should help bisectability.
I can fold the two patches into one if you prefer.

Please let's keep the order as we discussed. Otherwise this is just too confusing (Russell's comment is a good example of that).

Nicolas

#5 lore raw

Re: [PATCH v6 1/4] arm: introduce psci_smp_ops

Quoted 33 lines · Nicolas Pitre
Quoted 31 lines · Stefano Stabellini
Quoted 20 lines · Russell King - ARM Linux

arch/arm/kernel/setup.c void __init setup_arch(char **cmdline_p) · line 776

Quoted 8 lines · Stefano Stabellini
arch/arm/kernel/setup.c +5 -1
+	psci_init();
 #ifdef CONFIG_SMP
 	if (is_smp()) {
-		smp_set_ops(mdesc->smp);
+		if (mdesc->smp)
+			smp_set_ops(mdesc->smp);
+		else if (psci_smp_available())
+			smp_set_ops(&psci_smp_ops);

So, I have a vague recollection that the ordering of the above got discussed but I can't find it amongst the 21k of messages so far this year.

The above looks weird to me. Surely this should be:

		if (psci_smp_available())
			smp_set_ops(&psci_smp_ops);
		else if (mdesc->smp)
			smp_set_ops(mdesc->ops);
Quoted 6 lines

This means that if PSCI is available, and provides a set of operations, we override whatever the platform has statically provided.

Remember, we're trying to move away from using "mdesc"s for platform stuff, relying on things like DT and such like. We really should not be going for mdesc-overriding-newstuff but newstuff-overriding-mdesc.

That's correct, in fact if you look at the next patch you'll see that it changes the order.

Quoted 6 lines
Quoted 3 lines

I introduced the mechanism first and changed the priority later - it should help bisectability.
I can fold the two patches into one if you prefer.

Please let's keep the order as we discussed. Otherwise this is just too confusing (Russell's comment is a good example of that).

You are right, it is confusing.
By "keep the order as we discussed", do you mean merge the second patch into the first one, correct?

#6 lore raw

Re: [PATCH v6 1/4] arm: introduce psci_smp_ops

Quoted 38 lines · Stefano Stabellini
Quoted 37 lines · Nicolas Pitre
Quoted 34 lines · Stefano Stabellini
Quoted 20 lines · Russell King - ARM Linux

arch/arm/kernel/setup.c void __init setup_arch(char **cmdline_p) · line 776

Quoted 8 lines · Stefano Stabellini
arch/arm/kernel/setup.c +5 -1
+	psci_init();
 #ifdef CONFIG_SMP
 	if (is_smp()) {
-		smp_set_ops(mdesc->smp);
+		if (mdesc->smp)
+			smp_set_ops(mdesc->smp);
+		else if (psci_smp_available())
+			smp_set_ops(&psci_smp_ops);

So, I have a vague recollection that the ordering of the above got discussed but I can't find it amongst the 21k of messages so far this year.

The above looks weird to me. Surely this should be:

		if (psci_smp_available())
			smp_set_ops(&psci_smp_ops);
		else if (mdesc->smp)
			smp_set_ops(mdesc->ops);
Quoted 6 lines

This means that if PSCI is available, and provides a set of operations, we override whatever the platform has statically provided.

Remember, we're trying to move away from using "mdesc"s for platform stuff, relying on things like DT and such like. We really should not be going for mdesc-overriding-newstuff but newstuff-overriding-mdesc.

That's correct, in fact if you look at the next patch you'll see that it changes the order.

I introduced the mechanism first and changed the priority later - it should help bisectability.
I can fold the two patches into one if you prefer.

Quoted 6 lines
Quoted 2 lines

Please let's keep the order as we discussed. Otherwise this is just too confusing (Russell's comment is a good example of that).

You are right, it is confusing.
By "keep the order as we discussed", do you mean merge the second patch into the first one, correct?

Correct. And merge the commit log message too.

Nicolas

#7 lore raw

Re: [PATCH v6 1/4] arm: introduce psci_smp_ops

In reply to Stefano Stabellini
Quoted 7 lines · Stefano Stabellini
Quoted 2 lines · Nicolas Pitre

Please let's keep the order as we discussed. Otherwise this is just too confusing (Russell's comment is a good example of that).

You are right, it is confusing.
By "keep the order as we discussed", do you mean merge the second patch into the first one, correct?

Well, the solution to this kind of confusion is to ignore comments on the older patches and post a new set of patches and ask for all relevant comments to be against that set and that set only.

#8 lore raw

Re: [PATCH v6 1/4] arm: introduce psci_smp_ops

In reply to Nicolas Pitre
Quoted 33 lines · Nicolas Pitre
Quoted 31 lines · Stefano Stabellini
Quoted 20 lines · Russell King - ARM Linux

arch/arm/kernel/setup.c void __init setup_arch(char **cmdline_p) · line 776

Quoted 8 lines · Stefano Stabellini
arch/arm/kernel/setup.c +5 -1
+	psci_init();
 #ifdef CONFIG_SMP
 	if (is_smp()) {
-		smp_set_ops(mdesc->smp);
+		if (mdesc->smp)
+			smp_set_ops(mdesc->smp);
+		else if (psci_smp_available())
+			smp_set_ops(&psci_smp_ops);

So, I have a vague recollection that the ordering of the above got discussed but I can't find it amongst the 21k of messages so far this year.

The above looks weird to me. Surely this should be:

		if (psci_smp_available())
			smp_set_ops(&psci_smp_ops);
		else if (mdesc->smp)
			smp_set_ops(mdesc->ops);
Quoted 6 lines

This means that if PSCI is available, and provides a set of operations, we override whatever the platform has statically provided.

Remember, we're trying to move away from using "mdesc"s for platform stuff, relying on things like DT and such like. We really should not be going for mdesc-overriding-newstuff but newstuff-overriding-mdesc.

That's correct, in fact if you look at the next patch you'll see that it changes the order.

Quoted 6 lines
Quoted 3 lines

I introduced the mechanism first and changed the priority later - it should help bisectability.
I can fold the two patches into one if you prefer.

Please let's keep the order as we discussed. Otherwise this is just too confusing (Russell's comment is a good example of that).

My comment is based on the code which I had read and quoted. Things had moved on from that point, but, because I had 2000 odd messages to get through, there was no way to know at that point that there had been further discussion.

This is why catching up is such a problem - not only the amount of time it takes (I'm _still_ reading messages - I've only just read your reply above, so I'm still back in Thursday's email...)

I don't think there's any confusion though - the order I suggested seems to be the order which I recall later patches adopted.

#9 lore raw

Re: [PATCH v6 1/4] arm: introduce psci_smp_ops

In reply to Stefano Stabellini
Quoted 9 lines · Stefano Stabellini
Quoted 3 lines · Russell King - ARM Linux

This should allow the Xen problem to be resolved, because Xen will provide the PSCI operations, and it's correct in that case to override the platform's SMP operations.

Yes, increasing the priority of PSCI helps Xen a lot.
In order to completely solve the issue for Xen though, another patch is needed (http://marc.info/?l=linux-kernel&m=136630106201968&w=2) because of the introduction of smp_init.

Please look at the latest smp_init patch version I sent to you. It shouldn't conflict with Xen any longer. It now returns a bool result depending on whether it did set up smp_ops or not.

Nicolas

#10 lore raw

Re: [PATCH v6 1/4] arm: introduce psci_smp_ops

Quoted 7 lines · Nicolas Pitre
Quoted 5 lines · Stefano Stabellini
Quoted 3 lines · Russell King - ARM Linux

This should allow the Xen problem to be resolved, because Xen will provide the PSCI operations, and it's correct in that case to override the platform's SMP operations.

Quoted 8 lines
Quoted 4 lines

Yes, increasing the priority of PSCI helps Xen a lot.
In order to completely solve the issue for Xen though, another patch is needed (http://marc.info/?l=linux-kernel&m=136630106201968&w=2) because of the introduction of smp_init.

Please look at the latest smp_init patch version I sent to you. It shouldn't conflict with Xen any longer. It now returns a bool result depending on whether it did set up smp_ops or not.

CPUs are virtualized by Xen and do not reflect or expose the underlying SMP hardware and firmware features, so an hardware specific smp_init cannot run.

So the smp_init patch still breaks Xen because even if smp_init can fail graciously, executing a platform specific smp_init function that tries to access registers and memory regions that are not present is going to cause an undefined behaviour.

Under Xen, smp_init won't have a chance to return any value because it is going to crash first.

#11 lore raw

Re: [PATCH v6 1/4] arm: introduce psci_smp_ops

Quoted 17 lines · Stefano Stabellini
Quoted 7 lines · Nicolas Pitre
Quoted 5 lines · Stefano Stabellini
Quoted 3 lines · Russell King - ARM Linux

This should allow the Xen problem to be resolved, because Xen will provide the PSCI operations, and it's correct in that case to override the platform's SMP operations.

Quoted 8 lines
Quoted 4 lines

Yes, increasing the priority of PSCI helps Xen a lot.
In order to completely solve the issue for Xen though, another patch is needed (http://marc.info/?l=linux-kernel&m=136630106201968&w=2) because of the introduction of smp_init.

Please look at the latest smp_init patch version I sent to you. It shouldn't conflict with Xen any longer. It now returns a bool result depending on whether it did set up smp_ops or not.

Quoted 8 lines

CPUs are virtualized by Xen and do not reflect or expose the underlying SMP hardware and firmware features, so an hardware specific smp_init cannot run.

So the smp_init patch still breaks Xen because even if smp_init can fail graciously, executing a platform specific smp_init function that tries to access registers and memory regions that are not present is going to cause an undefined behaviour.

It won't access hardware but just look into the DT and return false if nothing interesting is found. At which point the next attempt in the priority list is PSCI by default.

Nicolas

#12 lore raw

Re: [PATCH v6 1/4] arm: introduce psci_smp_ops

Quoted 23 lines · Nicolas Pitre
Quoted 21 lines · Stefano Stabellini
Quoted 7 lines · Nicolas Pitre
Quoted 5 lines · Stefano Stabellini
Quoted 3 lines · Russell King - ARM Linux

This should allow the Xen problem to be resolved, because Xen will provide the PSCI operations, and it's correct in that case to override the platform's SMP operations.

Quoted 8 lines
Quoted 4 lines

Yes, increasing the priority of PSCI helps Xen a lot.
In order to completely solve the issue for Xen though, another patch is needed (http://marc.info/?l=linux-kernel&m=136630106201968&w=2) because of the introduction of smp_init.

Please look at the latest smp_init patch version I sent to you. It shouldn't conflict with Xen any longer. It now returns a bool result depending on whether it did set up smp_ops or not.

CPUs are virtualized by Xen and do not reflect or expose the underlying SMP hardware and firmware features, so an hardware specific smp_init cannot run.

Quoted 8 lines
Quoted 4 lines

So the smp_init patch still breaks Xen because even if smp_init can fail graciously, executing a platform specific smp_init function that tries to access registers and memory regions that are not present is going to cause an undefined behaviour.

It won't access hardware but just look into the DT and return false if nothing interesting is found. At which point the next attempt in the priority list is PSCI by default.

OK, that should work.
I am going to drop "xen/arm: introduce xen_early_init, use PSCI on xen".

We'll have to be careful enforcing that future smp_init implementations use DT rather than probing registers. Maybe I should add a comment to the smp_init patch to clarify that?

#13 lore raw

Re: [PATCH v6 1/4] arm: introduce psci_smp_ops

Quoted 33 lines · Stefano Stabellini
Quoted 23 lines · Nicolas Pitre
Quoted 21 lines · Stefano Stabellini
Quoted 7 lines · Nicolas Pitre
Quoted 5 lines · Stefano Stabellini
Quoted 3 lines · Russell King - ARM Linux

This should allow the Xen problem to be resolved, because Xen will provide the PSCI operations, and it's correct in that case to override the platform's SMP operations.

Quoted 8 lines
Quoted 4 lines

Yes, increasing the priority of PSCI helps Xen a lot.
In order to completely solve the issue for Xen though, another patch is needed (http://marc.info/?l=linux-kernel&m=136630106201968&w=2) because of the introduction of smp_init.

Please look at the latest smp_init patch version I sent to you. It shouldn't conflict with Xen any longer. It now returns a bool result depending on whether it did set up smp_ops or not.

CPUs are virtualized by Xen and do not reflect or expose the underlying SMP hardware and firmware features, so an hardware specific smp_init cannot run.

Quoted 8 lines
Quoted 4 lines

So the smp_init patch still breaks Xen because even if smp_init can fail graciously, executing a platform specific smp_init function that tries to access registers and memory regions that are not present is going to cause an undefined behaviour.

It won't access hardware but just look into the DT and return false if nothing interesting is found. At which point the next attempt in the priority list is PSCI by default.

Quoted 6 lines

OK, that should work.
I am going to drop "xen/arm: introduce xen_early_init, use PSCI on xen".

We'll have to be careful enforcing that future smp_init implementations use DT rather than probing registers. Maybe I should add a comment to the smp_init patch to clarify that?

No one should be probing registers without making sure it is safe to do so. Even on non virtualized hardware this can be a dangerous thing to do.

Nicolas

#14 lore raw

Re: [Xen-devel] [PATCH v6 1/4] arm: introduce psci_smp_ops

Quoted 3 lines · Nicolas Pitre

No one should be probing registers without making sure it is safe to do so. Even on non virtualized hardware this can be a dangerous thing to do.

Won't people writing per machine code consider, not unreasonably, that having been called through a mdesc machine specific hook constitutes enough "making sure" that they think it is safe to touch registers which are specific to that machine?

Ian.

#15 lore raw

Re: [Xen-devel] [PATCH v6 1/4] arm: introduce psci_smp_ops

Quoted 9 lines · Ian Campbell
Quoted 3 lines · Nicolas Pitre

No one should be probing registers without making sure it is safe to do so. Even on non virtualized hardware this can be a dangerous thing to do.

Won't people writing per machine code consider, not unreasonably, that having been called through a mdesc machine specific hook constitutes enough "making sure" that they think it is safe to touch registers which are specific to that machine?

Remember that this hook was introduced to decide at run time between different possibilities for SMP ops on the _same_ machine configuration. That machine shouldn't do things which is not permitted on either possible alternatives already. So far the actual usage of that hook only looks in the DT to make a decision. But even if it were to touch the hardware, that means it has to be safe to do so on all the possible hardware variations this mdesc is associated to.

And if Xen wants to emulate one of those hardware alternatives, then it better be ready to emulate it properly, or manage for _another_ mdesc to be selected instead. That's why mach-virt was introduced.

So in my opinion there is just no issue here.

Nicolas

#16 lore raw

Re: [Xen-devel] [PATCH v6 1/4] arm: introduce psci_smp_ops

Quoted 12 lines · Nicolas Pitre
Quoted 9 lines · Ian Campbell
Quoted 3 lines · Nicolas Pitre

No one should be probing registers without making sure it is safe to do so. Even on non virtualized hardware this can be a dangerous thing to do.

Won't people writing per machine code consider, not unreasonably, that having been called through a mdesc machine specific hook constitutes enough "making sure" that they think it is safe to touch registers which are specific to that machine?

Quoted 7 lines

Remember that this hook was introduced to decide at run time between different possibilities for SMP ops on the _same_ machine configuration. That machine shouldn't do things which is not permitted on either possible alternatives already. So far the actual usage of that hook only looks in the DT to make a decision. But even if it were to touch the hardware, that means it has to be safe to do so on all the possible hardware variations this mdesc is associated to.

This last sentence is the key.

It is not guaranteed that being safe on "all the possible hardware variations this mdesc is associated to" and being safe on Xen are the same thing.

What if the same magic configuration register exists on all the possible variations of the platform?
I understand that it is unlikely but I think it is a possibility.

If we don't take further precautions I'll be forced to regularly scan the list for smp_init implementations and look for possible breakages, pointing the unaware author of the patches to this conversation. Honestly it is not my idea of fun.

Quoted 3 lines

And if Xen wants to emulate one of those hardware alternatives, then it better be ready to emulate it properly, or manage for _another_ mdesc to be selected instead. That's why mach-virt was introduced.

I don't mean to argue pointlessly here, but I thought that it was clear that Xen does not emulate any hardware interfaces at all.

Of course when a convenient virtualization aware hardware interface is available (the vGIC for example) Xen is going to use it, but other than that no emulation is going to be done.

Quoted 1 line

So in my opinion there is just no issue here.

Not now, and maybe not even in the near future. But I feel that we are taking an error prone approach.

#17 lore raw

Re: [Xen-devel] [PATCH v6 1/4] arm: introduce psci_smp_ops

Quoted 23 lines · Stefano Stabellini
Quoted 12 lines · Nicolas Pitre
Quoted 9 lines · Ian Campbell
Quoted 3 lines · Nicolas Pitre

No one should be probing registers without making sure it is safe to do so. Even on non virtualized hardware this can be a dangerous thing to do.

Won't people writing per machine code consider, not unreasonably, that having been called through a mdesc machine specific hook constitutes enough "making sure" that they think it is safe to touch registers which are specific to that machine?

Quoted 7 lines

Remember that this hook was introduced to decide at run time between different possibilities for SMP ops on the _same_ machine configuration. That machine shouldn't do things which is not permitted on either possible alternatives already. So far the actual usage of that hook only looks in the DT to make a decision. But even if it were to touch the hardware, that means it has to be safe to do so on all the possible hardware variations this mdesc is associated to.

This last sentence is the key.

Quoted 7 lines

It is not guaranteed that being safe on "all the possible hardware variations this mdesc is associated to" and being safe on Xen are the same thing.

What if the same magic configuration register exists on all the possible variations of the platform?
I understand that it is unlikely but I think it is a possibility.

I think it is actually quite likely for such configuration registers, nvram etc to exist on all variants of a platform and not all that unlikely that smp_init might want to consult them.

Quoted 10 lines

If we don't take further precautions I'll be forced to regularly scan the list for smp_init implementations and look for possible breakages, pointing the unaware author of the patches to this conversation. Honestly it is not my idea of fun.

Quoted 3 lines

And if Xen wants to emulate one of those hardware alternatives, then it better be ready to emulate it properly, or manage for _another_ mdesc to be selected instead. That's why mach-virt was introduced.

Quoted 6 lines

I don't mean to argue pointlessly here, but I thought that it was clear that Xen does not emulate any hardware interfaces at all.

Of course when a convenient virtualization aware hardware interface is available (the vGIC for example) Xen is going to use it, but other than that no emulation is going to be done.

I think the key thing that non-Xen folks aren't aware of is that although Xen passes the majority of the underlying hardware to the dom0 kernel to manage one of the few things it does not expose to guests (where "guests" includes dom0) is the SMP topology of the underlying system.

The physical CPUs are managed/scheduled/etc by the hypervisor and it is the hypervisor which will need to be aware of big.LITTLE and MCPM etc.

The guests, and again this includes dom0, see only a set of VCPUs which are scheduled amongst the PCPUs by the hypervisor. It is not unusual to configure dom0 to have less VCPUs than there are PCPUs in the system. Currently the VCPUs are all considered to be uniform i.e. there is no big.LITTLE exposed to guests, although the hypervisor will most likely eventually support it and so may be scheduling the VCPUs among the big and LITTLE PCPUs according to $THINGS.

I don't think we want to go the route of mandating a 1:1 PCPU:VCPU relationship for dom0 for Xen on ARM.

Ian.

#18 lore raw

Re: [Xen-devel] [PATCH v6 1/4] arm: introduce psci_smp_ops

Quoted 28 lines · Ian Campbell
Quoted 27 lines · Stefano Stabellini
Quoted 12 lines · Nicolas Pitre
Quoted 9 lines · Ian Campbell
Quoted 3 lines · Nicolas Pitre

No one should be probing registers without making sure it is safe to do so. Even on non virtualized hardware this can be a dangerous thing to do.

Won't people writing per machine code consider, not unreasonably, that having been called through a mdesc machine specific hook constitutes enough "making sure" that they think it is safe to touch registers which are specific to that machine?

Quoted 7 lines

Remember that this hook was introduced to decide at run time between different possibilities for SMP ops on the _same_ machine configuration. That machine shouldn't do things which is not permitted on either possible alternatives already. So far the actual usage of that hook only looks in the DT to make a decision. But even if it were to touch the hardware, that means it has to be safe to do so on all the possible hardware variations this mdesc is associated to.

This last sentence is the key.

It is not guaranteed that being safe on "all the possible hardware variations this mdesc is associated to" and being safe on Xen are the same thing.

Quoted 7 lines
Quoted 3 lines

What if the same magic configuration register exists on all the possible variations of the platform?
I understand that it is unlikely but I think it is a possibility.

I think it is actually quite likely for such configuration registers, nvram etc to exist on all variants of a platform and not all that unlikely that smp_init might want to consult them.

In which case the rest of the kernel is also going to consult those registers for other purposes.

Again, what's the problem please?

Quoted 4 lines

I think the key thing that non-Xen folks aren't aware of is that although Xen passes the majority of the underlying hardware to the dom0 kernel to manage one of the few things it does not expose to guests (where "guests" includes dom0) is the SMP topology of the underlying system.

I suspect it is unlikely to pass on the DT information about the CCI either. Which means that, in the case that started this thread, the smp_init function needed by MCPM will simply return false and the next priority in the list i.e. plain PSCI will be initialized instead.

I don't forsee the need to poke at the hardware directly within ->smp_init, not since everything is moving to DT now.

Sure there are ways to screw up Xen support from within this hook, but that can be achieved in many other places. Will Xen take over every possible hooks in the kernel to prevent that from happening?

So please let's not cry wolf needlessly.

Quoted 4 lines

Currently the VCPUs are all considered to be uniform i.e. there is no big.LITTLE exposed to guests, although the hypervisor will most likely eventually support it and so may be scheduling the VCPUs among the big and LITTLE PCPUs according to $THINGS.

Indeed. That's what I suggested earlier.

Nicolas

#19 lore raw

Re: [Xen-devel] [PATCH v6 1/4] arm: introduce psci_smp_ops

Quoted 10 lines · Nicolas Pitre
Quoted 4 lines

I think the key thing that non-Xen folks aren't aware of is that although Xen passes the majority of the underlying hardware to the dom0 kernel to manage one of the few things it does not expose to guests (where "guests" includes dom0) is the SMP topology of the underlying system.

I suspect it is unlikely to pass on the DT information about the CCI either. Which means that, in the case that started this thread, the smp_init function needed by MCPM will simply return false and the next priority in the list i.e. plain PSCI will be initialized instead.

Quoted 8 lines

I don't forsee the need to poke at the hardware directly within ->smp_init, not since everything is moving to DT now.

Sure there are ways to screw up Xen support from within this hook, but that can be achieved in many other places. Will Xen take over every possible hooks in the kernel to prevent that from happening?

So please let's not cry wolf needlessly.

OK, you convinced me :-)
I'll drop the patch.

#20 lore raw

Re: [Xen-devel] [PATCH v6 1/4] arm: introduce psci_smp_ops

In reply to Nicolas Pitre
Quoted 3 lines · Nicolas Pitre

Sure there are ways to screw up Xen support from within this hook, but that can be achieved in many other places. Will Xen take over every possible hooks in the kernel to prevent that from happening?

In the majority of the other cases we would consider it a bug in Xen for not exposing these bits of the underlying hardware correctly to dom0, however the SMP stuff is a bit of a special case for the reasons I explained earlier which is why we are worrying about it more.

Quoted 1 line

So please let's not cry wolf needlessly.

Yes, perhaps those worries unfounded at this stage and we should just run with it and reference this discussion if it turns out to not work out well in practice.

Ian.

#21 lore raw

Re: [Xen-devel] [PATCH v6 1/4] arm: introduce psci_smp_ops

In reply to Nicolas Pitre
Quoted 23 lines · Nicolas Pitre
Quoted 21 lines · Stefano Stabellini
Quoted 7 lines · Nicolas Pitre
Quoted 5 lines · Stefano Stabellini
Quoted 3 lines · Russell King - ARM Linux

This should allow the Xen problem to be resolved, because Xen will provide the PSCI operations, and it's correct in that case to override the platform's SMP operations.

Quoted 8 lines
Quoted 4 lines

Yes, increasing the priority of PSCI helps Xen a lot.
In order to completely solve the issue for Xen though, another patch is needed (http://marc.info/?l=linux-kernel&m=136630106201968&w=2) because of the introduction of smp_init.

Please look at the latest smp_init patch version I sent to you. It shouldn't conflict with Xen any longer. It now returns a bool result depending on whether it did set up smp_ops or not.

CPUs are virtualized by Xen and do not reflect or expose the underlying SMP hardware and firmware features, so an hardware specific smp_init cannot run.

Quoted 8 lines
Quoted 4 lines

So the smp_init patch still breaks Xen because even if smp_init can fail graciously, executing a platform specific smp_init function that tries to access registers and memory regions that are not present is going to cause an undefined behaviour.

It won't access hardware but just look into the DT and return false if nothing interesting is found. At which point the next attempt in the priority list is PSCI by default.

I think there might be some confusion about the semantics of smp_init, since it is in mdesc I had interpreted it as a per-platform hook to allow "magic" SMP setup, which I at least had assumed would (be permitted to) involve hardware specific frobbing, including touching platform specific devices etc.

Is that not the case?

Can we guarantee that this hook won't be used by hardware platforms to e.g. probe NVRAM for SMP topology information or other activities which touch hardware?

If it isn't hardware specific then does this hook really belong in mdesc? Or if it is purely driven by DT can we not implement it in terms of DT at the top level rather than abstracting via a hardware specific hook?

Ian.

#22 lore raw

Re: [PATCH v6 1/4] arm: introduce psci_smp_ops

In reply to Stefano Stabellini
Quoted 7 lines · Stefano Stabellini
Quoted 3 lines · Russell King - ARM Linux

Remember, we're trying to move away from using "mdesc"s for platform stuff, relying on things like DT and such like. We really should not be going for mdesc-overriding-newstuff but newstuff-overriding-mdesc.

That's correct, in fact if you look at the next patch you'll see that it changes the order.

You may have noticed that I've been catching up with email, and it's exceedingly difficult to track what patches are obsolete and have been overridden by new versions.

Quoted 3 lines

I introduced the mechanism first and changed the priority later - it should help bisectability.
I can fold the two patches into one if you prefer.

On the face of it, I think that would be better. I don't remember what your last version looks like though.

Quoted 4 lines
Quoted 4 lines

Now, if the psci stuff can't be relied upon to provide the correct functionality, then that's a separate problem which needs addressing differently.

Quoted 8 lines
Quoted 3 lines

This should allow the Xen problem to be resolved, because Xen will provide the PSCI operations, and it's correct in that case to override the platform's SMP operations.

Yes, increasing the priority of PSCI helps Xen a lot.
In order to completely solve the issue for Xen though, another patch is needed (http://marc.info/?l=linux-kernel&m=136630106201968&w=2) because of the introduction of smp_init.

Given the way the code in setup.c will work:

+static bool __init xen_smp_init(void)
+{
+#ifdef CONFIG_SMP
+ /* If we are running on Xen, use PSCI if available.
+ * In any case do not try to use the native smp_ops. */
+ if (psci_smp_available())
+ smp_set_ops(&psci_smp_ops);
+#endif
+ return true;
+}

Doesn't this just need to return false, and then we'll drop down to using PSCI if those operations are available?

#23 lore raw

Re: [PATCH v6 1/4] arm: introduce psci_smp_ops

Quoted 26 lines · Russell King - ARM Linux
Quoted 4 lines
Quoted 4 lines

Now, if the psci stuff can't be relied upon to provide the correct functionality, then that's a separate problem which needs addressing differently.

Quoted 8 lines
Quoted 3 lines

This should allow the Xen problem to be resolved, because Xen will provide the PSCI operations, and it's correct in that case to override the platform's SMP operations.

Yes, increasing the priority of PSCI helps Xen a lot.
In order to completely solve the issue for Xen though, another patch is needed (http://marc.info/?l=linux-kernel&m=136630106201968&w=2) because of the introduction of smp_init.

Given the way the code in setup.c will work:

(quoted diff) +10 -0
+static bool __init xen_smp_init(void)
+{
+#ifdef CONFIG_SMP
+	/* If we are running on Xen, use PSCI if available.
+	 * In any case do not try to use the native smp_ops. */
+	if (psci_smp_available())
+		smp_set_ops(&psci_smp_ops);
+#endif
+	return true;
+}
Quoted 2 lines

Doesn't this just need to return false, and then we'll drop down to using PSCI if those operations are available?

If we are running on Xen, we are sure that the only available mechanism to boot secondary cpus is PSCI; there is no need to try anything else if that one is not available. This is way xen_smp_init is returning true unconditionally.

However I am going to drop the "xen/arm: introduce xen_early_init, use PSCI on xen" patch linked above entirely, because I'll just assume that if we are running on Xen smp_init is going to fail and return false. The next option on the list is PSCI so in theory we won't have to do anything special to make it work.

#24 lore raw

PATCH v6 2/4 arm: prefer psci_smp_ops over mdesc->smp

In reply to Stefano Stabellini

If PSCI is available on the platform, prefer psci_smp_ops over the platform smp_ops.

---
 arch/arm/kernel/setup.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/kernel/setup.c +3 -3
index 341efaa..dad3048 100644
@@ -770,10 +770,10 @@ void __init setup_arch(char **cmdline_p)
 	psci_init();
 #ifdef CONFIG_SMP
 	if (is_smp()) {
-		if (mdesc->smp)
-			smp_set_ops(mdesc->smp);
-		else if (psci_smp_available())
+		if (psci_smp_available())
 			smp_set_ops(&psci_smp_ops);
+		else if (mdesc->smp)
+			smp_set_ops(mdesc->smp);
 		smp_init_cpus();
 	}
 #endif
Signature · 1 line
1.7.2.5
Acked-by on v6 2/4
#25 lore raw

Re: [PATCH v6 2/4] arm: prefer psci_smp_ops over mdesc->smp

Quoted 4 lines · Stefano Stabellini

If PSCI is available on the platform, prefer psci_smp_ops over the platform smp_ops.

Quoted 25 lines
---
 arch/arm/kernel/setup.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/kernel/setup.c +3 -3
index 341efaa..dad3048 100644
@@ -770,10 +770,10 @@ void __init setup_arch(char **cmdline_p)
 	psci_init();
 #ifdef CONFIG_SMP
 	if (is_smp()) {
-		if (mdesc->smp)
-			smp_set_ops(mdesc->smp);
-		else if (psci_smp_available())
+		if (psci_smp_available())
 			smp_set_ops(&psci_smp_ops);
+		else if (mdesc->smp)
+			smp_set_ops(mdesc->smp);
 		smp_init_cpus();
 	}
 #endif
Signature · 1 line
1.7.2.5
#26 lore raw

PATCH v6 3/4 ARM: Enable selection of SMP operations at boot time

In reply to Stefano Stabellini

From: Jon Medhurst <[email protected]>

Add a new 'smp_init' hook to machine_desc so platforms can specify a function to be used to setup smp ops instead of having a statically defined value.

If smp_init is set, use it instead of psci_smp_ops or mdesc->smp.

---
 arch/arm/include/asm/mach/arch.h |    3 +++
 arch/arm/kernel/setup.c          |    4 +++-
 2 files changed, 6 insertions(+), 1 deletions(-)
arch/arm/include/asm/mach/arch.h +3 -0
index 308ad7d..c01bf53 100644
@@ -16,8 +16,10 @@ struct pt_regs;
 struct smp_operations;
 #ifdef CONFIG_SMP
 #define smp_ops(ops) (&(ops))
+#define smp_init_ops(ops) (&(ops))
 #else
 #define smp_ops(ops) (struct smp_operations *)NULL
+#define smp_init_ops(ops) (void (*)(void))NULL
 #endif
 
 struct machine_desc {
@@ -41,6 +43,7 @@ struct machine_desc {
 	unsigned char		reserve_lp2 :1;	/* never has lp2	*/
 	char			restart_mode;	/* default restart mode	*/
 	struct smp_operations	*smp;		/* SMP operations	*/
+	void			(*smp_init)(void);
 	void			(*fixup)(struct tag *, char **,
 					 struct meminfo *);
 	void			(*reserve)(void);/* reserve mem blocks	*/
arch/arm/kernel/setup.c +3 -1
index dad3048..2f738cb 100644
@@ -770,7 +770,9 @@ void __init setup_arch(char **cmdline_p)
 	psci_init();
 #ifdef CONFIG_SMP
 	if (is_smp()) {
-		if (psci_smp_available())
+		if (mdesc->smp_init)
+			(*mdesc->smp_init)();
+		else if (psci_smp_available())
 			smp_set_ops(&psci_smp_ops);
 		else if (mdesc->smp)
 			smp_set_ops(mdesc->smp);
Signature · 1 line
1.7.2.5
Reviewed-by Santosh Shilimkar on v6 3/4
#27 lore raw

Re: [PATCH v6 3/4] ARM: Enable selection of SMP operations at boot time

Quoted 8 lines · Stefano Stabellini

From: Jon Medhurst <[email protected]>

Add a new 'smp_init' hook to machine_desc so platforms can specify a function to be used to setup smp ops instead of having a statically defined value.

If smp_init is set, use it instead of psci_smp_ops or mdesc->smp.

Quoted 8 lines
---
 arch/arm/include/asm/mach/arch.h |    3 +++
 arch/arm/kernel/setup.c          |    4 +++-
 2 files changed, 6 insertions(+), 1 deletions(-)

Please use this version instead. The runtime hook may now indicate if it did initialize smp_ops or not.

----- >8
From: Jon Medhurst <[email protected]>
Date: Thu, 13 Dec 2012 13:23:13 +0000
Subject: [PATCH] ARM: Enable selection of SMP operations at boot time

Add a new 'smp_init' hook to machine_desc so platforms can specify a function to be used to setup smp ops instead of having a statically defined value. The hook must return true when smp_ops are initialized. If false the static mdesc->smp_ops will be used by default.

arch/arm/include/asm/mach/arch.h +3 -0
index 308ad7d6f9..af8c54c6c6 100644
@@ -16,8 +16,10 @@ struct pt_regs;
 struct smp_operations;
 #ifdef CONFIG_SMP
 #define smp_ops(ops) (&(ops))
+#define smp_init_ops(ops) (&(ops))
 #else
 #define smp_ops(ops) (struct smp_operations *)NULL
+#define smp_init_ops(ops) (bool (*)(void))NULL
 #endif
 
 struct machine_desc {
@@ -41,6 +43,7 @@ struct machine_desc {
 	unsigned char		reserve_lp2 :1;	/* never has lp2	*/
 	char			restart_mode;	/* default restart mode	*/
 	struct smp_operations	*smp;		/* SMP operations	*/
+	bool			(*smp_init)(void);
 	void			(*fixup)(struct tag *, char **,
 					 struct meminfo *);
 	void			(*reserve)(void);/* reserve mem blocks	*/
arch/arm/kernel/setup.c +2 -1
index 3f6cbb2e3e..cf4b08c0f9 100644
@@ -768,7 +768,8 @@ void __init setup_arch(char **cmdline_p)
 	arm_dt_init_cpu_maps();
 #ifdef CONFIG_SMP
 	if (is_smp()) {
-		smp_set_ops(mdesc->smp);
+		if (!mdesc->smp_init || !mdesc->smp_init())
+			smp_set_ops(mdesc->smp);
 		smp_init_cpus();
 	}
 #endif
#28 lore raw

PATCH v6 4/4 xen/arm: introduce xen_early_init, use PSCI on xen

In reply to Stefano Stabellini

Split xen_guest_init in two functions, one of them (xen_early_init) is going to be called very early from setup_arch.

Change machine_desc->smp_init to xen_smp_init if Xen is present on the platform. xen_smp_init just sets smp_ops to psci_smp_ops.

XEN selects ARM_PSCI.

Changes in v6:
- xen_smp_init: call smp_set_ops only ifdef CONFIG_SMP;
- move more of the initialization to xen_guest_init;
- select ARM_PSCI if XEN.

---
 arch/arm/Kconfig                      |    1 +
 arch/arm/include/asm/xen/hypervisor.h |    6 +++++
 arch/arm/kernel/setup.c               |    3 ++
 arch/arm/xen/enlighten.c              |   36 +++++++++++++++++++++++++-------
 4 files changed, 38 insertions(+), 8 deletions(-)
arch/arm/Kconfig +1 -0
index 2c3bdce..344e299 100644
@@ -1892,6 +1892,7 @@ config XEN
 	depends on ARM && AEABI && OF
 	depends on CPU_V7 && !CPU_V6
 	depends on !GENERIC_ATOMIC64
+	select ARM_PSCI
 	help
 	  Say Y if you want to run Linux in a Virtual Machine on Xen on ARM.
 
arch/arm/include/asm/xen/hypervisor.h +6 -0
index d7ab99a..17b3ea2 100644
@@ -16,4 +16,10 @@ static inline enum paravirt_lazy_mode paravirt_get_lazy_mode(void)
 	return PARAVIRT_LAZY_NONE;
 }
 
+#ifdef CONFIG_XEN
+void xen_early_init(void);
+#else
+static inline void xen_early_init(void) { return; }
+#endif
+
 #endif /* _ASM_ARM_XEN_HYPERVISOR_H */
arch/arm/kernel/setup.c +3 -0
index 2f738cb..336305e 100644
@@ -55,6 +55,8 @@
 #include <asm/unwind.h>
 #include <asm/memblock.h>
 #include <asm/virt.h>
+#include <asm/xen/hypervisor.h>
+#include <xen/xen.h>
 
 #include "atags.h"
 #include "tcm.h"
@@ -768,6 +770,7 @@ void __init setup_arch(char **cmdline_p)
 
 	arm_dt_init_cpu_maps();
 	psci_init();
+	xen_early_init();
 #ifdef CONFIG_SMP
 	if (is_smp()) {
 		if (mdesc->smp_init)
arch/arm/xen/enlighten.c +28 -8
index b002822..fc1bc2a 100644
@@ -11,6 +11,8 @@
 #include <xen/xenbus.h>
 #include <xen/page.h>
 #include <xen/xen-ops.h>
+#include <asm/mach/arch.h>
+#include <asm/psci.h>
 #include <asm/xen/hypervisor.h>
 #include <asm/xen/hypercall.h>
 #include <linux/interrupt.h>
@@ -176,11 +178,33 @@ static int __init xen_secondary_init(unsigned int cpu)
 	return 0;
 }
 
+static void __init xen_smp_init(void)
+{
+#ifdef CONFIG_SMP
+	if (psci_smp_available())
+		smp_set_ops(&psci_smp_ops);
+#endif
+}
+
 /*
  * see Documentation/devicetree/bindings/arm/xen.txt for the
  * documentation of the Xen Device Tree format.
  */
 #define GRANT_TABLE_PHYSADDR 0
+void __init xen_early_init(void)
+{
+	struct device_node *node;
+
+	node = of_find_compatible_node(NULL, NULL, "xen,xen");
+	if (!node) {
+		pr_debug("No Xen support\n");
+		return;
+	}
+
+	xen_domain_type = XEN_HVM_DOMAIN;
+	machine_desc->smp_init = xen_smp_init;
+}
+
 static int __init xen_guest_init(void)
 {
 	struct xen_add_to_physmap xatp;
@@ -194,25 +218,21 @@ static int __init xen_guest_init(void)
 	int i;
 
 	node = of_find_compatible_node(NULL, NULL, "xen,xen");
-	if (!node) {
-		pr_debug("No Xen support\n");
-		return 0;
-	}
+
 	s = of_get_property(node, "compatible", &len);
 	if (strlen(xen_prefix) + 3  < len &&
 			!strncmp(xen_prefix, s, strlen(xen_prefix)))
 		version = s + strlen(xen_prefix);
 	if (version == NULL) {
-		pr_debug("Xen version not found\n");
-		return 0;
+		pr_warn("Xen version not found\n");
+		return -EINVAL;
 	}
 	if (of_address_to_resource(node, GRANT_TABLE_PHYSADDR, &res))
-		return 0;
+		return -EINVAL;
 	xen_hvm_resume_frames = res.start >> PAGE_SHIFT;
 	xen_events_irq = irq_of_parse_and_map(node, 0);
 	pr_info("Xen %s support found, events_irq=%d gnttab_frame_pfn=%lx\n",
 			version, xen_events_irq, xen_hvm_resume_frames);
-	xen_domain_type = XEN_HVM_DOMAIN;
 
 	xen_setup_features();
 	if (xen_feature(XENFEAT_dom0))
Signature · 1 line
1.7.2.5
#29 lore raw

Re: [PATCH v6 4/4] xen/arm: introduce xen_early_init, use PSCI on xen

Quoted 5 lines · Stefano Stabellini

Split xen_guest_init in two functions, one of them (xen_early_init) is going to be called very early from setup_arch.

Change machine_desc->smp_init to xen_smp_init if Xen is present on the platform. xen_smp_init just sets smp_ops to psci_smp_ops.

I still think the above is redundant, especially since psci_smp_ops has priority over default mdesc->smp_ops. And doing so does break MCPM. But we're apparently going in circle over this issue.

Nicolas

#30 lore raw

Re: [PATCH v6 4/4] xen/arm: introduce xen_early_init, use PSCI on xen

Quoted 11 lines · Nicolas Pitre
Quoted 5 lines · Stefano Stabellini

Split xen_guest_init in two functions, one of them (xen_early_init) is going to be called very early from setup_arch.

Change machine_desc->smp_init to xen_smp_init if Xen is present on the platform. xen_smp_init just sets smp_ops to psci_smp_ops.

I still think the above is redundant, especially since psci_smp_ops has priority over default mdesc->smp_ops. And doing so does break MCPM. But we're apparently going in circle over this issue.

Did you read my last email on this issue?

http://marc.info/?l=linux-arm-kernel&m=136500098703317&w=2

Let's examine the use cases here, assuming that your MCPM patch series has been applied.

This is what happens:

- No Xen
Xen is not running on the platform and a Xen hypervisor node is not available on device tree.
Everything keeps working seamlessly, this patch doesn't change anything.

- we are running on Xen
Xen is running on the platform, we are running as a guest on Xen and an hypervisor node is available on device tree.
Let's also assume that there aren't any "arm,cci" compatible nodes on device tree because Xen wouldn't export this kind of information to any guests right now. Therefore PSCI should be used to boot secondary cpus. Because the versatile express machine sets smp_init to vexpress_smp_init_ops, vexpress_smp_init_ops will be called. vexpress_smp_init_ops sets smp_ops to vexpress_smp_ops, that *break* Xen.

With this patch, xen_smp_init will be called instead of vexpress_smp_init_ops, and smp_ops will be set to psci_smp_ops, therefore *unbreaking* Xen.

In fact what makes this patch really necessary is smp_init together with the MCPM series.

Do you agree with me?

#31 lore raw

Re: [PATCH v6 4/4] xen/arm: introduce xen_early_init, use PSCI on xen

Quoted 29 lines · Stefano Stabellini
Quoted 11 lines · Nicolas Pitre
Quoted 5 lines · Stefano Stabellini

Split xen_guest_init in two functions, one of them (xen_early_init) is going to be called very early from setup_arch.

Change machine_desc->smp_init to xen_smp_init if Xen is present on the platform. xen_smp_init just sets smp_ops to psci_smp_ops.

I still think the above is redundant, especially since psci_smp_ops has priority over default mdesc->smp_ops. And doing so does break MCPM. But we're apparently going in circle over this issue.

Did you read my last email on this issue?

http://marc.info/?l=linux-arm-kernel&m=136500098703317&w=2

Let's examine the use cases here, assuming that your MCPM patch series has been applied.

This is what happens:

- No Xen
Xen is not running on the platform and a Xen hypervisor node is not available on device tree.
Everything keeps working seamlessly, this patch doesn't change anything.

Quoted 6 lines

- we are running on Xen
Xen is running on the platform, we are running as a guest on Xen and an hypervisor node is available on device tree.
Let's also assume that there aren't any "arm,cci" compatible nodes on device tree because Xen wouldn't export this kind of information to any guests right now. Therefore PSCI should be used to boot secondary cpus.

Just in case this isn't clear enough: we don't have big.LITTLE support in Xen right now, not in the hypervisor and certainly not in guests. I'm keen on having big.LITTLE support in the hypervisor (thus some code similar to your MCPM patch series will probably end up in Xen at some point) but I doubt we'll expose big.LITTLE to guests any time soon. It's going to be years, so I am not particularly worried about it right now.

Quoted 15 lines

Because the versatile express machine sets smp_init to vexpress_smp_init_ops, vexpress_smp_init_ops will be called. vexpress_smp_init_ops sets smp_ops to vexpress_smp_ops, that *break* Xen.

With this patch, xen_smp_init will be called instead of vexpress_smp_init_ops, and smp_ops will be set to psci_smp_ops, therefore *unbreaking* Xen.

In fact what makes this patch really necessary is smp_init together with the MCPM series.

Do you agree with me?

#32 lore raw

Re: [PATCH v6 4/4] xen/arm: introduce xen_early_init, use PSCI on xen

Quoted 8 lines · Stefano Stabellini
Quoted 6 lines · Stefano Stabellini

- we are running on Xen
Xen is running on the platform, we are running as a guest on Xen and an hypervisor node is available on device tree.
Let's also assume that there aren't any "arm,cci" compatible nodes on device tree because Xen wouldn't export this kind of information to any guests right now. Therefore PSCI should be used to boot secondary cpus.

Quoted 7 lines

Just in case this isn't clear enough: we don't have big.LITTLE support in Xen right now, not in the hypervisor and certainly not in guests. I'm keen on having big.LITTLE support in the hypervisor (thus some code similar to your MCPM patch series will probably end up in Xen at some point) but I doubt we'll expose big.LITTLE to guests any time soon. It's going to be years, so I am not particularly worried about it right now.

I fully understand that it is unlikely that a Xen guest will "see" a big.LITTLE environment in the near future.

My concern is about a kernel that is _configured_ to run either on a native VExpress machine that might or might not be b.L, or as a Xen guest, in the same zImage binary.

Nicolas

#33 lore raw

Re: [PATCH v6 4/4] xen/arm: introduce xen_early_init, use PSCI on xen

In reply to Stefano Stabellini
Quoted 7 lines · Stefano Stabellini

This is what happens:

- No Xen
Xen is not running on the platform and a Xen hypervisor node is not available on device tree.
Everything keeps working seamlessly, this patch doesn't change anything.

Quoted 10 lines

- we are running on Xen
Xen is running on the platform, we are running as a guest on Xen and an hypervisor node is available on device tree.
Let's also assume that there aren't any "arm,cci" compatible nodes on device tree because Xen wouldn't export this kind of information to any guests right now. Therefore PSCI should be used to boot secondary cpus. Because the versatile express machine sets smp_init to vexpress_smp_init_ops, vexpress_smp_init_ops will be called. vexpress_smp_init_ops sets smp_ops to vexpress_smp_ops, that *break* Xen.

OK I see.

Quoted 3 lines

With this patch, xen_smp_init will be called instead of vexpress_smp_init_ops, and smp_ops will be set to psci_smp_ops, therefore *unbreaking* Xen.

However that breaks MCPM.

Quoted 2 lines

In fact what makes this patch really necessary is smp_init together with the MCPM series.

Yes.

Quoted 1 line

Do you agree with me?

On the Xen issue, yes.

Nicolas

#34 lore raw

Re: [PATCH v6 4/4] xen/arm: introduce xen_early_init, use PSCI on xen

Quoted 20 lines · Nicolas Pitre
Quoted 7 lines · Stefano Stabellini

This is what happens:

- No Xen
Xen is not running on the platform and a Xen hypervisor node is not available on device tree.
Everything keeps working seamlessly, this patch doesn't change anything.

Quoted 10 lines

- we are running on Xen
Xen is running on the platform, we are running as a guest on Xen and an hypervisor node is available on device tree.
Let's also assume that there aren't any "arm,cci" compatible nodes on device tree because Xen wouldn't export this kind of information to any guests right now. Therefore PSCI should be used to boot secondary cpus. Because the versatile express machine sets smp_init to vexpress_smp_init_ops, vexpress_smp_init_ops will be called. vexpress_smp_init_ops sets smp_ops to vexpress_smp_ops, that *break* Xen.

Quoted 7 lines

OK I see.

Quoted 3 lines

With this patch, xen_smp_init will be called instead of vexpress_smp_init_ops, and smp_ops will be set to psci_smp_ops, therefore *unbreaking* Xen.

However that breaks MCPM.

You mean on bare metal, right? For the bare metal, "xen,xen" property would not be present and xen_smp_init is not used. So the vexpress MCPM ops will be used. Aren't Dom0 cpu's basically virtual cpus? If Xen ever needs the MCPM support, the Xen hook itself can figure out whether to use MCPM support.

Rob

#35 lore raw

Re: [PATCH v6 4/4] xen/arm: introduce xen_early_init, use PSCI on xen

Quoted 27 lines · Rob Herring
Quoted 26 lines · Nicolas Pitre
Quoted 7 lines · Stefano Stabellini

This is what happens:

- No Xen
Xen is not running on the platform and a Xen hypervisor node is not available on device tree.
Everything keeps working seamlessly, this patch doesn't change anything.

Quoted 10 lines

- we are running on Xen
Xen is running on the platform, we are running as a guest on Xen and an hypervisor node is available on device tree.
Let's also assume that there aren't any "arm,cci" compatible nodes on device tree because Xen wouldn't export this kind of information to any guests right now. Therefore PSCI should be used to boot secondary cpus. Because the versatile express machine sets smp_init to vexpress_smp_init_ops, vexpress_smp_init_ops will be called. vexpress_smp_init_ops sets smp_ops to vexpress_smp_ops, that *break* Xen.

OK I see.

Quoted 3 lines

With this patch, xen_smp_init will be called instead of vexpress_smp_init_ops, and smp_ops will be set to psci_smp_ops, therefore *unbreaking* Xen.

Quoted 7 lines
Quoted 1 line

However that breaks MCPM.

You mean on bare metal, right? For the bare metal, "xen,xen" property would not be present and xen_smp_init is not used. So the vexpress MCPM ops will be used. Aren't Dom0 cpu's basically virtual cpus? If Xen ever needs the MCPM support, the Xen hook itself can figure out whether to use MCPM support.

Well, if Xen has its own mdesc distinct from the VExpress one then things
are indeed fine.

Nicolas

#36 lore raw

Re: [PATCH v6 4/4] xen/arm: introduce xen_early_init, use PSCI on xen

Quoted 37 lines · Nicolas Pitre
Quoted 27 lines · Rob Herring
Quoted 26 lines · Nicolas Pitre
Quoted 7 lines · Stefano Stabellini

This is what happens:

- No Xen
Xen is not running on the platform and a Xen hypervisor node is not available on device tree.
Everything keeps working seamlessly, this patch doesn't change anything.

Quoted 10 lines

- we are running on Xen
Xen is running on the platform, we are running as a guest on Xen and an hypervisor node is available on device tree.
Let's also assume that there aren't any "arm,cci" compatible nodes on device tree because Xen wouldn't export this kind of information to any guests right now. Therefore PSCI should be used to boot secondary cpus. Because the versatile express machine sets smp_init to vexpress_smp_init_ops, vexpress_smp_init_ops will be called. vexpress_smp_init_ops sets smp_ops to vexpress_smp_ops, that *break* Xen.

OK I see.

Quoted 3 lines

With this patch, xen_smp_init will be called instead of vexpress_smp_init_ops, and smp_ops will be set to psci_smp_ops, therefore *unbreaking* Xen.

Quoted 7 lines
Quoted 1 line

However that breaks MCPM.

You mean on bare metal, right? For the bare metal, "xen,xen" property would not be present and xen_smp_init is not used. So the vexpress MCPM ops will be used. Aren't Dom0 cpu's basically virtual cpus? If Xen ever needs the MCPM support, the Xen hook itself can figure out whether to use MCPM support.

Quoted 3 lines

Well, if Xen has its own mdesc distinct from the VExpress one then things
are indeed fine.

It's not about the mdesc: Xen has its own hypervisor node on device tree if and only if Xen is running on the platform, therefore the Xen early hook is never going to do anything at all on native.

In other words, this patch should NOT change the behaviour of Linux on native, and if it did, it would be a bug.

#37 lore raw

Re: [PATCH v6 4/4] xen/arm: introduce xen_early_init, use PSCI on xen

Quoted 42 lines · Stefano Stabellini
Quoted 37 lines · Nicolas Pitre
Quoted 27 lines · Rob Herring
Quoted 26 lines · Nicolas Pitre
Quoted 7 lines · Stefano Stabellini

This is what happens:

- No Xen
Xen is not running on the platform and a Xen hypervisor node is not available on device tree.
Everything keeps working seamlessly, this patch doesn't change anything.

Quoted 10 lines

- we are running on Xen
Xen is running on the platform, we are running as a guest on Xen and an hypervisor node is available on device tree.
Let's also assume that there aren't any "arm,cci" compatible nodes on device tree because Xen wouldn't export this kind of information to any guests right now. Therefore PSCI should be used to boot secondary cpus. Because the versatile express machine sets smp_init to vexpress_smp_init_ops, vexpress_smp_init_ops will be called. vexpress_smp_init_ops sets smp_ops to vexpress_smp_ops, that *break* Xen.

OK I see.

Quoted 3 lines

With this patch, xen_smp_init will be called instead of vexpress_smp_init_ops, and smp_ops will be set to psci_smp_ops, therefore *unbreaking* Xen.

Quoted 7 lines
Quoted 1 line

However that breaks MCPM.

You mean on bare metal, right? For the bare metal, "xen,xen" property would not be present and xen_smp_init is not used. So the vexpress MCPM ops will be used. Aren't Dom0 cpu's basically virtual cpus? If Xen ever needs the MCPM support, the Xen hook itself can figure out whether to use MCPM support.

Quoted 3 lines

Well, if Xen has its own mdesc distinct from the VExpress one then things
are indeed fine.

Quoted 6 lines

It's not about the mdesc: Xen has its own hypervisor node on device tree if and only if Xen is running on the platform, therefore the Xen early hook is never going to do anything at all on native.

In other words, this patch should NOT change the behaviour of Linux on native, and if it did, it would be a bug.

Perfect.

Nicolas

#38 lore raw

Re: [PATCH v6 4/4] xen/arm: introduce xen_early_init, use PSCI on xen

In reply to Rob Herring
Quoted 27 lines · Rob Herring
Quoted 26 lines · Nicolas Pitre
Quoted 7 lines · Stefano Stabellini

This is what happens:

- No Xen
Xen is not running on the platform and a Xen hypervisor node is not available on device tree.
Everything keeps working seamlessly, this patch doesn't change anything.

Quoted 10 lines

- we are running on Xen
Xen is running on the platform, we are running as a guest on Xen and an hypervisor node is available on device tree.
Let's also assume that there aren't any "arm,cci" compatible nodes on device tree because Xen wouldn't export this kind of information to any guests right now. Therefore PSCI should be used to boot secondary cpus. Because the versatile express machine sets smp_init to vexpress_smp_init_ops, vexpress_smp_init_ops will be called. vexpress_smp_init_ops sets smp_ops to vexpress_smp_ops, that *break* Xen.

OK I see.

Quoted 3 lines

With this patch, xen_smp_init will be called instead of vexpress_smp_init_ops, and smp_ops will be set to psci_smp_ops, therefore *unbreaking* Xen.

Quoted 5 lines
Quoted 1 line

However that breaks MCPM.

You mean on bare metal, right? For the bare metal, "xen,xen" property would not be present and xen_smp_init is not used. So the vexpress MCPM ops will be used.

That is correct.

Quoted 3 lines

Aren't Dom0 cpu's basically virtual cpus? If Xen ever needs the MCPM support, the Xen hook itself can figure out whether to use MCPM support.

Right.

#39 lore raw
In reply to Stefano Stabellini

Russell,
sorry for not CC'ing you explicitly since v1 of this series, there have been quite few lengthy discussions on this topic.

Do you have any opinions on this?
Do you feel that this work belong to your tree, or do you want me to go via arm-soc?

Quoted 39 lines · Stefano Stabellini

Hi all,
this is the sixth version of the patch series to move virt_smp_ops out of mach-virt and make it a generic set of reusable PSCI based smp_ops. psci_smp_ops are preferred over the platform smp_ops.
I added a patch to introduce smp_init to this series.
In the last patch I am using smp_init to switch to psci_smp_ops if Xen is detected on the platform.

Jon Medhurst (1):
ARM: Enable selection of SMP operations at boot time

Stefano Stabellini (3):
arm: introduce psci_smp_ops
arm: prefer psci_smp_ops over mdesc->smp xen/arm: introduce xen_early_init, use PSCI on xen

 arch/arm/Kconfig                      |    1 +
 arch/arm/include/asm/mach/arch.h      |    3 +
 arch/arm/include/asm/psci.h           |   29 ++++++++++++++
 arch/arm/include/asm/xen/hypervisor.h |    6 +++
 arch/arm/kernel/Makefile              |    5 ++-
 arch/arm/kernel/psci.c                |    7 +--
 arch/arm/kernel/psci_smp.c            |   67 +++++++++++++++++++++++++++++++++
 arch/arm/kernel/setup.c               |   12 +++++-
 arch/arm/mach-virt/Makefile           |    1 -
 arch/arm/mach-virt/platsmp.c          |   58 ----------------------------
 arch/arm/mach-virt/virt.c             |    3 -
 arch/arm/xen/enlighten.c              |   36 ++++++++++++++----
 12 files changed, 152 insertions(+), 76 deletions(-)

git://xenbits.xen.org/people/sstabellini/linux-pvhvm.git 3.9-rc3-smp-6

Cheers,

Stefano

#40 lore raw
In reply to Stefano Stabellini

Arnd, Olof,
do you have any thoughts on this series? Would you be happy to carry it in the arm-soc tree?

The last patch, "xen/arm: introduce xen_early_init, use PSCI on xen" has a (small) dependency on this series:

http://marc.info/?l=linux-kernel&m=136430893610688&w=2

would you be OK with taking that one too, or should that go through the Xen tree?

Cheers,

Stefano

Quoted 39 lines · Stefano Stabellini

Hi all,
this is the sixth version of the patch series to move virt_smp_ops out of mach-virt and make it a generic set of reusable PSCI based smp_ops. psci_smp_ops are preferred over the platform smp_ops.
I added a patch to introduce smp_init to this series.
In the last patch I am using smp_init to switch to psci_smp_ops if Xen is detected on the platform.

Jon Medhurst (1):
ARM: Enable selection of SMP operations at boot time

Stefano Stabellini (3):
arm: introduce psci_smp_ops
arm: prefer psci_smp_ops over mdesc->smp xen/arm: introduce xen_early_init, use PSCI on xen

 arch/arm/Kconfig                      |    1 +
 arch/arm/include/asm/mach/arch.h      |    3 +
 arch/arm/include/asm/psci.h           |   29 ++++++++++++++
 arch/arm/include/asm/xen/hypervisor.h |    6 +++
 arch/arm/kernel/Makefile              |    5 ++-
 arch/arm/kernel/psci.c                |    7 +--
 arch/arm/kernel/psci_smp.c            |   67 +++++++++++++++++++++++++++++++++
 arch/arm/kernel/setup.c               |   12 +++++-
 arch/arm/mach-virt/Makefile           |    1 -
 arch/arm/mach-virt/platsmp.c          |   58 ----------------------------
 arch/arm/mach-virt/virt.c             |    3 -
 arch/arm/xen/enlighten.c              |   36 ++++++++++++++----
 12 files changed, 152 insertions(+), 76 deletions(-)

git://xenbits.xen.org/people/sstabellini/linux-pvhvm.git 3.9-rc3-smp-6

Cheers,

Stefano

#41 lore raw
Quoted 11 lines · Stefano Stabellini

Arnd, Olof,
do you have any thoughts on this series? Would you be happy to carry it in the arm-soc tree?

The last patch, "xen/arm: introduce xen_early_init, use PSCI on xen" has a (small) dependency on this series:

http://marc.info/?l=linux-kernel&m=136430893610688&w=2

would you be OK with taking that one too, or should that go through the Xen tree?

I think it'd make sense to get Russell to ack the changes to the core ARM code. We can merge the series through arm-soc, or he can take them, whatever is easiest for everybody.

Given the dependencies on the second branch it might be easier to merge through Russell's tree.

-Olof

#42 lore raw
Quoted 13 lines · Olof Johansson
Quoted 11 lines · Stefano Stabellini

Arnd, Olof,
do you have any thoughts on this series? Would you be happy to carry it in the arm-soc tree?

The last patch, "xen/arm: introduce xen_early_init, use PSCI on xen" has a (small) dependency on this series:

http://marc.info/?l=linux-kernel&m=136430893610688&w=2

would you be OK with taking that one too, or should that go through the Xen tree?

Quoted 6 lines

I think it'd make sense to get Russell to ack the changes to the core ARM code. We can merge the series through arm-soc, or he can take them, whatever is easiest for everybody.

Given the dependencies on the second branch it might be easier to merge through Russell's tree.

I'm also dependent on the 1st patch for converting highbank to use PSCI and am just waiting on a stable branch to base it on. I believe Russell said he is offline for the next week.

Rob

#43 lore raw
Quoted 18 lines · Rob Herring
Quoted 17 lines · Olof Johansson
Quoted 11 lines · Stefano Stabellini

Arnd, Olof,
do you have any thoughts on this series? Would you be happy to carry it in the arm-soc tree?

The last patch, "xen/arm: introduce xen_early_init, use PSCI on xen" has a (small) dependency on this series:

http://marc.info/?l=linux-kernel&m=136430893610688&w=2

would you be OK with taking that one too, or should that go through the Xen tree?

I think it'd make sense to get Russell to ack the changes to the core ARM code. We can merge the series through arm-soc, or he can take them, whatever is easiest for everybody.

Quoted 6 lines
Quoted 2 lines

Given the dependencies on the second branch it might be easier to merge through Russell's tree.

I'm also dependent on the 1st patch for converting highbank to use PSCI and am just waiting on a stable branch to base it on. I believe Russell said he is offline for the next week.

By the first patch, do you just mean 6/6 in that series ("[RFC] arm: use PSCI if available"), or do you have dependencies on others in that series too?

Will

#44 lore raw
Quoted 22 lines · Will Deacon
Quoted 21 lines · Rob Herring
Quoted 19 lines · Olof Johansson
Quoted 11 lines · Stefano Stabellini

Arnd, Olof,
do you have any thoughts on this series? Would you be happy to carry it in the arm-soc tree?

The last patch, "xen/arm: introduce xen_early_init, use PSCI on xen" has a (small) dependency on this series:

http://marc.info/?l=linux-kernel&m=136430893610688&w=2

would you be OK with taking that one too, or should that go through the Xen tree?

I think it'd make sense to get Russell to ack the changes to the core ARM code. We can merge the series through arm-soc, or he can take them, whatever is easiest for everybody.

Given the dependencies on the second branch it might be easier to merge through Russell's tree.

Quoted 6 lines
Quoted 3 lines

I'm also dependent on the 1st patch for converting highbank to use PSCI and am just waiting on a stable branch to base it on. I believe Russell said he is offline for the next week.

By the first patch, do you just mean 6/6 in that series ("[RFC] arm: use PSCI if available"), or do you have dependencies on others in that series too?

FYI in few days, as soon as I am back from vacation, I am planning on sending out a single patch series to avoid further confusions. I'll also include the new version of the smp_init patch, as requested by Nicolas.

Of course we'll still need all the acks from Russell.

#45 lore raw
In reply to Will Deacon
Quoted 22 lines · Will Deacon
Quoted 21 lines · Rob Herring
Quoted 19 lines · Olof Johansson
Quoted 11 lines · Stefano Stabellini

Arnd, Olof,
do you have any thoughts on this series? Would you be happy to carry it in the arm-soc tree?

The last patch, "xen/arm: introduce xen_early_init, use PSCI on xen" has a (small) dependency on this series:

http://marc.info/?l=linux-kernel&m=136430893610688&w=2

would you be OK with taking that one too, or should that go through the Xen tree?

I think it'd make sense to get Russell to ack the changes to the core ARM code. We can merge the series through arm-soc, or he can take them, whatever is easiest for everybody.

Given the dependencies on the second branch it might be easier to merge through Russell's tree.

Quoted 6 lines
Quoted 3 lines

I'm also dependent on the 1st patch for converting highbank to use PSCI and am just waiting on a stable branch to base it on. I believe Russell said he is offline for the next week.

By the first patch, do you just mean 6/6 in that series ("[RFC] arm: use PSCI if available"), or do you have dependencies on others in that series too?

No, just the 1st patch in this thread: "arm: introduce psci_smp_ops"

Rob