From mboxrd@z Thu Jan 1 00:00:00 1970 From: Markus Trippelsdorf Subject: Re: Can no longer shutdown after drm/radeon: Implement radeon_pci_shutdown Date: Thu, 12 Dec 2013 14:56:14 +0100 Message-ID: <20131212135614.GA273@x4> References: <84mwk86x5a.wl%peter.chubb@nicta.com.au> <20131211072658.GA273@x4> <84txefdomu.wl%peter.chubb@nicta.com.au> <20131212025800.GA273@x4> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail.ud10.udmedia.de (ud10.udmedia.de [194.117.254.50]) by gabe.freedesktop.org (Postfix) with ESMTP id 18A7FFA9DB for ; Thu, 12 Dec 2013 05:56:16 -0800 (PST) Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org To: "Deucher, Alexander" Cc: Peter Chubb , "dri-devel@lists.freedesktop.org" List-Id: dri-devel@lists.freedesktop.org On 2013.12.12 at 03:27 +0000, Deucher, Alexander wrote: > > On 2013.12.11 at 23:46 +0000, Deucher, Alexander wrote: > > > > -----Original Message----- > > > > From: Peter Chubb [mailto:peter.chubb@nicta.com.au] > > > > Sent: Wednesday, December 11, 2013 5:11 PM > > > > To: Markus Trippelsdorf > > > > Cc: Peter Chubb; Deucher, Alexander; airlied@linux.ie; dri- > > > > devel@lists.freedesktop.org > > > > Subject: Re: Can no longer shutdown after drm/radeon: Implement > > > > radeon_pci_shutdown > > > > > > > > >>>>> "Markus" == Markus Trippelsdorf > > writes: > > > > > > > > Markus> On 2013.12.11 at 11:37 +1100, Peter Chubb wrote: > > > > > > > > Markus> It would be interesting to know where exactly it hangs. Could > > > > Markus> you comment out the *_fini(rdev) calls in > > > > Markus> radeon_driver_unload_kms > > > > (drivers/gpu/drm/radeon/radeon_kms.c) > > > > Markus> one after the other to find out which one is responsible? > > > > > > > > It's radeon_device_fini() that is the problem. > > > > > > I think the problem is that the drm subsystem tears down the device > > > via drm_driver.unload in drm_dev_unregister(), but now that we have a > > > pci_driver.shutdown callback (which is needed for kexec) that gets > > > called too so the driver gets torn down twice. > > > > If that is the case the following patch should fix the issue. > > Can you give it a try, Peter? (Peter:) > Thanks that works. I tested shutdown, kexec, and s2disk --- all work > correctly. > That may work, but I think it's just papering over a race which may > still bite someone else depending on the timing. This leaves three possibilities: 1) Revert 846ae41ae99d now and come up with a solution with proper locking for 3.14 2) Add my simple fix now and implement additional locking if the need arises for 3.14. 3) Implement a fix with proper locking now. It's your choice Alex. -- Markus