2015-04-28 16:03:05

by Valentin Rothberg

[permalink] [raw]
Subject: [PATCH] arch/arm/mach-mvebu/Kconfig: remove obsolete selects

ARM_ERRATA_753970 is not defined in Kconfig, so that both selects turn
out to be nops. Hence, we can safely remove them.

Signed-off-by: Valentin Rothberg <[email protected]>
---
I detected this issue with scripts/checkkconfigsymbols.py
---
arch/arm/mach-mvebu/Kconfig | 2 --
1 file changed, 2 deletions(-)

diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig
index 97473168d6b6..b9f1b63b169c 100644
--- a/arch/arm/mach-mvebu/Kconfig
+++ b/arch/arm/mach-mvebu/Kconfig
@@ -37,7 +37,6 @@ config MACH_ARMADA_370
config MACH_ARMADA_375
bool "Marvell Armada 375 boards" if ARCH_MULTI_V7
select ARM_ERRATA_720789
- select ARM_ERRATA_753970
select ARM_GIC
select ARMADA_375_CLK
select HAVE_ARM_SCU
@@ -52,7 +51,6 @@ config MACH_ARMADA_375
config MACH_ARMADA_38X
bool "Marvell Armada 380/385 boards" if ARCH_MULTI_V7
select ARM_ERRATA_720789
- select ARM_ERRATA_753970
select ARM_GIC
select ARMADA_38X_CLK
select HAVE_ARM_SCU
--
2.1.4


2015-04-28 16:41:45

by Gregory CLEMENT

[permalink] [raw]
Subject: Re: [PATCH] arch/arm/mach-mvebu/Kconfig: remove obsolete selects

Hi Valentin,

On 28/04/2015 18:02, Valentin Rothberg wrote:
> ARM_ERRATA_753970 is not defined in Kconfig, so that both selects turn
> out to be nops. Hence, we can safely remove them.

It was already pointed by Paul Bolle a few months ago:
http://thread.gmane.org/gmane.linux.kernel/1868817

and I thought it was applied.

He pointed that the original intent was to select
PL310_ERRATA_753970. Initially I was not sure if we needed it. In the
meantime I didn't get any answer from the hardware designers but this
errata affects the r3p0 version and according to the Cache ID register
the PL310 used on these two SoCs were the r3p3.

At the end I don't know which one of the patches to apply...

But in any case I will add
Acked-by: Gregory CLEMENT <[email protected]>


Thanks,

Gregory


>
> Signed-off-by: Valentin Rothberg <[email protected]>
> ---
> I detected this issue with scripts/checkkconfigsymbols.py
> ---
> arch/arm/mach-mvebu/Kconfig | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig
> index 97473168d6b6..b9f1b63b169c 100644
> --- a/arch/arm/mach-mvebu/Kconfig
> +++ b/arch/arm/mach-mvebu/Kconfig
> @@ -37,7 +37,6 @@ config MACH_ARMADA_370
> config MACH_ARMADA_375
> bool "Marvell Armada 375 boards" if ARCH_MULTI_V7
> select ARM_ERRATA_720789
> - select ARM_ERRATA_753970
> select ARM_GIC
> select ARMADA_375_CLK
> select HAVE_ARM_SCU
> @@ -52,7 +51,6 @@ config MACH_ARMADA_375
> config MACH_ARMADA_38X
> bool "Marvell Armada 380/385 boards" if ARCH_MULTI_V7
> select ARM_ERRATA_720789
> - select ARM_ERRATA_753970
> select ARM_GIC
> select ARMADA_38X_CLK
> select HAVE_ARM_SCU
>


--
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

2015-04-28 16:49:42

by Valentin Rothberg

[permalink] [raw]
Subject: Re: [PATCH] arch/arm/mach-mvebu/Kconfig: remove obsolete selects

Hi Gregory,

thanks for your reply.

On Tue, Apr 28, 2015 at 6:41 PM, Gregory CLEMENT
<[email protected]> wrote:
> Hi Valentin,
>
> On 28/04/2015 18:02, Valentin Rothberg wrote:
>> ARM_ERRATA_753970 is not defined in Kconfig, so that both selects turn
>> out to be nops. Hence, we can safely remove them.
>
> It was already pointed by Paul Bolle a few months ago:
> http://thread.gmane.org/gmane.linux.kernel/1868817
>
> and I thought it was applied.
>
> He pointed that the original intent was to select
> PL310_ERRATA_753970. Initially I was not sure if we needed it. In the
> meantime I didn't get any answer from the hardware designers but this
> errata affects the r3p0 version and according to the Cache ID register
> the PL310 used on these two SoCs were the r3p3.

I should have checked my mails before (Paul put me in the CC for this patch).

Kind regards,
Valentin

