All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5] ARM: mvebu: use dt_fixup to provide fallback for enable-method
@ 2018-07-26  3:48 ` Chris Packham
  0 siblings, 0 replies; 9+ messages in thread
From: Chris Packham @ 2018-07-26  3:48 UTC (permalink / raw)
  To: jason, andrew, gregory.clement, sebastian.hesselbarth, linux, ylefloch
  Cc: linux-arm-kernel, linux-kernel, Chris Packham

We need to maintain backwards compatibility with device trees that don't
define an enable method. At the same time we want the device tree to be
able to specify an enable-method and have it stick.

Previously by having smp assigned in the DT_MACHINE definition this
would be picked up by setup_arch() and override whatever
arm_dt_init_cpu_maps() had configured. Now we move the initial
assignment of default smp_ops to a dt_fixup and let
arm_dt_init_cpu_maps() override that if the device tree defines an
enable-method.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
---
Pervious versions

v1: http://lists.infradead.org/pipermail/linux-arm-kernel/2014-November/300182.html
v2: http://lists.infradead.org/pipermail/linux-arm-kernel/2014-November/300480.html
v3: http://lists.infradead.org/pipermail/linux-arm-kernel/2014-November/302945.html
v4: http://lists.infradead.org/pipermail/linux-arm-kernel/2014-November/303899.html

Changes since v4:
- drop "RFC"

 arch/arm/mach-mvebu/board-v7.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-mvebu/board-v7.c b/arch/arm/mach-mvebu/board-v7.c
index ccca95173e17..5bbde5e5258e 100644
--- a/arch/arm/mach-mvebu/board-v7.c
+++ b/arch/arm/mach-mvebu/board-v7.c
@@ -145,6 +145,11 @@ static void __init mvebu_dt_init(void)
 		i2c_quirk();
 }
 
+static void __init armada_370_xp_dt_fixup(void)
+{
+	smp_set_ops(smp_ops(armada_xp_smp_ops));
+}
+
 static const char * const armada_370_xp_dt_compat[] __initconst = {
 	"marvell,armada-370-xp",
 	NULL,
@@ -153,17 +158,12 @@ static const char * const armada_370_xp_dt_compat[] __initconst = {
 DT_MACHINE_START(ARMADA_370_XP_DT, "Marvell Armada 370/XP (Device Tree)")
 	.l2c_aux_val	= 0,
 	.l2c_aux_mask	= ~0,
-/*
- * The following field (.smp) is still needed to ensure backward
- * compatibility with old Device Trees that were not specifying the
- * cpus enable-method property.
- */
-	.smp		= smp_ops(armada_xp_smp_ops),
 	.init_machine	= mvebu_dt_init,
 	.init_irq       = mvebu_init_irq,
 	.restart	= mvebu_restart,
 	.reserve        = mvebu_memblock_reserve,
 	.dt_compat	= armada_370_xp_dt_compat,
+	.dt_fixup	= armada_370_xp_dt_fixup,
 MACHINE_END
 
 static const char * const armada_375_dt_compat[] __initconst = {
-- 
2.18.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v5] ARM: mvebu: use dt_fixup to provide fallback for enable-method
@ 2018-07-26  3:48 ` Chris Packham
  0 siblings, 0 replies; 9+ messages in thread
From: Chris Packham @ 2018-07-26  3:48 UTC (permalink / raw)
  To: linux-arm-kernel

We need to maintain backwards compatibility with device trees that don't
define an enable method. At the same time we want the device tree to be
able to specify an enable-method and have it stick.

Previously by having smp assigned in the DT_MACHINE definition this
would be picked up by setup_arch() and override whatever
arm_dt_init_cpu_maps() had configured. Now we move the initial
assignment of default smp_ops to a dt_fixup and let
arm_dt_init_cpu_maps() override that if the device tree defines an
enable-method.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
---
Pervious versions

