[lkml]   [2000]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] isa_{read,write}{w,l} fixed
    Philipp Rumpf wrote:
    > > I do. And the patch is wrong. Physical addresses are unsigned long. Take the
    > > errors as a chance to fix up the types in the driver.
    > I disagree. A lot of drivers seem to use structs as a cheap way to get
    > separate namespaces for their readl() / sbus_readl() offsets, and inconsistent
    > behaviour between readb() and isa_readb() (as well as isa_readb() on ARM
    > and isa_reab() on x86) would be unnecessarily confusing.

    Two key points here --

    * isa_xxx are only to ease the transition to newstyle ioremap. if you
    are hacking code, go ahead and update it to use

    * You can never directly use a struct to access an offset in MMIO
    space. To do so is broken and bad bad bad. The only acceptable way is

    my_struct = ioremap (...);
    my_reg = readb(&my_struct->foo_register);

    I much prefer to avoid structs, and use macros to access registers

    my_reg = RTL_R8 (FooRegisterConstant);



    Jeff Garzik | "Vegetarian" is the Indian word
    Building 1024 | for 'lousy hunter.'
    MandrakeSoft, Inc. |

    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:56    [W:0.019 / U:5.076 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site