> At the end I don't know which one of the patches to apply...
>
> But in any case I will add
> Acked-by: Gregory CLEMENT <[email protected]>
>
>
> Thanks,
>
> Gregory
>
>
>>
>> Signed-off-by: Valentin Rothberg <[email protected]>
>> ---
>> I detected this issue with scripts/checkkconfigsymbols.py
>> ---
>> arch/arm/mach-mvebu/Kconfig | 2 --
>> 1 file changed, 2 deletions(-)
>>
>> diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig
>> index 97473168d6b6..b9f1b63b169c 100644
>> --- a/arch/arm/mach-mvebu/Kconfig
>> +++ b/arch/arm/mach-mvebu/Kconfig
>> @@ -37,7 +37,6 @@ config MACH_ARMADA_370
>> config MACH_ARMADA_375
>> bool "Marvell Armada 375 boards" if ARCH_MULTI_V7
>> select ARM_ERRATA_720789
>> - select ARM_ERRATA_753970
>> select ARM_GIC
>> select ARMADA_375_CLK
>> select HAVE_ARM_SCU
>> @@ -52,7 +51,6 @@ config MACH_ARMADA_375
>> config MACH_ARMADA_38X
>> bool "Marvell Armada 380/385 boards" if ARCH_MULTI_V7
>> select ARM_ERRATA_720789
>> - select ARM_ERRATA_753970
>> select ARM_GIC
>> select ARMADA_38X_CLK
>> select HAVE_ARM_SCU
>>
>
>
> --
> Gregory Clement, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com

2015-04-28 16:54:41

by Russell King - ARM Linux

[permalink] [raw]
Subject: Re: [PATCH] arch/arm/mach-mvebu/Kconfig: remove obsolete selects

On Tue, Apr 28, 2015 at 06:41:41PM +0200, Gregory CLEMENT wrote:
> Hi Valentin,
>
> On 28/04/2015 18:02, Valentin Rothberg wrote:
> > ARM_ERRATA_753970 is not defined in Kconfig, so that both selects turn
> > out to be nops. Hence, we can safely remove them.
>
> It was already pointed by Paul Bolle a few months ago:
> http://thread.gmane.org/gmane.linux.kernel/1868817
>
> and I thought it was applied.
>
> He pointed that the original intent was to select
> PL310_ERRATA_753970. Initially I was not sure if we needed it. In the
> meantime I didn't get any answer from the hardware designers but this
> errata affects the r3p0 version and according to the Cache ID register
> the PL310 used on these two SoCs were the r3p3.

It's probably something I need to look at when I'm in a more relaxed
state, and when I have more time to deal with the dreaded email
backlog...

--
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.

2015-04-28 17:07:25

by Gregory CLEMENT

[permalink] [raw]
Subject: Re: [PATCH] arch/arm/mach-mvebu/Kconfig: remove obsolete selects

Hi Russell,

On 28/04/2015 18:54, Russell King - ARM Linux wrote:
> On Tue, Apr 28, 2015 at 06:41:41PM +0200, Gregory CLEMENT wrote:
>> Hi Valentin,
>>
>> On 28/04/2015 18:02, Valentin Rothberg wrote:
>>> ARM_ERRATA_753970 is not defined in Kconfig, so that both selects turn
>>> out to be nops. Hence, we can safely remove them.
>>
>> It was already pointed by Paul Bolle a few months ago:
>> http://thread.gmane.org/gmane.linux.kernel/1868817
>>
>> and I thought it was applied.
>>
>> He pointed that the original intent was to select
>> PL310_ERRATA_753970. Initially I was not sure if we needed it. In the
>> meantime I didn't get any answer from the hardware designers but this
>> errata affects the r3p0 version and according to the Cache ID register
>> the PL310 used on these two SoCs were the r3p3.
>
> It's probably something I need to look at when I'm in a more relaxed
> state, and when I have more time to deal with the dreaded email
> backlog...

Do you see any mistake in my reasoning?

Do you think that errata 753970 could be applied on PL310 version
more recent than the r3p0 one ?

Do you think that Cache ID register could give incorrect information
about the PL310 version?

Or maybe you think about something more global.


Thanks,

Gregory




--
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

2015-04-28 18:02:16

by Paul Bolle

[permalink] [raw]
Subject: Re: [PATCH] arch/arm/mach-mvebu/Kconfig: remove obsolete selects

On Tue, 2015-04-28 at 17:54 +0100, Russell King - ARM Linux wrote:
> It's probably something I need to look at when I'm in a more relaxed
> state, and when I have more time to deal with the dreaded email
> backlog...

