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

2013-04-25 Thread Ian Campbell
On Mon, 2013-04-22 at 17:07 +0100, Nicolas Pitre wrote: > 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 case

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

2013-04-24 Thread Stefano Stabellini
On Mon, 22 Apr 2013, Russell King - ARM Linux wrote: > > > 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

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

2013-04-24 Thread Stefano Stabellini
On Mon, 22 Apr 2013, Nicolas Pitre wrote: > > 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 th

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

2013-04-22 Thread Nicolas Pitre
On Mon, 22 Apr 2013, Ian Campbell wrote: > On Fri, 2013-04-19 at 18:06 +0100, Stefano Stabellini wrote: > > On Fri, 19 Apr 2013, Nicolas Pitre wrote: > > > On Fri, 19 Apr 2013, Ian Campbell wrote: > > > > > > > On Fri, 2013-04-19 at 16:47 +0100, Nicolas Pitre wrote: > > > > > No one should be pro

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

2013-04-22 Thread Ian Campbell
On Fri, 2013-04-19 at 18:06 +0100, Stefano Stabellini wrote: > On Fri, 19 Apr 2013, Nicolas Pitre wrote: > > On Fri, 19 Apr 2013, Ian Campbell wrote: > > > > > On Fri, 2013-04-19 at 16:47 +0100, Nicolas Pitre wrote: > > > > No one should be probing registers without making sure it is safe to do >

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

2013-04-22 Thread Russell King - ARM Linux
On Thu, Apr 18, 2013 at 05:49:21PM +0100, Stefano Stabellini wrote: > On Thu, 18 Apr 2013, Nicolas Pitre wrote: > > 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

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

2013-04-22 Thread Russell King - ARM Linux
On Thu, Apr 18, 2013 at 12:35:57PM -0400, Nicolas Pitre wrote: > On Thu, 18 Apr 2013, Stefano Stabellini wrote: > > > On Thu, 18 Apr 2013, Russell King - ARM Linux wrote: > > > On Fri, Apr 05, 2013 at 02:11:32PM +0100, Stefano Stabellini wrote: > > > > + psci_init(); > > > > #ifdef CONFIG_S

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

2013-04-22 Thread Russell King - ARM Linux
On Thu, Apr 18, 2013 at 05:20:23PM +0100, Stefano Stabellini wrote: > On Thu, 18 Apr 2013, Russell King - ARM Linux wrote: > > 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-overri

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

2013-04-19 Thread Stefano Stabellini
On Fri, 19 Apr 2013, Nicolas Pitre wrote: > On Fri, 19 Apr 2013, Ian Campbell wrote: > > > On Fri, 2013-04-19 at 16:47 +0100, Nicolas Pitre wrote: > > > 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 thin

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

2013-04-19 Thread Nicolas Pitre
On Fri, 19 Apr 2013, Ian Campbell wrote: > On Fri, 2013-04-19 at 16:47 +0100, Nicolas Pitre wrote: > > 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

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

2013-04-19 Thread Ian Campbell
On Fri, 2013-04-19 at 16:47 +0100, Nicolas Pitre wrote: > 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 call

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

2013-04-19 Thread Nicolas Pitre
On Fri, 19 Apr 2013, Stefano Stabellini wrote: > On Thu, 18 Apr 2013, Nicolas Pitre wrote: > > On Thu, 18 Apr 2013, Stefano Stabellini wrote: > > > > > On Thu, 18 Apr 2013, Nicolas Pitre wrote: > > > > On Thu, 18 Apr 2013, Stefano Stabellini wrote: > > > > > > > > > On Thu, 18 Apr 2013, Russell

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

2013-04-19 Thread Ian Campbell
On Thu, 2013-04-18 at 18:38 +0100, Nicolas Pitre wrote: > On Thu, 18 Apr 2013, Stefano Stabellini wrote: > > > On Thu, 18 Apr 2013, Nicolas Pitre wrote: > > > On Thu, 18 Apr 2013, Stefano Stabellini wrote: > > > > > > > On Thu, 18 Apr 2013, Russell King - ARM Linux wrote: > > > > > This should al

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

