Re: [PATCH 7/7] driver-core : convert semaphore to mutex in struct class

2008-01-21 Thread Jarek Poplawski
On 22-01-2008 01:55, Dave Young wrote: ... > Hi, thanks your effort. Now I think we should stop this thread and > waiting the class_device going away :) Sure! But, if you change your mind I'm interested in this subject. Thanks, Jarek P. -- To unsubscribe from this list: send the line "unsubscribe

Re: [PATCH 7/7] driver-core : convert semaphore to mutex in struct class

2008-01-21 Thread Dave Young
> > > > Hope the iteration patches 1-6/7 could be applied. > > Can you resend them again, and CC: me on all of them, with the latest > updates, so I know what I should be reviewing this time around? Hi, sent. > > thanks, > > greg k-h > -- To unsubscribe from this list: send the line "unsubscribe

Re: [PATCH 7/7] driver-core : convert semaphore to mutex in struct class

2008-01-21 Thread Greg KH
On Tue, Jan 22, 2008 at 08:55:05AM +0800, Dave Young wrote: > On Jan 22, 2008 5:16 AM, Jarek Poplawski <[EMAIL PROTECTED]> wrote: > > Dave Young wrote, On 01/21/2008 09:44 AM: > > ... > > > I applied it in my kernel, built and run without warnings, but it need > > > more testing. > > > I will be ve

Re: [PATCH 7/7] driver-core : convert semaphore to mutex in struct class

2008-01-21 Thread Dave Young
On Jan 22, 2008 5:16 AM, Jarek Poplawski <[EMAIL PROTECTED]> wrote: > Dave Young wrote, On 01/21/2008 09:44 AM: > ... > > I applied it in my kernel, built and run without warnings, but it need > > more testing. > > I will be very glad to see the test result about this if you could, thanks. > > Bad

Re: [PATCH 7/7] driver-core : convert semaphore to mutex in struct class

2008-01-21 Thread Jarek Poplawski
Dave Young wrote, On 01/21/2008 09:44 AM: ... > I applied it in my kernel, built and run without warnings, but it need > more testing. > I will be very glad to see the test result about this if you could, thanks. Bad news. (Alas I won't be able to check this today.) ==

Re: [PATCH 7/7] driver-core : convert semaphore to mutex in struct class

2008-01-21 Thread Jarek Poplawski
On Mon, Jan 21, 2008 at 04:44:36PM +0800, Dave Young wrote: ... > I applied it in my kernel, built and run without warnings, but it need > more testing. > I will be very glad to see the test result about this if you could, thanks. I'll try this of course, but alas I don't have anything such more s

Re: [PATCH 7/7] driver-core : convert semaphore to mutex in struct class

2008-01-21 Thread Dave Young
On Jan 21, 2008 4:36 PM, Jarek Poplawski <[EMAIL PROTECTED]> wrote: > On Mon, Jan 21, 2008 at 09:43:35AM +0800, Dave Young wrote: > ... > > Convert the class semaphore to mutex. > > class_interface_register/unregister use class_device_* functions, so > > SINGLE_DEPTH_NESTING added for lockdep plea

Re: [PATCH 7/7] driver-core : convert semaphore to mutex in struct class

2008-01-21 Thread Jarek Poplawski
On Mon, Jan 21, 2008 at 09:43:35AM +0800, Dave Young wrote: ... > Convert the class semaphore to mutex. > class_interface_register/unregister use class_device_* functions, so > SINGLE_DEPTH_NESTING added for lockdep please in these functions. Looks fine to me now, but... I think you forgot again

Re: [PATCH 7/7] driver-core : convert semaphore to mutex in struct class

2008-01-20 Thread Dave Young
On Mon, Jan 21, 2008 at 09:30:21AM +0800, Dave Young wrote: > On Sat, Jan 19, 2008 at 10:39:33AM +0100, Jarek Poplawski wrote: > > Dave Young wrote, On 01/18/2008 10:07 AM: > > > > > On Jan 18, 2008 4:23 PM, Jarek Poplawski <[EMAIL PROTECTED]> wrote: > > > > >> On Fri, Jan 18, 2008 at 03:48:02PM

Re: [PATCH 7/7] driver-core : convert semaphore to mutex in struct class

2008-01-20 Thread Dave Young
On Sat, Jan 19, 2008 at 10:39:33AM +0100, Jarek Poplawski wrote: > Dave Young wrote, On 01/18/2008 10:07 AM: > > > On Jan 18, 2008 4:23 PM, Jarek Poplawski <[EMAIL PROTECTED]> wrote: > > >> On Fri, Jan 18, 2008 at 03:48:02PM +0800, Dave Young wrote: > > ... > > >>> 1) Using CLASS_NORMAL/CLASS_P

