* [PATCH] gpio: mvebu: Fix cause computation in irq handler
@ 2017-07-12 11:22 Gregory CLEMENT
2017-07-24 15:49 ` Gregory CLEMENT
2017-08-07 12:15 ` Linus Walleij
0 siblings, 2 replies; 4+ messages in thread
From: Gregory CLEMENT @ 2017-07-12 11:22 UTC (permalink / raw)
To: linux-arm-kernel
When switching to regmap, the way to compute the irq cause was
reorganized. However while doing it, a typo was introduced: a 'xor'
replaced a 'and'.
This lead to wrong behavior in the interrupt handler ans one of the
symptom was wrong irq handler called on the Armada 388 GP:
"->handle_irq(): c016303c,
handle_bad_irq+0x0/0x278
->irq_data.chip(): c0b0ec0c,
0xc0b0ec0c
->action(): (null)
IRQ_NOPROBE set
IRQ_NOREQUEST set
unexpected IRQ trap at vector 00
irq 0, desc: ee804800, depth: 1, count: 0, unhandled: 0"
Fixes: 2233bf7a92e7 ("gpio: mvebu: switch to regmap for register access")
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
---
drivers/gpio/gpio-mvebu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
index e338c3743562..45c65f805fd6 100644
--- a/drivers/gpio/gpio-mvebu.c
+++ b/drivers/gpio/gpio-mvebu.c
@@ -557,7 +557,7 @@ static void mvebu_gpio_irq_handler(struct irq_desc *desc)
edge_cause = mvebu_gpio_read_edge_cause(mvchip);
edge_mask = mvebu_gpio_read_edge_mask(mvchip);
- cause = (data_in ^ level_mask) | (edge_cause & edge_mask);
+ cause = (data_in & level_mask) | (edge_cause & edge_mask);
for (i = 0; i < mvchip->chip.ngpio; i++) {
int irq;
--
2.13.2
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH] gpio: mvebu: Fix cause computation in irq handler 2017-07-12 11:22 [PATCH] gpio: mvebu: Fix cause computation in irq handler Gregory CLEMENT @ 2017-07-24 15:49 ` Gregory CLEMENT 2017-08-02 12:09 ` Gregory CLEMENT 2017-08-07 12:15 ` Linus Walleij 1 sibling, 1 reply; 4+ messages in thread From: Gregory CLEMENT @ 2017-07-24 15:49 UTC (permalink / raw) To: linux-arm-kernel Hi Linus, On mer., juil. 12 2017, Gregory CLEMENT <gregory.clement@free-electrons.com> wrote: > When switching to regmap, the way to compute the irq cause was > reorganized. However while doing it, a typo was introduced: a 'xor' > replaced a 'and'. > > This lead to wrong behavior in the interrupt handler ans one of the > symptom was wrong irq handler called on the Armada 388 GP: > "->handle_irq(): c016303c, > handle_bad_irq+0x0/0x278 > ->irq_data.chip(): c0b0ec0c, > 0xc0b0ec0c > ->action(): (null) > IRQ_NOPROBE set > IRQ_NOREQUEST set > unexpected IRQ trap at vector 00 > irq 0, desc: ee804800, depth: 1, count: 0, unhandled: 0" > > Fixes: 2233bf7a92e7 ("gpio: mvebu: switch to regmap for register access") > Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com> Would it be possible to push this fix on the current kernel (v4.13-rc) ? Indeed currently due to this bug, the Armada 388 GP board does not boot anymore because this board uses a gpio interrupt. So it prevents to have continuous integration on this one with kci for instance. Thanks, Gregory > --- > drivers/gpio/gpio-mvebu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c > index e338c3743562..45c65f805fd6 100644 > --- a/drivers/gpio/gpio-mvebu.c > +++ b/drivers/gpio/gpio-mvebu.c > @@ -557,7 +557,7 @@ static void mvebu_gpio_irq_handler(struct irq_desc *desc) > edge_cause = mvebu_gpio_read_edge_cause(mvchip); > edge_mask = mvebu_gpio_read_edge_mask(mvchip); > > - cause = (data_in ^ level_mask) | (edge_cause & edge_mask); > + cause = (data_in & level_mask) | (edge_cause & edge_mask); > > for (i = 0; i < mvchip->chip.ngpio; i++) { > int irq; > -- > 2.13.2 > -- Gregory Clement, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] gpio: mvebu: Fix cause computation in irq handler 2017-07-24 15:49 ` Gregory CLEMENT @ 2017-08-02 12:09 ` Gregory CLEMENT 0 siblings, 0 replies; 4+ messages in thread From: Gregory CLEMENT @ 2017-08-02 12:09 UTC (permalink / raw) To: linux-arm-kernel Hi Linus, On lun., juil. 24 2017, Gregory CLEMENT <gregory.clement@free-electrons.com> wrote: > Hi Linus, > > On mer., juil. 12 2017, Gregory CLEMENT <gregory.clement@free-electrons.com> wrote: > >> When switching to regmap, the way to compute the irq cause was >> reorganized. However while doing it, a typo was introduced: a 'xor' >> replaced a 'and'. >> >> This lead to wrong behavior in the interrupt handler ans one of the >> symptom was wrong irq handler called on the Armada 388 GP: >> "->handle_irq(): c016303c, >> handle_bad_irq+0x0/0x278 >> ->irq_data.chip(): c0b0ec0c, >> 0xc0b0ec0c >> ->action(): (null) >> IRQ_NOPROBE set >> IRQ_NOREQUEST set >> unexpected IRQ trap at vector 00 >> irq 0, desc: ee804800, depth: 1, count: 0, unhandled: 0" >> >> Fixes: 2233bf7a92e7 ("gpio: mvebu: switch to regmap for register access") >> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com> > > Would it be possible to push this fix on the current kernel (v4.13-rc) ? > > Indeed currently due to this bug, the Armada 388 GP board does not boot > anymore because this board uses a gpio interrupt. So it prevents to have > continuous integration on this one with kci for instance. I saw that yesterday you appplied patches on gpio/fixes but it seems that you missed this one, because most of the patch you're applied were actually posted after this one. Thanks, Gregory > > >> --- >> drivers/gpio/gpio-mvebu.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c >> index e338c3743562..45c65f805fd6 100644 >> --- a/drivers/gpio/gpio-mvebu.c >> +++ b/drivers/gpio/gpio-mvebu.c >> @@ -557,7 +557,7 @@ static void mvebu_gpio_irq_handler(struct irq_desc *desc) >> edge_cause = mvebu_gpio_read_edge_cause(mvchip); >> edge_mask = mvebu_gpio_read_edge_mask(mvchip); >> >> - cause = (data_in ^ level_mask) | (edge_cause & edge_mask); >> + cause = (data_in & level_mask) | (edge_cause & edge_mask); >> >> for (i = 0; i < mvchip->chip.ngpio; i++) { >> int irq; >> -- >> 2.13.2 >> > > -- > Gregory Clement, Free Electrons > Kernel, drivers, real-time and embedded Linux > development, consulting, training and support. > http://free-electrons.com > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel at lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel -- Gregory Clement, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] gpio: mvebu: Fix cause computation in irq handler 2017-07-12 11:22 [PATCH] gpio: mvebu: Fix cause computation in irq handler Gregory CLEMENT 2017-07-24 15:49 ` Gregory CLEMENT @ 2017-08-07 12:15 ` Linus Walleij 1 sibling, 0 replies; 4+ messages in thread From: Linus Walleij @ 2017-08-07 12:15 UTC (permalink / raw) To: linux-arm-kernel On Wed, Jul 12, 2017 at 1:22 PM, Gregory CLEMENT <gregory.clement@free-electrons.com> wrote: > When switching to regmap, the way to compute the irq cause was > reorganized. However while doing it, a typo was introduced: a 'xor' > replaced a 'and'. > > This lead to wrong behavior in the interrupt handler ans one of the > symptom was wrong irq handler called on the Armada 388 GP: > "->handle_irq(): c016303c, > handle_bad_irq+0x0/0x278 > ->irq_data.chip(): c0b0ec0c, > 0xc0b0ec0c > ->action(): (null) > IRQ_NOPROBE set > IRQ_NOREQUEST set > unexpected IRQ trap at vector 00 > irq 0, desc: ee804800, depth: 1, count: 0, unhandled: 0" > > Fixes: 2233bf7a92e7 ("gpio: mvebu: switch to regmap for register access") > Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com> Patch applied for fixes. Yours, Linus Walleij ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-08-07 12:15 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-07-12 11:22 [PATCH] gpio: mvebu: Fix cause computation in irq handler Gregory CLEMENT 2017-07-24 15:49 ` Gregory CLEMENT 2017-08-02 12:09 ` Gregory CLEMENT 2017-08-07 12:15 ` Linus Walleij
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).