Re: [openib-general] 2.6.18-rc5-mm1: drivers/infiniband/hw/amso1100/c2.c compile error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



    Roland> Yes, I agree that's a good plan, especially the
    Roland> documentation part.  However I would argue that what's in
    Roland> drivers/infiniband/hw/mthca/mthca_doorbell.h is
    Roland> legitimate: the driver uses __raw_writeq() when it exists
    Roland> and uses two __raw_writel()s properly serialized with a
    Roland> device-specific lock to get exactly the atomicity it needs
    Roland> on 32-bit archs.

    Bryan> On the off chance that you might be arguing that
    Bryan> mthca_write64 could be a candidate drop-in for writeq on
    Bryan> 32-bit arches:

No, quite the opposite.  I'm arguing that the wrappers in mthca do
legitimately belong in a device driver, since they encapsulate
device-specific knowledge about what serialization suffices when an
atomic __raw_writeq() is not available.

    Bryan> That approach might work on mthca hardware, but it's not
    Bryan> safe in general.  The ipath driver requires a proper
    Bryan> writeq(), for example, because the hardware will quite
    Bryan> legitimately treat 32-bit writes to some registers as
    Bryan> separate accesses, and screw things up royally.

Yes, that's an unfortunate feature of the ipath hardware that
apparently makes it impossible to drive on a generic 32-bit architecture.

So perhaps writeq()/__raw_writeq() need to be defined to generate a
single bus cycle to the extent that makes sense.  Which would mean
that it's not possible to implement on all architectures.

 - R.

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux