Re: [PATCH v5 2/4] base/platform: Continue on insert_resource() error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hello Grant

On Thu, Jun 4, 2015 at 9:54 AM, Grant Likely <grant.likely@xxxxxxxxxx> 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 devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux