All of lore.kernel.org
 help / color / mirror / Atom feed
From: olof@austin.ibm.com (Olof Johansson)
To: Arnd Bergmann <arnd@arndb.de>
Cc: linuxppc64-dev@ozlabs.org, Paul Mackerras <paulus@samba.org>,
	linux-kernel@vger.kernel.org, Anton Blanchard <anton@samba.org>
Subject: Re: [PATCH 3/4] ppc64: Add driver for BPA iommu
Date: Thu, 28 Apr 2005 09:30:30 -0500	[thread overview]
Message-ID: <20050428143030.GC1023@austin.ibm.com> (raw)
In-Reply-To: <20050428140558.GB1023@austin.ibm.com>

On Thu, Apr 28, 2005 at 09:05:58AM -0500, Olof Johansson wrote:

> > +/* compute the hashed 6 bit index for the 4-way associative pte cache */
> > +static inline unsigned long
> > +get_ioc_hash(ioste iost_entry, unsigned long io_address)
> > +{
> > +	unsigned long iopte = get_ioptep(iost_entry, io_address);
> > +
> > +	return ((iopte & 0x000000000000001f8ul) >> 3)
> > +	     ^ ((iopte & 0x00000000000020000ul) >> 17)
> > +	     ^ ((iopte & 0x00000000000010000ul) >> 15)
> > +	     ^ ((iopte & 0x00000000000008000ul) >> 13)
> > +	     ^ ((iopte & 0x00000000000004000ul) >> 11)
> > +	     ^ ((iopte & 0x00000000000002000ul) >> 9)
> > +	     ^ ((iopte & 0x00000000000001000ul) >> 7);
> 
> Can't you reverse the subword by just doing one XOR instead of 6?

Ugh, I wrote that before I had coffee. No you can't, you can just negate
the value by doing the XOR. Nevermind.


-Olof

  reply	other threads:[~2005-04-28 14:30 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-28  7:54 [PATCH 0/4] ppc64: Introduce BPA platform Arnd Bergmann
2005-04-28  7:56 ` [PATCH 1/4] ppc64: add BPA platform type Arnd Bergmann
2005-04-28  7:58 ` [PATCH 2/4] ppc64: Add driver for BPA interrupt controllers Arnd Bergmann
2005-04-28  7:59 ` [PATCH 3/4] ppc64: Add driver for BPA iommu Arnd Bergmann
2005-04-28 14:05   ` Olof Johansson
2005-04-28 14:30     ` Olof Johansson [this message]
2005-04-29  4:35     ` Arnd Bergmann
2005-04-29  5:36       ` Olof Johansson
2005-04-29  5:48         ` Arnd Bergmann
2005-04-29  6:43           ` Benjamin Herrenschmidt
2005-04-29  8:31             ` Arnd Bergmann
2005-04-29 13:06               ` Paul Mackerras
2005-04-28  8:00 ` [PATCH 4/4] ppc64: Add SPU file system Arnd Bergmann
2005-04-28 14:44 ` [PATCH 0/4] ppc64: Introduce BPA platform Sonny Rao
2005-04-29  4:35   ` Arnd Bergmann

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=20050428143030.GC1023@austin.ibm.com \
    --to=olof@austin.ibm.com \
    --cc=anton@samba.org \
    --cc=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc64-dev@ozlabs.org \
    --cc=paulus@samba.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.