From: Fabien Chouteau <chouteau@adacore.com>
To: Alexander Graf <agraf@suse.de>
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/2] PPC: Add dump_mmu() for 6xx
Date: Thu, 20 Jun 2013 15:06:53 +0200 [thread overview]
Message-ID: <51C2FE6D.8080700@adacore.com> (raw)
In-Reply-To: <CBA64B11-E708-4C6B-948B-F4674131AC9E@suse.de>
On 06/20/2013 01:16 PM, Alexander Graf wrote:
>
> On 18.06.2013, at 18:04, Fabien Chouteau wrote:
>
>> On 06/18/2013 05:31 PM, Alexander Graf wrote:
>>>> + for (type = 0; type < 2; type++)
>>>
>>> You need braces on these. Please run your patch through checkpatch.pl :).
>>
>> I did ;)
>>
>> -> ./scripts/checkpatch.pl 0001-PPC-Add-dump_mmu-for-6xx.patch
>> total: 0 errors, 0 warnings, 51 lines checked
>>
>> 0001-PPC-Add-dump_mmu-for-6xx.patch has no obvious style problems and is ready for submission.
>
> Meh - broken script :). According to the CODING_STYLE convention all of the above need to be cluttered with braces ;).
Will do.
>>>> + for (way = 0; way < env->nb_ways; way++)
>>>> + for (entry = env->nb_tlb * type + env->tlb_per_way * way;
>>>> + entry < (env->nb_tlb * type + env->tlb_per_way * (way + 1));
>>>> + entry++) {
>>>> +
>>>> + tlb = &env->tlb.tlb6[entry];
>>>> + cpu_fprintf(f, "TLB %02d/%02d %s way:%d %s ["
>>>> + TARGET_FMT_lx " " TARGET_FMT_lx "]\n",
>>>> + entry % env->nb_tlb, env->nb_tlb,
>>>> + type ? "code" : "data", way,
>>>> + pte_is_valid(tlb->pte0) ? "valid" : "inval",
>>>> + tlb->EPN, tlb->EPN + TARGET_PAGE_SIZE);
>>>> + }
>>>
>>> I thought 6xx and 74xx also support HTAB and SRs? Shouldn't we dump those as well?
>>>
>>
>> I don't know what that is, can you send me an example of what the printf line should be?
>
> SRs are similar to the SLB that book3s_64 print out. Just that there are a fixed smaller number of them (16). Basically you'd dump the env->sr array, similar to how the debug functions in get_segment_6xx_tlb() dump it.
>
> For the HTAB I think SDR1 should be enough, so you don't need to do too much here. If you like, you can just dump the decoded fields env->htab_base and env->htab_mask. Dumping the whole HTAB would just explode the output.
>
> However, you also should definitely dump all (valid) BATs. Check out get_bat_6xx_tlb() for debug code that dumps BATs.
>
Ok I'll have a look at that, and BATs should definitely be printed out.
--
Fabien Chouteau
prev parent reply other threads:[~2013-06-20 13:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-18 14:53 [Qemu-devel] [PATCH 1/2] PPC: Add dump_mmu() for 6xx Fabien Chouteau
2013-06-18 14:53 ` [Qemu-devel] [PATCH 2/2] PPC: Fix GDB read on code area for PPC6xx Fabien Chouteau
2013-06-18 15:34 ` Alexander Graf
2013-06-21 18:10 ` Jan Kiszka
2013-06-22 0:26 ` Alexander Graf
2013-06-24 8:40 ` Fabien Chouteau
2013-06-18 15:31 ` [Qemu-devel] [PATCH 1/2] PPC: Add dump_mmu() for 6xx Alexander Graf
2013-06-18 16:04 ` Fabien Chouteau
2013-06-20 11:16 ` Alexander Graf
2013-06-20 13:06 ` Fabien Chouteau [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=51C2FE6D.8080700@adacore.com \
--to=chouteau@adacore.com \
--cc=agraf@suse.de \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.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.