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> If the hardware/driver absolutely requires that the 64-bit
    Andrew> write be atomic on-the-bus then sure, the fix is to
    Andrew> disable that driver on that architecture in Kconfig.

    Andrew> If, however, the atomicity requirement is a software thing
    Andrew> (we need to be atomic against other CPU reads and writes)
    Andrew> then that can be solved with locking, and we can design
    Andrew> APIs for this which can be implemented efficiently on all
    Andrew> architectures.

    It seems that there are cases of both. ipath needs actual 64-bit bus
    transactions to work properly. mthca needs to make sure that if
    doorbell writes are split into two 32-bit halves, then no other writes
    go to the same MMIO page in between the halves.

    What do you think the API would look like? Something along the lines
    of mthca_doorbell.h, where we have macros for

    DECLARE_WRITEQ_LOCK()
    INIT_WRITEQ_LOCK()
    GET_WRITEQ_LOCK()

    which get stubbed out on architectures where writeq is already atomic,
    and then pass the lock into writeq()?

    But then you probably need some Kconfig symbol to say if writeq() is
    really atomic or just software atomic (for ipath et al to depend 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-01 23:09    [W:0.035 / U:1.424 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site