From: Andrzej Hajda <a.hajda@samsung.com>
To: Javier Martinez Canillas <javier@dowhile0.org>,
Inki Dae <inki.dae@samsung.com>
Cc: Sjoerd Simons <sjoerd.simons@collabora.co.uk>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
David Airlie <airlied@linux.ie>,
"linux-samsung-soc@vger.kernel.org"
<linux-samsung-soc@vger.kernel.org>,
Kevin Hilman <khilman@deeprootsystems.com>
Subject: Re: [PATCH] drm/exynos: fix infinite loop issue incurred by no pair
Date: Tue, 18 Nov 2014 11:48:12 +0100 [thread overview]
Message-ID: <546B23EC.3070601@samsung.com> (raw)
In-Reply-To: <CABxcv=kPShghFWcy_M9FxZ0m3aYghkLVex857YpCWuiM+tSp3w@mail.gmail.com>
On 11/18/2014 11:23 AM, Javier Martinez Canillas wrote:
> Hello Inki,
>
>> Right, but at least, we could avoid kernel booting failure which is very
>> critical. Please know that this patch is temporary to avoid the kernel
>> booting failure although deferred probe request of Exynos drm could be
>> broken. For this, I will look into dd core to find out more generic way:
>> I suspect that this might be incurred in case that a driver is probed in
>> probe context of other driver or it might be really dd core bug.
>>
>
> I gave a try to your patch on top of today's linux-next and I still
> see the same boot failure reported by Kevin on a Exynos5420 Peach Pit
> so $subject does not fix the issue. The boot message is [0] fyi.
>
> By digging a bit I noticed that this happens when the
> exynos_drm_platform_probe() calls platform_driver_register() to
> register the Exynos fimd platform driver. The problem is that in
> __driver_attach() the call to device_lock(dev->parent) never returns
> and the thread sleeps forever waiting for the device parent mutex to
> be released.
>
> Do you have any ideas why this could happen?
>
> If I modify __driver_attach() to only grab the device lock and not its
> parent lock, then the thread is able to hold its own mutex and the
> platform driver registration succeeds but then I see the infinite loop
> that was reported before and the workaround in $subject indeed avoids
> to happen.
>
> So we have two issues here and your patch is only a workaround for the later.
This is the same issue Krzysztof reported two weeks ago and I answered
him with my diagnosis[1].
[1]: http://permalink.gmane.org/gmane.linux.kernel.samsung-soc/39804
Regards
Andrzej
>
> Best regards,
> Javier
>
> [0]:
> [ 1.324091] [drm] Initialized drm 1.1.0 20060810
> [ 240.158665] random: nonblocking pool is initialized
> [ 240.162202] INFO: task swapper/0:1 blocked for more than 120 seconds.
> [ 240.168493] Not tainted 3.18.0-rc4-next-20141117-00001-g85466f9 #22
> [ 240.175256] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs"
> disables this message.
> [ 240.183064] swapper/0 D c045bb00 0 1 0 0x00000000
> [ 240.189410] [<c045bb00>] (__schedule) from [<c045c230>]
> (schedule_preempt_disabled+0x14/0x20)
> [ 240.197904] [<c045c230>] (schedule_preempt_disabled) from
> [<c045e998>] (__mutex_lock_slowpath+0x19c/0x3f4)
> [ 240.207531] [<c045e998>] (__mutex_lock_slowpath) from [<c045ebfc>]
> (mutex_lock+0xc/0x24)
> [ 240.215599] [<c045ebfc>] (mutex_lock) from [<c0281718>]
> (__driver_attach+0x44/0x90)
> [ 240.223239] [<c0281718>] (__driver_attach) from [<c027ff30>]
> (bus_for_each_dev+0x54/0x88)
> [ 240.231387] [<c027ff30>] (bus_for_each_dev) from [<c0280da0>]
> (bus_add_driver+0xd8/0x1cc)
> [ 240.239541] [<c0280da0>] (bus_add_driver) from [<c0281d80>]
> (driver_register+0x78/0xf4)
> [ 240.247523] [<c0281d80>] (driver_register) from [<c0274324>]
> (exynos_drm_platform_probe+0x34/0x188)
> [ 240.256546] [<c0274324>] (exynos_drm_platform_probe) from
> [<c02829d8>] (platform_drv_probe+0x48/0x98)
> [ 240.265739] [<c02829d8>] (platform_drv_probe) from [<c02815b4>]
> (driver_probe_device+0x114/0x234)
> [ 240.274588] [<c02815b4>] (driver_probe_device) from [<c0281760>]
> (__driver_attach+0x8c/0x90)
> [ 240.283003] [<c0281760>] (__driver_attach) from [<c027ff30>]
> (bus_for_each_dev+0x54/0x88)
> [ 240.291158] [<c027ff30>] (bus_for_each_dev) from [<c0280da0>]
> (bus_add_driver+0xd8/0x1cc)
> [ 240.299311] [<c0280da0>] (bus_add_driver) from [<c0281d80>]
> (driver_register+0x78/0xf4)
> [ 240.307293] [<c0281d80>] (driver_register) from [<c02742a4>]
> (exynos_drm_init+0x84/0xd0)
> [ 240.315362] [<c02742a4>] (exynos_drm_init) from [<c0008944>]
> (do_one_initcall+0x80/0x1d0)
> [ 240.323521] [<c0008944>] (do_one_initcall) from [<c0624d3c>]
> (kernel_init_freeable+0x108/0x1d4)
> [ 240.332191] [<c0624d3c>] (kernel_init_freeable) from [<c0457224>]
> (kernel_init+0x8/0xe4)
> [ 240.340261] [<c0457224>] (kernel_init) from [<c000e638>]
> (ret_from_fork+0x14/0x3c)
>
next prev parent reply other threads:[~2014-11-18 10:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-18 3:20 [PATCH] drm/exynos: fix infinite loop issue incurred by no pair Inki Dae
2014-11-18 7:58 ` Sjoerd Simons
2014-11-18 8:20 ` Inki Dae
2014-11-18 10:23 ` Javier Martinez Canillas
2014-11-18 10:45 ` Inki Dae
2014-11-18 10:48 ` Andrzej Hajda [this message]
2014-11-18 10:53 ` Javier Martinez Canillas
2014-11-18 13:31 ` Inki Dae
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=546B23EC.3070601@samsung.com \
--to=a.hajda@samsung.com \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=inki.dae@samsung.com \
--cc=javier@dowhile0.org \
--cc=khilman@deeprootsystems.com \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=sjoerd.simons@collabora.co.uk \
/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.