v1: http://lists.infradead.org/pipermail/linux-arm-kernel/2014-November/300182.html
v2: http://lists.infradead.org/pipermail/linux-arm-kernel/2014-November/300480.html
v3: http://lists.infradead.org/pipermail/linux-arm-kernel/2014-November/302945.html
v4: http://lists.infradead.org/pipermail/linux-arm-kernel/2014-November/303899.html

Changes since v4:
- drop "RFC"

 arch/arm/mach-mvebu/board-v7.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-mvebu/board-v7.c b/arch/arm/mach-mvebu/board-v7.c
index ccca95173e17..5bbde5e5258e 100644
--- a/arch/arm/mach-mvebu/board-v7.c
+++ b/arch/arm/mach-mvebu/board-v7.c
@@ -145,6 +145,11 @@ static void __init mvebu_dt_init(void)
 		i2c_quirk();
 }
 
+static void __init armada_370_xp_dt_fixup(void)
+{
+	smp_set_ops(smp_ops(armada_xp_smp_ops));
+}
+
 static const char * const armada_370_xp_dt_compat[] __initconst = {
 	"marvell,armada-370-xp",
 	NULL,
@@ -153,17 +158,12 @@ static const char * const armada_370_xp_dt_compat[] __initconst = {
 DT_MACHINE_START(ARMADA_370_XP_DT, "Marvell Armada 370/XP (Device Tree)")
 	.l2c_aux_val	= 0,
 	.l2c_aux_mask	= ~0,
-/*
- * The following field (.smp) is still needed to ensure backward
- * compatibility with old Device Trees that were not specifying the
- * cpus enable-method property.
- */
-	.smp		= smp_ops(armada_xp_smp_ops),
 	.init_machine	= mvebu_dt_init,
 	.init_irq       = mvebu_init_irq,
 	.restart	= mvebu_restart,
 	.reserve        = mvebu_memblock_reserve,
 	.dt_compat	= armada_370_xp_dt_compat,
+	.dt_fixup	= armada_370_xp_dt_fixup,
 MACHINE_END
 
 static const char * const armada_375_dt_compat[] __initconst = {
-- 
2.18.0

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v5] ARM: mvebu: use dt_fixup to provide fallback for enable-method
  2018-07-26  3:48 ` Chris Packham
@ 2018-09-21 10:05   ` Gregory CLEMENT
  -1 siblings, 0 replies; 9+ messages in thread
From: Gregory CLEMENT @ 2018-09-21 10:05 UTC (permalink / raw)
  To: Chris Packham
  Cc: jason, andrew, sebastian.hesselbarth, linux, ylefloch,
	linux-arm-kernel, linux-kernel

Hi Chris,
 
 On jeu., juil. 26 2018, Chris Packham <chris.packham@alliedtelesis.co.nz> wrote:

> We need to maintain backwards compatibility with device trees that don't
> define an enable method. At the same time we want the device tree to be
> able to specify an enable-method and have it stick.
>
> Previously by having smp assigned in the DT_MACHINE definition this
> would be picked up by setup_arch() and override whatever
> arm_dt_init_cpu_maps() had configured. Now we move the initial
> assignment of default smp_ops to a dt_fixup and let
> arm_dt_init_cpu_maps() override that if the device tree defines an
> enable-method.
>
> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>

I made several tests on an Armada XP based board: OpenBlock AX3: I
modify the enable-method in the decvice tree, and I confirm that without
your patch it is not taken into account whereas with this patch the
enable-method is applied form the device tree. I also didn't see any
regression with the original dtb.

So I added my:
Tested-by: Gregory CLEMENT <gregory.clement@bootlin.com>

and applied on mvebu/soc

Thanks,

Gregory

> ---
> Pervious versions
>
> v1: http://lists.infradead.org/pipermail/linux-arm-kernel/2014-November/300182.html
> v2: http://lists.infradead.org/pipermail/linux-arm-kernel/2014-November/300480.html
> v3: http://lists.infradead.org/pipermail/linux-arm-kernel/2014-November/302945.html
> v4: http://lists.infradead.org/pipermail/linux-arm-kernel/2014-November/303899.html
>
> Changes since v4:
> - drop "RFC"
>
>  arch/arm/mach-mvebu/board-v7.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm/mach-mvebu/board-v7.c b/arch/arm/mach-mvebu/board-v7.c
> index ccca95173e17..5bbde5e5258e 100644
> --- a/arch/arm/mach-mvebu/board-v7.c
> +++ b/arch/arm/mach-mvebu/board-v7.c
> @@ -145,6 +145,11 @@ static void __init mvebu_dt_init(void)
>  		i2c_quirk();
>  }
>  
> +static void __init armada_370_xp_dt_fixup(void)
> +{
> +	smp_set_ops(smp_ops(armada_xp_smp_ops));
> +}
> +
>  static const char * const armada_370_xp_dt_compat[] __initconst = {
>  	"marvell,armada-370-xp",
>  	NULL,
> @@ -153,17 +158,12 @@ static const char * const armada_370_xp_dt_compat[] __initconst = {
>  DT_MACHINE_START(ARMADA_370_XP_DT, "Marvell Armada 370/XP (Device Tree)")
>  	.l2c_aux_val	= 0,
>  	.l2c_aux_mask	= ~0,
> -/*
> - * The following field (.smp) is still needed to ensure backward
> - * compatibility with old Device Trees that were not specifying the
> - * cpus enable-method property.
> - */
> -	.smp		= smp_ops(armada_xp_smp_ops),
>  	.init_machine	= mvebu_dt_init,
>  	.init_irq       = mvebu_init_irq,
>  	.restart	= mvebu_restart,
>  	.reserve        = mvebu_memblock_reserve,
>  	.dt_compat	= armada_370_xp_dt_compat,
> +	.dt_fixup	= armada_370_xp_dt_fixup,
>  MACHINE_END
>  
>  static const char * const armada_375_dt_compat[] __initconst = {
> -- 
> 2.18.0
>

-- 
Gregory Clement, Bootlin
Embedded Linux and Kernel engineering
http://bootlin.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v5] ARM: mvebu: use dt_fixup to provide fallback for enable-method
@ 2018-09-21 10:05   ` Gregory CLEMENT
  0 siblings, 0 replies; 9+ messages in thread
From: Gregory CLEMENT @ 2018-09-21 10:05 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Chris,
 
 On jeu., juil. 26 2018, Chris Packham <chris.packham@alliedtelesis.co.nz> wrote:

> We need to maintain backwards compatibility with device trees that don't
> define an enable method. At the same time we want the device tree to be
> able to specify an enable-method and have it stick.
>
> Previously by having smp assigned in the DT_MACHINE definition this
> would be picked up by setup_arch() and override whatever
> arm_dt_init_cpu_maps() had configured. Now we move the initial
> assignment of default smp_ops to a dt_fixup and let
> arm_dt_init_cpu_maps() override that if the device tree defines an
> enable-method.
>
> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>

I made several tests on an Armada XP based board: OpenBlock AX3: I
modify the enable-method in the decvice tree, and I confirm that without
your patch it is not taken into account whereas with this patch the
enable-method is applied form the device tree. I also didn't see any
regression with the original dtb.

So I added my:
Tested-by: Gregory CLEMENT <gregory.clement@bootlin.com>

and applied on mvebu/soc

Thanks,

Gregory

> ---
> Pervious versions
>
> v1: http://lists.infradead.org/pipermail/linux-arm-kernel/2014-November/300182.html
> v2: http://lists.infradead.org/pipermail/linux-arm-kernel/2014-November/300480.html
> v3: http://lists.infradead.org/pipermail/linux-arm-kernel/2014-November/302945.html
> v4: http://lists.infradead.org/pipermail/linux-arm-kernel/2014-November/303899.html
>
> Changes since v4:
> - drop "RFC"
>
>  arch/arm/mach-mvebu/board-v7.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm/mach-mvebu/board-v7.c b/arch/arm/mach-mvebu/board-v7.c
> index ccca95173e17..5bbde5e5258e 100644
> --- a/arch/arm/mach-mvebu/board-v7.c
> +++ b/arch/arm/mach-mvebu/board-v7.c
> @@ -145,6 +145,11 @@ static void __init mvebu_dt_init(void)
>  		i2c_quirk();
>  }
>  
> +static void __init armada_370_xp_dt_fixup(void)
> +{
> +	smp_set_ops(smp_ops(armada_xp_smp_ops));
> +}
> +
>  static const char * const armada_370_xp_dt_compat[] __initconst = {
>  	"marvell,armada-370-xp",
>  	NULL,
> @@ -153,17 +158,12 @@ static const char * const armada_370_xp_dt_compat[] __initconst = {
>  DT_MACHINE_START(ARMADA_370_XP_DT, "Marvell Armada 370/XP (Device Tree)")
>  	.l2c_aux_val	= 0,
>  	.l2c_aux_mask	= ~0,
> -/*
> - * The following field (.smp) is still needed to ensure backward
> - * compatibility with old Device Trees that were not specifying the
> - * cpus enable-method property.
> - */
> -	.smp		= smp_ops(armada_xp_smp_ops),
>  	.init_machine	= mvebu_dt_init,
>  	.init_irq       = mvebu_init_irq,
>  	.restart	= mvebu_restart,
>  	.reserve        = mvebu_memblock_reserve,
>  	.dt_compat	= armada_370_xp_dt_compat,
> +	.dt_fixup	= armada_370_xp_dt_fixup,
>  MACHINE_END
>  
>  static const char * const armada_375_dt_compat[] __initconst = {
> -- 
> 2.18.0
>

-- 
Gregory Clement, Bootlin
Embedded Linux and Kernel engineering
http://bootlin.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v5] ARM: mvebu: use dt_fixup to provide fallback for enable-method
  2018-09-21 10:05   ` Gregory CLEMENT
@ 2018-09-24  9:53     ` Olof Johansson
  -1 siblings, 0 replies; 9+ messages in thread
From: Olof Johansson @ 2018-09-24  9:53 UTC (permalink / raw)
  To: Gregory CLEMENT
  Cc: Chris Packham, jason, andrew, sebastian.hesselbarth, linux,
	ylefloch, linux-arm-kernel, linux-kernel

On Fri, Sep 21, 2018 at 12:05:48PM +0200, Gregory CLEMENT wrote:
> Hi Chris,
>  
>  On jeu., juil. 26 2018, Chris Packham <chris.packham@alliedtelesis.co.nz> wrote:
> 
> > We need to maintain backwards compatibility with device trees that don't
> > define an enable method. At the same time we want the device tree to be
> > able to specify an enable-method and have it stick.
> >
> > Previously by having smp assigned in the DT_MACHINE definition this
> > would be picked up by setup_arch() and override whatever
> > arm_dt_init_cpu_maps() had configured. Now we move the initial
> > assignment of default smp_ops to a dt_fixup and let
> > arm_dt_init_cpu_maps() override that if the device tree defines an
> > enable-method.
> >
> > Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
> 
> I made several tests on an Armada XP based board: OpenBlock AX3: I
> modify the enable-method in the decvice tree, and I confirm that without
> your patch it is not taken into account whereas with this patch the
> enable-method is applied form the device tree. I also didn't see any
> regression with the original dtb.
> 
> So I added my:
> Tested-by: Gregory CLEMENT <gregory.clement@bootlin.com>
> 
> and applied on mvebu/soc

Hi,

Looks like this broke non-SMP. Not a huge deal, but please apply this as
closely as possible on top of the previous patch (or squash it in).


- 8< - 8< - 8< - 8< - 8< - 8< - 8< - 8< - 8< - 8< - 8< - 8< - 8< - 8< -



From 3190d9502607995c7aecce79beec36714574d494 Mon Sep 17 00:00:00 2001
From: Olof Johansson <olof@lixom.net>
Date: Mon, 24 Sep 2018 02:37:31 -0700
Subject: [PATCH] ARM: mvebu: fix !SMP build

Wrap set_smp_ops() in CONFIG_SMP.

Fixes: d6ec59de9a0a8 ("ARM: mvebu: use dt_fixup to provide fallback for enable-method")
Cc: Chris Packham <chris.packham@alliedtelesis.co.nz>
Signed-off-by: Olof Johansson <olof@lixom.net>
---
 arch/arm/mach-mvebu/board-v7.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/mach-mvebu/board-v7.c b/arch/arm/mach-mvebu/board-v7.c
index 5bbde5e..0b10acd 100644
--- a/arch/arm/mach-mvebu/board-v7.c
+++ b/arch/arm/mach-mvebu/board-v7.c
@@ -147,7 +147,9 @@ static void __init mvebu_dt_init(void)
 
 static void __init armada_370_xp_dt_fixup(void)
 {
+#ifdef CONFIG_SMP
 	smp_set_ops(smp_ops(armada_xp_smp_ops));
+#endif
 }
 
 static const char * const armada_370_xp_dt_compat[] __initconst = {
-- 
2.8.6


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v5] ARM: mvebu: use dt_fixup to provide fallback for enable-method
@ 2018-09-24  9:53     ` Olof Johansson
  0 siblings, 0 replies; 9+ messages in thread
From: Olof Johansson @ 2018-09-24  9:53 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Sep 21, 2018 at 12:05:48PM +0200, Gregory CLEMENT wrote:
> Hi Chris,
>  
>  On jeu., juil. 26 2018, Chris Packham <chris.packham@alliedtelesis.co.nz> wrote:
> 
> > We need to maintain backwards compatibility with device trees that don't
> > define an enable method. At the same time we want the device tree to be
> > able to specify an enable-method and have it stick.
> >
> > Previously by having smp assigned in the DT_MACHINE definition this
> > would be picked up by setup_arch() and override whatever
> > arm_dt_init_cpu_maps() had configured. Now we move the initial
> > assignment of default smp_ops to a dt_fixup and let
> > arm_dt_init_cpu_maps() override that if the device tree defines an
> > enable-method.
> >
> > Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
> 
> I made several tests on an Armada XP based board: OpenBlock AX3: I
> modify the enable-method in the decvice tree, and I confirm that without
> your patch it is not taken into account whereas with this patch the
> enable-method is applied form the device tree. I also didn't see any
> regression with the original dtb.
> 
> So I added my:
> Tested-by: Gregory CLEMENT <gregory.clement@bootlin.com>
> 
> and applied on mvebu/soc

Hi,

Looks like this broke non-SMP. Not a huge deal, but please apply this as
closely as possible on top of the previous patch (or squash it in).


- 8< - 8< - 8< - 8< - 8< - 8< - 8< - 8< - 8< - 8< - 8< - 8< - 8< - 8< -



>From 3190d9502607995c7aecce79beec36714574d494 Mon Sep 17 00:00:00 2001
From: Olof Johansson <olof@lixom.net>
Date: Mon, 24 Sep 2018 02:37:31 -0700
Subject: [PATCH] ARM: mvebu: fix !SMP build

Wrap set_smp_ops() in CONFIG_SMP.

Fixes: d6ec59de9a0a8 ("ARM: mvebu: use dt_fixup to provide fallback for enable-method")
Cc: Chris Packham <chris.packham@alliedtelesis.co.nz>
Signed-off-by: Olof Johansson <olof@lixom.net>
---
 arch/arm/mach-mvebu/board-v7.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/mach-mvebu/board-v7.c b/arch/arm/mach-mvebu/board-v7.c
index 5bbde5e..0b10acd 100644
--- a/arch/arm/mach-mvebu/board-v7.c
+++ b/arch/arm/mach-mvebu/board-v7.c
@@ -147,7 +147,9 @@ static void __init mvebu_dt_init(void)
 
 static void __init armada_370_xp_dt_fixup(void)
 {
+#ifdef CONFIG_SMP
 	smp_set_ops(smp_ops(armada_xp_smp_ops));
+#endif
 }
 
 static const char * const armada_370_xp_dt_compat[] __initconst = {
-- 
2.8.6

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v5] ARM: mvebu: use dt_fixup to provide fallback for enable-method
  2018-09-24  9:53     ` Olof Johansson
@ 2018-09-24 10:06       ` Chris Packham
  -1 siblings, 0 replies; 9+ messages in thread
From: Chris Packham @ 2018-09-24 10:06 UTC (permalink / raw)
  To: Olof Johansson, Gregory CLEMENT
  Cc: jason, andrew, sebastian.hesselbarth, linux, ylefloch,
	linux-arm-kernel, linux-kernel

On 24/09/18 21:54, Olof Johansson wrote:
> On Fri, Sep 21, 2018 at 12:05:48PM +0200, Gregory CLEMENT wrote:
>> Hi Chris,
>>   
>>   On jeu., juil. 26 2018, Chris Packham <chris.packham@alliedtelesis.co.nz> wrote:
>>
>>> We need to maintain backwards compatibility with device trees that don't
>>> define an enable method. At the same time we want the device tree to be
>>> able to specify an enable-method and have it stick.
>>>
>>> Previously by having smp assigned in the DT_MACHINE definition this
>>> would be picked up by setup_arch() and override whatever
>>> arm_dt_init_cpu_maps() had configured. Now we move the initial
>>> assignment of default smp_ops to a dt_fixup and let
>>> arm_dt_init_cpu_maps() override that if the device tree defines an
>>> enable-method.
>>>
>>> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
>>
>> I made several tests on an Armada XP based board: OpenBlock AX3: I
>> modify the enable-method in the decvice tree, and I confirm that without
>> your patch it is not taken into account whereas with this patch the
>> enable-method is applied form the device tree. I also didn't see any
>> regression with the original dtb.
>>
>> So I added my:
>> Tested-by: Gregory CLEMENT <gregory.clement@bootlin.com>
>>
>> and applied on mvebu/soc
> 
> Hi,
> 
> Looks like this broke non-SMP. Not a huge deal, but please apply this as
> closely as possible on top of the previous patch (or squash it in).
> 
> 
> - 8< - 8< - 8< - 8< - 8< - 8< - 8< - 8< - 8< - 8< - 8< - 8< - 8< - 8< -
> 
> 
> 
>  From 3190d9502607995c7aecce79beec36714574d494 Mon Sep 17 00:00:00 2001
> From: Olof Johansson <olof@lixom.net>
> Date: Mon, 24 Sep 2018 02:37:31 -0700
> Subject: [PATCH] ARM: mvebu: fix !SMP build
> 
> Wrap set_smp_ops() in CONFIG_SMP.
> 
> Fixes: d6ec59de9a0a8 ("ARM: mvebu: use dt_fixup to provide fallback for enable-method")
> Cc: Chris Packham <chris.packham@alliedtelesis.co.nz>
> Signed-off-by: Olof Johansson <olof@lixom.net>
> ---
>   arch/arm/mach-mvebu/board-v7.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/arch/arm/mach-mvebu/board-v7.c b/arch/arm/mach-mvebu/board-v7.c
> index 5bbde5e..0b10acd 100644
> --- a/arch/arm/mach-mvebu/board-v7.c
> +++ b/arch/arm/mach-mvebu/board-v7.c
> @@ -147,7 +147,9 @@ static void __init mvebu_dt_init(void)
>   
>   static void __init armada_370_xp_dt_fixup(void)
>   {
> +#ifdef CONFIG_SMP
>   	smp_set_ops(smp_ops(armada_xp_smp_ops));
> +#endif
>   }
>   
>   static const char * const armada_370_xp_dt_compat[] __initconst = {
> 

Makes sense to me.

Gregory, do you want me to send a v6 or are you able to squash this in?

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v5] ARM: mvebu: use dt_fixup to provide fallback for enable-method
@ 2018-09-24 10:06       ` Chris Packham
  0 siblings, 0 replies; 9+ messages in thread
From: Chris Packham @ 2018-09-24 10:06 UTC (permalink / raw)
  To: linux-arm-kernel

On 24/09/18 21:54, Olof Johansson wrote:
> On Fri, Sep 21, 2018 at 12:05:48PM +0200, Gregory CLEMENT wrote:
>> Hi Chris,
>>   
>>   On jeu., juil. 26 2018, Chris Packham <chris.packham@alliedtelesis.co.nz> wrote:
>>
>>> We need to maintain backwards compatibility with device trees that don't
>>> define an enable method. At the same time we want the device tree to be
>>> able to specify an enable-method and have it stick.
>>>
>>> Previously by having smp assigned in the DT_MACHINE definition this
>>> would be picked up by setup_arch() and override whatever
>>> arm_dt_init_cpu_maps() had configured. Now we move the initial
>>> assignment of default smp_ops to a dt_fixup and let
>>> arm_dt_init_cpu_maps() override that if the device tree defines an
>>> enable-method.
>>>
>>> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
>>
>> I made several tests on an Armada XP based board: OpenBlock AX3: I
>> modify the enable-method in the decvice tree, and I confirm that without
>> your patch it is not taken into account whereas with this patch the
>> enable-method is applied form the device tree. I also didn't see any
>> regression with the original dtb.
>>
>> So I added my:
>> Tested-by: Gregory CLEMENT <gregory.clement@bootlin.com>
>>
>> and applied on mvebu/soc
> 
> Hi,
> 
> Looks like this broke non-SMP. Not a huge deal, but please apply this as
> closely as possible on top of the previous patch (or squash it in).
> 
> 
> - 8< - 8< - 8< - 8< - 8< - 8< - 8< - 8< - 8< - 8< - 8< - 8< - 8< - 8< -
> 
> 
> 
>  From 3190d9502607995c7aecce79beec36714574d494 Mon Sep 17 00:00:00 2001
> From: Olof Johansson <olof@lixom.net>
> Date: Mon, 24 Sep 2018 02:37:31 -0700
> Subject: [PATCH] ARM: mvebu: fix !SMP build
> 
> Wrap set_smp_ops() in CONFIG_SMP.
> 
> Fixes: d6ec59de9a0a8 ("ARM: mvebu: use dt_fixup to provide fallback for enable-method")
> Cc: Chris Packham <chris.packham@alliedtelesis.co.nz>
> Signed-off-by: Olof Johansson <olof@lixom.net>
> ---
>   arch/arm/mach-mvebu/board-v7.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/arch/arm/mach-mvebu/board-v7.c b/arch/arm/mach-mvebu/board-v7.c
> index 5bbde5e..0b10acd 100644
> --- a/arch/arm/mach-mvebu/board-v7.c
> +++ b/arch/arm/mach-mvebu/board-v7.c
> @@ -147,7 +147,9 @@ static void __init mvebu_dt_init(void)
>   
>   static void __init armada_370_xp_dt_fixup(void)
>   {
> +#ifdef CONFIG_SMP
>   	smp_set_ops(smp_ops(armada_xp_smp_ops));
> +#endif
>   }
>   
>   static const char * const armada_370_xp_dt_compat[] __initconst = {
> 

Makes sense to me.

Gregory, do you want me to send a v6 or are you able to squash this in?

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v5] ARM: mvebu: use dt_fixup to provide fallback for enable-method
  2018-09-24 10:06       ` Chris Packham
  (?)
@ 2018-09-24 15:18       ` Gregory CLEMENT
  -1 siblings, 0 replies; 9+ messages in thread
From: Gregory CLEMENT @ 2018-09-24 15:18 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Chris and Olof
 
 On lun., sept. 24 2018, Chris Packham <Chris.Packham@alliedtelesis.co.nz> wrote:

> On 24/09/18 21:54, Olof Johansson wrote:
>> On Fri, Sep 21, 2018 at 12:05:48PM +0200, Gregory CLEMENT wrote:
>>> Hi Chris,
>>>   
>>>   On jeu., juil. 26 2018, Chris Packham <chris.packham@alliedtelesis.co.nz> wrote:
>>>
>>>> We need to maintain backwards compatibility with device trees that don't
>>>> define an enable method. At the same time we want the device tree to be
>>>> able to specify an enable-method and have it stick.
>>>>
>>>> Previously by having smp assigned in the DT_MACHINE definition this
>>>> would be picked up by setup_arch() and override whatever
>>>> arm_dt_init_cpu_maps() had configured. Now we move the initial
>>>> assignment of default smp_ops to a dt_fixup and let
>>>> arm_dt_init_cpu_maps() override that if the device tree defines an
>>>> enable-method.
>>>>
>>>> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
>>>
>>> I made several tests on an Armada XP based board: OpenBlock AX3: I
>>> modify the enable-method in the decvice tree, and I confirm that without
>>> your patch it is not taken into account whereas with this patch the
>>> enable-method is applied form the device tree. I also didn't see any
>>> regression with the original dtb.
>>>
>>> So I added my:
>>> Tested-by: Gregory CLEMENT <gregory.clement@bootlin.com>
>>>
>>> and applied on mvebu/soc
>> 
>> Hi,
>> 
>> Looks like this broke non-SMP. Not a huge deal, but please apply this as
>> closely as possible on top of the previous patch (or squash it in).
>> 
>> 
>> - 8< - 8< - 8< - 8< - 8< - 8< - 8< - 8< - 8< - 8< - 8< - 8< - 8< - 8< -
>> 
>> 
>> 
>>  From 3190d9502607995c7aecce79beec36714574d494 Mon Sep 17 00:00:00 2001
>> From: Olof Johansson <olof@lixom.net>
>> Date: Mon, 24 Sep 2018 02:37:31 -0700
>> Subject: [PATCH] ARM: mvebu: fix !SMP build
>> 
>> Wrap set_smp_ops() in CONFIG_SMP.
>> 
>> Fixes: d6ec59de9a0a8 ("ARM: mvebu: use dt_fixup to provide fallback for enable-method")
>> Cc: Chris Packham <chris.packham@alliedtelesis.co.nz>
>> Signed-off-by: Olof Johansson <olof@lixom.net>
>> ---
>>   arch/arm/mach-mvebu/board-v7.c | 2 ++
>>   1 file changed, 2 insertions(+)
>> 
>> diff --git a/arch/arm/mach-mvebu/board-v7.c b/arch/arm/mach-mvebu/board-v7.c
>> index 5bbde5e..0b10acd 100644
>> --- a/arch/arm/mach-mvebu/board-v7.c
>> +++ b/arch/arm/mach-mvebu/board-v7.c
>> @@ -147,7 +147,9 @@ static void __init mvebu_dt_init(void)
>>   
>>   static void __init armada_370_xp_dt_fixup(void)
>>   {
>> +#ifdef CONFIG_SMP
>>   	smp_set_ops(smp_ops(armada_xp_smp_ops));
>> +#endif
>>   }
>>   
>>   static const char * const armada_370_xp_dt_compat[] __initconst = {
>> 
>
> Makes sense to me.
>
> Gregory, do you want me to send a v6 or are you able to squash this
> in?

I squashed Olof fix in the commit of the mvebu/soc .

Thanks,

Gregory


-- 
Gregory Clement, Bootlin
Embedded Linux and Kernel engineering
http://bootlin.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-09-24 15:18 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-26  3:48 [PATCH v5] ARM: mvebu: use dt_fixup to provide fallback for enable-method Chris Packham
2018-07-26  3:48 ` Chris Packham
2018-09-21 10:05 ` Gregory CLEMENT
2018-09-21 10:05   ` Gregory CLEMENT
2018-09-24  9:53   ` Olof Johansson
2018-09-24  9:53     ` Olof Johansson
2018-09-24 10:06     ` Chris Packham
2018-09-24 10:06       ` Chris Packham
2018-09-24 15:18       ` Gregory CLEMENT

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.