lkml.org 
[lkml]   [2008]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [patch 2.6.25-rc5 1/2] gpiolib: dynamic gpio number allocation
    On Thu, 13 Mar 2008 16:53:58 -0800 David Brownell <david-b@pacbell.net> wrote:

    > On Thursday 13 March 2008, Andrew Morton wrote:
    > > On Thu, 13 Mar 2008 15:18:58 -0800
    > > David Brownell <david-b@pacbell.net> wrote:
    > >
    > > > On Thursday 13 March 2008, Andrew Morton wrote:
    > > >
    > > > > hm. I suppose that if someone want a huge number of GPIOs then we can
    > > > > convert this to a bitmap or an IDR tree easily enough.
    > > >
    > > > Actually, I tried IDRs for a while and they broke platforms
    > > > which needed to initialize and use GPIOs early: before kmalloc
    > > > would work. A real PITA that was -- and slow too.
    > >
    > > If IDRs were slow, that linear search will be glacial.
    >
    > The slowness of IDRs was needing to use them for the
    > routine lookups ... versus the current array index,
    > which costs a fraction of an instruction cycle and
    > doesn't need separate locks.
    >
    > Or were you implying they should be used for something
    > other than mapping GPIO numbers to controllers/state?
    >

    For dynamic allocation. There should be no need for lookups outside
    register/unregister.


    Where did the CONFIG_NR_GPIOS discussion disappear to?


    \
     
     \ /
      Last update: 2008-03-14 03:21    [W:5.518 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site