linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc: Fix xmon ml/mz commands to work with 64-bit values
Date: Wed, 04 May 2011 15:46:20 +1000	[thread overview]
Message-ID: <1304487980.2513.355.camel@pasglop> (raw)
In-Reply-To: <1304484194.2513.348.camel@pasglop>

On Wed, 2011-05-04 at 14:43 +1000, Benjamin Herrenschmidt wrote:
> On Fri, 2011-04-08 at 08:18 -0400, Josh Boyer wrote:
> > The ml and and mz commands in xmon currently only work on 32-bit values.
> > This leads to odd issues when trying to use them on a ppc64 machine.  If
> > one specified 64-bit addresses to mz, it would loop on the same output
> > indefinitely.  The ml command would fail to find any 64-bit values in a
> > memory range, even though one could clearly see them present with the d
> > command.
> > 
> > This adds a small function that mimics GETWORD, but works for 64-bit
> > values.  The data types involved in these commands are also changed to
> > 'unsigned long' instead of just 'unsigned'.
> > 
> > Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
> 
> Well if you're going to mimic GETWORD, why not replace it everywhere ?
> 
> Or just do that :-)
> 
> #if BITS_PER_LONG == 32
> #define GETLONG(v)	GETWORD(v)
> #else
> #define GETLONG(v)	((GETWORD(v) << 32) | GETWORD(v + 4))
> #endif

Note that Paul mentions the whole thing is pretty much useless
anyways :-)

It's a remnant of the xmon code running in "foreign" environments such
as little endian he reckons. You could probably just dereference the
value.

Now it has the side effect of potentially avoiding alignment interrupts
which might be a "good thing" but then, we don't do it everywhere in
xmon so it's pointless.

Cheers,
Ben.

      reply	other threads:[~2011-05-04  5:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-08 12:18 [PATCH] powerpc: Fix xmon ml/mz commands to work with 64-bit values Josh Boyer
2011-05-04  4:43 ` Benjamin Herrenschmidt
2011-05-04  5:46   ` Benjamin Herrenschmidt [this message]

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=1304487980.2513.355.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=jwboyer@linux.vnet.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).