Discussion:
[ORLinux] [PATCH] OpenRISC: Fix level-triggered irq handler
ApacheGT
2012-08-24 07:25:22 UTC
Permalink
or1k_pic_mask_ack() did not mask the irq.

Signed-off-by: Gong Tao <gongtao0607 at gmail.com>
---
arch/openrisc/kernel/irq.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/arch/openrisc/kernel/irq.c b/arch/openrisc/kernel/irq.c
index a65aede..6619c91 100644
--- a/arch/openrisc/kernel/irq.c
+++ b/arch/openrisc/kernel/irq.c
@@ -91,9 +91,12 @@ static void or1k_pic_mask_ack(struct irq_data *data)
/* Comments for pic_ack apply here, too */

#ifdef CONFIG_OR1K_1200
+ /* MUST mask first. added by gongtao0607 at gmail.com */
+ mtspr(SPR_PICMR, mfspr(SPR_PICMR) & ~(1UL << data->hwirq));
mtspr(SPR_PICSR, mfspr(SPR_PICSR) & ~(1UL << data->hwirq));
#else
WARN(1, "Interrupt handling possibily broken\n");
+ mtspr(SPR_PICMR, (1UL << data->hwirq));
mtspr(SPR_PICSR, (1UL << data->hwirq));
#endif
}
--
1.7.11.1
--
?? ??
Sincerely,
Gong Tao

???????????????

School of Advanced Engineering @

Beihang UNIV.

Mail: gongtao0607[at]gmail[dot]com
<gongtao0607 at gmail.com>

Tel: +86 15210988463

--------------------
| OpenPGP keys: DE4CCC4F(gongtao0607[at]gmail[dot]com)
| OpenPGP fingerprint: 1C93 0B63 3466 74F2 D3C3 D873 4F7D 76E5 DE4C CC4F
--------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openrisc.net/pipermail/linux/attachments/20120824/bc44b739/attachment-0001.html>
Gong Tao
2012-08-27 08:25:03 UTC
Permalink
or1k_pic_mask_ack() did not mask the irq.

Signed-off-by: Gong Tao <gongtao0607 at gmail.com>
---
arch/openrisc/kernel/irq.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/arch/openrisc/kernel/irq.c b/arch/openrisc/kernel/irq.c
index a65aede..f09b5cf 100644
--- a/arch/openrisc/kernel/irq.c
+++ b/arch/openrisc/kernel/irq.c
@@ -7,6 +7,7 @@
*
* Modifications for the OpenRISC architecture:
* Copyright (C) 2010-2011 Jonas Bonn <jonas at southpole.se>
+ * 2012 Gong Tao <gongtao0607 at gmail.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -91,9 +92,12 @@ static void or1k_pic_mask_ack(struct irq_data *data)
/* Comments for pic_ack apply here, too */

#ifdef CONFIG_OR1K_1200
+ /* MUST mask first */
+ mtspr(SPR_PICMR, mfspr(SPR_PICMR) & ~(1UL << data->hwirq));
mtspr(SPR_PICSR, mfspr(SPR_PICSR) & ~(1UL << data->hwirq));
#else
WARN(1, "Interrupt handling possibily broken\n");
+ mtspr(SPR_PICMR, (1UL << data->hwirq));
mtspr(SPR_PICSR, (1UL << data->hwirq));
#endif
}
--
1.7.12
Jonas Bonn
2012-09-21 07:01:57 UTC
Permalink
Hi Tao,

Thanks. The patch looks good and I'll pull the change for 3.7.

A couple of things to note for future submissions:

i) Make sure your patch is based off of something in a public tree.
Your patch below has additional changes that are not in linux-next so
that the patch doesn't actually apply as is.
ii) In the future, please don't send patches as HTML mail. It's
preferable to use something like git-send-mail.

Thanks again,
Jonas
Post by ApacheGT
or1k_pic_mask_ack() did not mask the irq.
Signed-off-by: Gong Tao <gongtao0607 at gmail.com
<mailto:gongtao0607 at gmail.com>>
---
arch/openrisc/kernel/irq.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/openrisc/kernel/irq.c b/arch/openrisc/kernel/irq.c
index a65aede..6619c91 100644
--- a/arch/openrisc/kernel/irq.c
+++ b/arch/openrisc/kernel/irq.c
@@ -91,9 +91,12 @@ static void or1k_pic_mask_ack(struct irq_data *data)
/* Comments for pic_ack apply here, too */
#ifdef CONFIG_OR1K_1200
+/* MUST mask first. added by gongtao0607 at gmail.com
<mailto:gongtao0607 at gmail.com> */
+mtspr(SPR_PICMR, mfspr(SPR_PICMR) & ~(1UL << data->hwirq));
mtspr(SPR_PICSR, mfspr(SPR_PICSR) & ~(1UL << data->hwirq));
#else
WARN(1, "Interrupt handling possibily broken\n");
+mtspr(SPR_PICMR, (1UL << data->hwirq));
mtspr(SPR_PICSR, (1UL << data->hwirq));
#endif
}
--
1.7.11.1
--
?? ??
Sincerely,
Gong Tao
? ???????,??????
Beihang UNIV.
Mail: gongtao0607[at]gmail[dot]com
<mailto:gongtao0607 at gmail.com>
Tel: +86 15210988463
--------------------
| OpenPGP keys: DE4CCC4F(gongtao0607[at]gmail[dot]com)
| OpenPGP fingerprint: 1C93 0B63 3466 74F2 D3C3 D873 4F7D 76E5 DE4C CC4F
--------------------
_______________________________________________
Linux mailing list
Linux at lists.openrisc.net
http://lists.openrisc.net/listinfo/linux
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openrisc.net/pipermail/linux/attachments/20120921/79c5e0d1/attachment.html>
Loading...