Please take your time. This is just a trivial cleanup. A few lines in
some Kconfig files that do _absolutely nothing_ will be removed. That's
all. (I'm _not_ being sarcastic here.)

That being said, I would suggest you do start with this trivial cleanup.
Because after that cleanup the people that actually care about this
board can continue to ponder the question which *_ERRATA_* Kconfig
symbol should be selected at their leisure. As that question has already
been discussed for a year now...

Take care,


Paul Bolle

2015-04-30 13:44:33

by Russell King - ARM Linux

[permalink] [raw]
Subject: Re: [PATCH] arch/arm/mach-mvebu/Kconfig: remove obsolete selects

On Tue, Apr 28, 2015 at 07:07:22PM +0200, Gregory CLEMENT wrote:
> Hi Russell,
>
> On 28/04/2015 18:54, Russell King - ARM Linux wrote:
> > On Tue, Apr 28, 2015 at 06:41:41PM +0200, Gregory CLEMENT wrote:
> >> Hi Valentin,
> >>
> >> On 28/04/2015 18:02, Valentin Rothberg wrote:
> >>> ARM_ERRATA_753970 is not defined in Kconfig, so that both selects turn
> >>> out to be nops. Hence, we can safely remove them.
> >>
> >> It was already pointed by Paul Bolle a few months ago:
> >> http://thread.gmane.org/gmane.linux.kernel/1868817
> >>
> >> and I thought it was applied.
> >>
> >> He pointed that the original intent was to select
> >> PL310_ERRATA_753970. Initially I was not sure if we needed it. In the
> >> meantime I didn't get any answer from the hardware designers but this
> >> errata affects the r3p0 version and according to the Cache ID register
> >> the PL310 used on these two SoCs were the r3p3.
> >
> > It's probably something I need to look at when I'm in a more relaxed
> > state, and when I have more time to deal with the dreaded email
> > backlog...
>
> Do you see any mistake in my reasoning?

No, it's just that I didn't have the time and mental capacity to provide
the following kind of answer...

There is no impact when enabling errata 753970 on a platform which doesn't
need it, so I think we might as well default the errata to always being
enabled, and remove the select statements everywhere.

The workaround for this errata is merely to direct the sync register
writes elsewhere in the register space - and that's only done when
we detect a PL310 which needs the workaround applied. Disabling this
option effectively removes this code:

if (IS_ENABLED(CONFIG_PL310_ERRATA_753970) &&
revision == L310_CACHE_ID_RTL_R3P0) {
sync_reg_offset = L2X0_DUMMY_REG;
errata[n++] = "753970";
}

The reason you'd want to disable it is if you had a PL310 r3p0 in your
SoC which you had applied a hardware fix to.

So, I'd suggest this patch instead:

arch/arm/mach-mvebu/Kconfig | 2 --
arch/arm/mach-sti/Kconfig | 1 -
arch/arm/mach-ux500/Kconfig | 1 -
arch/arm/mach-vexpress/Kconfig | 1 -
arch/arm/mm/Kconfig | 1 +
5 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig
index c1e4567a5ab3..e8e5fa25121c 100644
--- a/arch/arm/mach-mvebu/Kconfig
+++ b/arch/arm/mach-mvebu/Kconfig
@@ -37,7 +37,6 @@ config MACH_ARMADA_370
config MACH_ARMADA_375
bool "Marvell Armada 375 boards" if ARCH_MULTI_V7
select ARM_ERRATA_720789
- select ARM_ERRATA_753970
select ARM_GIC
select ARMADA_375_CLK
select HAVE_ARM_SCU
@@ -52,7 +51,6 @@ config MACH_ARMADA_375
config MACH_ARMADA_38X
bool "Marvell Armada 380/385 boards" if ARCH_MULTI_V7
select ARM_ERRATA_720789
- select ARM_ERRATA_753970
select ARM_GIC
select ARMADA_38X_CLK
select HAVE_ARM_SCU
diff --git a/arch/arm/mach-sti/Kconfig b/arch/arm/mach-sti/Kconfig
index 3b1ac463a494..a36a1f145cf4 100644
--- a/arch/arm/mach-sti/Kconfig
+++ b/arch/arm/mach-sti/Kconfig
@@ -11,7 +11,6 @@ menuconfig ARCH_STI
select ARM_ERRATA_754322
select ARM_ERRATA_764369 if SMP
select ARM_ERRATA_775420
- select PL310_ERRATA_753970 if CACHE_L2X0
select PL310_ERRATA_769419 if CACHE_L2X0
select RESET_CONTROLLER
help
diff --git a/arch/arm/mach-ux500/Kconfig b/arch/arm/mach-ux500/Kconfig
index c9ac19b24e5a..59d3f80e602e 100644
--- a/arch/arm/mach-ux500/Kconfig
+++ b/arch/arm/mach-ux500/Kconfig
@@ -15,7 +15,6 @@ menuconfig ARCH_U8500
select PINCTRL
select PINCTRL_ABX500
select PINCTRL_NOMADIK
- select PL310_ERRATA_753970 if CACHE_L2X0
help
Support for ST-Ericsson's Ux500 architecture

diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig
index 4be537977040..80d34b3f36e7 100644
--- a/arch/arm/mach-vexpress/Kconfig
+++ b/arch/arm/mach-vexpress/Kconfig
@@ -44,7 +44,6 @@ config ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA
default y
select ARM_ERRATA_643719 if SMP
select ARM_ERRATA_720789
- select PL310_ERRATA_753970 if CACHE_L2X0
help
Provides common dependencies for Versatile Express platforms
based on Cortex-A5 and Cortex-A9 processors. In order to
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
index b4f92b9a13ac..2a9d30db169a 100644
--- a/arch/arm/mm/Kconfig
+++ b/arch/arm/mm/Kconfig
@@ -931,6 +931,7 @@ config PL310_ERRATA_727915

config PL310_ERRATA_753970
bool "PL310 errata: cache sync operation may be faulty"
+ default y
help
This option enables the workaround for the 753970 PL310 (r3p0) erratum.



--
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.