mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arjan van de Ven <arjan@infradead.org>
To: Robert Walsh <rjwalsh@pathscale.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	Roland Dreier <rolandd@cisco.com>,
	linux-kernel@vger.kernel.org, openib-general@openib.org
Subject: Re: [PATCH 01/13]  [RFC] ipath basic headers
Date: Sat, 17 Dec 2005 23:25:23 +0100	[thread overview]
Message-ID: <1134858323.2997.11.camel@laptopd505.fenrus.org> (raw)
In-Reply-To: <1134857953.20575.59.camel@phosphene.durables.org>

On Sat, 2005-12-17 at 14:19 -0800, Robert Walsh wrote:
> > > +{
> > > +	void *ssv, *dsv;
> > > +	uint32_t csv;
> > > +	__asm__ __volatile__("cld\n\trep\n\tmovsb":"=&c"(csv), "=&D"(dsv),
> > > +			     "=&S"(ssv)
> > > +			     :"0"(cnt), "1"(dest), "2"(src)
> > > +			     :"memory");
> > > +}
> > 
> > No way we're gonna put assembler code into such a driver.
> 
> Why not?  The chip (and therefore the driver) only works with Opterons.
> It's tied to the HT bus, but PCI or anything like that.

and opterons can already run 2 architectures. And the HT bus is a
generic bus.. with public specs. Others than just AMD use it as well.

also.. what is wrong with memcpy and co ?

> > > +static __inline__ uint32_t ipath_kget_kreg32(const ipath_type stype,
> > > +					     ipath_kreg regno)
> > > +{
> > > +	volatile uint32_t *kreg32;
> > > +
> > > +	if (!devdata[stype].ipath_kregbase)
> > > +		return ~0;
> > > +
> > > +	kreg32 = (volatile uint32_t *)&devdata[stype].ipath_kregbase[regno];
> > 
> > volatile use is probably always wrong. but this whole functions looks like
> > a very odd wrapper anyway?
> 
> The volatile is there so the compiler doesn't optimize away the read.
> This is important, because reads of our hardware have side-effects and
> cannot be optimized out.

then you need to use readl() and family most like; they already take
care of this anyway.



  reply	other threads:[~2005-12-17 22:25 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20051031150618.627779f1.akpm@osdl.org>
2005-12-16 23:48 ` [PATCH 00/13] [RFC] IB: PathScale InfiniPath driver Roland Dreier
2005-12-16 23:48   ` [PATCH 01/13] [RFC] ipath basic headers Roland Dreier
2005-12-16 23:48     ` [PATCH 02/13] [RFC] ipath debug header Roland Dreier
2005-12-16 23:48       ` [PATCH 03/13] [RFC] ipath copy routines Roland Dreier
2005-12-16 23:48         ` [PATCH 04/13] [RFC] ipath LLD core, part 1 Roland Dreier
2005-12-16 23:48           ` [PATCH 05/13] [RFC] ipath LLD core, part 2 Roland Dreier
2005-12-16 23:48             ` [PATCH 06/13] [RFC] ipath LLD core, part 3 Roland Dreier
2005-12-16 23:48               ` [PATCH 07/13] [RFC] ipath core misc files Roland Dreier
2005-12-16 23:48                 ` [PATCH 08/13] [RFC] ipath core last bit Roland Dreier
2005-12-16 23:48                   ` [PATCH 09/13] [RFC] ipath IB driver headers Roland Dreier
2005-12-16 23:48                     ` [PATCH 10/13] [RFC] ipath verbs, part 1 Roland Dreier
2005-12-16 23:48                       ` [PATCH 11/13] [RFC] ipath verbs, part 2 Roland Dreier
2005-12-16 23:48                         ` [PATCH 12/13] [RFC] ipath verbs MAD handling Roland Dreier
2005-12-16 23:48                           ` [PATCH 13/13] [RFC] ipath Kconfig and Makefile Roland Dreier
2005-12-17 21:52                             ` Adrian Bunk
2005-12-17 22:54                               ` [openib-general] " Robert Walsh
2005-12-17 23:55                                 ` Adrian Bunk
2005-12-18  1:17                                   ` Robert Walsh
2005-12-18  0:27                                 ` Alan Cox
2005-12-18 19:23                             ` Sam Ravnborg
2005-12-20  0:32                               ` [openib-general] " Robert Walsh
2005-12-26  2:49                               ` Roland Dreier
2005-12-18 19:59                       ` [PATCH 10/13] [RFC] ipath verbs, part 1 Paul E. McKenney
2005-12-18 20:05                         ` [openib-general] " Robert Walsh
2005-12-19 20:50                         ` Ralph Campbell
2005-12-17 20:38                   ` [PATCH 08/13] [RFC] ipath core last bit Andrew Morton
2005-12-21  0:00                     ` Robert Walsh
2005-12-17 20:38                 ` [PATCH 07/13] [RFC] ipath core misc files Andrew Morton
2005-12-17 21:29                   ` Robert Walsh
2005-12-17 21:33                   ` Robert Walsh
2005-12-18  3:10                     ` Andrew Morton
2005-12-18  3:13                       ` Robert Walsh
2005-12-17 20:38           ` [PATCH 04/13] [RFC] ipath LLD core, part 1 Andrew Morton
2005-12-17 21:34             ` Robert Walsh
2005-12-17 12:38         ` [PATCH 03/13] [RFC] ipath copy routines Pekka Enberg
2005-12-17 21:38           ` Robert Walsh
2005-12-17 13:16         ` Christoph Hellwig
2005-12-17 20:38         ` Andrew Morton
2005-12-17 22:40           ` Robert Walsh
2005-12-18  3:19             ` Andrew Morton
2005-12-18  3:35               ` Adrian Bunk
2005-12-18  5:33               ` Robert Walsh
2005-12-18  9:33               ` David S. Miller
2005-12-18 19:52                 ` Robert Walsh
2005-12-18  3:27             ` Andi Kleen
2005-12-18  5:36               ` Robert Walsh
2005-12-18  5:41                 ` Andi Kleen
2005-12-18 13:25               ` Alan Cox
2005-12-17 12:33     ` [PATCH 01/13] [RFC] ipath basic headers Pekka Enberg
2005-12-17 21:55       ` Robert Walsh
2005-12-17 13:14     ` Christoph Hellwig
2005-12-17 21:51       ` Eric W. Biederman
2005-12-18  3:25         ` Andi Kleen
2005-12-18 15:02           ` Eric W. Biederman
2005-12-17 22:19       ` Robert Walsh
2005-12-17 22:25         ` Arjan van de Ven [this message]
2005-12-17 22:47           ` Robert Walsh
2005-12-17 20:38     ` Andrew Morton
2005-12-17 22:39       ` Robert Walsh
2005-12-18  3:14         ` Andrew Morton
2005-12-20  1:43       ` Robert Walsh
2005-12-17 13:16   ` [PATCH 00/13] [RFC] IB: PathScale InfiniPath driver Christoph Hellwig
2005-12-17 15:51     ` Roland Dreier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1134858323.2997.11.camel@laptopd505.fenrus.org \
    --to=arjan@infradead.org \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=openib-general@openib.org \
    --cc=rjwalsh@pathscale.com \
    --cc=rolandd@cisco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®