linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Pantelis Antoniou <panto@antoniou-consulting.com>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Russell King" <linux@arm.linux.org.uk>,
	"Benoît Coussno" <b-cousson@ti.com>,
	"Paul Walmsley" <paul@pwsan.com>,
	"Sourav Poddar" <sourav.poddar@ti.com>,
	"Russ Dill" <Russ.Dill@ti.com>, "Felipe Balbi" <balbi@ti.com>,
	"Koen Kooi" <koen@circuitco.com>,
	linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/5] arm: omap: Proper cleanups for omap_device
Date: Thu, 8 Aug 2013 00:25:14 -0700	[thread overview]
Message-ID: <20130808072513.GY7656@atomide.com> (raw)
In-Reply-To: <4B64047B-505F-4D54-871B-8F1B5315B613@antoniou-consulting.com>

* Pantelis Antoniou <panto@antoniou-consulting.com> [130807 09:31]:
> Hi Tony,
> 
> On Aug 7, 2013, at 7:15 PM, Tony Lindgren wrote:
> 
> > * Pantelis Antoniou <panto@antoniou-consulting.com> [130806 02:44]:
> >> On Aug 6, 2013, at 12:33 PM, Greg Kroah-Hartman wrote:
> >>> On Tue, Aug 06, 2013 at 10:53:44AM +0300, Pantelis Antoniou wrote:
> >>>> +
> >>>> static int _omap_device_notifier_call(struct notifier_block *nb,
> >>>> 				      unsigned long event, void *dev)
> >>>> {
> >>>> @@ -185,9 +211,13 @@ static int _omap_device_notifier_call(struct notifier_block *nb,
> >>>> 	struct omap_device *od;
> >>>> 
> >>>> 	switch (event) {
> >>>> -	case BUS_NOTIFY_DEL_DEVICE:
> >>>> +	case BUS_NOTIFY_UNBOUND_DRIVER:
> >>>> +		/* NOTIFY_DEL_DEVICE is not the right call...
> >>>> +		 * we use a callback here, to make sure no-one is going to
> >>>> +		 * try to use the omap_device data after they're deleted
> >>>> +		 */
> >>>> 		if (pdev->archdata.od)
> >>>> -			omap_device_delete(pdev->archdata.od);
> >>>> +			device_schedule_callback(dev, _omap_device_cleanup);
> >>> 
> >>> Really?  This is one sign that you are totally using the driver core
> >>> incorrectly.  You shouldn't have to rely on notifier callbacks to handle
> >>> device removals, your bus code should do that for you directly.
> >>> 
> >>> I don't like this at all, sorry.
> >>> 
> >> 
> >> Don't shoot the messenger please...
> > 
> > As you're inititalizing capebus with DT, let's figure out what if
> > anything you actually need from omap_device. I'd much rather remove
> > dependencies than add more.
> > 
> 
> There is no such thing as capebus anymore. This is just the path of
> removing a platform device, which happens to also be an omap_device.

OK, so let's figure out the minimal fixes needed.
 
> >> This is all about fixing a crash without messing too many things.
> > 
> > It seems this fix is only needed for supporting out-of-tree code?
> > These features with omap_device we may not even want to support in
> > the mainline tree as is being discussed..
> > 
> 
> What out of tree code? The only thing this patch does is make sure we
> don't crash when a perfectly valid call to platform_device_unregister() happens.
> 
> Drivers that don't use omap_device work just fine.

So what's the minimal set of fixes then?

Regards,

Tony

  reply	other threads:[~2013-08-08  7:25 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1375775624-12250-1-git-send-email-panto@antoniou-consulting.com>
     [not found] ` <1375775624-12250-6-git-send-email-panto@antoniou-consulting.com>
2013-08-06  9:33   ` [PATCH 5/5] arm: omap: Proper cleanups for omap_device Greg Kroah-Hartman
2013-08-06  9:37     ` Pantelis Antoniou
2013-08-06 10:14       ` Greg Kroah-Hartman
2013-08-06 13:37         ` Alexander Holler
2013-08-07  5:52           ` Greg Kroah-Hartman
2013-08-07 15:22             ` Alexander Holler
2013-08-07  7:44         ` Pantelis Antoniou
2013-08-07 16:15       ` Tony Lindgren
2013-08-07 16:23         ` Pantelis Antoniou
2013-08-08  7:25           ` Tony Lindgren [this message]
     [not found] ` <1375775624-12250-2-git-send-email-panto@antoniou-consulting.com>
2013-08-06  9:36   ` [PATCH 1/5] pdev: Fix platform device resource linking Greg Kroah-Hartman
2013-08-06  9:45     ` Pantelis Antoniou
2013-08-06 10:15       ` Greg Kroah-Hartman
2013-08-06 10:19         ` Russell King - ARM Linux
2013-08-07  5:57           ` Greg Kroah-Hartman
2013-08-07  8:27             ` Russell King - ARM Linux
2013-08-06 10:27         ` Pantelis Antoniou
2013-08-07  5:56           ` Greg Kroah-Hartman
2013-08-07  7:37             ` Pantelis Antoniou
2013-08-07 17:13               ` Matt Porter
     [not found] ` <1375775624-12250-4-git-send-email-panto@antoniou-consulting.com>
     [not found]   ` <87a9kt2vd8.fsf@linaro.org>
2013-08-08  9:23     ` [PATCH 3/5] omap: Properly handle resources for omap_devices Pantelis Antoniou
2013-08-09 15:16       ` Kevin Hilman
2013-08-09 15:32         ` Pantelis Antoniou
2013-08-09 16:35           ` Kevin Hilman
2013-08-09 18:08             ` Pantelis Antoniou
     [not found] ` <1375775624-12250-5-git-send-email-panto@antoniou-consulting.com>
     [not found]   ` <87siyl19uk.fsf@linaro.org>
2013-08-08  9:29     ` [PATCH 4/5] omap: Avoid crashes in the case of hwmod misconfiguration Pantelis Antoniou

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=20130808072513.GY7656@atomide.com \
    --to=tony@atomide.com \
    --cc=Russ.Dill@ti.com \
    --cc=b-cousson@ti.com \
    --cc=balbi@ti.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=koen@circuitco.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=panto@antoniou-consulting.com \
    --cc=paul@pwsan.com \
    --cc=sourav.poddar@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 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).