All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@deeprootsystems.com>
To: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Govindraj <govindraj.ti@gmail.com>,
	Paul Walmsley <paul@pwsan.com>,
	linux-omap@vger.kernel.org
Subject: Re: Unbalanced IRQ wake disable during resume from static suspend
Date: Thu, 02 Dec 2010 15:15:50 +0100	[thread overview]
Message-ID: <87y6882rc9.fsf@deeprootsystems.com> (raw)
In-Reply-To: <09fd160109a43efec9a472055d541c9e@mail.gmail.com> (Santosh Shilimkar's message of "Thu, 2 Dec 2010 16:40:28 +0530")

Santosh Shilimkar <santosh.shilimkar@ti.com> writes:

[...]

> Here is the refreshed version with change log. Also
> attached the patch in case google mails raps it up.
>
> From 0170159ae34957efb839d9143123f7ced795f62e Mon Sep 17 00:00:00 2001
> From: Santosh Shilimkar <santosh.shilimkar@ti.com>
> Date: Thu, 2 Dec 2010 14:36:17 +0530
> Subject: [PATCH] omap: irq: Dummy handler for enable_irq_wake
>
> With PM enabled, enable_irq_wake() has a callback for
> interrupt controllers. But since omap INTC handler did not had this
> call back associated, it was always returning -ENXIO, which was
> breaking the existing drivers. This patch adds dummy handlers in
> in order to avoid breaking of existing drivers.

Can you describe a little more exacly how drivers were being broken
(e.g. describe why this caused unbalanced IRQs, etc.)

Other than that this looks like the right fix.

I guess this hasn't been seen before since we haven't tested the sysfs
wakeup interface for the omap-serial driver.  For on-chip OMAP UARTs,
using the sysfs interface isn't needed as the serial core is already
doing device_init_wakeup(dev, true);

Kevin

> Without this patch you get below warnings with wakeup enabled on devices
>
> ------------[ cut here ]------------
> WARNING: at kernel/irq/manage.c:382 set_irq_wake+0x80/0xe4()
> Unbalanced IRQ 72 wake disable
> Modules linked in:
> [<c0062a28>] (unwind_backtrace+0x0/0xec) from [<c0092260>]
> (warn_slowpath_common+0x4c/0x64)
> [<c0092260>] (warn_slowpath_common+0x4c/0x64) from [<c00922f8>]
> (warn_slowpath_fmt+0x2c/0x3c
>
> [<c00922f8>] (warn_slowpath_fmt+0x2c/0x3c) from [<c00d3238>]
> (set_irq_wake+0x80/0xe4)
> [<c00d3238>] (set_irq_wake+0x80/0xe4) from [<c029dd60>]
> (uart_resume_port+0x84/0x248)
> [<c029dd60>] (uart_resume_port+0x84/0x248) from [<c02a2338>]
> (serial_omap_resume+0x20/0x2c)
> [<c02a2338>] (serial_omap_resume+0x20/0x2c) from [<c02a92d4>]
> (platform_pm_resume+0x48/0x54)
> [<c02a92d4>] (platform_pm_resume+0x48/0x54) from [<c02abd1c>]
> (pm_op+0x6c/0xac)
> [<c02abd1c>] (pm_op+0x6c/0xac) from [<c02ac0fc>]
> (device_resume+0x58/0x10c)
> [<c02ac0fc>] (device_resume+0x58/0x10c) from [<c02ac2ec>]
> (dpm_resume_end+0xf4/0x360)
> [<c02ac2ec>] (dpm_resume_end+0xf4/0x360) from [<c00cf58c>]
> (suspend_devices_and_enter+0x1ac/
> 0x200)
> [<c00cf58c>] (suspend_devices_and_enter+0x1ac/0x200) from [<c00cf6c0>]
> (enter_state+0xe0/0x1
> 38)
> [<c00cf6c0>] (enter_state+0xe0/0x138) from [<c00ced18>]
> (state_store+0x90/0xb8)
> [<c00ced18>] (state_store+0x90/0xb8) from [<c0243b98>]
> (kobj_attr_store+0x18/0x1c)
> [<c0243b98>] (kobj_attr_store+0x18/0x1c) from [<c0176128>]
> (sysfs_write_file+0x10c/0x144)
> [<c0176128>] (sysfs_write_file+0x10c/0x144) from [<c0125528>]
> (vfs_write+0xac/0x134)
> [<c0125528>] (vfs_write+0xac/0x134) from [<c012565c>]
> (sys_write+0x3c/0x68)
> [<c012565c>] (sys_write+0x3c/0x68) from [<c005bb00>]
> (ret_fast_syscall+0x0/0x3c)
> ---[ end trace 19fe50b7b47ba94f ]---
>
> Reported-by: Paul Walmsley <paul@pwsan.com>
> Tested-by: Govindraj.R <govindraj.raja@ti.com>
>
> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
> ---
>  arch/arm/mach-omap2/irq.c |   10 ++++++++++
>  1 files changed, 10 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
> index 32eeabe..6a964d3 100644
> --- a/arch/arm/mach-omap2/irq.c
> +++ b/arch/arm/mach-omap2/irq.c
> @@ -143,11 +143,21 @@ static void omap_mask_ack_irq(unsigned int irq)
>  	omap_ack_irq(irq);
>  }
>
> +#ifdef CONFIG_PM
> +static int omap_set_wake(unsigned int irq, unsigned int on)
> +{
> +	return 0;
> +}
> +#else
> +#define omap_set_wake NULL
> +#endif
> +
>  static struct irq_chip omap_irq_chip = {
>  	.name	= "INTC",
>  	.ack	= omap_mask_ack_irq,
>  	.mask	= omap_mask_irq,
>  	.unmask	= omap_unmask_irq,
> +	.set_wake = omap_set_wake,
>  };
>
>  static void __init omap_irq_bank_init_one(struct omap_irq_bank *bank)

  reply	other threads:[~2010-12-02 14:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-02  8:05 Unbalanced IRQ wake disable during resume from static suspend Paul Walmsley
2010-12-02  8:14 ` Paul Walmsley
2010-12-02  9:08   ` Santosh Shilimkar
2010-12-02 10:34     ` Govindraj
2010-12-02 11:10       ` Santosh Shilimkar
2010-12-02 14:15         ` Kevin Hilman [this message]
2010-12-02 14:54           ` Santosh Shilimkar
2010-12-03 10:00           ` Paul Walmsley
2010-12-07 21:32             ` Kevin Hilman
2010-12-03 10:23     ` Paul Walmsley
2010-12-03 11:08       ` Santosh Shilimkar
2010-12-03 11:20         ` Govindraj
2010-12-03 11:26           ` Santosh Shilimkar
2010-12-09 18:20           ` Kevin Hilman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y6882rc9.fsf@deeprootsystems.com \
    --to=khilman@deeprootsystems.com \
    --cc=govindraj.ti@gmail.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=paul@pwsan.com \
    --cc=santosh.shilimkar@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.