resume regression in 2.6.37
Subsystems (3)
Hi,
we are using devices based on an PXA300 and are successfully using the 2.6.36.2 kernel (vanilla, basically unpatched). You can find the platform-specific code that describes our devices
in /arch/arm/mach-pxa/raumfeld.c.
Now I've tried to update the kernel to 2.6.37. After fixing the already reported NULL pointer dereference on bootup in pxa3xx_nand_probe(), the device seems to work fine until I suspend it and then try to wake it up from suspend. Suspend seems to work fine, no warnings whatsoever. However there is absolutely no sign of resume.
I've used git bisect to track this down to the following commit:
commit 2f7e99bb9be6a2d8d7b808dc86037710cc8b7bf1
Author: Thomas Gleixner <[email protected]> Date: Mon Sep 27 12:45:50 2010 +0000
genirq: Provide compat handling for chip->set_wake()
Wrap the old chip function set_wake() until the migration is complete and the old chip functions are removed.
LKML-Reference: <[email protected]>
Any idea on how to proceed from here? I don't think I can just revert this commit and expect things to work, right?
Regards,
Sven
Signature · 5 lines
Sven Neumann Head of RAUMFELD Software Development Lautsprecher Teufel GmbH | B?lowstr. 66 | 10783 Berlin | Germany Tel: +49 (0)30-300 930 153 | s.neumann at raumfeld.com
Quoted 20 lines · Sven Neumann
Now I've tried to update the kernel to 2.6.37. After fixing the already reported NULL pointer dereference on bootup in
pxa3xx_nand_probe(), the device seems to work fine until I suspend it and then try to wake it up from suspend. Suspend seems to work fine, no warnings whatsoever. However there is absolutely no sign of resume.I've used git bisect to track this down to the following commit:
commit
2f7e99bb9be6a2d8d7b808dc86037710cc8b7bf1Author: Thomas Gleixner <[email protected]> Date: Mon Sep 27 12:45:50 2010 +0000genirq: Provide compat handling for
chip->set_wake()Wrap the old chip function
set_wake()until the migration is complete and the old chip functions are removed.Signed-off-by Thomas Gleixner <[email protected]>Cc Peter Zijlstra <[email protected]>
Quoted 7 lines
LKML-Reference: <[email protected]>
Reviewed-by H. Peter Anvin <[email protected]>Reviewed-by Ingo Molnar <[email protected]>Any idea on how to proceed from here? I don't think I can just revert this commit and expect things to work, right?
Well, I somehow doubt, that this is the real culprit. The patch does not change anything of the set_wake() functionality. It's a functional equivivalent wrapper, nothing else.
Can you revert it on top of 2.6.37 and verify that it helps ?
Thanks,
tglx
Quoted 26 lines · Thomas Gleixner
Quoted 25 lines · Sven Neumann
Now I've tried to update the kernel to 2.6.37. After fixing the already reported NULL pointer dereference on bootup in
pxa3xx_nand_probe(), the device seems to work fine until I suspend it and then try to wake it up from suspend. Suspend seems to work fine, no warnings whatsoever. However there is absolutely no sign of resume.I've used git bisect to track this down to the following commit:
commit
2f7e99bb9be6a2d8d7b808dc86037710cc8b7bf1Author: Thomas Gleixner <[email protected]> Date: Mon Sep 27 12:45:50 2010 +0000genirq: Provide compat handling for
chip->set_wake()Wrap the old chip function
set_wake()until the migration is complete and the old chip functions are removed.Signed-off-by Thomas Gleixner <[email protected]>Cc Peter Zijlstra <[email protected]>LKML-Reference: <[email protected]>
Reviewed-by H. Peter Anvin <[email protected]>Reviewed-by Ingo Molnar <[email protected]>
Quoted 8 lines
Quoted 2 lines
Any idea on how to proceed from here? I don't think I can just revert this commit and expect things to work, right?
Well, I somehow doubt, that this is the real culprit. The patch does not change anything of the
set_wake()functionality. It's a functional equivivalent wrapper, nothing else.Can you revert it on top of 2.6.37 and verify that it helps ?
I've done that now and while it doesn't solve the problem completely, I can definitely say that reverting the change does make a difference.
Without the revert there is absolutely no sign of resume. With the change reverted I can see that the PXA powers up again, there's an LED showing that the USB controller has power again. Unfortunately there's seems to be another problem and the resume doesn't complete. I've tried to get console output by using no_console_suspend, but there's just gibberish on the console after resume :(
Any idea on how to proceed from here? I could perhaps ask our hardware engineer to try find out where exactly we are stuck in the resume. But I'd like to avoid that if possible.
Thanks,
Sven
Quoted 5 lines · Sven Neumann
Quoted 4 lines · Thomas Gleixner
Quoted 2 lines · Sven Neumann
Any idea on how to proceed from here? I don't think I can just revert this commit and expect things to work, right?
Quoted 8 lines
Quoted 5 lines
Well, I somehow doubt, that this is the real culprit. The patch does not change anything of the
set_wake()functionality. It's a functional equivivalent wrapper, nothing else.Can you revert it on top of 2.6.37 and verify that it helps ?
I've done that now and while it doesn't solve the problem completely, I can definitely say that reverting the change does make a difference.
Hmm. I have to admit that this confuses the hell out of me.
Quoted 10 lines
Without the revert there is absolutely no sign of resume. With the change reverted I can see that the PXA powers up again, there's an LED showing that the USB controller has power again. Unfortunately there's seems to be another problem and the resume doesn't complete. I've tried to get console output by using
no_console_suspend, but there's just gibberish on the console after resume :(Any idea on how to proceed from here? I could perhaps ask our hardware engineer to try find out where exactly we are stuck in the resume. But I'd like to avoid that if possible.
Can you stick a printk into the set_wake() function of that irq chip and print the irq and on arguments and the return value . Run that with both stock 2.6.37 and the patch reverted.
Thanks,
tglx
Quoted 7 lines · Thomas Gleixner
Quoted 7 lines
Without the revert there is absolutely no sign of resume. With the change reverted I can see that the PXA powers up again, there's an LED showing that the USB controller has power again. Unfortunately there's seems to be another problem and the resume doesn't complete. I've tried to get console output by using
no_console_suspend, but there's just gibberish on the console after resume :(
Quoted 7 lines
Quoted 3 lines
Any idea on how to proceed from here? I could perhaps ask our hardware engineer to try find out where exactly we are stuck in the resume. But I'd like to avoid that if possible.
Can you stick a printk into the
set_wake()function of that irq chip and print the irq and on arguments and the return value . Run that with both stock 2.6.37 and the patch reverted.
pxa3xx_set_wake(31, 1) returns 0
Same result with stock 2.6.37 and the patch reverted. Except that without the patch reverted, the device doesn't power up again.
Sven
Quoted 13 lines · Sven Neumann
Quoted 11 lines · Thomas Gleixner
Quoted 10 lines
Without the revert there is absolutely no sign of resume. With the change reverted I can see that the PXA powers up again, there's an LED showing that the USB controller has power again. Unfortunately there's seems to be another problem and the resume doesn't complete. I've tried to get console output by using
no_console_suspend, but there's just gibberish on the console after resume :(Any idea on how to proceed from here? I could perhaps ask our hardware engineer to try find out where exactly we are stuck in the resume. But I'd like to avoid that if possible.
Quoted 8 lines
Quoted 3 lines
Can you stick a printk into the
set_wake()function of that irq chip and print the irq and on arguments and the return value . Run that with both stock 2.6.37 and the patch reverted.
pxa3xx_set_wake(31, 1)returns 0Same result with stock 2.6.37 and the patch reverted. Except that without the patch reverted, the device doesn't power up again.
Ok, can we agree that the patch has no functional impact on the set_wake function? And I don't see a reason why reverting that patch results in a working resume. That does not make sense at all. Which compiler version are you using ?
Thanks,
tglx
Quoted 21 lines · Thomas Gleixner
Quoted 19 lines · Sven Neumann
Quoted 7 lines · Thomas Gleixner
Quoted 7 lines
Without the revert there is absolutely no sign of resume. With the change reverted I can see that the PXA powers up again, there's an LED showing that the USB controller has power again. Unfortunately there's seems to be another problem and the resume doesn't complete. I've tried to get console output by using
no_console_suspend, but there's just gibberish on the console after resume :(Quoted 7 lines
Quoted 3 lines
Any idea on how to proceed from here? I could perhaps ask our hardware engineer to try find out where exactly we are stuck in the resume. But I'd like to avoid that if possible.
Can you stick a printk into the
set_wake()function of that irq chip and print the irq and on arguments and the return value . Run that with both stock 2.6.37 and the patch reverted.
pxa3xx_set_wake(31, 1)returns 0
Quoted 7 lines
Quoted 2 lines
Same result with stock 2.6.37 and the patch reverted. Except that without the patch reverted, the device doesn't power up again.
Ok, can we agree that the patch has no functional impact on the
set_wakefunction? And I don't see a reason why reverting that patch results in a working resume. That does not make sense at all. Which compiler version are you using ?
I agree that this is all very weird and as far as I understand the patch it should have no functional impact. Unfortunately reverting the patch does not result in a working resume, but at least it makes a difference and at the moment it's the only trace I have.
My cross-compile tool-chain uses GCC 4.3.5.
Sven
Quoted 30 lines · Sven Neumann
Quoted 21 lines · Thomas Gleixner
Quoted 19 lines · Sven Neumann
Quoted 7 lines · Thomas Gleixner
Quoted 7 lines
Without the revert there is absolutely no sign of resume. With the change reverted I can see that the PXA powers up again, there's an LED showing that the USB controller has power again. Unfortunately there's seems to be another problem and the resume doesn't complete. I've tried to get console output by using
no_console_suspend, but there's just gibberish on the console after resume :(Quoted 7 lines
Quoted 3 lines
Any idea on how to proceed from here? I could perhaps ask our hardware engineer to try find out where exactly we are stuck in the resume. But I'd like to avoid that if possible.
Can you stick a printk into the
set_wake()function of that irq chip and print the irq and on arguments and the return value . Run that with both stock 2.6.37 and the patch reverted.
pxa3xx_set_wake(31, 1)returns 0Quoted 7 lines
Quoted 2 lines
Same result with stock 2.6.37 and the patch reverted. Except that without the patch reverted, the device doesn't power up again.
Ok, can we agree that the patch has no functional impact on the
set_wakefunction? And I don't see a reason why reverting that patch results in a working resume. That does not make sense at all. Which compiler version are you using ?
Quoted 6 lines
I agree that this is all very weird and as far as I understand the patch it should have no functional impact. Unfortunately reverting the patch does not result in a working resume, but at least it makes a difference and at the moment it's the only trace I have.
My cross-compile tool-chain uses GCC 4.3.5.
Can you try a different compiler ?
Thanks,
tglx
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 24 lines · Thomas Gleixner
Quoted 13 lines · Sven Neumann
Quoted 11 lines · Thomas Gleixner
Quoted 10 lines
Without the revert there is absolutely no sign of resume. With the change reverted I can see that the PXA powers up again, there's an LED showing that the USB controller has power again. Unfortunately there's seems to be another problem and the resume doesn't complete. I've tried to get console output by using
no_console_suspend, but there's just gibberish on the console after resume :(Any idea on how to proceed from here? I could perhaps ask our hardware engineer to try find out where exactly we are stuck in the resume. But I'd like to avoid that if possible.
Quoted 8 lines
Quoted 3 lines
Can you stick a printk into the
set_wake()function of that irq chip and print the irq and on arguments and the return value . Run that with both stock 2.6.37 and the patch reverted.
pxa3xx_set_wake(31, 1)returns 0Same result with stock 2.6.37 and the patch reverted. Except that without the patch reverted, the device doesn't power up again.
Quoted 9 lines
Ok, can we agree that the patch has no functional impact on the
set_wakefunction? And I don't see a reason why reverting that patch results in a working resume. That does not make sense at all. Which compiler version are you using ?Thanks,
tglx
Hi
If you take a look at the pxa gpio irq handling you'll see that it sets the "set_wake" field of it's irq_chip after calling set_irq_chip for all of the irqs, so the compat handler gets never installed.
So I guess the following patch fixes it:
arch/arm/mach-pxa/irq.c +0 -0
- --- a/arch/arm/mach-pxa/irq.c
+++ b/arch/arm/mach-pxa/irq.c
@@ -111,13 +111,13 @@ static void __init pxa_init_low_gpio_irq(set_wake_t fn)
GRER0 &= ~0x3;
GEDR0 = 0x3;
+ pxa_low_gpio_chip.set_wake = fn;
+
for (irq = IRQ_GPIO0; irq <= IRQ_GPIO1; irq++) {
set_irq_chip(irq, &pxa_low_gpio_chip); set_irq_handler(irq, handle_edge_irq); set_irq_flags(irq, IRQF_VALID);
}
- -
- - pxa_low_gpio_chip.set_wake = fn;
}
void __init pxa_init_irq(int irq_nr, set_wake_t fn)
@@ -142,13 +142,14 @@ void __init pxa_init_irq(int irq_nr, set_wake_t fn)
/* only unmasked interrupts kick us out of idle */ ICCR = 1;
+ pxa_internal_irq_chip.set_wake = fn;
+
for (irq = PXA_IRQ(0); irq < PXA_IRQ(irq_nr); irq++) {
set_irq_chip(irq, &pxa_internal_irq_chip); set_irq_handler(irq, handle_level_irq); set_irq_flags(irq, IRQF_VALID);
}
- - pxa_internal_irq_chip.set_wake = fn;
pxa_init_low_gpio_irq(fn);
}
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk00l4cACgkQBX4mSR26RiMTMQCdGCiu3ALAIEe0dUkX3u5xeHmz dggAnj2cePanr6HFi+6KQ4tF7cT6xoq0
=yxJs
-----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 68 lines · Lars-Peter Clausen
Quoted 24 lines · Thomas Gleixner
Quoted 13 lines · Sven Neumann
Quoted 11 lines · Thomas Gleixner
Quoted 10 lines
Without the revert there is absolutely no sign of resume. With the change reverted I can see that the PXA powers up again, there's an LED showing that the USB controller has power again. Unfortunately there's seems to be another problem and the resume doesn't complete. I've tried to get console output by using
no_console_suspend, but there's just gibberish on the console after resume :(Any idea on how to proceed from here? I could perhaps ask our hardware engineer to try find out where exactly we are stuck in the resume. But I'd like to avoid that if possible.
Quoted 8 lines
Quoted 3 lines
Can you stick a printk into the
set_wake()function of that irq chip and print the irq and on arguments and the return value . Run that with both stock 2.6.37 and the patch reverted.
pxa3xx_set_wake(31, 1)returns 0Same result with stock 2.6.37 and the patch reverted. Except that without the patch reverted, the device doesn't power up again.
Quoted 8 lines
Ok, can we agree that the patch has no functional impact on the
set_wakefunction? And I don't see a reason why reverting that patch results in a working resume. That does not make sense at all. Which compiler version are you using ?Thanks,
tglx
Hi
If you take a look at the pxa gpio irq handling you'll see that it sets the "
set_wake" field of it'sirq_chipafter callingset_irq_chipfor all of the irqs, so the compat handler gets never installed.So I guess the following patch fixes it:
arch/arm/mach-pxa/irq.c +4
-2@@ -111,13 +111,13 @@ static void __init pxa_init_low_gpio_irq(set_wake_t fn)GRER0 &= ~0x3 ;GEDR0 =0x3 ; + pxa_low_gpio_chip.set_wake = fn; +for (irq =IRQ_GPIO0 ; irq <=IRQ_GPIO1 ; irq++) {set_irq_chip (irq, &pxa_low_gpio_chip);set_irq_handler (irq, handle_edge_irq);set_irq_flags (irq,IRQF_VALID ); } - - pxa_low_gpio_chip.set_wake = fn; }void __init pxa_init_irq (int irq_nr,set_wake_t fn)@@ -142,13 +142,14 @@ void __init pxa_init_irq(int irq_nr, set_wake_t fn)/* only unmasked interrupts kick us out of idle */ ICCR =1 ; + pxa_internal_irq_chip.set_wake = fn; +
arch/arm/mach-pxa/irq.c void __init pxa_init_irq(int irq_nr, set_wake_t fn) · line 155
Quoted 10 lines
arch/arm/mach-pxa/irq.c +0
-1for (irq =PXA_IRQ (0 ); irq <PXA_IRQ (irq_nr); irq++) {set_irq_chip (irq, &pxa_internal_irq_chip);set_irq_handler (irq, handle_level_irq);set_irq_flags (irq,IRQF_VALID ); } - pxa_internal_irq_chip.set_wake = fn;pxa_init_low_gpio_irq (fn); }
and
arch/arm/mach-pxa/pxa3xx.c +0 -0
- --- a/arch/arm/mach-pxa/pxa3xx.c
+++ b/arch/arm/mach-pxa/pxa3xx.c
@@ -558,13 +558,13 @@ static void __init pxa_init_ext_wakeup_irq(set_wake_t fn)
{
int irq;
+ pxa_ext_wakeup_chip.set_wake = fn;
+
for (irq = IRQ_WAKEUP0; irq <= IRQ_WAKEUP1; irq++) {
set_irq_chip(irq, &pxa_ext_wakeup_chip); set_irq_handler(irq, handle_edge_irq); set_irq_flags(irq, IRQF_VALID);
}
- -
- - pxa_ext_wakeup_chip.set_wake = fn;
}
void __init pxa3xx_init_irq(void)
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk00n7wACgkQBX4mSR26RiO1lgCfRblXeDhxuXHe7sKzQEApzyS7 wjgAniUvOc9RdV5jms1SU5ivQ0T3NogK
=heYm
-----END PGP SIGNATURE-----
Hi,
Quoted 53 lines · Lars-Peter Clausen
Quoted 31 lines
If you take a look at the pxa gpio irq handling you'll see that it sets the "
set_wake" field of it'sirq_chipafter callingset_irq_chipfor all of the irqs, so the compat handler gets never installed.So I guess the following patch fixes it:
arch/arm/mach-pxa/irq.c +4
-2@@ -111,13 +111,13 @@ static void __init pxa_init_low_gpio_irq(set_wake_t fn)GRER0 &= ~0x3 ;GEDR0 =0x3 ; + pxa_low_gpio_chip.set_wake = fn; +for (irq =IRQ_GPIO0 ; irq <=IRQ_GPIO1 ; irq++) {set_irq_chip (irq, &pxa_low_gpio_chip);set_irq_handler (irq, handle_edge_irq);set_irq_flags (irq,IRQF_VALID ); } - - pxa_low_gpio_chip.set_wake = fn; }void __init pxa_init_irq (int irq_nr,set_wake_t fn)@@ -142,13 +142,14 @@ void __init pxa_init_irq(int irq_nr, set_wake_t fn)/* only unmasked interrupts kick us out of idle */ ICCR =1 ; + pxa_internal_irq_chip.set_wake = fn; +arch/arm/mach-pxa/irq.c void __init pxa_init_irq(int irq_nr, set_wake_t fn) · line 155
Quoted 10 lines
arch/arm/mach-pxa/irq.c +0
-1for (irq =PXA_IRQ (0 ); irq <PXA_IRQ (irq_nr); irq++) {set_irq_chip (irq, &pxa_internal_irq_chip);set_irq_handler (irq, handle_level_irq);set_irq_flags (irq,IRQF_VALID ); } - pxa_internal_irq_chip.set_wake = fn;pxa_init_low_gpio_irq (fn); }and
arch/arm/mach-pxa/pxa3xx.c +3
-1- --- a/arch/arm/mach-pxa/pxa3xx.c +++ b/arch/arm/mach-pxa/pxa3xx.c@@ -558,13 +558,13 @@ static void __init pxa_init_ext_wakeup_irq(set_wake_t fn) {int irq; + pxa_ext_wakeup_chip.set_wake = fn; +
arch/arm/mach-pxa/pxa3xx.c static void __init pxa_init_ext_wakeup_irq(set_wake_t fn) · line 570
Quoted 10 lines
arch/arm/mach-pxa/pxa3xx.c +0
-2for (irq =IRQ_WAKEUP0 ; irq <=IRQ_WAKEUP1 ; irq++) {set_irq_chip (irq, &pxa_ext_wakeup_chip);set_irq_handler (irq, handle_edge_irq);set_irq_flags (irq,IRQF_VALID ); } - - - - pxa_ext_wakeup_chip.set_wake = fn; }void __init pxa3xx_init_irq (void )
Indeed, that does fix it. It doesn't fix all my problems, but at least the device shows the same behavior now as with commit 2f7e99bb9be reverted. It powers up again and then outputs gibberish to the console. I will try another bisect to find out what else is broken.
I will send another mail with your two patches combined into a single commit. Please consider to sign-off that patch and send it upstream and to stable.
Thanks a lot for your help,
Sven
PATCH 1/1 pxa3xx: fix PXA GPIO IRQ handling
From: Lars-Peter Clausen <[email protected]>
Set the "set_wake" field of the irq_chip struct before calling set_irq_chip() for all of the IRQs, so that the compat handler actually gets installed.
--- arch/arm/mach-pxa/irq.c | 7 ++++--- arch/arm/mach-pxa/pxa3xx.c | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-)
arch/arm/mach-pxa/irq.c +4 -3
@@ -111,13 +111,13 @@ static void __init pxa_init_low_gpio_irq(set_wake_t fn)GRER0 &= ~0x3 ;GEDR0 =0x3 ; + pxa_low_gpio_chip.set_wake = fn; +for (irq =IRQ_GPIO0 ; irq <=IRQ_GPIO1 ; irq++) {set_irq_chip (irq, &pxa_low_gpio_chip);set_irq_handler (irq, handle_edge_irq);set_irq_flags (irq,IRQF_VALID ); } - - pxa_low_gpio_chip.set_wake = fn; }void __init pxa_init_irq (int irq_nr,set_wake_t fn)
@@ -142,13 +142,14 @@ void __init pxa_init_irq(int irq_nr, set_wake_t fn)/* only unmasked interrupts kick us out of idle */ ICCR =1 ; + pxa_internal_irq_chip.set_wake = fn; +for (irq =PXA_IRQ (0 ); irq <PXA_IRQ (irq_nr); irq++) {set_irq_chip (irq, &pxa_internal_irq_chip);set_irq_handler (irq, handle_level_irq);set_irq_flags (irq,IRQF_VALID ); } - pxa_internal_irq_chip.set_wake = fn;pxa_init_low_gpio_irq (fn); }
arch/arm/mach-pxa/pxa3xx.c +2 -2
@@ -567,13 +567,13 @@ static void __init pxa_init_ext_wakeup_irq(set_wake_t fn) {int irq; + pxa_ext_wakeup_chip.set_wake = fn; +for (irq =IRQ_WAKEUP0 ; irq <=IRQ_WAKEUP1 ; irq++) {set_irq_chip (irq, &pxa_ext_wakeup_chip);set_irq_handler (irq, handle_edge_irq);set_irq_flags (irq,IRQF_VALID ); } - - pxa_ext_wakeup_chip.set_wake = fn; }void __init pxa3xx_init_irq (void )
Signature · 1 line
1.7.1
Thomas Gleixner
Acked-byQuoted 3 lines · Lars-Peter Clausen
If you take a look at the pxa gpio irq handling you'll see that it sets the "
set_wake" field of it'sirq_chipafter callingset_irq_chipfor all of the irqs, so the compat handler gets never installed.
Good catch. Can you please resend with a proper changelog and SOB? Please add
after the Signed-off-by line.
Also feel free to add:
Re: [PATCH] pxa3xx: fix PXA GPIO IRQ handling
In reply to Sven NeumannQuoted 7 lines · Sven Neumann
From: Lars-Peter Clausen <[email protected]>
Set the "
set_wake" field of theirq_chipstruct before callingset_irq_chip()for all of the IRQs, so that the compat handler actually gets installed.Tested-by Sven Neumann <[email protected]>
If you send the patch out it needs your S-o-b, too.
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
Re: [PATCH] pxa3xx: fix PXA GPIO IRQ handling
In reply to Sven NeumannQuoted 7 lines · Sven Neumann
From: Lars-Peter Clausen <[email protected]>
Set the "
set_wake" field of theirq_chipstruct before callingset_irq_chip()for all of the IRQs, so that the compat handler actually gets installed.Tested-by Sven Neumann <[email protected]>
Quoted 61 lines
--- arch/arm/mach-pxa/irq.c | 7 ++++--- arch/arm/mach-pxa/pxa3xx.c | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-)arch/arm/mach-pxa/irq.c +4
-3@@ -111,13 +111,13 @@ static void __init pxa_init_low_gpio_irq(set_wake_t fn)GRER0 &= ~0x3 ;GEDR0 =0x3 ; + pxa_low_gpio_chip.set_wake = fn; +for (irq =IRQ_GPIO0 ; irq <=IRQ_GPIO1 ; irq++) {set_irq_chip (irq, &pxa_low_gpio_chip);set_irq_handler (irq, handle_edge_irq);set_irq_flags (irq,IRQF_VALID ); } - - pxa_low_gpio_chip.set_wake = fn; }void __init pxa_init_irq (int irq_nr,set_wake_t fn)@@ -142,13 +142,14 @@ void __init pxa_init_irq(int irq_nr, set_wake_t fn)/* only unmasked interrupts kick us out of idle */ ICCR =1 ; + pxa_internal_irq_chip.set_wake = fn; +for (irq =PXA_IRQ (0 ); irq <PXA_IRQ (irq_nr); irq++) {set_irq_chip (irq, &pxa_internal_irq_chip);set_irq_handler (irq, handle_level_irq);set_irq_flags (irq,IRQF_VALID ); } - pxa_internal_irq_chip.set_wake = fn;pxa_init_low_gpio_irq (fn); }arch/arm/mach-pxa/pxa3xx.c +2
-2@@ -567,13 +567,13 @@ static void __init pxa_init_ext_wakeup_irq(set_wake_t fn) {int irq; + pxa_ext_wakeup_chip.set_wake = fn; +for (irq =IRQ_WAKEUP0 ; irq <=IRQ_WAKEUP1 ; irq++) {set_irq_chip (irq, &pxa_ext_wakeup_chip);set_irq_handler (irq, handle_edge_irq);set_irq_flags (irq,IRQF_VALID ); } - - pxa_ext_wakeup_chip.set_wake = fn; }void __init pxa3xx_init_irq (void )
PATCH 1/1 ARM: pxa: fix GPIO IRQ handling
From: Lars-Peter Clausen <[email protected]>
Set the "set_wake" field of the irq_chip struct before calling set_irq_chip() for all of the IRQs, so that the compat handler actually gets installed.
--- arch/arm/mach-pxa/irq.c | 7 ++++--- arch/arm/mach-pxa/pxa3xx.c | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-)
arch/arm/mach-pxa/irq.c +4 -3
@@ -111,13 +111,13 @@ static void __init pxa_init_low_gpio_irq(set_wake_t fn)GRER0 &= ~0x3 ;GEDR0 =0x3 ; + pxa_low_gpio_chip.set_wake = fn; +for (irq =IRQ_GPIO0 ; irq <=IRQ_GPIO1 ; irq++) {set_irq_chip (irq, &pxa_low_gpio_chip);set_irq_handler (irq, handle_edge_irq);set_irq_flags (irq,IRQF_VALID ); } - - pxa_low_gpio_chip.set_wake = fn; }void __init pxa_init_irq (int irq_nr,set_wake_t fn)
@@ -142,13 +142,14 @@ void __init pxa_init_irq(int irq_nr, set_wake_t fn)/* only unmasked interrupts kick us out of idle */ ICCR =1 ; + pxa_internal_irq_chip.set_wake = fn; +for (irq =PXA_IRQ (0 ); irq <PXA_IRQ (irq_nr); irq++) {set_irq_chip (irq, &pxa_internal_irq_chip);set_irq_handler (irq, handle_level_irq);set_irq_flags (irq,IRQF_VALID ); } - pxa_internal_irq_chip.set_wake = fn;pxa_init_low_gpio_irq (fn); }
arch/arm/mach-pxa/pxa3xx.c +2 -2
@@ -567,13 +567,13 @@ static void __init pxa_init_ext_wakeup_irq(set_wake_t fn) {int irq; + pxa_ext_wakeup_chip.set_wake = fn; +for (irq =IRQ_WAKEUP0 ; irq <=IRQ_WAKEUP1 ; irq++) {set_irq_chip (irq, &pxa_ext_wakeup_chip);set_irq_handler (irq, handle_edge_irq);set_irq_flags (irq,IRQF_VALID ); } - - pxa_ext_wakeup_chip.set_wake = fn; }void __init pxa3xx_init_irq (void )
Signature · 1 line
1.7.1
Re: [PATCH] pxa3xx: fix PXA GPIO IRQ handling
In reply to Lars-Peter ClausenQuoted 6 lines · Lars-Peter Clausen
Quoted 5 lines · Sven Neumann
From: Lars-Peter Clausen <[email protected]>
Set the "
set_wake" field of theirq_chipstruct before callingset_irq_chip()for all of the IRQs, so that the compat handler actually gets installed.
Not really sure if this is necessary. Lennert has done the transition to irq_data to those _set_wake() functions as well, so it should be OK that compat handler doesn't get installed.
Now I'm not against moving this above, just wondering if there were any consequences/errors coming out?
Quoted 73 lines
Quoted 2 lines
Tested-by Sven Neumann <[email protected]>Signed-off-by Lars-Peter Clausen <[email protected]>Quoted 51 lines
---
?arch/arm/mach-pxa/irq.c ? ?| ? ?7 ++++---
?arch/arm/mach-pxa/pxa3xx.c | ? ?4 ++--
?2 files changed, 6 insertions(+), 5 deletions(-)arch/arm/mach-pxa/irq.c +2
-2@@ -111,13 +111,13 @@ static void __init pxa_init_low_gpio_irq(set_wake_t fn) ? ? ? GRER0 &= ~0x3; ? ? ? GEDR0 = 0x3; + ? ? pxa_low_gpio_chip.set_wake = fn; + ? ? ? for (irq = IRQ_GPIO0; irq <= IRQ_GPIO1; irq++) { ? ? ? ? ? ? ? set_irq_chip(irq, &pxa_low_gpio_chip); ? ? ? ? ? ? ? set_irq_handler(irq, handle_edge_irq); ? ? ? ? ? ? ? set_irq_flags(irq, IRQF_VALID); ? ? ? } - - ? ? pxa_low_gpio_chip.set_wake = fn; ?} ?void __init pxa_init_irq(int irq_nr, set_wake_t fn)@@ -142,13 +142,14 @@ void __init pxa_init_irq(int irq_nr, set_wake_t fn)? ? ? /* only unmasked interrupts kick us out of idle */ ? ? ? ICCR = 1;
+ ? ? pxa_internal_irq_chip.set_wake = fn;
+
? ? ? for (irq =PXA_IRQ(0); irq <PXA_IRQ(irq_nr); irq++) { ? ? ? ? ? ? ?set_irq_chip(irq, &pxa_internal_irq_chip); ? ? ? ? ? ? ?set_irq_handler(irq, handle_level_irq); ? ? ? ? ? ? ?set_irq_flags(irq, IRQF_VALID);
? ? ? }- ? ? pxa_internal_irq_chip.set_wake = fn;
? ? ?pxa_init_low_gpio_irq(fn);
?}arch/arm/mach-pxa/pxa3xx.c +2
-0@@ -567,13 +567,13 @@ static void __init pxa_init_ext_wakeup_irq(set_wake_t fn) ?{ ? ? ? int irq; + ? ? pxa_ext_wakeup_chip.set_wake = fn; +arch/arm/mach-pxa/pxa3xx.c static void __init pxa_init_ext_wakeup_irq(set_wake_t fn) · line 579
Quoted 10 lines
arch/arm/mach-pxa/pxa3xx.c +0
-2? ? ? for (irq = IRQ_WAKEUP0; irq <= IRQ_WAKEUP1; irq++) { ? ? ? ? ? ? ? set_irq_chip(irq, &pxa_ext_wakeup_chip); ? ? ? ? ? ? ? set_irq_handler(irq, handle_edge_irq); ? ? ? ? ? ? ? set_irq_flags(irq, IRQF_VALID); ? ? ? } - - ? ? pxa_ext_wakeup_chip.set_wake = fn; ?} ?void __init pxa3xx_init_irq(void)_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH] pxa3xx: fix PXA GPIO IRQ handling
Quoted 7 lines · Eric Miao
Quoted 3 lines
Quoted 3 lines
Set the "
set_wake" field of theirq_chipstruct before callingset_irq_chip()for all of the IRQs, so that the compat handler actually gets installed.Not really sure if this is necessary. Lennert has done the transition to
irq_datato those_set_wake()functions as well, so it should be OK that compat handler doesn't get installed.
Yeah, this has been dealt with upstream, and this patch won't apply.
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
arch/arm/mach-pxa/irq.c +0
-0@@ -111,13 +111,13 @@ static void __init pxa_init_low_gpio_irq(set_wake_t fn) ? ? ? GRER0 &= ~0x3; ? ? ? GEDR0 = 0x3;
Quoted 9 lines
Quoted 9 lines
arch/arm/mach-pxa/irq.c static void __init pxa_init_low_gpio_irq(set_wake_t fn) · line 120
Quoted 9 lines
arch/arm/mach-pxa/irq.c +2
-2+ ? ? pxa_low_gpio_chip.set_wake = fn; + ? ? ? for (irq = IRQ_GPIO0; irq <= IRQ_GPIO1; irq++) { ? ? ? ? ? ? ? set_irq_chip(irq, &pxa_low_gpio_chip); ? ? ? ? ? ? ? set_irq_handler(irq, handle_edge_irq); ? ? ? ? ? ? ? set_irq_flags(irq, IRQF_VALID); ? ? ? } - - ? ? pxa_low_gpio_chip.set_wake = fn;
Upstream has:
pxa_low_gpio_chip.irq_set_wake = fn;
Re: [PATCH] pxa3xx: fix PXA GPIO IRQ handling
In reply to Eric MiaoQuoted 8 lines · Eric Miao
Quoted 6 lines · Lars-Peter Clausen
Quoted 5 lines · Sven Neumann
From: Lars-Peter Clausen <[email protected]>
Set the "
set_wake" field of theirq_chipstruct before callingset_irq_chip()for all of the IRQs, so that the compat handler actually gets installed.
Quoted 6 lines
Not really sure if this is necessary. Lennert has done the transition to
irq_datato those_set_wake()functions as well, so it should be OK that compat handler doesn't get installed.Now I'm not against moving this above, just wondering if there were any consequences/errors coming out?
Well, our PXA300 device doesn't power up again when it should resume from suspend. Fine with me if this has been fixed upstream, but I would still like to get this patch into 2.6.37. I'll try to test upstream as soon as Linus releases 2.6.38-rc1...
Sven
Re: [PATCH] pxa3xx: fix PXA GPIO IRQ handling
Quoted 13 lines · Sven Neumann
Quoted 12 lines · Eric Miao
Quoted 6 lines · Lars-Peter Clausen
Quoted 5 lines · Sven Neumann
From: Lars-Peter Clausen <[email protected]>
Set the "
set_wake" field of theirq_chipstruct before callingset_irq_chip()for all of the IRQs, so that the compat handler actually gets installed.Not really sure if this is necessary. Lennert has done the transition to
irq_datato those_set_wake()functions as well, so it should be OK that compat handler doesn't get installed.
Quoted 5 lines
Quoted 2 lines
Now I'm not against moving this above, just wondering if there were any consequences/errors coming out?
Well, our PXA300 device doesn't power up again when it should resume from suspend. Fine with me if this has been fixed upstream,
Yeah, that's true. Mind re-post with your SOB?
Quoted 9 lines
but I would
still like to get this patch into 2.6.37. I'll try to test upstream as soon as Linus releases 2.6.38-rc1...Sven
Re: [PATCH] pxa3xx: fix PXA GPIO IRQ handling
Quoted 14 lines · Eric Miao
Quoted 13 lines · Sven Neumann
Quoted 12 lines · Eric Miao
Quoted 6 lines · Lars-Peter Clausen
Quoted 5 lines · Sven Neumann
From: Lars-Peter Clausen <[email protected]>
Set the "
set_wake" field of theirq_chipstruct before callingset_irq_chip()for all of the IRQs, so that the compat handler actually gets installed.Not really sure if this is necessary. Lennert has done the transition to
irq_datato those_set_wake()functions as well, so it should be OK that compat handler doesn't get installed.
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
Now I'm not against moving this above, just wondering if there were any consequences/errors coming out?
Well, our PXA300 device doesn't power up again when it should resume from suspend. Fine with me if this has been fixed upstream,
Yeah, that's true. Mind re-post with your SOB?
And Cc linux-stable.
Quoted 4 lines
Quoted 4 lines
but I would
still like to get this patch into 2.6.37. I'll try to test upstream as soon as Linus releases 2.6.38-rc1...
That's will be great help.
Quoted 7 lines
Quoted 6 lines
Sven