* [PATCH v4 1/8] ARM: l2c: move cache-aurora-l2.h to asm/hardware
[not found] <20180112012755.20495-1-chris.packham@alliedtelesis.co.nz>
@ 2018-01-12 1:27 ` Chris Packham
2018-01-12 1:27 ` [PATCH v4 2/8] ARM: aurora-l2: add prefix to MAX_RANGE_SIZE Chris Packham
` (4 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Chris Packham @ 2018-01-12 1:27 UTC (permalink / raw)
To: linux-arm-kernel
From: Jan Luebbe <jlu@pengutronix.de>
This include file will be used by the AURORA EDAC code.
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Reviewed-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
---
arch/arm/{mm => include/asm/hardware}/cache-aurora-l2.h | 0
arch/arm/mm/cache-l2x0.c | 2 +-
2 files changed, 1 insertion(+), 1 deletion(-)
rename arch/arm/{mm => include/asm/hardware}/cache-aurora-l2.h (100%)
diff --git a/arch/arm/mm/cache-aurora-l2.h b/arch/arm/include/asm/hardware/cache-aurora-l2.h
similarity index 100%
rename from arch/arm/mm/cache-aurora-l2.h
rename to arch/arm/include/asm/hardware/cache-aurora-l2.h
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
index 808efbb89b88..a00d6f7fd34c 100644
--- a/arch/arm/mm/cache-l2x0.c
+++ b/arch/arm/mm/cache-l2x0.c
@@ -30,8 +30,8 @@
#include <asm/cp15.h>
#include <asm/cputype.h>
#include <asm/hardware/cache-l2x0.h>
+#include <asm/hardware/cache-aurora-l2.h>
#include "cache-tauros3.h"
-#include "cache-aurora-l2.h"
struct l2c_init_data {
const char *type;
--
2.15.1
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH v4 2/8] ARM: aurora-l2: add prefix to MAX_RANGE_SIZE
[not found] <20180112012755.20495-1-chris.packham@alliedtelesis.co.nz>
2018-01-12 1:27 ` [PATCH v4 1/8] ARM: l2c: move cache-aurora-l2.h to asm/hardware Chris Packham
@ 2018-01-12 1:27 ` Chris Packham
2018-01-12 1:27 ` [PATCH v4 3/8] ARM: aurora-l2: add defines for parity and ECC registers Chris Packham
` (3 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Chris Packham @ 2018-01-12 1:27 UTC (permalink / raw)
To: linux-arm-kernel
From: Jan Luebbe <jlu@pengutronix.de>
The macro name is too generic, so add a AURORA_ prefix.
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Reviewed-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
---
arch/arm/include/asm/hardware/cache-aurora-l2.h | 2 +-
arch/arm/mm/cache-l2x0.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm/include/asm/hardware/cache-aurora-l2.h b/arch/arm/include/asm/hardware/cache-aurora-l2.h
index c86124769831..dc5c479ec4c3 100644
--- a/arch/arm/include/asm/hardware/cache-aurora-l2.h
+++ b/arch/arm/include/asm/hardware/cache-aurora-l2.h
@@ -41,7 +41,7 @@
#define AURORA_ACR_FORCE_WRITE_THRO_POLICY \
(2 << AURORA_ACR_FORCE_WRITE_POLICY_OFFSET)
-#define MAX_RANGE_SIZE 1024
+#define AURORA_MAX_RANGE_SIZE 1024
#define AURORA_WAY_SIZE_SHIFT 2
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
index a00d6f7fd34c..7d2d2a3c67d0 100644
--- a/arch/arm/mm/cache-l2x0.c
+++ b/arch/arm/mm/cache-l2x0.c
@@ -1364,8 +1364,8 @@ static unsigned long aurora_range_end(unsigned long start, unsigned long end)
* since cache range operations stall the CPU pipeline
* until completion.
*/
- if (end > start + MAX_RANGE_SIZE)
- end = start + MAX_RANGE_SIZE;
+ if (end > start + AURORA_MAX_RANGE_SIZE)
+ end = start + AURORA_MAX_RANGE_SIZE;
/*
* Cache range operations can't straddle a page boundary.
--
2.15.1
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH v4 3/8] ARM: aurora-l2: add defines for parity and ECC registers
[not found] <20180112012755.20495-1-chris.packham@alliedtelesis.co.nz>
2018-01-12 1:27 ` [PATCH v4 1/8] ARM: l2c: move cache-aurora-l2.h to asm/hardware Chris Packham
2018-01-12 1:27 ` [PATCH v4 2/8] ARM: aurora-l2: add prefix to MAX_RANGE_SIZE Chris Packham
@ 2018-01-12 1:27 ` Chris Packham
2018-01-12 1:27 ` [PATCH v4 4/8] ARM: l2x0: support parity-enable/disable on aurora Chris Packham
` (2 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Chris Packham @ 2018-01-12 1:27 UTC (permalink / raw)
To: linux-arm-kernel
From: Jan Luebbe <jlu@pengutronix.de>
These defines will be used by subsequent patches to add support for the
parity check and error correction functionality in the Aurora L2 cache
controller.
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
[cp: use shorter names for some #defines]
Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
---
arch/arm/include/asm/hardware/cache-aurora-l2.h | 48 +++++++++++++++++++++++++
1 file changed, 48 insertions(+)
diff --git a/arch/arm/include/asm/hardware/cache-aurora-l2.h b/arch/arm/include/asm/hardware/cache-aurora-l2.h
index dc5c479ec4c3..39769ffa0051 100644
--- a/arch/arm/include/asm/hardware/cache-aurora-l2.h
+++ b/arch/arm/include/asm/hardware/cache-aurora-l2.h
@@ -31,6 +31,9 @@
#define AURORA_ACR_REPLACEMENT_TYPE_SEMIPLRU \
(3 << AURORA_ACR_REPLACEMENT_OFFSET)
+#define AURORA_ACR_PARITY_EN (1 << 21)
+#define AURORA_ACR_ECC_EN (1 << 20)
+
#define AURORA_ACR_FORCE_WRITE_POLICY_OFFSET 0
#define AURORA_ACR_FORCE_WRITE_POLICY_MASK \
(0x3 << AURORA_ACR_FORCE_WRITE_POLICY_OFFSET)
@@ -41,6 +44,51 @@
#define AURORA_ACR_FORCE_WRITE_THRO_POLICY \
(2 << AURORA_ACR_FORCE_WRITE_POLICY_OFFSET)
+#define AURORA_ERR_CNT_REG 0x600
+#define AURORA_ERR_ATTR_CAP_REG 0x608
+#define AURORA_ERR_ADDR_CAP_REG 0x60c
+#define AURORA_ERR_WAY_CAP_REG 0x610
+#define AURORA_ERR_INJECT_CTL_REG 0x614
+#define AURORA_ERR_INJECT_MASK_REG 0x618
+
+#define AURORA_ERR_CNT_CLR_OFFSET 31
+#define AURORA_ERR_CNT_CLR \
+ (0x1 << AURORA_ERR_CNT_CLR_OFFSET)
+#define AURORA_ERR_CNT_UE_OFFSET 16
+#define AURORA_ERR_CNT_UE_MASK \
+ (0x7fff << AURORA_ERR_CNT_UE_OFFSET)
+#define AURORA_ERR_CNT_CE_OFFSET 0
+#define AURORA_ERR_CNT_CE_MASK \
+ (0xffff << AURORA_ERR_CNT_CE_OFFSET)
+
+#define AURORA_ERR_ATTR_SRC_OFF 16
+#define AURORA_ERR_ATTR_SRC_MSK \
+ (0x7 << AURORA_ERR_ATTR_SRC_OFF)
+#define AURORA_ERR_ATTR_TXN_OFF 12
+#define AURORA_ERR_ATTR_TXN_MSK \
+ (0xf << AURORA_ERR_ATTR_TXN_OFF)
+#define AURORA_ERR_ATTR_ERR_OFF 8
+#define AURORA_ERR_ATTR_ERR_MSK \
+ (0x3 << AURORA_ERR_ATTR_ERR_OFF)
+#define AURORA_ERR_ATTR_CAP_VALID_OFF 0
+#define AURORA_ERR_ATTR_CAP_VALID \
+ (0x1 << AURORA_ERR_ATTR_CAP_VALID_OFF)
+
+#define AURORA_ERR_ADDR_CAP_ADDR_MASK 0xffffffe0
+
+#define AURORA_ERR_WAY_IDX_OFF 8
+#define AURORA_ERR_WAY_IDX_MSK \
+ (0xfff << AURORA_ERR_WAY_IDX_OFF)
+#define AURORA_ERR_WAY_CAP_WAY_OFFSET 1
+#define AURORA_ERR_WAY_CAP_WAY_MASK \
+ (0xf << AURORA_ERR_WAY_CAP_WAY_OFFSET)
+
+#define AURORA_ERR_INJECT_CTL_ADDR_MASK 0xfffffff0
+#define AURORA_ERR_ATTR_TXN_OFF 12
+#define AURORA_ERR_INJECT_CTL_EN_MASK 0x3
+#define AURORA_ERR_INJECT_CTL_EN_PARITY 0x2
+#define AURORA_ERR_INJECT_CTL_EN_ECC 0x1
+
#define AURORA_MAX_RANGE_SIZE 1024
#define AURORA_WAY_SIZE_SHIFT 2
--
2.15.1
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH v4 4/8] ARM: l2x0: support parity-enable/disable on aurora
[not found] <20180112012755.20495-1-chris.packham@alliedtelesis.co.nz>
` (2 preceding siblings ...)
2018-01-12 1:27 ` [PATCH v4 3/8] ARM: aurora-l2: add defines for parity and ECC registers Chris Packham
@ 2018-01-12 1:27 ` Chris Packham
2018-01-12 1:27 ` [PATCH v4 5/8] ARM: l2x0: add marvell,ecc-enable property for aurora Chris Packham
[not found] ` <1525338355.17782.21.camel@pengutronix.de>
5 siblings, 0 replies; 8+ messages in thread
From: Chris Packham @ 2018-01-12 1:27 UTC (permalink / raw)
To: linux-arm-kernel
The aurora cache on the Marvell Armada-XP SoC supports the same tag
parity features as the other l2x0 cache implementations.
Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
[jlu at pengutronix.de: use aurora specific define AURORA_ACR_PARITY_EN]
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
---
arch/arm/mm/cache-l2x0.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
index 7d2d2a3c67d0..b70bee74750d 100644
--- a/arch/arm/mm/cache-l2x0.c
+++ b/arch/arm/mm/cache-l2x0.c
@@ -1505,6 +1505,13 @@ static void __init aurora_of_parse(const struct device_node *np,
mask |= AURORA_ACR_FORCE_WRITE_POLICY_MASK;
}
+ if (of_property_read_bool(np, "arm,parity-enable")) {
+ mask |= AURORA_ACR_PARITY_EN;
+ val |= AURORA_ACR_PARITY_EN;
+ } else if (of_property_read_bool(np, "arm,parity-disable")) {
+ mask |= AURORA_ACR_PARITY_EN;
+ }
+
*aux_val &= ~mask;
*aux_val |= val;
*aux_mask &= ~mask;
--
2.15.1
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH v4 5/8] ARM: l2x0: add marvell,ecc-enable property for aurora
[not found] <20180112012755.20495-1-chris.packham@alliedtelesis.co.nz>
` (3 preceding siblings ...)
2018-01-12 1:27 ` [PATCH v4 4/8] ARM: l2x0: support parity-enable/disable on aurora Chris Packham
@ 2018-01-12 1:27 ` Chris Packham
2018-01-19 21:28 ` Rob Herring
[not found] ` <1525338355.17782.21.camel@pengutronix.de>
5 siblings, 1 reply; 8+ messages in thread
From: Chris Packham @ 2018-01-12 1:27 UTC (permalink / raw)
To: linux-arm-kernel
The aurora cache on the Marvell Armada-XP SoC supports ECC protection
for the L2 data arrays. Add a "marvell,ecc-enable" device tree property
which can be used to enable this.
Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
[jlu at pengutronix.de: use aurora specific define AURORA_ACR_ECC_EN]
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
---
Documentation/devicetree/bindings/arm/l2c2x0.txt | 2 ++
arch/arm/mm/cache-l2x0.c | 7 +++++++
2 files changed, 9 insertions(+)
diff --git a/Documentation/devicetree/bindings/arm/l2c2x0.txt b/Documentation/devicetree/bindings/arm/l2c2x0.txt
index fbe6cb21f4cf..15a84f0ba9f1 100644
--- a/Documentation/devicetree/bindings/arm/l2c2x0.txt
+++ b/Documentation/devicetree/bindings/arm/l2c2x0.txt
@@ -76,6 +76,8 @@ Optional properties:
specified to indicate that such transforms are precluded.
- arm,parity-enable : enable parity checking on the L2 cache (L220 or PL310).
- arm,parity-disable : disable parity checking on the L2 cache (L220 or PL310).
+- marvell,ecc-enable : enable ECC protection on the L2 cache
+- marvell,ecc-disable : disable ECC protection on the L2 cache
- arm,outer-sync-disable : disable the outer sync operation on the L2 cache.
Some core tiles, especially ARM PB11MPCore have a faulty L220 cache that
will randomly hang unless outer sync operations are disabled.
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
index b70bee74750d..644f786e4fa9 100644
--- a/arch/arm/mm/cache-l2x0.c
+++ b/arch/arm/mm/cache-l2x0.c
@@ -1505,6 +1505,13 @@ static void __init aurora_of_parse(const struct device_node *np,
mask |= AURORA_ACR_FORCE_WRITE_POLICY_MASK;
}
+ if (of_property_read_bool(np, "marvell,ecc-enable")) {
+ mask |= AURORA_ACR_ECC_EN;
+ val |= AURORA_ACR_ECC_EN;
+ } else if (of_property_read_bool(np, "marvell,ecc-disable")) {
+ mask |= AURORA_ACR_ECC_EN;
+ }
+
if (of_property_read_bool(np, "arm,parity-enable")) {
mask |= AURORA_ACR_PARITY_EN;
val |= AURORA_ACR_PARITY_EN;
--
2.15.1
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH v4 5/8] ARM: l2x0: add marvell,ecc-enable property for aurora
2018-01-12 1:27 ` [PATCH v4 5/8] ARM: l2x0: add marvell,ecc-enable property for aurora Chris Packham
@ 2018-01-19 21:28 ` Rob Herring
0 siblings, 0 replies; 8+ messages in thread
From: Rob Herring @ 2018-01-19 21:28 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Jan 12, 2018 at 02:27:52PM +1300, Chris Packham wrote:
> The aurora cache on the Marvell Armada-XP SoC supports ECC protection
> for the L2 data arrays. Add a "marvell,ecc-enable" device tree property
> which can be used to enable this.
>
> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
> [jlu at pengutronix.de: use aurora specific define AURORA_ACR_ECC_EN]
> Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
> ---
> Documentation/devicetree/bindings/arm/l2c2x0.txt | 2 ++
> arch/arm/mm/cache-l2x0.c | 7 +++++++
> 2 files changed, 9 insertions(+)
The Calxeda PL310 has ECC too so maybe shouldn't have a vendor prefix,
but I don't think anyone will ever care to change it at this point.
Reviewed-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <1525338355.17782.21.camel@pengutronix.de>]
* [PATCH v4 0/8] EDAC drivers for Armada XP L2 and DDR
[not found] ` <1525338355.17782.21.camel@pengutronix.de>
@ 2018-05-03 20:54 ` Chris Packham
2018-10-09 7:06 ` Uwe Kleine-König
0 siblings, 1 reply; 8+ messages in thread
From: Chris Packham @ 2018-05-03 20:54 UTC (permalink / raw)
To: linux-arm-kernel
Hi Jan,
On 03/05/18 21:22, Jan L?bbe wrote:
> Hi Chris,
>
> On Fri, 2018-01-12 at 14:27 +1300, Chris Packham wrote:
>> I've found some time to address Borislav's comments (I think I've got them
>> all). The patches affected are 3/8 and 7/8. The changes are all reasonably
>> cosmetic and I can confirm with the addition of 8/8 that the (mc) EDAC
>> reporting works on Armada-38x.
>>
>> The current plan is for these to go in via the ARM tree once appropriate
>> Reviews/Acks have been given.
>
> I've finally found some time to look at this again. :)
>
> As far as I can see, Borislav has reviewed the edac bits and Rob has
> review the binding for marvell,ecc-enable. I'm not sure where it got
> stuck though. Russell wanted to merge the whole series? Or am i missing
> something?
>
Yes I was expecting it to come in via the ARM tree. It may have got lost
in the noise of the merge window. I checked a few times but I didn't
want to add to the noise.
Given that it's been a while: ping.
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH v4 0/8] EDAC drivers for Armada XP L2 and DDR
2018-05-03 20:54 ` [PATCH v4 0/8] EDAC drivers for Armada XP L2 and DDR Chris Packham
@ 2018-10-09 7:06 ` Uwe Kleine-König
0 siblings, 0 replies; 8+ messages in thread
From: Uwe Kleine-König @ 2018-10-09 7:06 UTC (permalink / raw)
To: linux-arm-kernel
Hello Chris,
On Thu, May 03, 2018 at 08:54:36PM +0000, Chris Packham wrote:
> On 03/05/18 21:22, Jan L?bbe wrote:
> > On Fri, 2018-01-12 at 14:27 +1300, Chris Packham wrote:
> >> I've found some time to address Borislav's comments (I think I've got them
> >> all). The patches affected are 3/8 and 7/8. The changes are all reasonably
> >> cosmetic and I can confirm with the addition of 8/8 that the (mc) EDAC
> >> reporting works on Armada-38x.
> >>
> >> The current plan is for these to go in via the ARM tree once appropriate
> >> Reviews/Acks have been given.
> >
> > I've finally found some time to look at this again. :)
> >
> > As far as I can see, Borislav has reviewed the edac bits and Rob has
> > review the binding for marvell,ecc-enable. I'm not sure where it got
> > stuck though. Russell wanted to merge the whole series? Or am i missing
> > something?
> >
>
> Yes I was expecting it to come in via the ARM tree. It may have got lost
> in the noise of the merge window. I checked a few times but I didn't
> want to add to the noise.
>
> Given that it's been a while: ping.
During an internal review of some patches in a BSP I stumbled over this
series.
I noticed that some patches (at least 1 and 2) don't have your S-o-b.
Patch 4 doesn't have it as last entry.
Didn't look in more detail, but maybe fix this formalism (which for sure
will prevent application of this series) and resend on top of a recent
tree?
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 8+ messages in thread