[lkml]   [2001]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: unsigned long ioremap()?
    Jes Sorensen wrote:
    > >>>>> "Abramo" == Abramo Bagnara <> writes:
    > Abramo> "David S. Miller" wrote:
    > >> One final point, I want to reiterate that I believe:
    > >>
    > >> foo = readl(&regs->bar);
    > >>
    > >> is perfectly legal and should not be discouraged and in particular,
    > >> not made painful to do.
    > Abramo> I disagree: regs it's not a dereferenceable thing and I think
    > Abramo> it's an abuse of pointer type. You're keeping a pointer that
    > Abramo> need a big sign on it saying "Don't dereference me", it's a
    > Abramo> mess.
    > Thats complete rubbish, in many cases the regs structure matches a
    > regs structure seen by another CPU on the other side of the PCI bus
    > (ie. the firmware case). There is nothing wrong with the above
    > approach as long as you keep in mind that you cannot dereference the
    > struct without using readl and you have to make sure to explicitly do
    > padding in the struct (not all CPUs guarantee the same natural
    > alignment).

    "As long as you handle with gloves thick enough such a shit, there's no

    Abramo Bagnara

    Opera Unica Phone: +39.546.656023
    Via Emilia Interna, 140
    48014 Castel Bolognese (RA) - Italy

    ALSA project
    It sounds good!
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 12:52    [W:0.023 / U:0.956 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site