Re: [PATCH 7/7] driver-core : convert semaphore to mutex in struct class

2008-01-20 Thread Dave Young
On Sat, Jan 19, 2008 at 10:39:33AM +0100, Jarek Poplawski wrote: > Dave Young wrote, On 01/18/2008 10:07 AM: > > > On Jan 18, 2008 4:23 PM, Jarek Poplawski <[EMAIL PROTECTED]> wrote: > > >> On Fri, Jan 18, 2008 at 03:48:02PM +0800, Dave Young wrote: > > ... > > >>> 1) Using CLASS_NORMAL/CLASS_P

Re: [PATCH 7/7] driver-core : convert semaphore to mutex in struct class

2008-01-19 Thread Jarek Poplawski
Dave Young wrote, On 01/18/2008 10:07 AM: > On Jan 18, 2008 4:23 PM, Jarek Poplawski <[EMAIL PROTECTED]> wrote: >> On Fri, Jan 18, 2008 at 03:48:02PM +0800, Dave Young wrote: ... >>> 1) Using CLASS_NORMAL/CLASS_PARENT/CLASS_CHILD will be enough. >>> or >>> 2) Simply add SINGLE_LEVEL_NESTING in

Re: [PATCH 7/7] driver-core : convert semaphore to mutex in struct class

2008-01-18 Thread Jarek Poplawski
On Fri, Jan 18, 2008 at 11:45:12AM +0100, Kay Sievers wrote: > On Fri, 2008-01-18 at 08:38 +0100, Jarek Poplawski wrote: > > On Fri, Jan 18, 2008 at 01:31:17PM +0800, Dave Young wrote: > > > On Jan 18, 2008 11:18 AM, Kay Sievers <[EMAIL PROTECTED]> wrote: > > ... > > > > Yeah, might be better to wa

Re: [PATCH 7/7] driver-core : convert semaphore to mutex in struct class

2008-01-18 Thread Kay Sievers
On Fri, 2008-01-18 at 08:38 +0100, Jarek Poplawski wrote: > On Fri, Jan 18, 2008 at 01:31:17PM +0800, Dave Young wrote: > > On Jan 18, 2008 11:18 AM, Kay Sievers <[EMAIL PROTECTED]> wrote: > ... > > > Yeah, might be better to wait until class_device is gone, otherwise you > > > may need to fix stuf

Re: [PATCH 7/7] driver-core : convert semaphore to mutex in struct class

2008-01-18 Thread Dave Young
On Jan 18, 2008 4:23 PM, Jarek Poplawski <[EMAIL PROTECTED]> wrote: > On Fri, Jan 18, 2008 at 03:48:02PM +0800, Dave Young wrote: > > On Jan 18, 2008 3:38 PM, Jarek Poplawski <[EMAIL PROTECTED]> wrote: > ... > > > IMHO, it would be nice to get the real state of current lockdep > > > problems here t

Re: [PATCH 7/7] driver-core : convert semaphore to mutex in struct class

2008-01-18 Thread Jarek Poplawski
On Fri, Jan 18, 2008 at 09:00:34AM +0100, Jarek Poplawski wrote: > On Fri, Jan 18, 2008 at 09:42:25AM +0800, Dave Young wrote: > ... > > After digging the class usage code again, I found that the only > > possible double lock place is the class_interface_register/unregister > > in which the class_d

Re: [PATCH 7/7] driver-core : convert semaphore to mutex in struct class

2008-01-18 Thread Jarek Poplawski
On Fri, Jan 18, 2008 at 03:48:02PM +0800, Dave Young wrote: > On Jan 18, 2008 3:38 PM, Jarek Poplawski <[EMAIL PROTECTED]> wrote: ... > > IMHO, it would be nice to get the real state of current lockdep > > problems here to figure out if there is any chance to do this right & > > without any warning

Re: [PATCH 7/7] driver-core : convert semaphore to mutex in struct class

2008-01-17 Thread Jarek Poplawski
On Fri, Jan 18, 2008 at 09:42:25AM +0800, Dave Young wrote: ... > After digging the class usage code again, I found that the only > possible double lock place is the class_interface_register/unregister > in which the class_device api could be called. OK, but currently after using mostly: mutex_loc

