[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPybu_3gYAZTHHYD7y2MdKFJBwDVyb5a9fwQqEMc+0xmKSTpKg@mail.gmail.com>
Date: Thu, 4 Jun 2015 10:47:07 +0200
From: Ricardo Ribalda Delgado <ricardo.ribalda@...il.com>
To: Grant Likely <grant.likely@...aro.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Rob Herring <robh+dt@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Jakub Sitnicki <jsitnicki@...il.com>,
Vivek Goyal <vgoyal@...hat.com>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Jiang Liu <jiang.liu@...ux.intel.com>,
Mike Travis <travis@....com>,
Thierry Reding <treding@...dia.com>,
LKML <linux-kernel@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>
Subject: Re: [PATCH v5 2/4] base/platform: Continue on insert_resource() error
Hello Grant
On Thu, Jun 4, 2015 at 9:54 AM, Grant Likely <grant.likely@...aro.org> wrote:
>
> I'm pretty sure this is going to break some platforms. I described it in
> my earlier email today, but I'll summarize here too since this is the
> latest patch set.
The version that is in stable is also broken. Unloading the device
tree crashes the device completely.
>
> Making this change allows the registration of devices to continue, but
> it will still break device drivers that do a request_resource() on a
> region that another device managed to claim with insert_resource(). The
> only way around this is to not do insert_resource() at all, or to remove
> the request_resource() from all drivers (not feasible).
If we do not do insert_resource(), we will have the crash on
release_resource() and a lot! of code duplication.
>
> I think we have to deal with it by making resource insertion optional.
> I'd like to make the default be to do the insertion, and be able to
> blacklist platforms that have issues.
What about, making the request_resource a little bit more clever.
Something like:
If the resouce is not taken
return ok
if the resource is taken:
If the requester or the current owner of the resource are device tree devices
show a warning and continue.
else
return error
Wouldn't this fix the issue and guide the developers towards a proper
fix for their platform, instead of just encourage them to blacklist
their platform?
Thanks!
>
> g.
>
--
Ricardo Ribalda
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists