ARM: shmobile: r8a7779 Marzen legacy fix V2
Magnus Damm
maintainerPATCH v2 1/1 ARM: shmobile: r8a7779 Marzen legacy fix V2
From: Magnus Damm <[email protected]>
Unbreak the r8a7779 Marzen legacy code provided by marzen_defconfig.
As it is today Marzen multiplatform is working, but the legacy code is broken. This patch intends to leave multiplatform as-is but do a simple one-shot fix to unbreak the legacy code base.
Without this patch there is no preset delay and the TWD is defined both in C code and in DT. Solve the delay by invoking shmobile_init_delay() and simply disable TWD in case of building for legacy.
Marzen legacy code will be removed in the near future, but until then we may as well avoid breaking it.
---
Developed and tested on top of renesas-devel-20150706-v4.2-rc1
arch/arm/Kconfig | 1 - arch/arm/mach-shmobile/setup-r8a7779.c | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-)
arch/arm/Kconfig +0 -1
@@ -626,7 +626,6 @@ config ARCH_SHMOBILE_LEGACY select CPU_V7 select GENERIC_CLOCKEVENTS select HAVE_ARM_SCU if SMP - select HAVE_ARM_TWD if SMP select HAVE_SMP select MIGHT_HAVE_CACHE_L2X0 select MULTI_IRQ_HANDLER
arch/arm/mach-shmobile/setup-r8a7779.c +2 -0
@@ -677,6 +677,8 @@ void __init r8a7779_add_standard_devicesvoid __init r8a7779_add_early_devices (void ) { +shmobile_init_delay (); +early_platform_add_devices (r8a7779_early_devices,ARRAY_SIZE (r8a7779_early_devices));
Quoted 8 lines · Magnus Damm
From: Magnus Damm <[email protected]>
Unbreak the r8a7779 Marzen legacy code provided by
marzen_defconfig.As it is today Marzen multiplatform is working, but the legacy code is broken. This patch intends to leave multiplatform as-is but do a simple one-shot fix to unbreak the legacy code base.
Quoted 8 lines
Without this patch there is no preset delay and the TWD is defined both in C code and in DT. Solve the delay by invoking
shmobile_init_delay()and simply disable TWD in case of building for legacy.Marzen legacy code will be removed in the near future, but until then we may as well avoid breaking it.
Signed-off-by Magnus Damm <[email protected]>
Thanks, that does seem to improve things a lot.
I can now boot all the way to a nfs userspace :^)
I wonder if we should also add the following?
For the record, I found that after I enabled CONFIG_SMSC_PHY the boot now gets as far as initialising SDHI.
Quoted 30 lines
---
Developed and tested on top of renesas-devel-20150706-v4.2-rc1
arch/arm/Kconfig | 1 - arch/arm/mach-shmobile/setup-r8a7779.c | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-)arch/arm/Kconfig +0
-1@@ -626,7 +626,6 @@ config ARCH_SHMOBILE_LEGACY select CPU_V7 select GENERIC_CLOCKEVENTS select HAVE_ARM_SCU if SMP - select HAVE_ARM_TWD if SMP select HAVE_SMP select MIGHT_HAVE_CACHE_L2X0 select MULTI_IRQ_HANDLERarch/arm/mach-shmobile/setup-r8a7779.c +2
-0@@ -677,6 +677,8 @@ void __init r8a7779_add_standard_devicesvoid __init r8a7779_add_early_devices (void ) { +shmobile_init_delay (); +early_platform_add_devices (r8a7779_early_devices,ARRAY_SIZE (r8a7779_early_devices));
Magnus Damm
maintainerHi Simon,
Quoted 13 lines · Simon Horman
Quoted 12 lines · Magnus Damm
From: Magnus Damm <[email protected]>
Unbreak the r8a7779 Marzen legacy code provided by
marzen_defconfig.As it is today Marzen multiplatform is working, but the legacy code is broken. This patch intends to leave multiplatform as-is but do a simple one-shot fix to unbreak the legacy code base.
Without this patch there is no preset delay and the TWD is defined both in C code and in DT. Solve the delay by invoking
shmobile_init_delay()and simply disable TWD in case of building for legacy.
Quoted 8 lines
Quoted 4 lines
Marzen legacy code will be removed in the near future, but until then we may as well avoid breaking it.
Signed-off-by Magnus Damm <[email protected]>Thanks, that does seem to improve things a lot.
I can now boot all the way to a nfs userspace :^)
Yay!
Quoted 1 line
Tested-by Simon Horman <[email protected]>
Thanks for testing!
Quoted 7 lines
I wonder if we should also add the following?
Fixes f2a5473861cf ("clocksource: sh_tmu: Set cpu_possible_mask to fix SMP broadcast")For the record, I found that after I enabled
CONFIG_SMSC_PHYthe boot now gets as far as initialising SDHI.
Feel free to include any comment you think will help. My view is that the TMU commit pointed out by itself is not really troublesome, it is more that on legacy systems using earlytimer and TWD that this problem happens. For multiplatform the commit is fine.
Cheers,
/ magnus
Quoted 36 lines · Magnus Damm
Hi Simon,
Quoted 13 lines · Simon Horman
Quoted 12 lines · Magnus Damm
From: Magnus Damm <[email protected]>
Unbreak the r8a7779 Marzen legacy code provided by
marzen_defconfig.As it is today Marzen multiplatform is working, but the legacy code is broken. This patch intends to leave multiplatform as-is but do a simple one-shot fix to unbreak the legacy code base.
Without this patch there is no preset delay and the TWD is defined both in C code and in DT. Solve the delay by invoking
shmobile_init_delay()and simply disable TWD in case of building for legacy.Quoted 8 lines
Quoted 4 lines
Marzen legacy code will be removed in the near future, but until then we may as well avoid breaking it.
Signed-off-by Magnus Damm <[email protected]>Thanks, that does seem to improve things a lot.
I can now boot all the way to a nfs userspace :^)Yay!
Quoted 1 line
Tested-by Simon Horman <[email protected]>Thanks for testing!
Quoted 5 lines
I wonder if we should also add the following?
Fixes f2a5473861cf ("clocksource: sh_tmu: Set cpu_possible_mask to fix SMP broadcast")
Quoted 7 lines
Quoted 2 lines
For the record, I found that after I enabled
CONFIG_SMSC_PHYthe boot now gets as far as initialising SDHI.Feel free to include any comment you think will help. My view is that the TMU commit pointed out by itself is not really troublesome, it is more that on legacy systems using earlytimer and TWD that this problem happens. For multiplatform the commit is fine.
From my point of view the patch mentioned caused a behavioural change on legacy systems which this patch addresses.
Magnus Damm
maintainerQuoted 40 lines · Simon Horman
Quoted 39 lines · Magnus Damm
Hi Simon,
Quoted 13 lines · Simon Horman
Quoted 12 lines · Magnus Damm
From: Magnus Damm <[email protected]>
Unbreak the r8a7779 Marzen legacy code provided by
marzen_defconfig.As it is today Marzen multiplatform is working, but the legacy code is broken. This patch intends to leave multiplatform as-is but do a simple one-shot fix to unbreak the legacy code base.
Without this patch there is no preset delay and the TWD is defined both in C code and in DT. Solve the delay by invoking
shmobile_init_delay()and simply disable TWD in case of building for legacy.Quoted 8 lines
Quoted 4 lines
Marzen legacy code will be removed in the near future, but until then we may as well avoid breaking it.
Signed-off-by Magnus Damm <[email protected]>Thanks, that does seem to improve things a lot.
I can now boot all the way to a nfs userspace :^)Yay!
Quoted 1 line
Tested-by Simon Horman <[email protected]>Thanks for testing!
Quoted 7 lines
I wonder if we should also add the following?
Fixes f2a5473861cf ("clocksource: sh_tmu: Set cpu_possible_mask to fix SMP broadcast")For the record, I found that after I enabled
CONFIG_SMSC_PHYthe boot now gets as far as initialising SDHI.
Quoted 7 lines
Quoted 4 lines
Feel free to include any comment you think will help. My view is that the TMU commit pointed out by itself is not really troublesome, it is more that on legacy systems using earlytimer and TWD that this problem happens. For multiplatform the commit is fine.
From my point of view the patch mentioned caused a behavioural change on legacy systems which this patch addresses.
Sure, I agree about that. =)
/ magnus
Quoted 46 lines · Magnus Damm
Quoted 45 lines · Simon Horman
Quoted 43 lines · Magnus Damm
Hi Simon,
Quoted 13 lines · Simon Horman
Quoted 12 lines · Magnus Damm
From: Magnus Damm <[email protected]>
Unbreak the r8a7779 Marzen legacy code provided by
marzen_defconfig.As it is today Marzen multiplatform is working, but the legacy code is broken. This patch intends to leave multiplatform as-is but do a simple one-shot fix to unbreak the legacy code base.
Without this patch there is no preset delay and the TWD is defined both in C code and in DT. Solve the delay by invoking
shmobile_init_delay()and simply disable TWD in case of building for legacy.Quoted 8 lines
Quoted 4 lines
Marzen legacy code will be removed in the near future, but until then we may as well avoid breaking it.
Signed-off-by Magnus Damm <[email protected]>Thanks, that does seem to improve things a lot.
I can now boot all the way to a nfs userspace :^)Yay!
Quoted 1 line
Tested-by Simon Horman <[email protected]>Thanks for testing!
Quoted 7 lines
I wonder if we should also add the following?
Fixes f2a5473861cf ("clocksource: sh_tmu: Set cpu_possible_mask to fix SMP broadcast")For the record, I found that after I enabled
CONFIG_SMSC_PHYthe boot now gets as far as initialising SDHI.Feel free to include any comment you think will help. My view is that the TMU commit pointed out by itself is not really troublesome, it is more that on legacy systems using earlytimer and TWD that this problem happens. For multiplatform the commit is fine.
Quoted 4 lines
Quoted 2 lines
From my point of view the patch mentioned caused a behavioural change on legacy systems which this patch addresses.
Sure, I agree about that. =)
Excellent.
With the above in mind I will queue this up with the Fixes tag as a fix for v4.3. It may well filter into -stable from there.
Magnus Damm
maintainerHi Simon,
Quoted 50 lines · Simon Horman
Quoted 49 lines · Magnus Damm
Quoted 47 lines · Simon Horman
Quoted 36 lines · Magnus Damm
Hi Simon,
Quoted 13 lines · Simon Horman
Quoted 12 lines · Magnus Damm
From: Magnus Damm <[email protected]>
Unbreak the r8a7779 Marzen legacy code provided by
marzen_defconfig.As it is today Marzen multiplatform is working, but the legacy code is broken. This patch intends to leave multiplatform as-is but do a simple one-shot fix to unbreak the legacy code base.
Without this patch there is no preset delay and the TWD is defined both in C code and in DT. Solve the delay by invoking
shmobile_init_delay()and simply disable TWD in case of building for legacy.Quoted 8 lines
Quoted 4 lines
Marzen legacy code will be removed in the near future, but until then we may as well avoid breaking it.
Signed-off-by Magnus Damm <[email protected]>Thanks, that does seem to improve things a lot.
I can now boot all the way to a nfs userspace :^)Yay!
Quoted 1 line
Tested-by Simon Horman <[email protected]>Thanks for testing!
Quoted 5 lines
I wonder if we should also add the following?
Fixes f2a5473861cf ("clocksource: sh_tmu: Set cpu_possible_mask to fix SMP broadcast")Quoted 7 lines
Quoted 2 lines
For the record, I found that after I enabled
CONFIG_SMSC_PHYthe boot now gets as far as initialising SDHI.Feel free to include any comment you think will help. My view is that the TMU commit pointed out by itself is not really troublesome, it is more that on legacy systems using earlytimer and TWD that this problem happens. For multiplatform the commit is fine.
From my point of view the patch mentioned caused a behavioural change on legacy systems which this patch addresses.
Quoted 6 lines
Quoted 1 line
Sure, I agree about that. =)
Excellent.
With the above in mind I will queue this up with the Fixes tag as a fix for v4.3. It may well filter into -stable from there.
Sounds good, thanks for your help!
/ magnus
Quoted 19 lines · Simon Horman
Quoted 18 lines · Magnus Damm
Quoted 17 lines · Simon Horman
Quoted 16 lines · Magnus Damm
Hi Simon,
Quoted 13 lines · Simon Horman
Quoted 12 lines · Magnus Damm
From: Magnus Damm <[email protected]>
Unbreak the r8a7779 Marzen legacy code provided by
marzen_defconfig.As it is today Marzen multiplatform is working, but the legacy code is broken. This patch intends to leave multiplatform as-is but do a simple one-shot fix to unbreak the legacy code base.
Without this patch there is no preset delay and the TWD is defined both in C code and in DT. Solve the delay by invoking
shmobile_init_delay()and simply disable TWD in case of building for legacy.
Quoted 7 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Marzen legacy code will be removed in the near future, but until then we may as well avoid breaking it.
Signed-off-by Magnus Damm <[email protected]>With the above in mind I will queue this up with the Fixes tag as a fix for v4.3. It may well filter into -stable from there.
Before you tag it for stable: keeping in mind commit 30225743852ed5c3 ("ARM: shmobile: sh73a0 dtsi: Add Cortex-A9 TWD node), does it work with CONFIG_CPU_IDLE=y?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Hi Geert,
Quoted 23 lines · Geert Uytterhoeven
Quoted 22 lines · Simon Horman
Quoted 21 lines · Magnus Damm
Quoted 20 lines · Simon Horman
Quoted 19 lines · Magnus Damm
Hi Simon,
Quoted 16 lines · Simon Horman
Quoted 15 lines · Magnus Damm
From: Magnus Damm <[email protected]>
Unbreak the r8a7779 Marzen legacy code provided by
marzen_defconfig.As it is today Marzen multiplatform is working, but the legacy code is broken. This patch intends to leave multiplatform as-is but do a simple one-shot fix to unbreak the legacy code base.
Without this patch there is no preset delay and the TWD is defined both in C code and in DT. Solve the delay by invoking
shmobile_init_delay()and simply disable TWD in case of building for legacy.Marzen legacy code will be removed in the near future, but until then we may as well avoid breaking it.
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Signed-off-by Magnus Damm <[email protected]>With the above in mind I will queue this up with the Fixes tag as a fix for v4.3. It may well filter into -stable from there.
Before you tag it for stable: keeping in mind commit
30225743852ed5c3("ARM: shmobile: sh73a0 dtsi: Add Cortex-A9 TWD node), does it work withCONFIG_CPU_IDLE=y?
CONFIG_CPU_IDLE=yCONFIG_CPU_IDLE_GOV_LADDER=yCONFIG_CPU_IDLE_GOV_MENU=yCONFIG_DT_IDLE_STATES=yCONFIG_ARM_CPUIDLE=y
I tried enabling the above and then tested booting the marzen board both with and without this patch (the one in the subject of the email).
The result was the same as without the above options enabled:
* The patch seems to be required for marzen to boot to any kind of console without CONFIG_DEBUG_LL set.
Hi SImon,
Quoted 39 lines · Simon Horman
Quoted 23 lines · Geert Uytterhoeven
Quoted 22 lines · Simon Horman
Quoted 21 lines · Magnus Damm
Quoted 20 lines · Simon Horman
Quoted 19 lines · Magnus Damm
Hi Simon,
Quoted 16 lines · Simon Horman
Quoted 15 lines · Magnus Damm
From: Magnus Damm <[email protected]>
Unbreak the r8a7779 Marzen legacy code provided by
marzen_defconfig.As it is today Marzen multiplatform is working, but the legacy code is broken. This patch intends to leave multiplatform as-is but do a simple one-shot fix to unbreak the legacy code base.
Without this patch there is no preset delay and the TWD is defined both in C code and in DT. Solve the delay by invoking
shmobile_init_delay()and simply disable TWD in case of building for legacy.Marzen legacy code will be removed in the near future, but until then we may as well avoid breaking it.
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Signed-off-by Magnus Damm <[email protected]>With the above in mind I will queue this up with the Fixes tag as a fix for v4.3. It may well filter into -stable from there.
Before you tag it for stable: keeping in mind commit
30225743852ed5c3("ARM: shmobile: sh73a0 dtsi: Add Cortex-A9 TWD node), does it work withCONFIG_CPU_IDLE=y?
CONFIG_CPU_IDLE=yCONFIG_CPU_IDLE_GOV_LADDER=yCONFIG_CPU_IDLE_GOV_MENU=yCONFIG_DT_IDLE_STATES=yCONFIG_ARM_CPUIDLE=y
Quoted 7 lines
I tried enabling the above and then tested booting the marzen board both with and without this patch (the one in the subject of the email).
The result was the same as without the above options enabled:
* The patch seems to be required for marzen to boot to any kind of console without
CONFIG_DEBUG_LLset.
OK, then I'd go for it!
Thanks for checking.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Quoted 8 lines · Magnus Damm
From: Magnus Damm <[email protected]>
Unbreak the r8a7779 Marzen legacy code provided by
marzen_defconfig.As it is today Marzen multiplatform is working, but the legacy code is broken. This patch intends to leave multiplatform as-is but do a simple one-shot fix to unbreak the legacy code base.
Quoted 8 lines
Without this patch there is no preset delay and the TWD is defined both in C code and in DT. Solve the delay by invoking
shmobile_init_delay()and simply disable TWD in case of building for legacy.Marzen legacy code will be removed in the near future, but until then we may as well avoid breaking it.
Signed-off-by Magnus Damm <[email protected]>
I currently have this patch queued up.
However, as "[PATCH 00/03] ARM: shmobile: r8a7779 Marzen legacy removal" is also queued up I have it in mind to drop this patch. The reasoning is twofold:
* There seems little benefit to fix legacy code that is being removed
* There is a tedious merge conflict between fixing and removing the code
Quoted 18 lines · Simon Horman
Quoted 8 lines · Magnus Damm
From: Magnus Damm <[email protected]>
Unbreak the r8a7779 Marzen legacy code provided by
marzen_defconfig.As it is today Marzen multiplatform is working, but the legacy code is broken. This patch intends to leave multiplatform as-is but do a simple one-shot fix to unbreak the legacy code base.
Quoted 8 lines
Without this patch there is no preset delay and the TWD is defined both in C code and in DT. Solve the delay by invoking
shmobile_init_delay()and simply disable TWD in case of building for legacy.Marzen legacy code will be removed in the near future, but until then we may as well avoid breaking it.
Signed-off-by Magnus Damm <[email protected]>
Quoted 7 lines
I currently have this patch queued up.
However, as "[PATCH 00/03] ARM: shmobile: r8a7779 Marzen legacy removal" is also queued up I have it in mind to drop this patch. The reasoning is twofold:* There seems little benefit to fix legacy code that is being removed
* There is a tedious merge conflict between fixing and removing the code
I have gone ahead and dropped this patch.