Re: [PATCH 7/7] driver-core : convert semaphore to mutex in struct class

2008-01-17 Thread Dave Young
On Jan 18, 2008 3:38 PM, Jarek Poplawski <[EMAIL PROTECTED]> wrote: > On Fri, Jan 18, 2008 at 01:31:17PM +0800, Dave Young wrote: > > On Jan 18, 2008 11:18 AM, Kay Sievers <[EMAIL PROTECTED]> wrote: > ... > > > Yeah, might be better to wait until class_device is gone, otherwise you > > > may need t

Re: [PATCH 7/7] driver-core : convert semaphore to mutex in struct class

2008-01-17 Thread Jarek Poplawski
On Fri, Jan 18, 2008 at 01:31:17PM +0800, Dave Young wrote: > On Jan 18, 2008 11:18 AM, Kay Sievers <[EMAIL PROTECTED]> wrote: ... > > Yeah, might be better to wait until class_device is gone, otherwise you > > may need to fix stuff that is just going to be removed. Your change to > > have iterator

Re: [PATCH 7/7] driver-core : convert semaphore to mutex in struct class

2008-01-17 Thread Greg KH
On Fri, Jan 18, 2008 at 04:18:43AM +0100, Kay Sievers wrote: > On Fri, 2008-01-18 at 10:28 +0800, Dave Young wrote: > > Then what's your opinon about the lockdep warning fix? I wonder > > whether the "soon" means we should do mutex convert after the > > class_device going away? > > Yeah, might be

Re: [PATCH 7/7] driver-core : convert semaphore to mutex in struct class

2008-01-17 Thread Kay Sievers
On Fri, 2008-01-18 at 10:28 +0800, Dave Young wrote: > On Jan 18, 2008 9:55 AM, Kay Sievers <[EMAIL PROTECTED]> wrote: > > > > On Jan 18, 2008 2:42 AM, Dave Young <[EMAIL PROTECTED]> wrote: > > > > > > On Jan 18, 2008 7:26 AM, Jarek Poplawski <[EMAIL PROTECTED]> wrote: > > > > > > > > On Thu, Jan 1

Re: [PATCH 7/7] driver-core : convert semaphore to mutex in struct class

2008-01-17 Thread Dave Young
On Jan 18, 2008 9:55 AM, Kay Sievers <[EMAIL PROTECTED]> wrote: > > On Jan 18, 2008 2:42 AM, Dave Young <[EMAIL PROTECTED]> wrote: > > > > On Jan 18, 2008 7:26 AM, Jarek Poplawski <[EMAIL PROTECTED]> wrote: > > > > > > On Thu, Jan 17, 2008 at 09:31:55PM +0100, Jarek Poplawski wrote: > > > > On Thu,

Re: [PATCH 7/7] driver-core : convert semaphore to mutex in struct class

2008-01-17 Thread Kay Sievers
On Jan 18, 2008 2:42 AM, Dave Young <[EMAIL PROTECTED]> wrote: > > On Jan 18, 2008 7:26 AM, Jarek Poplawski <[EMAIL PROTECTED]> wrote: > > > > On Thu, Jan 17, 2008 at 09:31:55PM +0100, Jarek Poplawski wrote: > > > On Thu, Jan 17, 2008 at 02:57:36PM -0500, Alan Stern wrote: > > > > On Thu, 17 Jan 20

Re: [PATCH 7/7] driver-core : convert semaphore to mutex in struct class

2008-01-17 Thread Dave Young
On Jan 17, 2008 11:16 PM, Alan Stern <[EMAIL PROTECTED]> wrote: > On Thu, 17 Jan 2008, Dave Young wrote: > > > > Your meaning isn't clear. Do you mean that your patch doesn't generate > > > any lockdep warnings at all? Or do you mean that it generates a single > > > lockdep warning at boot time a

Re: [PATCH 7/7] driver-core : convert semaphore to mutex in struct class

2008-01-17 Thread Dave Young
On Jan 18, 2008 7:26 AM, Jarek Poplawski <[EMAIL PROTECTED]> wrote: > > On Thu, Jan 17, 2008 at 09:31:55PM +0100, Jarek Poplawski wrote: > > On Thu, Jan 17, 2008 at 02:57:36PM -0500, Alan Stern wrote: > > > On Thu, 17 Jan 2008, Jarek Poplawski wrote: > > > > > > > On Thu, Jan 17, 2008 at 10:16:30AM

Re: [PATCH 7/7] driver-core : convert semaphore to mutex in struct class

