Re: [PATCH] of: fix race when matching drivers

2011-05-18 Thread Grant Likely
On Wed, May 18, 2011 at 9:27 AM, Milton Miller milt...@bga.com wrote: If two drivers are probing devices at the same time, both will write their match table result to the dev-of_match cache at the same time. Only write the result if the device matches. In a thread titled SBus devices

[PATCH] of: fix race when matching drivers

2011-05-18 Thread Milton Miller
If two drivers are probing devices at the same time, both will write their match table result to the dev-of_match cache at the same time. Only write the result if the device matches. In a thread titled SBus devices sometimes detected, sometimes not, Meelis reported his SBus hme was not detected

Re: [PATCH] of: fix race when matching drivers

2011-05-18 Thread Grant Likely
[cc'ing Linus: This is fix for a 2.6.39 regression, so just a heads up that I'll be sending you a pull req ASAP (later this morning)] On Wed, May 18, 2011 at 9:41 AM, Grant Likely grant.lik...@secretlab.ca wrote: On Wed, May 18, 2011 at 9:27 AM, Milton Miller milt...@bga.com wrote: If two

Re: DT and endianness

2011-05-18 Thread Grant Likely
On Wed, May 18, 2011 at 3:06 AM, Rajendra Nayak rna...@ti.com wrote: Hey Grant, I have been working over the last few days trying to evaluate what part of the data files in OMAP can be moved to Device tree. One basic issue I am stuck with trying to extract data out of the device tree blob is

Re: [PATCH] of: fix race when matching drivers

2011-05-18 Thread Grant Likely
On Wed, May 18, 2011 at 05:45:17PM +0200, Josip Rodin wrote: On Wed, May 18, 2011 at 10:27:39AM -0500, Milton Miller wrote: --- work.git.orig/include/linux/of_device.h 2011-05-18 09:57:01.014386816 -0500 +++ work.git/include/linux/of_device.h 2011-05-18 09:58:27.537431575 -0500

Pinmux with device tree

2011-05-18 Thread Simon Glass
Hi, I see a new pinmux system in the LKML. Has anyone looked at how to represent pinmux settings in the device tree? On a related topic, the examples that are used for GPIOs assume a flags word which describes things like pull-ups, direction, etc. This seems pretty cumbersome and gets worse with

Re: [RFC PATCH] drivers/amba: probe via device tree reworked

2011-05-18 Thread Grant Likely
On Wed, May 18, 2011 at 01:14:47PM -0500, Rob Herring wrote: From: Rob Herring rob.herr...@calxeda.com This reworks the original amba bus device tree probing to be more inline with how platform bus probing via device tree is done using a match table. You should also mention that this patch

[git pull][PATCH 0/2] Fix regression caused by addition of 'of_match'

2011-05-18 Thread Grant Likely
Hi Linus, Here is Milton's patch to fix up the race condition on devicetree driver matching observed on SPARC, plus a follow up patch to remove the whole of_match thing entirely, which I've tested on my platforms, but has not yet been verified by anyone else. I'll leave it up to you whether to

[PATCH 2/2] drivercore: revert addition of of_match to struct device

2011-05-18 Thread Grant Likely
Commit b826291c, drivercore/dt: add a match table pointer to struct device added an of_match pointer to struct device to cache the of_match_table entry discovered at driver match time. This was unsafe because matching is not an atomic operation with probing a driver. If two or more drivers are

Re: Pinmux with device tree

2011-05-18 Thread Mitch Bradley
On 5/18/2011 6:34 AM, Simon Glass wrote: Hi, I see a new pinmux system in the LKML. Has anyone looked at how to represent pinmux settings in the device tree? On a related topic, the examples that are used for GPIOs assume a flags word which describes things like pull-ups, direction, etc. This

Re: [PATCH 2/2] drivercore: revert addition of of_match to struct device

2011-05-18 Thread Greg KH
On Wed, May 18, 2011 at 01:21:05PM -0600, Grant Likely wrote: Commit b826291c, drivercore/dt: add a match table pointer to struct device added an of_match pointer to struct device to cache the of_match_table entry discovered at driver match time. This was unsafe because matching is not an

Re: [RFC PATCH] drivers/amba: probe via device tree reworked

2011-05-18 Thread Grant Likely
On Wed, May 18, 2011 at 02:39:10PM -0500, Rob Herring wrote: On 05/18/2011 01:47 PM, Grant Likely wrote: On Wed, May 18, 2011 at 01:14:47PM -0500, Rob Herring wrote: From: Rob Herringrob.herr...@calxeda.com This reworks the original amba bus device tree probing to be more inline with how

Re: [PATCH] of: fix race when matching drivers

2011-05-18 Thread Josip Rodin
On Wed, May 18, 2011 at 10:27:39AM -0500, Milton Miller wrote: --- work.git.orig/include/linux/of_device.h 2011-05-18 09:57:01.014386816 -0500 +++ work.git/include/linux/of_device.h2011-05-18 09:58:27.537431575 -0500 @@ -21,8 +21,15 @@ extern void of_device_make_bus_id(struct

Re: [PATCH 2/2] drivercore: revert addition of of_match to struct device

2011-05-18 Thread David Miller
From: Grant Likely grant.lik...@secretlab.ca Date: Wed, 18 May 2011 13:21:05 -0600 Commit b826291c, drivercore/dt: add a match table pointer to struct device added an of_match pointer to struct device to cache the of_match_table entry discovered at driver match time. This was unsafe because

Re: [PATCH 1/2] of: fix race when matching drivers

2011-05-18 Thread David Miller
From: Grant Likely grant.lik...@secretlab.ca Date: Wed, 18 May 2011 13:21:00 -0600 From: Milton Miller milt...@bga.com If two drivers are probing devices at the same time, both will write their match table result to the dev-of_match cache at the same time. Only write the result if the