Linux-MIPS Archive on lore.kernel.org
 help / Atom feed
* [PATCH] mips: cm: reprime error cause
@ 2019-02-06 11:34 Vladimir Kondratiev
  2019-02-06 11:44 ` [PATCH v2] " Vladimir Kondratiev
  2019-02-06 11:46 ` [PATCH v3] " Vladimir Kondratiev
  0 siblings, 2 replies; 4+ messages in thread
From: Vladimir Kondratiev @ 2019-02-06 11:34 UTC (permalink / raw)
  To: Ralf Baechle, Paul Burton, James Hogan
  Cc: linux-mips, linux-kernel, Vladimir Kondratiev

Accordingly to the documentation
---cut---
The GCR_ERROR_CAUSE.ERR_TYPE field and the GCR_ERROR_MULT.ERR_TYPE
fields can be cleared by either a reset or by writing the current
value of GCR_ERROR_CAUSE.ERR_TYPE to the
GCR_ERROR_CAUSE.ERR_TYPE register.
---cut---
Do exactly this

Fixes: 3885c2b463f6 ("MIPS: CM: Add support for reporting CM cache errors")
Signed-off-by: Vladimir Kondratiev <vladimir.kondratiev@linux.intel.com>
---
 arch/mips/kernel/mips-cm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/kernel/mips-cm.c b/arch/mips/kernel/mips-cm.c
index 8f5bd04f320a..f54ba99dc7d9 100644
--- a/arch/mips/kernel/mips-cm.c
+++ b/arch/mips/kernel/mips-cm.c
@@ -457,5 +457,5 @@ void mips_cm_error_report(void)
 	}
 
 	/* reprime cause register */
-	write_gcr_error_cause(0);
+	write_gcr_error_cause(cm_error & CM3_GCR_ERROR_CAUSE_ERRTYPE);
 }
-- 
2.19.1


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

* [PATCH v2] mips: cm: reprime error cause
  2019-02-06 11:34 [PATCH] mips: cm: reprime error cause Vladimir Kondratiev
@ 2019-02-06 11:44 ` " Vladimir Kondratiev
  2019-02-06 11:46 ` [PATCH v3] " Vladimir Kondratiev
  1 sibling, 0 replies; 4+ messages in thread
From: Vladimir Kondratiev @ 2019-02-06 11:44 UTC (permalink / raw)
  To: Ralf Baechle, Paul Burton, James Hogan
  Cc: linux-mips, linux-kernel, Vladimir Kondratiev, Vladimir Kondratiev

From: Vladimir Kondratiev <vladimir.kondratiev@lnux.intel.com>

Accordingly to the documentation
---cut---
The GCR_ERROR_CAUSE.ERR_TYPE field and the GCR_ERROR_MULT.ERR_TYPE
fields can be cleared by either a reset or by writing the current
value of GCR_ERROR_CAUSE.ERR_TYPE to the
GCR_ERROR_CAUSE.ERR_TYPE register.
---cut---
Do exactly this. Original value of cm_error may be safely written back;
it clears error cause and keeps other bits untouched.

Fixes: 3885c2b463f6 ("MIPS: CM: Add support for reporting CM cache errors")
Signed-off-by: Vladimir Kondratiev <vladimir.kondratiev@linux.intel.com>
---
 arch/mips/kernel/mips-cm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/kernel/mips-cm.c b/arch/mips/kernel/mips-cm.c
index 8f5bd04f320a..7f3f136572de 100644
--- a/arch/mips/kernel/mips-cm.c
+++ b/arch/mips/kernel/mips-cm.c
@@ -457,5 +457,5 @@ void mips_cm_error_report(void)
 	}
 
 	/* reprime cause register */
-	write_gcr_error_cause(0);
+	write_gcr_error_cause(cm_error);
 }
-- 
2.19.1


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

