Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-15 Thread David Brownell
On Thursday 15 November 2007, Haavard Skinnemoen wrote: > On Thu, 15 Nov 2007 00:20:33 -0800 > David Brownell <[EMAIL PROTECTED]> wrote: > > > > > - gpio_direction_input()/gpio_direction_output() implicitly > > > > request the pins, if they weren't already requested. > > > > > > Eek,

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-15 Thread Haavard Skinnemoen
On Thu, 15 Nov 2007 00:20:33 -0800 David Brownell <[EMAIL PROTECTED]> wrote: > > > - gpio_direction_input()/gpio_direction_output() implicitly > > > request the pins, if they weren't already requested. > > > > Eek, that's completely wrong. Allowing to access a resource _before_ > > it is

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-15 Thread David Brownell
On Wednesday 14 November 2007, Nick Piggin wrote: > > > > All this does is prevent constant and needless checking for > > > > "do you want to preempt me now?" "now?" "now?" in "now?" the > > > > middle "now?" of "now?" i/o "now?" loops. > > > > > > Actually that's wrong. > > > > Certainly it's

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-15 Thread Nick Piggin
On Thursday 15 November 2007 19:17, David Brownell wrote: > On Wednesday 14 November 2007, Nick Piggin wrote: > > > > > All this does is prevent constant and needless checking for > > > > > "do you want to preempt me now?" "now?" "now?" in "now?" the > > > > > middle "now?" of "now?" i/o "now?"

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-15 Thread Haavard Skinnemoen
On Wed, 14 Nov 2007 22:50:17 -0800 David Brownell <[EMAIL PROTECTED]> wrote: > > Since this is the code that runs under the lock > > No, there's more than that. This is what runs under it in > the hot paths, yes, but the gpio request/free paths do > more work than this. (That includes

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-15 Thread David Brownell
On Wednesday 14 November 2007, Thomas Gleixner wrote: > On Wed, 14 Nov 2007, David Brownell wrote: > > > The protection of the chip list can be converted to a mutex and > > > does not need to be a spinlock at all. > > > > No, we still need to use a spinlock to protect table changes. > > The

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-15 Thread Nick Piggin
On Thursday 15 November 2007 06:19, Nick Piggin wrote: > On Thursday 15 November 2007 19:17, David Brownell wrote: > > On Wednesday 14 November 2007, Nick Piggin wrote: > > > > > > All this does is prevent constant and needless checking for > > > > > > "do you want to preempt me now?" "now?"

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-15 Thread Nick Piggin
On Thursday 15 November 2007 17:28, David Brownell wrote: > On Tuesday 13 November 2007, Nick Piggin wrote: > > > All this does is prevent constant and needless checking for > > > "do you want to preempt me now?" "now?" "now?" in "now?" the > > > middle "now?" of "now?" i/o "now?" loops. > > > >

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-15 Thread Nick Piggin
On Thursday 15 November 2007 17:28, David Brownell wrote: On Tuesday 13 November 2007, Nick Piggin wrote: All this does is prevent constant and needless checking for do you want to preempt me now? now? now? in now? the middle now? of now? i/o now? loops. Actually that's wrong.

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-15 Thread Nick Piggin
On Thursday 15 November 2007 06:19, Nick Piggin wrote: On Thursday 15 November 2007 19:17, David Brownell wrote: On Wednesday 14 November 2007, Nick Piggin wrote: All this does is prevent constant and needless checking for do you want to preempt me now? now? now? in now? the

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-15 Thread David Brownell
On Wednesday 14 November 2007, Thomas Gleixner wrote: On Wed, 14 Nov 2007, David Brownell wrote: The protection of the chip list can be converted to a mutex and does not need to be a spinlock at all. No, we still need to use a spinlock to protect table changes. The reason for that is

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-15 Thread Haavard Skinnemoen
On Wed, 14 Nov 2007 22:50:17 -0800 David Brownell [EMAIL PROTECTED] wrote: Since this is the code that runs under the lock No, there's more than that. This is what runs under it in the hot paths, yes, but the gpio request/free paths do more work than this. (That includes direction

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-15 Thread Nick Piggin
On Thursday 15 November 2007 19:17, David Brownell wrote: On Wednesday 14 November 2007, Nick Piggin wrote: All this does is prevent constant and needless checking for do you want to preempt me now? now? now? in now? the middle now? of now? i/o now? loops. Actually that's

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-15 Thread David Brownell
On Wednesday 14 November 2007, Nick Piggin wrote: All this does is prevent constant and needless checking for do you want to preempt me now? now? now? in now? the middle now? of now? i/o now? loops. Actually that's wrong. Certainly it's right for the mainstream kernel.  

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-15 Thread Haavard Skinnemoen
On Thu, 15 Nov 2007 00:20:33 -0800 David Brownell [EMAIL PROTECTED] wrote: - gpio_direction_input()/gpio_direction_output() implicitly request the pins, if they weren't already requested. Eek, that's completely wrong. Allowing to access a resource _before_ it is assigned and

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-15 Thread David Brownell
On Thursday 15 November 2007, Haavard Skinnemoen wrote: On Thu, 15 Nov 2007 00:20:33 -0800 David Brownell [EMAIL PROTECTED] wrote: - gpio_direction_input()/gpio_direction_output() implicitly request the pins, if they weren't already requested. Eek, that's completely

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-14 Thread Thomas Gleixner
On Wed, 14 Nov 2007, David Brownell wrote: > On Wednesday 14 November 2007, Thomas Gleixner wrote: > > struct gpio_desc { > >struct gpio_chip *chip; > >int pinoffset; > > }; > > Eric Miao has a different notion of "gpio_desc" more analagous to > the "irq_desc", so I'll not use

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-14 Thread Thomas Gleixner
On Wed, 14 Nov 2007, David Brownell wrote: > > The protection of the chip list can be converted to a mutex and > > does not need to be a spinlock at all. > > No, we still need to use a spinlock to protect table changes. > The reason for that is briefly: > > - gpio_request()/gpio_free() have so

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-14 Thread David Brownell
On Wednesday 14 November 2007, Thomas Gleixner wrote: > struct gpio_desc { >        struct gpio_chip *chip; >        int pinoffset; > }; Eric Miao has a different notion of "gpio_desc" more analagous to the "irq_desc", so I'll not use that name for such a structure. Let me call yours a "struct

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-14 Thread David Brownell
On Wednesday 14 November 2007, Haavard Skinnemoen wrote: > On Wed, 14 Nov 2007 00:37:57 -0800 > David Brownell <[EMAIL PROTECTED]> wrote: > > > Although another point is related to "trivial": the data > > is being protected through an operation too trivial to be > > worth paying for any of that

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-14 Thread David Brownell
On Wednesday 14 November 2007, Thomas Gleixner wrote: > On Mon, 12 Nov 2007, David Brownell wrote: > > > I'm still trying to understand what you've observed here. Is it the case > > > that a single gpio operation went from 6.4 up to 11.2 usecs? > > > > That was a single bitbanged I2C bit

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-14 Thread David Brownell
On Tuesday 13 November 2007, Nick Piggin wrote: > > All this does is prevent constant and needless checking for > > "do you want to preempt me now?" "now?" "now?" in "now?" the > > middle "now?" of "now?" i/o "now?" loops. > > Actually that's wrong. Certainly it's right for the mainstream

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-14 Thread David Brownell
On Tuesday 13 November 2007, Nick Piggin wrote: > > > But these ones > > > are raw locks rather than normal locks probably because that > > > they are trivially an innermost and correct lock. > > > > As in the $SUBJECT case, I'd say. > > > > Although another point is related to "trivial":  the

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-14 Thread Thomas Gleixner
On Mon, 12 Nov 2007, David Brownell wrote: > > I'm still trying to understand what you've observed here. Is it the case > > that a single gpio operation went from 6.4 up to 11.2 usecs? > > That was a single bitbanged I2C bit transfer, with embedded udelay()s. > I believe that was four gpio

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-14 Thread Ingo Molnar
* David Brownell <[EMAIL PROTECTED]> wrote: > > Why do you want to use raw_spinlock_t? > > Already answered elsewhere in this thread ... I'll highlight the point > that such bitops shouldn't be preemption points. raw_spinlock_t is a spinlock-internal implementation detail in the

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-14 Thread Haavard Skinnemoen
On Wed, 14 Nov 2007 00:37:57 -0800 David Brownell <[EMAIL PROTECTED]> wrote: > Although another point is related to "trivial": the data > is being protected through an operation too trivial to be > worth paying for any of that priority logic. But isn't there any way we can remove the lock from

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-14 Thread Nick Piggin
On Wednesday 14 November 2007 19:20, David Brownell wrote: > On Tuesday 13 November 2007, Nick Piggin wrote: > > I mean, if you have a > > timing critical operation, then you should ensure you have priorities > > set correctly so that you simply don't get preempted. > > Which is why bitops like

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-14 Thread Nick Piggin
On Wednesday 14 November 2007 19:37, David Brownell wrote: > On Tuesday 13 November 2007, Nick Piggin wrote: > > Upstream, all spinlocks prevent preemption. > > I chose my wording carefully though. A preemption point is > more than just a small region where preemption isn't allowed. > > It's one

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-14 Thread David Brownell
On Tuesday 13 November 2007, Nick Piggin wrote: > On Wednesday 14 November 2007 17:52, David Brownell wrote: > > On Tuesday 13 November 2007, Andrew Morton wrote: > > > > > I'll highlight the > > > > point that such bitops shouldn't be preemption points. > > > > > > Disagree.  *everything* should

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-14 Thread David Brownell
On Tuesday 13 November 2007, Nick Piggin wrote: > > > > I'd be happy if, as originally presented, it were possible to just > > > > pass a raw_spinlock_t to spin_lock_irqsave() and friends. > > > > > > that's a spinlock type abstraction of PREEMPT_RT, not of mainline. > > Even when you're talking

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-14 Thread David Brownell
On Tuesday 13 November 2007, Nick Piggin wrote: On Wednesday 14 November 2007 17:52, David Brownell wrote: On Tuesday 13 November 2007, Andrew Morton wrote: I'll highlight the point that such bitops shouldn't be preemption points. Disagree.  *everything* should be a preemption

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-14 Thread Nick Piggin
On Wednesday 14 November 2007 19:20, David Brownell wrote: On Tuesday 13 November 2007, Nick Piggin wrote: I mean, if you have a timing critical operation, then you should ensure you have priorities set correctly so that you simply don't get preempted. Which is why bitops like

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-14 Thread David Brownell
On Tuesday 13 November 2007, Nick Piggin wrote: I'd be happy if, as originally presented, it were possible to just pass a raw_spinlock_t to spin_lock_irqsave() and friends. that's a spinlock type abstraction of PREEMPT_RT, not of mainline. Even when you're talking about the -rt

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-14 Thread Nick Piggin
On Wednesday 14 November 2007 19:37, David Brownell wrote: On Tuesday 13 November 2007, Nick Piggin wrote: Upstream, all spinlocks prevent preemption. I chose my wording carefully though. A preemption point is more than just a small region where preemption isn't allowed. It's one of

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-14 Thread Ingo Molnar
* David Brownell [EMAIL PROTECTED] wrote: Why do you want to use raw_spinlock_t? Already answered elsewhere in this thread ... I'll highlight the point that such bitops shouldn't be preemption points. raw_spinlock_t is a spinlock-internal implementation detail in the upstream

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-14 Thread Haavard Skinnemoen
On Wed, 14 Nov 2007 00:37:57 -0800 David Brownell [EMAIL PROTECTED] wrote: Although another point is related to trivial: the data is being protected through an operation too trivial to be worth paying for any of that priority logic. But isn't there any way we can remove the lock from the

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-14 Thread Thomas Gleixner
On Mon, 12 Nov 2007, David Brownell wrote: I'm still trying to understand what you've observed here. Is it the case that a single gpio operation went from 6.4 up to 11.2 usecs? That was a single bitbanged I2C bit transfer, with embedded udelay()s. I believe that was four gpio operations,

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-14 Thread David Brownell
On Tuesday 13 November 2007, Nick Piggin wrote: All this does is prevent constant and needless checking for do you want to preempt me now? now? now? in now? the middle now? of now? i/o now? loops. Actually that's wrong. Certainly it's right for the mainstream kernel. Dropping a lock

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-14 Thread David Brownell
On Tuesday 13 November 2007, Nick Piggin wrote: But these ones are raw locks rather than normal locks probably because that they are trivially an innermost and correct lock. As in the $SUBJECT case, I'd say. Although another point is related to trivial:  the data is being

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-14 Thread David Brownell
On Wednesday 14 November 2007, Haavard Skinnemoen wrote: On Wed, 14 Nov 2007 00:37:57 -0800 David Brownell [EMAIL PROTECTED] wrote: Although another point is related to trivial: the data is being protected through an operation too trivial to be worth paying for any of that priority

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-14 Thread David Brownell
On Wednesday 14 November 2007, Thomas Gleixner wrote: On Mon, 12 Nov 2007, David Brownell wrote: I'm still trying to understand what you've observed here. Is it the case that a single gpio operation went from 6.4 up to 11.2 usecs? That was a single bitbanged I2C bit transfer, with

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-14 Thread David Brownell
On Wednesday 14 November 2007, Thomas Gleixner wrote: struct gpio_desc {        struct gpio_chip *chip;        int pinoffset; }; Eric Miao has a different notion of gpio_desc more analagous to the irq_desc, so I'll not use that name for such a structure. Let me call yours a struct gpio_pin

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-14 Thread Thomas Gleixner
On Wed, 14 Nov 2007, David Brownell wrote: The protection of the chip list can be converted to a mutex and does not need to be a spinlock at all. No, we still need to use a spinlock to protect table changes. The reason for that is briefly: - gpio_request()/gpio_free() have so far been

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-14 Thread Thomas Gleixner
On Wed, 14 Nov 2007, David Brownell wrote: On Wednesday 14 November 2007, Thomas Gleixner wrote: struct gpio_desc { struct gpio_chip *chip; int pinoffset; }; Eric Miao has a different notion of gpio_desc more analagous to the irq_desc, so I'll not use that name for such

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-13 Thread Nick Piggin
On Wednesday 14 November 2007 17:52, David Brownell wrote: > On Tuesday 13 November 2007, Andrew Morton wrote: > > > I'll highlight the > > > point that such bitops shouldn't be preemption points. > > > > Disagree.  *everything* should be a preemption point. > > So it's wrong that uses the >

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-13 Thread David Brownell
On Tuesday 13 November 2007, Andrew Morton wrote: > > > > Why do you want to use raw_spinlock_t? > > > > Already answered elsewhere in this thread ... > > Can't say I really understood the answer.  I don't think we > actually know where all of this extra time is being spent? Reading that,

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-13 Thread Nick Piggin
On Wednesday 14 November 2007 06:22, David Brownell wrote: > On Tuesday 13 November 2007, Ingo Molnar wrote: > > * David Brownell <[EMAIL PROTECTED]> wrote: > > > > > I speculate that either the design has changed (without fanfare), > > > > > or else that stuff is in RT kernels and has not yet

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-13 Thread Andrew Morton
On Tue, 13 Nov 2007 11:22:45 -0800 David Brownell <[EMAIL PROTECTED]> wrote: > On Tuesday 13 November 2007, Ingo Molnar wrote: > > > > * David Brownell <[EMAIL PROTECTED]> wrote: > > > > > > > I speculate that either the design has changed (without fanfare), > > > > > or else that stuff is in

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-13 Thread David Brownell
On Tuesday 13 November 2007, Ingo Molnar wrote: > > * David Brownell <[EMAIL PROTECTED]> wrote: > > > > > I speculate that either the design has changed (without fanfare), > > > > or else that stuff is in RT kernels and has not yet gone upstream. > > > > > > Well whatever. We shouldn't have

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-13 Thread Ingo Molnar
* David Brownell <[EMAIL PROTECTED]> wrote: > > > I speculate that either the design has changed (without fanfare), > > > or else that stuff is in RT kernels and has not yet gone upstream. > > > > Well whatever. We shouldn't have to resort to caller-side party > > tricks like this to get

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-13 Thread Ingo Molnar
* David Brownell [EMAIL PROTECTED] wrote: I speculate that either the design has changed (without fanfare), or else that stuff is in RT kernels and has not yet gone upstream. Well whatever. We shouldn't have to resort to caller-side party tricks like this to get acceptable

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-13 Thread David Brownell
On Tuesday 13 November 2007, Ingo Molnar wrote: * David Brownell [EMAIL PROTECTED] wrote: I speculate that either the design has changed (without fanfare), or else that stuff is in RT kernels and has not yet gone upstream. Well whatever. We shouldn't have to resort to

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-13 Thread Andrew Morton
On Tue, 13 Nov 2007 11:22:45 -0800 David Brownell [EMAIL PROTECTED] wrote: On Tuesday 13 November 2007, Ingo Molnar wrote: * David Brownell [EMAIL PROTECTED] wrote: I speculate that either the design has changed (without fanfare), or else that stuff is in RT kernels and has

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-13 Thread Nick Piggin
On Wednesday 14 November 2007 06:22, David Brownell wrote: On Tuesday 13 November 2007, Ingo Molnar wrote: * David Brownell [EMAIL PROTECTED] wrote: I speculate that either the design has changed (without fanfare), or else that stuff is in RT kernels and has not yet gone upstream.

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-13 Thread David Brownell
On Tuesday 13 November 2007, Andrew Morton wrote: Why do you want to use raw_spinlock_t? Already answered elsewhere in this thread ... Can't say I really understood the answer.  I don't think we actually know where all of this extra time is being spent? Reading that, one could

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-13 Thread Nick Piggin
On Wednesday 14 November 2007 17:52, David Brownell wrote: On Tuesday 13 November 2007, Andrew Morton wrote: I'll highlight the point that such bitops shouldn't be preemption points. Disagree.  *everything* should be a preemption point. So it's wrong that asm-generic/bitops/atomic.h

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-12 Thread David Brownell
> > It seems info on raw spinlocks is out > > of sync with current code. Allegedly it should be possible to just > > pass a raw_spinlock_t pointer to spin_lock_irqsave() and friends > > and have GCC sort out the right stuff ... but that didn't work. > > > > I speculate that either the

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-12 Thread Andrew Morton
On Mon, 12 Nov 2007 14:32:53 -0800 David Brownell <[EMAIL PROTECTED]> wrote: > On Monday 12 November 2007, Andrew Morton wrote: > > On Fri, 9 Nov 2007 11:36:19 -0800 David Brownell <[EMAIL PROTECTED]> wrote: > > > > > Provide new implementation infrastructure that platforms may choose to use > >

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-12 Thread David Brownell
On Monday 12 November 2007, Andrew Morton wrote: > On Fri, 9 Nov 2007 11:36:19 -0800 David Brownell <[EMAIL PROTECTED]> wrote: > > > Provide new implementation infrastructure that platforms may choose to use > > when implementing the GPIO programming interface. ... > > > > ... > > > > +/*

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-12 Thread Andrew Morton
On Fri, 9 Nov 2007 11:36:19 -0800 David Brownell <[EMAIL PROTECTED]> wrote: > Provide new implementation infrastructure that platforms may choose to use > when implementing the GPIO programming interface. Platforms can update their > GPIO support to use this. In many cases the incremental cost

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-12 Thread Andrew Morton
On Fri, 9 Nov 2007 11:36:19 -0800 David Brownell [EMAIL PROTECTED] wrote: Provide new implementation infrastructure that platforms may choose to use when implementing the GPIO programming interface. Platforms can update their GPIO support to use this. In many cases the incremental cost to

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-12 Thread David Brownell
On Monday 12 November 2007, Andrew Morton wrote: On Fri, 9 Nov 2007 11:36:19 -0800 David Brownell [EMAIL PROTECTED] wrote: Provide new implementation infrastructure that platforms may choose to use when implementing the GPIO programming interface. ... ... +/* gpio_lock protects

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-12 Thread Andrew Morton
On Mon, 12 Nov 2007 14:32:53 -0800 David Brownell [EMAIL PROTECTED] wrote: On Monday 12 November 2007, Andrew Morton wrote: On Fri, 9 Nov 2007 11:36:19 -0800 David Brownell [EMAIL PROTECTED] wrote: Provide new implementation infrastructure that platforms may choose to use when

Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-12 Thread David Brownell
It seems info on raw spinlocks is out of sync with current code. Allegedly it should be possible to just pass a raw_spinlock_t pointer to spin_lock_irqsave() and friends and have GCC sort out the right stuff ... but that didn't work. I speculate that either the design has

[patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-09 Thread David Brownell
Provide new implementation infrastructure that platforms may choose to use when implementing the GPIO programming interface. Platforms can update their GPIO support to use this. In many cases the incremental cost to access a non-inlined GPIO should be on the order of a dozen instructions, so it

[patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

2007-11-09 Thread David Brownell
Provide new implementation infrastructure that platforms may choose to use when implementing the GPIO programming interface. Platforms can update their GPIO support to use this. In many cases the incremental cost to access a non-inlined GPIO should be on the order of a dozen instructions, so it