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



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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: [openib-general] Re: [PATCH 0 of 18] ipath driver - for inclusion in 2.6.17
    ... Roland> atomic_set_maskcalls. ... Bryan> objects, but what you say makes sense. ... What if you moved the MAD query handling code into your core driver? ...
    (Linux-Kernel)
  • Re: CE 5.0 Ram question.
    ... He wasn't guessing at the solution, that was the answer to your question. ... If the memory is ... initialized properly in hardware ... "Bryan" wrote in message ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Remapping pages mapped to userspace
    ... Bryan> Why would you not want accesses to explode? ... Bryan> hardware for userspace to talk to any more. ...
    (Linux-Kernel)
  • Re: [SLE] SUSE Linux 10.1 - 32-bit or 64-bit
    ... On Monday 15 May 2006 11:05 am, Bryan J. Smith wrote: ... I do not see any reference to PAE 52-bit in the AMD 64 Architecture ...
    (SuSE)
  • Re: Andrew Luck...Moran
    ... Ask Jake Locker...or Bryan Brohm...how that worked out. ... He can always go back to Stanford 15 years from now ... and get that architecture degree. ...
    (rec.sport.football.college)