From: Tom St Denis <tom.stdenis-5C7GfCeVMHo@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: Tom St Denis <tom.stdenis-5C7GfCeVMHo@public.gmane.org>
Subject: [PATCH umr] Tidy up skipping PDE=>PTE mappings
Date: Mon, 6 Nov 2017 09:56:52 -0500 [thread overview]
Message-ID: <20171106145652.24810-1-tom.stdenis@amd.com> (raw)
Should fix the indentation now when a PDE entry is actually a PTE.
Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
---
src/lib/read_vram.c | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/src/lib/read_vram.c b/src/lib/read_vram.c
index 51823d71021e..89d55ff1bef6 100644
--- a/src/lib/read_vram.c
+++ b/src/lib/read_vram.c
@@ -509,20 +509,20 @@ static int umr_access_vram_ai(struct umr_asic *asic, uint32_t vmid,
pde_fields.system = (pde_entry >> 1) & 1;
pde_fields.cache = (pde_entry >> 2) & 1;
pde_fields.pte = (pde_entry >> 54) & 1;
- if (!pde_fields.pte && memcmp(&pde_fields, &pde_array[pde_cnt], sizeof pde_fields) && asic->options.verbose)
- fprintf(stderr, "[VERBOSE]: %s PDE%d=0x%016llx, VA=0x%012llx, PBA==0x%012llx, V=%d, S=%d, C=%d, P=%d\n",
- &indentation[12-pde_cnt*3],
- pde_cnt,
- (unsigned long long)pde_entry,
- (unsigned long long)address & va_mask,
- (unsigned long long)pde_fields.pte_base_addr,
- (int)pde_fields.valid,
- (int)pde_fields.system,
- (int)pde_fields.cache,
- (int)pde_fields.pte);
- memcpy(&pde_array[pde_cnt++], &pde_fields, sizeof pde_fields);
-
- if (pde_fields.pte) {
+ if (!pde_fields.pte) {
+ if (memcmp(&pde_fields, &pde_array[pde_cnt], sizeof pde_fields) && asic->options.verbose)
+ fprintf(stderr, "[VERBOSE]: %s PDE%d=0x%016llx, VA=0x%012llx, PBA==0x%012llx, V=%d, S=%d, C=%d, P=%d\n",
+ &indentation[12-pde_cnt*3],
+ pde_cnt,
+ (unsigned long long)pde_entry,
+ (unsigned long long)address & va_mask,
+ (unsigned long long)pde_fields.pte_base_addr,
+ (int)pde_fields.valid,
+ (int)pde_fields.system,
+ (int)pde_fields.cache,
+ (int)pde_fields.pte);
+ memcpy(&pde_array[pde_cnt++], &pde_fields, sizeof pde_fields);
+ } else {
pte_entry = pde_entry;
goto pde_is_pte;
}
--
2.12.0
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
reply other threads:[~2017-11-06 14:56 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20171106145652.24810-1-tom.stdenis@amd.com \
--to=tom.stdenis-5c7gfcevmho@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.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