All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pantelis Antoniou <panto@antoniou-consulting.com>
To: Kevin Hilman <khilman@linaro.org>
Cc: "Tony Lindgren" <tony@atomide.com>,
	"Russell King" <linux@arm.linux.org.uk>,
	"Benoît Cousson" <benoit.cousson@gmail.com>,
	"Paul Walmsley" <paul@pwsan.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"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 3/5] omap: Properly handle resources for omap_devices
Date: Fri, 9 Aug 2013 21:08:23 +0300	[thread overview]
Message-ID: <9212EC22-CD28-4D32-8EE0-F291B93719A6@antoniou-consulting.com> (raw)
In-Reply-To: <87ioze7rfx.fsf@kernel.org>

Hi Kevin,

On Aug 9, 2013, at 7:35 PM, Kevin Hilman wrote:

> Pantelis Antoniou <panto@antoniou-consulting.com> writes:
> 
>> Hi
>> On Aug 9, 2013, at 6:16 PM, Kevin Hilman wrote:
>> 
>>> Pantelis Antoniou <panto@antoniou-consulting.com> writes:
>>> 
>>>> Hi Kevin,
>>>> 
>>>> On Aug 7, 2013, at 9:45 PM, Kevin Hilman wrote:
>>>> 
>>>>> [fixing address for Benoit]
>>>>> 
>>>>> Pantelis Antoniou <panto@antoniou-consulting.com> writes:
>>>>> 
>>>>>> omap_device relies on the platform notifier callbacks managing resources
>>>>>> behind the scenes. The resources were not properly linked causing crashes
>>>>>> when removing the device.
>>>>>> 
>>>>>> Rework the resource modification code so that linking is performed properly,
>>>>>> and make sure that no resources that have no parent (which can happen for DMA
>>>>>> & IRQ resources) are ever left for cleanup by the core resource layer.
>>>>>> 
>>>>>> Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
>>>>> 
>>>>> This one failed my "took more than 15 minutes to understand" test.  The
>>>>> changelog is rather vague (especially about what "properly" means), and
>>>>> the combination of moving code and changing it makes the patch rather
>>>>> clunky to read, so I remain a bit confused about what the actual problem
>>>>> is.  Please elaborate.
>>>>> 
>>>>> Also, could you share a crash dump as well as details about how to
>>>>> reproduce this problem?
>>>>> 
>>>>> Thanks,
>>>>> 
>>>>> Kevin
>>>> 
>>>> It's the full patchset that fixes the problem:
>>>> 
>>>> Let me illustrate:
>>>> 
>>>> The kernel I use is located at:
>>>> 
>>>> git@github.com:pantoniou/linux-beagle-track-mainline.git
>>>> branch: merge-20130806 (there are topic branches for other stuff too)
>>> 
>>> Sorry, I don't have the time to go through a bunch of out of tree
>>> branches to figure this out.  Can you create a simpler test case to
>>> reproduce this?  e.g. Does this happen when building the serial driver
>>> as a module and then removing it?  If not, why not?
>> 
>> What 'bunch of out of tree branches'? There is a single merge branch against
>> current mainline. 
> 
> And That branch contains multiple other branches (as you stated yourself
> above), many of which look to be out of tree:
> 
> $ git log --oneline --merges  panto/master..panto/merge-20130806
> 031297e Merge branch 'lcdc-fixes' into merge-20130806
> 44cf018 Merge branch 'usb-fixes' into merge-20130806
> 3cc739b Merge branch 'tscadc' into merge-20130806
> f0ec35d Merge branch 'capemgr' into merge-20130806
> 4d87712 Merge branch 'general-fixes' into merge-20130806
> 04535fb Merge branch 'pinctrl-fixes' into merge-20130806
> 5115b55 Merge branch 'i2c-fixes' into merge-20130806
> e96edf5 Merge branch 'capes' into merge-20130806
> 1eb1779 Merge branch 'dts-fixes' into merge-20130806
> ca12149 Merge branch 'mmc-fixes' into merge-20130806
> 41ed7a0 Merge branch 'pdev-fixes' into merge-20130806
> 2ba9995 Merge branch 'of-fixes' into merge-20130806
> 38b5cb4 Merge branch 'dtc-overlays' into merge-20130806
> 167648d Merge branch 'dtc-fixes' into merge-20130806
> 2f7de02 Merge branch 'reset' into merge-20130806
> 
> $ git log --oneline --no-merges panto/master..panto/merge-20130806 |wc -l
> 85
> 

Yes, but they have nothing to do with the problem at hand; the only
branch that matters i pdev-fixes.

>> And no you don't trigger this by removing a module.
>> 
>> platform_driver_unregister() != platform_device_register().
>> 
>> I'll try to figure out something simpler, but it's pretty damn obvious that
>> something is not right there. 
> 
> I agree something does not seem right, and never said otherwise.  I'm
> simply looking for an easy way to reproduce it with mainline.  
> 
> Since it's so "damn obvious", I'll accept the insult and agree to being
> a moron.  Please educate me by making it even more obvious with a way to
> reproduce it against mainline.
> 

You can't reproduce it via rmmod'ing a module; it's not the same code path.
That you need to do is to call platform_device_unregister() for the affected
device on a DT enabled board.

The only platform that triggers it currently is the beaglebone with DT
overlays support.

To get it to trigger on something simpler, I'll have to write a pretty
elaborate module where I register the device and then immediately unregister
it.

>> Do you think fixing problems in that part of platform device removal
>> was something I did because I didn't have other things to do?
> 
> Settle down, I said nothing of the sort.
> 
> On the contrary, I assumed you were being a generous citizen of the
> community and contributing back your fixes, and as a developer of this
> part of the kernel, I'm trying to help.  If I didn't care, I wouldn't
> have responded in the first place.
> 

OK

>> It is broken and I'm trying to get it fixed. Are you?
> 
> I was, but your accusatory tone is reducing my motivation to help.
> 

I guess that's a fair accusation; sorry for coming out a bit strong here.

Anyway, I'll see what it takes to come up with a test module that exhibits the issue
easier.

> Kevin
> 

Regards

-- Pantelis


  reply	other threads:[~2013-08-09 18:08 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
     [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 [this message]
     [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=9212EC22-CD28-4D32-8EE0-F291B93719A6@antoniou-consulting.com \
    --to=panto@antoniou-consulting.com \
    --cc=Russ.Dill@ti.com \
    --cc=balbi@ti.com \
    --cc=benoit.cousson@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=khilman@linaro.org \
    --cc=koen@circuitco.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=paul@pwsan.com \
    --cc=sourav.poddar@ti.com \
    --cc=tony@atomide.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 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.