linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Will Schmidt <will_schmidt@vnet.ibm.com>
Cc: linuxppc-dev@ozlabs.org, paulus@samba.org
Subject: Re: [PATCH] [powerpc v2] update xmon slb code
Date: Wed, 31 Oct 2007 11:57:41 +1100	[thread overview]
Message-ID: <1193792261.9928.82.camel@pasglop> (raw)
In-Reply-To: <20071030215037.12776.73871.stgit@farscape.rchland.ibm.com>


On Tue, 2007-10-30 at 16:50 -0500, Will Schmidt wrote:
> [powerpc] update xmon slb code
> 
> This adds a bit more detail to the xmon SLB output.  When the valid bit is
> set, This displays the ESID and VSID values, as well as decoding the
> segment size. (1T or 256M).  This supresses the output for any slb entries
> that contain only zeros.
> 
> sample output from power6 (1T segment support):

 .../....

> 
> Tested on power5 and power6.
> 
> Signed-Off-By: Will Schmidt <will_schmidt@vnet.ibm.com>

Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

> ---
> This version adds padding around the ESID and VSID fields, and the LLP bits
> are displayed too.  (Per request from Olof and Ben).
> I'll try to follow up sometime later with code that will handle decoding page
> sizes.  I dont have a testcase handy to properly exercise that yet. :-)
> ---
> 
>  arch/powerpc/xmon/xmon.c |   27 +++++++++++++++++++++------
>  1 files changed, 21 insertions(+), 6 deletions(-)
> 
> 
> diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
> index 121b04d..93c26c3 100644
> --- a/arch/powerpc/xmon/xmon.c
> +++ b/arch/powerpc/xmon/xmon.c
> @@ -2527,16 +2527,31 @@ static void xmon_print_symbol(unsigned long address, const char *mid,
>  static void dump_slb(void)
>  {
>  	int i;
> -	unsigned long tmp;
> +	unsigned long esid,vsid,valid;
> +	unsigned long llp_bits;
>  
>  	printf("SLB contents of cpu %x\n", smp_processor_id());
>  
>  	for (i = 0; i < SLB_NUM_ENTRIES; i++) {
> -		asm volatile("slbmfee  %0,%1" : "=r" (tmp) : "r" (i));
> -		printf("%02d %016lx ", i, tmp);
> -
> -		asm volatile("slbmfev  %0,%1" : "=r" (tmp) : "r" (i));
> -		printf("%016lx\n", tmp);
> +		asm volatile("slbmfee  %0,%1" : "=r" (esid) : "r" (i));
> +		asm volatile("slbmfev  %0,%1" : "=r" (vsid) : "r" (i));
> +		valid = (esid & SLB_ESID_V);
> +		if (valid | esid | vsid) {
> +			printf("%02d %016lx %016lx", i, esid, vsid);
> +			if (valid) {
> +				llp_bits = vsid & SLB_VSID_LLP;
> +				if (vsid & SLB_VSID_B_1T) {
> +					printf("  1T  ESID=%9lx  VSID=%10lx LLP bits:%3lx \n",
> +						GET_ESID_1T(esid),vsid >> SLB_VSID_SHIFT_1T,
> +						llp_bits);
> +				} else {
> +					printf(" 256M ESID=%9lx  VSID=%10lx LLP bits:%3lx \n",
> +						GET_ESID(esid),vsid >> SLB_VSID_SHIFT,
> +						llp_bits);
> +				}
> +			} else
> +				printf("\n");
> +		}
>  	}
>  }
>  
> 
> 
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev

  reply	other threads:[~2007-10-31  0:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-30 21:50 [PATCH] [powerpc v2] update xmon slb code Will Schmidt
2007-10-31  0:57 ` Benjamin Herrenschmidt [this message]
2007-10-31  1:26 ` Olof Johansson
2007-10-31  1:42 ` Paul Mackerras

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=1193792261.9928.82.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.org \
    --cc=will_schmidt@vnet.ibm.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;
as well as URLs for NNTP newsgroup(s).