Re: [PATCH 2/2] drivercore: Fix unregistration path of platform devices

From: Ricardo Ribalda Delgado
Date: Mon Jun 08 2015 - 04:43:36 EST


Hello Pantelis

On Mon, Jun 8, 2015 at 10:14 AM, Pantelis Antoniou
<pantelis.antoniou@xxxxxxxxxxxx> wrote:
>>
>
> Either patch fixes (or rather papers over) the problem.
>
> The way I understand it is that we have two issues.
>
> 1. The rather obvious crash on device removal.
> 2. The of_platform_populate (and the subsequent call to
> of_platform_device_create_pdata()) not registering the resources
> due to bugs in platforms that do overlapping regions.
>
>
> #1 is fixed but #2 is rather touchy.

I believe that after my last patchset also #2 is fixed.

The only missing part is applying the shared flag to ONLY the broken
OF platforms, not to all.

We even have a warning on overlapping resources, that should help the
development

https://git.kernel.org/cgit/linux/kernel/git/gregkh/driver-core.git/tree/drivers/base/platform.c?h=driver-core-testing#n379

Hopefully one day we can merge of and platform :)

>
> I would like to eventually fix those platforms; starting with a
> nice fat warning when using overlapping regions would be nice.
>
> The problem is how to deal with range definitions that overlap.
> Does anyone remember what does the spec say regarding those?
>
> If the way they are used now in those platform is wrong we should
> mark them in some manner in the DT so that the idiom does not propagate.

We could easily find out which DT have overlapping resources on the tree...

Regars!
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/