* [PATCH v3] bus: omap_l3_smx: identify timeout cause before rebooting
@ 2023-08-01 19:22 Sicelo A. Mhlongo
2023-08-02 13:36 ` Sebastian Reichel
0 siblings, 1 reply; 3+ messages in thread
From: Sicelo A. Mhlongo @ 2023-08-01 19:22 UTC (permalink / raw)
To: linux-omap; +Cc: linux-kernel, maemo-leste, Sicelo A. Mhlongo
Identify and print the error source before rebooting the board due to an l3
timeout error. This is helpful when debugging, e.g. via serial.
Signed-off-by: Sicelo A. Mhlongo <absicsz@gmail.com>
---
drivers/bus/omap_l3_smx.c | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)
diff --git a/drivers/bus/omap_l3_smx.c b/drivers/bus/omap_l3_smx.c
index bb1606f5ce2d..8e1a38bfcd8b 100644
--- a/drivers/bus/omap_l3_smx.c
+++ b/drivers/bus/omap_l3_smx.c
@@ -166,19 +166,10 @@ static irqreturn_t omap3_l3_app_irq(int irq, void *_l3)
irqreturn_t ret = IRQ_NONE;
int_type = irq == l3->app_irq ? L3_APPLICATION_ERROR : L3_DEBUG_ERROR;
- if (!int_type) {
+ if (!int_type)
status = omap3_l3_readll(l3->rt, L3_SI_FLAG_STATUS_0);
- /*
- * if we have a timeout error, there's nothing we can
- * do besides rebooting the board. So let's BUG on any
- * of such errors and handle the others. timeout error
- * is severe and not expected to occur.
- */
- BUG_ON(status & L3_STATUS_0_TIMEOUT_MASK);
- } else {
+ else
status = omap3_l3_readll(l3->rt, L3_SI_FLAG_STATUS_1);
- /* No timeout error for debug sources */
- }
/* identify the error source */
err_source = __ffs(status);
@@ -190,6 +181,14 @@ static irqreturn_t omap3_l3_app_irq(int irq, void *_l3)
ret |= omap3_l3_block_irq(l3, error, error_addr);
}
+ /*
+ * if we have a timeout error, there's nothing we can
+ * do besides rebooting the board. So let's BUG on any
+ * of such errors and handle the others. timeout error
+ * is severe and not expected to occur.
+ */
+ BUG_ON(!int_type && status & L3_STATUS_0_TIMEOUT_MASK);
+
/* Clear the status register */
clear = (L3_AGENT_STATUS_CLEAR_IA << int_type) |
L3_AGENT_STATUS_CLEAR_TA;
--
2.40.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v3] bus: omap_l3_smx: identify timeout cause before rebooting
2023-08-01 19:22 [PATCH v3] bus: omap_l3_smx: identify timeout cause before rebooting Sicelo A. Mhlongo
@ 2023-08-02 13:36 ` Sebastian Reichel
2023-08-09 9:31 ` Tony Lindgren
0 siblings, 1 reply; 3+ messages in thread
From: Sebastian Reichel @ 2023-08-02 13:36 UTC (permalink / raw)
To: Sicelo A. Mhlongo; +Cc: linux-omap, linux-kernel, maemo-leste
[-- Attachment #1: Type: text/plain, Size: 2128 bytes --]
Hi,
On Tue, Aug 01, 2023 at 09:22:40PM +0200, Sicelo A. Mhlongo wrote:
> Identify and print the error source before rebooting the board due to an l3
> timeout error. This is helpful when debugging, e.g. via serial.
>
> Signed-off-by: Sicelo A. Mhlongo <absicsz@gmail.com>
> ---
> drivers/bus/omap_l3_smx.c | 21 ++++++++++-----------
> 1 file changed, 10 insertions(+), 11 deletions(-)
nice, adding features with a negative diffstat :)
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
-- Sebastian
> diff --git a/drivers/bus/omap_l3_smx.c b/drivers/bus/omap_l3_smx.c
> index bb1606f5ce2d..8e1a38bfcd8b 100644
> --- a/drivers/bus/omap_l3_smx.c
> +++ b/drivers/bus/omap_l3_smx.c
> @@ -166,19 +166,10 @@ static irqreturn_t omap3_l3_app_irq(int irq, void *_l3)
> irqreturn_t ret = IRQ_NONE;
>
> int_type = irq == l3->app_irq ? L3_APPLICATION_ERROR : L3_DEBUG_ERROR;
> - if (!int_type) {
> + if (!int_type)
> status = omap3_l3_readll(l3->rt, L3_SI_FLAG_STATUS_0);
> - /*
> - * if we have a timeout error, there's nothing we can
> - * do besides rebooting the board. So let's BUG on any
> - * of such errors and handle the others. timeout error
> - * is severe and not expected to occur.
> - */
> - BUG_ON(status & L3_STATUS_0_TIMEOUT_MASK);
> - } else {
> + else
> status = omap3_l3_readll(l3->rt, L3_SI_FLAG_STATUS_1);
> - /* No timeout error for debug sources */
> - }
>
> /* identify the error source */
> err_source = __ffs(status);
> @@ -190,6 +181,14 @@ static irqreturn_t omap3_l3_app_irq(int irq, void *_l3)
> ret |= omap3_l3_block_irq(l3, error, error_addr);
> }
>
> + /*
> + * if we have a timeout error, there's nothing we can
> + * do besides rebooting the board. So let's BUG on any
> + * of such errors and handle the others. timeout error
> + * is severe and not expected to occur.
> + */
> + BUG_ON(!int_type && status & L3_STATUS_0_TIMEOUT_MASK);
> +
> /* Clear the status register */
> clear = (L3_AGENT_STATUS_CLEAR_IA << int_type) |
> L3_AGENT_STATUS_CLEAR_TA;
> --
> 2.40.1
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v3] bus: omap_l3_smx: identify timeout cause before rebooting
2023-08-02 13:36 ` Sebastian Reichel
@ 2023-08-09 9:31 ` Tony Lindgren
0 siblings, 0 replies; 3+ messages in thread
From: Tony Lindgren @ 2023-08-09 9:31 UTC (permalink / raw)
To: Sebastian Reichel
Cc: Sicelo A. Mhlongo, linux-omap, linux-kernel, maemo-leste
* Sebastian Reichel <sebastian.reichel@collabora.com> [230802 13:37]:
> Hi,
>
> On Tue, Aug 01, 2023 at 09:22:40PM +0200, Sicelo A. Mhlongo wrote:
> > Identify and print the error source before rebooting the board due to an l3
> > timeout error. This is helpful when debugging, e.g. via serial.
> >
> > Signed-off-by: Sicelo A. Mhlongo <absicsz@gmail.com>
> > ---
> > drivers/bus/omap_l3_smx.c | 21 ++++++++++-----------
> > 1 file changed, 10 insertions(+), 11 deletions(-)
>
> nice, adding features with a negative diffstat :)
>
> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Great, I'll add this to omap-for-v6.6/ti-sysc branch. The omap_l3_smx
deals with interconnect related issues and is closely coupled with
ti-sysc driver.
Regards,
Tony
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-08-09 9:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-01 19:22 [PATCH v3] bus: omap_l3_smx: identify timeout cause before rebooting Sicelo A. Mhlongo
2023-08-02 13:36 ` Sebastian Reichel
2023-08-09 9:31 ` Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).