[lkml]   [1999]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: Ideas for abstracting driver IO from bus implementation?

    >Solaris has an equivalent sort of abstraction layer, where you make a DDI
    >call to indirectly access any device register. I'm wondering if such an
    >abstraction layer would be of any use for other types of Linux drivers,
    >and if so, how I should design my API to make it as broadly useful as

    And as Larry McVoy will tell you- he thought that for the Solaris DDI/DKI
    we went *way* overboard on this. It isn't even just the indirect register
    access, but the whole notion of hierarchies of busses and their
    interrelations for both CPU access to devices and DMA accesses to memory
    and/or other devices. This really went to town, and cost performance
    bigtime. I suspect that if this were done now though the performance could
    have been mostly bought back changes in compiler technology since then.

    *BSD has a rather nice intermediate approach to this. It doesn't require a
    tree hierarchy for devices (which has the the nice property of giving a
    digraph for bursts and widths), nor does it really treat DMA precisely
    within the same framework, but does encapsulate relatively nicely the
    notion that any particular device should be accessed via some sort of
    bus_space_WIDTH type of function/macro. Linux sort of has this already in
    that each platform has it's own {in,out}foo functions- but that's a bit
    limited as you point out (it requires there be no more than one system IO

    To answer your question above- yes, I could see it being of general use-
    it might make drivers a bit easier to share with really wierd
    architectures if the access abstraction is simple but strong.

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:50    [W:0.019 / U:26.120 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site