All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
To: Johan Hovold <johan-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Bin Liu <b-liu-l0cyMroinI0@public.gmane.org>,
	linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: musb RPM sleep-while-atomic in 4.9-rc1
Date: Fri, 21 Oct 2016 00:08:49 -0700	[thread overview]
Message-ID: <20161021070848.rum7wrlihjayqdbh@atomide.com> (raw)
In-Reply-To: <20161020153749.GC12413@localhost>

* Johan Hovold <johan-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> [161020 08:38]:
> Hi Tony,
> 
> I'm getting the splat below when booting 4.9-rc1 on a BBB and
> tracked it down to 65b3f50ed6fa ("usb: musb: Add PM runtime support for
> MUSB DSPS glue layer") which added a synchronous RPM get in a timer
> callback:

OK, sorry to hear about that. Care to email me your .config and how
to reproduce and what do you have connected like a hub? Also do
you use built-in gadgets or configure them via configfs?

> [    6.466226] BUG: sleeping function called from invalid context at /home/johan/work/omicron/src/linux/drivers/base/power/runtime.c:955
> [    6.478850] in_atomic(): 1, irqs_disabled(): 0, pid: 59, name: grep
> [    6.485434] 1 lock held by grep/59:
> [    6.489102]  #0: [    6.490966]  (
> ((&glue->timer))[    6.494206] ){+.-...}
> , at: [    6.497194] [<c0191084>] call_timer_fn+0x0/0x41c
> [    6.502048] Preemption disabled at:[    6.505540] [<c01015e0>] __do_softirq+0x80/0x594
> [    6.510393] 
> [    6.511974] CPU: 0 PID: 59 Comm: grep Not tainted 4.9.0-rc1 #46
> [    6.518190] Hardware name: Generic AM33XX (Flattened Device Tree)
> [    6.524613] [<c01116e4>] (unwind_backtrace) from [<c010dec0>] (show_stack+0x20/0x24)
> [    6.532753] [<c010dec0>] (show_stack) from [<c0364f1c>] (dump_stack+0x24/0x28)
> [    6.540351] [<c0364f1c>] (dump_stack) from [<c015ea58>] (___might_sleep+0x1d8/0x2c4)
> [    6.548486] [<c015ea58>] (___might_sleep) from [<c015ebb4>] (__might_sleep+0x70/0xa8)
> [    6.556720] [<c015ebb4>] (__might_sleep) from [<c0413d60>] (__pm_runtime_resume+0x9c/0xa0)
> [    6.565404] [<c0413d60>] (__pm_runtime_resume) from [<c04d0bc4>] (otg_timer+0x3c/0x254)
> [    6.573813] [<c04d0bc4>] (otg_timer) from [<c0191180>] (call_timer_fn+0xfc/0x41c)
> [    6.581675] [<c0191180>] (call_timer_fn) from [<c01915c0>] (expire_timers+0x120/0x210)
> [    6.589990] [<c01915c0>] (expire_timers) from [<c0191acc>] (run_timer_softirq+0xa4/0xdc)
> [    6.598487] [<c0191acc>] (run_timer_softirq) from [<c010168c>] (__do_softirq+0x12c/0x594)
> [    6.607079] [<c010168c>] (__do_softirq) from [<c01384cc>] (irq_exit+0xf4/0x130)
> [    6.614766] [<c01384cc>] (irq_exit) from [<c017d910>] (__handle_domain_irq+0x84/0xec)
> [    6.622991] [<c017d910>] (__handle_domain_irq) from [<c0101500>] (omap_intc_handle_irq+0x44/0xa0)
> [    6.632306] [<c0101500>] (omap_intc_handle_irq) from [<c010ee78>] (__irq_usr+0x58/0x80)
> [    6.640716] Exception stack(0xcf669fb0 to 0xcf669ff8)
> [    6.646028] 9fa0:                                     b6fd5050 0012ebb0 b6e71058 b6e1c088
> [    6.654614] 9fc0: b6e07000 00000001 b6e1cb10 b6fd5000 00000001 00000000 b6fd38e8 bec32a54
> [    6.663198] 9fe0: b6e1c870 bec32990 b6fb0a20 b6fb9758 20030010 ffffffff
> 
> Setting the irq_safe flag seems to do the trick, but not sure that's
> what you intended to do.

That's what we want to avoid as it keep the parent device permanently
enabled. To avoid that we want to just queue things and deal with them
from pm_runtime_resume.

> I saw you posted some regression fixes lately, but they did not look
> related to this at first glance at least.

Yeah this seems different. Can you still try v4.9-rc + patches from
thread "[PATCH 0/2] Fixes for two more musb regressions"?

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2016-10-21  7:08 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-20 15:37 musb RPM sleep-while-atomic in 4.9-rc1 Johan Hovold
2016-10-21  7:08 ` Tony Lindgren [this message]
     [not found]   ` <20161021070848.rum7wrlihjayqdbh-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2016-10-21  9:25     ` Johan Hovold
2016-10-21  9:49       ` Tony Lindgren
     [not found]         ` <20161021094904.q66kjsl33yzf2kir-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2016-10-21 11:07           ` Johan Hovold
2016-10-21 11:27             ` Tony Lindgren
     [not found]               ` <20161021112745.lancojpgv4h6aqpw-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2016-10-24 17:35                 ` Tony Lindgren
     [not found]                   ` <20161024173538.26xvlitxiwjmh4fx-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2016-10-25  8:32                     ` Johan Hovold
2016-10-25 15:11                       ` Tony Lindgren
     [not found]                         ` <20161025151110.vih52s47a2g2col5-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2016-10-26 14:20                           ` Johan Hovold
2016-10-26 14:31                             ` Tony Lindgren
     [not found]                               ` <20161026143100.rg4pse6mjyq32hxm-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2016-10-27 15:14                                 ` Tony Lindgren
     [not found]                                   ` <20161027151446.ffj6w2tydf6ymv7c-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2016-10-27 16:44                                     ` Johan Hovold
2016-10-27 17:40                                       ` Tony Lindgren
     [not found]                                         ` <20161027174016.43twztwekvb3b25t-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2016-10-27 18:45                                           ` Johan Hovold
2016-10-27 19:15                                             ` Tony Lindgren
     [not found]                                               ` <20161027191552.tuutyslp5qtu2b4f-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2016-10-28  9:44                                                 ` Johan Hovold
2016-10-28 18:13                                                   ` Tony Lindgren
     [not found]                                                     ` <20161028181318.umwn3rx55pg2cvwd-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2016-10-31 11:49                                                       ` Johan Hovold
2016-11-03 21:26                                                         ` Tony Lindgren
     [not found]                                                           ` <20161103212635.GC21430-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2016-11-03 22:01                                                             ` Ladislav Michl
2016-11-04 14:16                                                             ` Johan Hovold
2016-11-04 15:13                                                               ` Tony Lindgren
2016-11-07 18:28                                                               ` Tony Lindgren

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=20161021070848.rum7wrlihjayqdbh@atomide.com \
    --to=tony-4v6ys6ai5vpbdgjk7y7tuq@public.gmane.org \
    --cc=b-liu-l0cyMroinI0@public.gmane.org \
    --cc=johan-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /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.