* [PATCH v3] mips: cm: reprime error cause
  2019-02-06 11:34 [PATCH] mips: cm: reprime error cause Vladimir Kondratiev
  2019-02-06 11:44 ` [PATCH v2] " Vladimir Kondratiev
@ 2019-02-06 11:46 ` " Vladimir Kondratiev
  2019-02-07 19:56   ` Paul Burton
  1 sibling, 1 reply; 4+ messages in thread
From: Vladimir Kondratiev @ 2019-02-06 11:46 UTC (permalink / raw)
  To: Ralf Baechle, Paul Burton, James Hogan
  Cc: linux-mips, linux-kernel, Vladimir Kondratiev

Accordingly to the documentation
---cut---
The GCR_ERROR_CAUSE.ERR_TYPE field and the GCR_ERROR_MULT.ERR_TYPE
fields can be cleared by either a reset or by writing the current
value of GCR_ERROR_CAUSE.ERR_TYPE to the
GCR_ERROR_CAUSE.ERR_TYPE register.
---cut---
Do exactly this. Original value of cm_error may be safely written back;
it clears error cause and keeps other bits untouched.

Fixes: 3885c2b463f6 ("MIPS: CM: Add support for reporting CM cache errors")
Signed-off-by: Vladimir Kondratiev <vladimir.kondratiev@linux.intel.com>
---
 arch/mips/kernel/mips-cm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/kernel/mips-cm.c b/arch/mips/kernel/mips-cm.c
index 8f5bd04f320a..7f3f136572de 100644
--- a/arch/mips/kernel/mips-cm.c
+++ b/arch/mips/kernel/mips-cm.c
@@ -457,5 +457,5 @@ void mips_cm_error_report(void)
 	}
 
 	/* reprime cause register */
-	write_gcr_error_cause(0);
+	write_gcr_error_cause(cm_error);
 }
-- 
2.19.1


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

* Re: [PATCH v3] mips: cm: reprime error cause
  2019-02-06 11:46 ` [PATCH v3] " Vladimir Kondratiev
@ 2019-02-07 19:56   ` Paul Burton
  0 siblings, 0 replies; 4+ messages in thread
From: Paul Burton @ 2019-02-07 19:56 UTC (permalink / raw)
  To: Vladimir Kondratiev
  Cc: Ralf Baechle, Paul Burton, James Hogan, linux-mips, linux-kernel,
	Vladimir Kondratiev, linux-mips

Hello,

Vladimir Kondratiev wrote:
> Accordingly to the documentation
> ---cut---
> The GCR_ERROR_CAUSE.ERR_TYPE field and the GCR_ERROR_MULT.ERR_TYPE
> fields can be cleared by either a reset or by writing the current
> value of GCR_ERROR_CAUSE.ERR_TYPE to the
> GCR_ERROR_CAUSE.ERR_TYPE register.
> ---cut---
> Do exactly this. Original value of cm_error may be safely written back;
> it clears error cause and keeps other bits untouched.
> 
> Fixes: 3885c2b463f6 ("MIPS: CM: Add support for reporting CM cache errors")
> Signed-off-by: Vladimir Kondratiev <vladimir.kondratiev@linux.intel.com>

Applied to mips-fixes.

Thanks,
    Paul

[ This message was auto-generated; if you believe anything is incorrect
  then please email paul.burton@mips.com to report it. ]

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

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-06 11:34 [PATCH] mips: cm: reprime error cause Vladimir Kondratiev
2019-02-06 11:44 ` [PATCH v2] " Vladimir Kondratiev
2019-02-06 11:46 ` [PATCH v3] " Vladimir Kondratiev
2019-02-07 19:56   ` Paul Burton

Linux-MIPS Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-mips/0 linux-mips/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mips linux-mips/ https://lore.kernel.org/linux-mips \
		linux-mips@vger.kernel.org linux-mips@archiver.kernel.org
	public-inbox-index linux-mips


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-mips


AGPL code for this site: git clone https://public-inbox.org/ public-inbox