lkml.org 
[lkml]   [2006]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: 2.6.18-rc5-mm1: drivers/infiniband/hw/amso1100/c2.c compile error
    From
    Date
        Andrew> It depends on how many other devices have (or are expected
    Andrew> to have) mthca-like requirements. If the answer is "very
    Andrew> few, maybe none" then perhaps we don't need to go
    Andrew> designing generic interfaces to support such things.

    I actually don't know of any others -- not that I'm an expert on the
    range of devices that exist...

    What's your feeling about drivers like amso1100, which don't
    particularly care about atomicity, but just want to write a 64-bit
    quantity conveniently? Should we require writeq()/__raw_writeq() for
    all archs, and then define CONFIG_ARCH_HAS_64BIT_ATOMIC_MMIO_WRITES as
    appropriate?

    I see stuff like this is drivers/dma/ioatdma.c:

    #if (BITS_PER_LONG == 64)
    ioatdma_chan_write64(ioat_chan, IOAT_CHAINADDR_OFFSET, desc->phys);
    #else
    ioatdma_chan_write32(ioat_chan,
    IOAT_CHAINADDR_OFFSET_LOW,
    (u32) desc->phys);
    ioatdma_chan_write32(ioat_chan, IOAT_CHAINADDR_OFFSET_HIGH, 0);
    #endif

    and drivers/char/hpet.c:

    #ifndef readq
    static inline unsigned long long readq(void __iomem *addr)
    {
    return readl(addr) | (((unsigned long long)readl(addr + 4)) << 32LL);
    }
    #endif

    #ifndef writeq
    static inline void writeq(unsigned long long v, void __iomem *addr)
    {
    writel(v & 0xffffffff, addr);
    writel(v >> 32, addr + 4);
    }
    #endif

    and so on...

    - R.

    --
    VGER BF report: H 0
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2006-09-02 00:45    [W:0.041 / U:0.324 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site