2013-04-19 Thread Stefano Stabellini
On Thu, 18 Apr 2013, Nicolas Pitre wrote: > On Thu, 18 Apr 2013, Stefano Stabellini wrote: > > > On Thu, 18 Apr 2013, Nicolas Pitre wrote: > > > On Thu, 18 Apr 2013, Stefano Stabellini wrote: > > > > > > > On Thu, 18 Apr 2013, Russell King - ARM Linux wrote: > > > > > This should allow the Xen pr

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

2013-04-18 Thread Nicolas Pitre
On Thu, 18 Apr 2013, Stefano Stabellini wrote: > On Thu, 18 Apr 2013, Nicolas Pitre wrote: > > On Thu, 18 Apr 2013, Stefano Stabellini wrote: > > > > > On Thu, 18 Apr 2013, Russell King - ARM Linux wrote: > > > > On Fri, Apr 05, 2013 at 02:11:32PM +0100, Stefano Stabellini wrote: > > > > > +

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

2013-04-18 Thread Nicolas Pitre
On Thu, 18 Apr 2013, Stefano Stabellini wrote: > On Thu, 18 Apr 2013, Nicolas Pitre wrote: > > On Thu, 18 Apr 2013, Stefano Stabellini wrote: > > > > > On Thu, 18 Apr 2013, Russell King - ARM Linux wrote: > > > > This should allow the Xen problem to be resolved, because Xen will > > > > provide t

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

2013-04-18 Thread Stefano Stabellini
On Thu, 18 Apr 2013, Nicolas Pitre wrote: > On Thu, 18 Apr 2013, Stefano Stabellini wrote: > > > On Thu, 18 Apr 2013, Russell King - ARM Linux wrote: > > > This should allow the Xen problem to be resolved, because Xen will > > > provide the PSCI operations, and it's correct in that case to overrid

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

2013-04-18 Thread Stefano Stabellini
On Thu, 18 Apr 2013, Nicolas Pitre wrote: > On Thu, 18 Apr 2013, Stefano Stabellini wrote: > > > On Thu, 18 Apr 2013, Russell King - ARM Linux wrote: > > > On Fri, Apr 05, 2013 at 02:11:32PM +0100, Stefano Stabellini wrote: > > > > + psci_init(); > > > > #ifdef CONFIG_SMP > > > > if

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

2013-04-18 Thread Nicolas Pitre
On Thu, 18 Apr 2013, Stefano Stabellini wrote: > On Thu, 18 Apr 2013, Russell King - ARM Linux wrote: > > 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, incre

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

2013-04-18 Thread Nicolas Pitre
On Thu, 18 Apr 2013, Stefano Stabellini wrote: > On Thu, 18 Apr 2013, Russell King - ARM Linux wrote: > > On Fri, Apr 05, 2013 at 02:11:32PM +0100, Stefano Stabellini wrote: > > > + psci_init(); > > > #ifdef CONFIG_SMP > > > if (is_smp()) { > > > - smp_set_ops(mdesc->smp); > > > +

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

2013-04-18 Thread Stefano Stabellini
On Thu, 18 Apr 2013, Russell King - ARM Linux wrote: > On Fri, Apr 05, 2013 at 02:11:32PM +0100, Stefano Stabellini wrote: > > + psci_init(); > > #ifdef CONFIG_SMP > > if (is_smp()) { > > - smp_set_ops(mdesc->smp); > > + if (mdesc->smp) > > + smp_set_ops

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

2013-04-18 Thread Russell King - ARM Linux
On Fri, Apr 05, 2013 at 02:11:32PM +0100, Stefano Stabellini wrote: > + 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

[PATCH v6 1/4] arm: introduce psci_smp_ops

2013-04-05 Thread Stefano Stabellini
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 th