linux-samsung-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Sebastian Reichel <sebastian.reichel@collabora.com>,
	Matheus Castello <matheus@castello.eng.br>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Subject: Re: [PATCH] power: supply: max17040: Correct IRQ wake handling
Date: Mon, 13 Jan 2020 09:34:03 +0100	[thread overview]
Message-ID: <20200113083403.GA1320@pi3> (raw)
In-Reply-To: <20200110100540.27371-1-m.szyprowski@samsung.com>

On Fri, Jan 10, 2020 at 11:05:40AM +0100, Marek Szyprowski wrote:
> Don't disable IRQ wake feature without prior enabling it.
> 
> This fixes following warning observed on Exynos3250-based Rinato board:
> ------------[ cut here ]------------
> WARNING: CPU: 0 PID: 1288 at kernel/irq/manage.c:724 irq_set_irq_wake+0xfc/0x134
> Unbalanced IRQ 83 wake disable
> Modules linked in:
> CPU: 0 PID: 1288 Comm: rtcwake Not tainted 5.5.0-rc5-next-20200110-00031-g6289fffbb3f5 #7266
> Hardware name: Samsung Exynos (Flattened Device Tree)
> [<c0112e48>] (unwind_backtrace) from [<c010e090>] (show_stack+0x10/0x14)
> [<c010e090>] (show_stack) from [<c0b25b28>] (dump_stack+0xa4/0xd0)
> [<c0b25b28>] (dump_stack) from [<c0128088>] (__warn+0xf4/0x10c)
> [<c0128088>] (__warn) from [<c0128114>] (warn_slowpath_fmt+0x74/0xb8)
> [<c0128114>] (warn_slowpath_fmt) from [<c019e9a0>] (irq_set_irq_wake+0xfc/0x134)
> [<c019e9a0>] (irq_set_irq_wake) from [<c0772708>] (max17040_suspend+0x50/0x58)
> [<c0772708>] (max17040_suspend) from [<c05f55ac>] (dpm_run_callback+0xb4/0x400)
> [<c05f55ac>] (dpm_run_callback) from [<c05f5e38>] (__device_suspend+0x140/0x814)
> [<c05f5e38>] (__device_suspend) from [<c05f9548>] (dpm_suspend+0x16c/0x564)
> [<c05f9548>] (dpm_suspend) from [<c05fa2e4>] (dpm_suspend_start+0x90/0x98)
> [<c05fa2e4>] (dpm_suspend_start) from [<c01977f4>] (suspend_devices_and_enter+0xec/0xc0c)
> [<c01977f4>] (suspend_devices_and_enter) from [<c019862c>] (pm_suspend+0x318/0x3e8)
> [<c019862c>] (pm_suspend) from [<c01963cc>] (state_store+0x68/0xc8)
> [<c01963cc>] (state_store) from [<c03531a4>] (kernfs_fop_write+0x10c/0x220)
> [<c03531a4>] (kernfs_fop_write) from [<c02b44c4>] (__vfs_write+0x2c/0x1c4)
> [<c02b44c4>] (__vfs_write) from [<c02b7288>] (vfs_write+0xa4/0x180)
> [<c02b7288>] (vfs_write) from [<c02b74d0>] (ksys_write+0x58/0xcc)
> [<c02b74d0>] (ksys_write) from [<c0101000>] (ret_fast_syscall+0x0/0x28)
> Exception stack(0xd6e83fa8 to 0xd6e83ff0)
> ...
> irq event stamp: 18028
> hardirqs last  enabled at (18027): [<c014b99c>] cancel_delayed_work+0x84/0xf8
> hardirqs last disabled at (18028): [<c0b49b1c>] _raw_spin_lock_irqsave+0x1c/0x58
> softirqs last  enabled at (17876): [<c01026d8>] __do_softirq+0x4f0/0x5e4
> softirqs last disabled at (17869): [<c0130d34>] irq_exit+0x16c/0x170
> ---[ end trace 0728005730004e60 ]---
> 
> Fixes: 2e17ed94de68 ("power: supply: max17040: Add IRQ handler for low SOC alert")
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
>  drivers/power/supply/max17040_battery.c | 16 ++++------------
>  1 file changed, 4 insertions(+), 12 deletions(-)

Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof


  reply	other threads:[~2020-01-13  8:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20200110100620eucas1p12fff62b485570e93b283e23c7a9e5b57@eucas1p1.samsung.com>
2020-01-10 10:05 ` [PATCH] power: supply: max17040: Correct IRQ wake handling Marek Szyprowski
2020-01-13  8:34   ` Krzysztof Kozlowski [this message]
2020-01-14  0:28   ` Sebastian Reichel

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=20200113083403.GA1320@pi3 \
    --to=krzk@kernel.org \
    --cc=b.zolnierkie@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=matheus@castello.eng.br \
    --cc=sebastian.reichel@collabora.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 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).