lkml.org 
[lkml]   [2009]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH] x86: Remove readq()/writeq() on 32-bit
    From
    From: Roland Dreier <rdreier@cisco.com>
    Date: Tue, 28 Apr 2009 12:05:10 -0700

    > As discussed in <http://lkml.org/lkml/2009/4/19/164> and follow-ups,
    > readq()/writeq() for 32-bit x86 are implemented as two readl()/writel()
    > operations. This is not atomic (in the sense that another MMIO
    > operation from another CPU or thread can be done in the middle of the
    > two read/writes), and may not access the two halves of the register in
    > the correct order to work with hardware.
    >
    > Rather than silently providing a 32-bit fallback that leaves a
    > possibility for strange driver bugs, it's better to provide readq()
    > and writeq() only for 64-bit architectures, and have a compile failure
    > on 32-bit architectures that forces driver authors to think about what
    > the correct solution is.
    >
    > This essentially reverts 2c5643b1 ("x86: provide readq()/writeq() on
    > 32-bit too") and follow-on commits. If in the future someone wants to
    > provide a generic solution for all 32-bit architectures, that's great,
    > but there's not much point in providing (arguably broken)
    > implementations for only one architecture, since any portable driver
    > will have to implement fallbacks for other architectures anyway.
    >
    > Signed-off-by: Roland Dreier <rolandd@cisco.com>

    Acked-by: David S. Miller <davem@davemloft.net>


    \
     
     \ /
      Last update: 2009-04-29 07:15    [W:0.027 / U:119.096 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site