Re: [GPIO]implement sleeping GPIO chip removal

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Maciej Szmigiero
Date: Wednesday, November 10, 2010 - 8:28 am

W dniu 10.11.2010 06:09, Grant Likely pisze:


Every call to gpio_ensure_requested() in gpiolib.c is done while holding gpio_lock and this function is not exported.


Race with ...?
The only place where chip->dead is changed to zero is later in gpiochip_remove_sleeping() (which cannot be called at the same time for the same
chip more than once anyway) or gpiochip_add() which is new chip registration function.

(..)
(..)

I agree with you on this.

W dniu 10.11.2010 10:49, Thomas Gleixner pisze:

The only way to do GPIO chip removal in the current code is to busy-loop.
"Sloppy" (as you called it) waiting is still more CPU-friendly than looping 
in hope that somebody will finally release the chip.
If you would like to implement it as kobject then go ahead and post the code
so it can be used in drivers.

Best regards and thanks for comments,
Maciej Szmigiero
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[GPIO]implement sleeping GPIO chip removal, Maciej Szmigiero, (Sun Nov 7, 11:30 am)
Re: [GPIO]implement sleeping GPIO chip removal, Grant Likely, (Tue Nov 9, 10:09 pm)
Re: [GPIO]implement sleeping GPIO chip removal, Thomas Gleixner, (Wed Nov 10, 2:49 am)
Re: [GPIO]implement sleeping GPIO chip removal, Maciej Szmigiero, (Wed Nov 10, 8:28 am)
Re: [GPIO]implement sleeping GPIO chip removal, Thomas Gleixner, (Wed Nov 10, 1:42 pm)
Re: [GPIO]implement sleeping GPIO chip removal, Maciej Szmigiero, (Wed Nov 10, 2:01 pm)
Re: [GPIO]implement sleeping GPIO chip removal, Thomas Gleixner, (Wed Nov 10, 2:07 pm)
Re: [GPIO]implement sleeping GPIO chip removal, Grant Likely, (Wed Nov 10, 2:15 pm)
Re: [GPIO]implement sleeping GPIO chip removal, Grant Likely, (Wed Nov 10, 3:14 pm)
Re: [GPIO]implement sleeping GPIO chip removal, Greg KH, (Wed Nov 10, 3:45 pm)
Re: [GPIO]implement sleeping GPIO chip removal, Thomas Gleixner, (Wed Nov 10, 3:47 pm)
Re: [GPIO]implement sleeping GPIO chip removal, Paul Mundt, (Wed Nov 10, 4:15 pm)
Re: [GPIO]implement sleeping GPIO chip removal, Maciej Szmigiero, (Fri Nov 12, 1:46 pm)