Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1229490 > unrolled thread
| Started by | Sudeep Holla <sudeep.holla@arm.com> |
|---|---|
| First post | 2015-09-21 17:50 +0200 |
| Last post | 2015-09-22 11:50 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 16/17] pinctrl: single: remove misuse of IRQF_NO_SUSPEND flag Sudeep Holla <sudeep.holla@arm.com> - 2015-09-21 17:50 +0200
Re: [PATCH 16/17] pinctrl: single: remove misuse of IRQF_NO_SUSPEND flag Thomas Gleixner <tglx@linutronix.de> - 2015-09-21 21:00 +0200
Re: [PATCH 16/17] pinctrl: single: remove misuse of IRQF_NO_SUSPEND flag Sudeep Holla <sudeep.holla@arm.com> - 2015-09-22 11:50 +0200
| From | Sudeep Holla <sudeep.holla@arm.com> |
|---|---|
| Date | 2015-09-21 17:50 +0200 |
| Subject | [PATCH 16/17] pinctrl: single: remove misuse of IRQF_NO_SUSPEND flag |
| Message-ID | <qbbvQ-2wt-15@gated-at.bofh.it> |
The IRQF_NO_SUSPEND flag is used to identify the interrupts that should
be left enabled so as to allow them to work as expected during the
suspend-resume cycle, but doesn't guarantee that it will wake the system
from a suspended state, enable_irq_wake is recommended to be used for
the wakeup.
This patch removes the use of IRQF_NO_SUSPEND flags replacing it with
irq_set_irq_wake instead.
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
drivers/pinctrl/pinctrl-single.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
index ef04b962c3d5..a5d0f0e52de1 100644
--- a/drivers/pinctrl/pinctrl-single.c
+++ b/drivers/pinctrl/pinctrl-single.c
@@ -1615,12 +1615,14 @@ static void pcs_irq_unmask(struct irq_data *d)
*/
static int pcs_irq_set_wake(struct irq_data *d, unsigned int state)
{
+ struct pcs_soc_data *pcs_soc = irq_data_get_irq_chip_data(d);
+
if (state)
pcs_irq_unmask(d);
else
pcs_irq_mask(d);
- return 0;
+ return irq_set_irq_wake(pcs_soc->irq, state);
}
/**
@@ -1755,8 +1757,7 @@ static int pcs_irq_init_chained_handler(struct pcs_device *pcs,
int res;
res = request_irq(pcs_soc->irq, pcs_irq_handler,
- IRQF_SHARED | IRQF_NO_SUSPEND |
- IRQF_NO_THREAD,
+ IRQF_SHARED | IRQF_NO_THREAD,
name, pcs_soc);
if (res) {
pcs_soc->irq = -1;
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Thomas Gleixner <tglx@linutronix.de> |
|---|---|
| Date | 2015-09-21 21:00 +0200 |
| Subject | Re: [PATCH 16/17] pinctrl: single: remove misuse of IRQF_NO_SUSPEND flag |
| Message-ID | <qbetI-6Kf-47@gated-at.bofh.it> |
| In reply to | #1229490 |
On Mon, 21 Sep 2015, Sudeep Holla wrote:
> The IRQF_NO_SUSPEND flag is used to identify the interrupts that should
> be left enabled so as to allow them to work as expected during the
> suspend-resume cycle, but doesn't guarantee that it will wake the system
> from a suspended state, enable_irq_wake is recommended to be used for
> the wakeup.
>
> This patch removes the use of IRQF_NO_SUSPEND flags replacing it with
> irq_set_irq_wake instead.
>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: linux-gpio@vger.kernel.org
> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
> ---
> drivers/pinctrl/pinctrl-single.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
> index ef04b962c3d5..a5d0f0e52de1 100644
> --- a/drivers/pinctrl/pinctrl-single.c
> +++ b/drivers/pinctrl/pinctrl-single.c
> @@ -1615,12 +1615,14 @@ static void pcs_irq_unmask(struct irq_data *d)
> */
> static int pcs_irq_set_wake(struct irq_data *d, unsigned int state)
> {
> + struct pcs_soc_data *pcs_soc = irq_data_get_irq_chip_data(d);
> +
> if (state)
> pcs_irq_unmask(d);
> else
> pcs_irq_mask(d);
>
> - return 0;
> + return irq_set_irq_wake(pcs_soc->irq, state);
That's going to create at least a lockdep splat due to nesting
irq_desc->lock.
Thanks,
tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Sudeep Holla <sudeep.holla@arm.com> |
|---|---|
| Date | 2015-09-22 11:50 +0200 |
| Subject | Re: [PATCH 16/17] pinctrl: single: remove misuse of IRQF_NO_SUSPEND flag |
| Message-ID | <qbsmZ-1AY-7@gated-at.bofh.it> |
| In reply to | #1229662 |
On 21/09/15 19:53, Thomas Gleixner wrote:
> On Mon, 21 Sep 2015, Sudeep Holla wrote:
>> The IRQF_NO_SUSPEND flag is used to identify the interrupts that should
>> be left enabled so as to allow them to work as expected during the
>> suspend-resume cycle, but doesn't guarantee that it will wake the system
>> from a suspended state, enable_irq_wake is recommended to be used for
>> the wakeup.
>>
>> This patch removes the use of IRQF_NO_SUSPEND flags replacing it with
>> irq_set_irq_wake instead.
>>
>> Cc: Linus Walleij <linus.walleij@linaro.org>
>> Cc: linux-gpio@vger.kernel.org
>> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
>> ---
>> drivers/pinctrl/pinctrl-single.c | 7 ++++---
>> 1 file changed, 4 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
>> index ef04b962c3d5..a5d0f0e52de1 100644
>> --- a/drivers/pinctrl/pinctrl-single.c
>> +++ b/drivers/pinctrl/pinctrl-single.c
>> @@ -1615,12 +1615,14 @@ static void pcs_irq_unmask(struct irq_data *d)
>> */
>> static int pcs_irq_set_wake(struct irq_data *d, unsigned int state)
>> {
>> + struct pcs_soc_data *pcs_soc = irq_data_get_irq_chip_data(d);
>> +
>> if (state)
>> pcs_irq_unmask(d);
>> else
>> pcs_irq_mask(d);
>>
>> - return 0;
>> + return irq_set_irq_wake(pcs_soc->irq, state);
>
> That's going to create at least a lockdep splat due to nesting
> irq_desc->lock.
>
Ah right, I noted that I must fix it when you pointed out similar issue
on the other thread[1]. I forgot later, sorry will look into that.
Regards,
Sudeep
[1] https://lkml.org/lkml/2015/9/8/617
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web