2008-01-17 Thread Jarek Poplawski
On Thu, Jan 17, 2008 at 09:31:55PM +0100, Jarek Poplawski wrote: > On Thu, Jan 17, 2008 at 02:57:36PM -0500, Alan Stern wrote: > > On Thu, 17 Jan 2008, Jarek Poplawski wrote: > > > > > On Thu, Jan 17, 2008 at 10:16:30AM -0500, Alan Stern wrote: > > > > On Thu, 17 Jan 2008, Dave Young wrote: > > >

Re: [PATCH 7/7] driver-core : convert semaphore to mutex in struct class

2008-01-17 Thread Jarek Poplawski
On Thu, Jan 17, 2008 at 09:31:55PM +0100, Jarek Poplawski wrote: > On Thu, Jan 17, 2008 at 02:57:36PM -0500, Alan Stern wrote: ... > > If I recall correctly the nature of the warning was that a method > > routine for one class (called with the class's mutex held) was creating > > a second class and

Re: [PATCH 7/7] driver-core : convert semaphore to mutex in struct class

2008-01-17 Thread Jarek Poplawski
On Thu, Jan 17, 2008 at 01:11:01PM -0800, Greg KH wrote: ... > I've known Greg to make lots of mistakes :) Right! Above is one example... > I don't remember ever saying that the "code is correct with the lockdep > warnings", I think I said, "Make sure there are no lockdep warnings with > any conv

Re: [PATCH 7/7] driver-core : convert semaphore to mutex in struct class

2008-01-17 Thread Greg KH
On Thu, Jan 17, 2008 at 02:57:36PM -0500, Alan Stern wrote: > On Thu, 17 Jan 2008, Jarek Poplawski wrote: > > On the other hand, according to Greg the code is OK, so if there are any > > such warnings they simply have to be false! (...Unless you trust lockdep > > more?!) > > It's not a matter of t

Re: [PATCH 7/7] driver-core : convert semaphore to mutex in struct class

2008-01-17 Thread Jarek Poplawski
On Thu, Jan 17, 2008 at 02:57:36PM -0500, Alan Stern wrote: > On Thu, 17 Jan 2008, Jarek Poplawski wrote: > > > On Thu, Jan 17, 2008 at 10:16:30AM -0500, Alan Stern wrote: > > > On Thu, 17 Jan 2008, Dave Young wrote: > > > > > > > > Your meaning isn't clear. Do you mean that your patch doesn't

Re: [PATCH 7/7] driver-core : convert semaphore to mutex in struct class

2008-01-17 Thread Alan Stern
On Thu, 17 Jan 2008, Jarek Poplawski wrote: > On Thu, Jan 17, 2008 at 10:16:30AM -0500, Alan Stern wrote: > > On Thu, 17 Jan 2008, Dave Young wrote: > > > > > > Your meaning isn't clear. Do you mean that your patch doesn't generate > > > > any lockdep warnings at all? Or do you mean that it gen

Re: [PATCH 7/7] driver-core : convert semaphore to mutex in struct class

2008-01-17 Thread Jarek Poplawski
On Thu, Jan 17, 2008 at 10:16:30AM -0500, Alan Stern wrote: > On Thu, 17 Jan 2008, Dave Young wrote: > > > > Your meaning isn't clear. Do you mean that your patch doesn't generate > > > any lockdep warnings at all? Or do you mean that it generates a single > > > lockdep warning at boot time and

Re: [PATCH 7/7] driver-core : convert semaphore to mutex in struct class

2008-01-17 Thread Alan Stern
On Thu, 17 Jan 2008, Dave Young wrote: > > Your meaning isn't clear. Do you mean that your patch doesn't generate > > any lockdep warnings at all? Or do you mean that it generates a single > > lockdep warning at boot time and then no more warnings afterward? > > I means the latter one. That's

Re: [PATCH 7/7] driver-core : convert semaphore to mutex in struct class

2008-01-17 Thread Dave Young
On Jan 17, 2008 4:38 PM, Jarek Poplawski <[EMAIL PROTECTED]> wrote: > On 17-01-2008 02:17, Dave Young wrote: > > On Jan 16, 2008 4:34 PM, Jarek Poplawski <[EMAIL PROTECTED]> wrote: > >> On Wed, Jan 16, 2008 at 09:03:03AM +0800, Dave Young wrote: > >> ... > >>> The lockdep warining was posted in the

Re: [PATCH 7/7] driver-core : convert semaphore to mutex in struct class

2008-01-17 Thread Jarek Poplawski
On 17-01-2008 02:17, Dave Young wrote: > On Jan 16, 2008 4:34 PM, Jarek Poplawski <[EMAIL PROTECTED]> wrote: >> On Wed, Jan 16, 2008 at 09:03:03AM +0800, Dave Young wrote: >> ... >>> The lockdep warining was posted in the below thread, actually, I have >>> built and run this patced kernel for sever

Re: [PATCH 7/7] driver-core : convert semaphore to mutex in struct class

2008-01-16 Thread Dave Young
On Jan 16, 2008 11:27 PM, Alan Stern <[EMAIL PROTECTED]> wrote: > On Wed, 16 Jan 2008, Dave Young wrote: > > > The lockdep warining was posted in the below thread, actually, I have > > built and run this patced kernel for several days, there's no more > > warnings. > > http://lkml.org/lkml/2008/1/3

Re: [PATCH 7/7] driver-core : convert semaphore to mutex in struct class

2008-01-16 Thread Dave Young
On Jan 16, 2008 4:34 PM, Jarek Poplawski <[EMAIL PROTECTED]> wrote: > On Wed, Jan 16, 2008 at 09:03:03AM +0800, Dave Young wrote: > ... > > The lockdep warining was posted in the below thread, actually, I have > > built and run this patced kernel for several days, there's no more > > warnings. > >

Re: [PATCH 7/7] driver-core : convert semaphore to mutex in struct class

2008-01-16 Thread Jarek Poplawski
On Wed, Jan 16, 2008 at 10:27:54AM -0500, Alan Stern wrote: > On Wed, 16 Jan 2008, Dave Young wrote: > > > The lockdep warining was posted in the below thread, actually, I have > > built and run this patced kernel for several days, there's no more > > warnings. > > http://lkml.org/lkml/2008/1/3/2

Re: [PATCH 7/7] driver-core : convert semaphore to mutex in struct class

2008-01-16 Thread Alan Stern
On Wed, 16 Jan 2008, Dave Young wrote: > The lockdep warining was posted in the below thread, actually, I have > built and run this patced kernel for several days, there's no more > warnings. > http://lkml.org/lkml/2008/1/3/2 Your meaning isn't clear. Do you mean that your patch doesn't generate

Re: [PATCH 7/7] driver-core : convert semaphore to mutex in struct class

2008-01-16 Thread Jarek Poplawski
On Wed, Jan 16, 2008 at 09:03:03AM +0800, Dave Young wrote: ... > The lockdep warining was posted in the below thread, actually, I have > built and run this patced kernel for several days, there's no more > warnings. > http://lkml.org/lkml/2008/1/3/2 Right... But, with something like this: ... ha

Re: [PATCH 7/7] driver-core : convert semaphore to mutex in struct class

2008-01-15 Thread Dave Young
On Jan 15, 2008 9:56 PM, Jarek Poplawski <[EMAIL PROTECTED]> wrote: > > On Tue, Jan 15, 2008 at 05:15:27PM +0800, Dave Young wrote: > > Convert the class semaphore to mutex. > > > > Signed-off-by: Dave Young <[EMAIL PROTECTED]> > > > > --- > > drivers/base/class.c | 38 +++-

Re: [PATCH 7/7] driver-core : convert semaphore to mutex in struct class

2008-01-15 Thread Jarek Poplawski
On Tue, Jan 15, 2008 at 05:15:27PM +0800, Dave Young wrote: > Convert the class semaphore to mutex. > > Signed-off-by: Dave Young <[EMAIL PROTECTED]> > > --- > drivers/base/class.c | 38 +++--- > drivers/base/core.c| 18 -- > include/lin

Re: [PATCH 7/7] driver-core : convert semaphore to mutex in struct class

2008-01-15 Thread Dave Young
Convert the class semaphore to mutex. Signed-off-by: Dave Young <[EMAIL PROTECTED]> --- drivers/base/class.c | 38 +++--- drivers/base/core.c| 18 -- include/linux/device.h |3 ++- 3 files changed, 29 insertions(+), 30 deletions(-)

[PATCH 7/7] driver-core : convert semaphore to mutex in struct class

2008-01-12 Thread Dave Young
Convert the class semaphore to mutex. Signed-off-by: Dave Young <[EMAIL PROTECTED]> --- drivers/base/class.c | 38 +++--- drivers/base/core.c| 18 -- include/linux/device.h |3 ++- 3 files changed, 29 insertions(+), 30 deletions(-)