lkml.org 
[lkml]   [2006]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [openib-general] 2.6.18-rc5-mm1: drivers/infiniband/hw/amso1100/c2.c compile error
From
Date
    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 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:03    [W:0.110 / U:45.984 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site