FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Crash Utility

 
 
LinkBack Thread Tools
 
Old 02-02-2012, 07:43 AM
"Suzuki K. Poulose"
 
Default Non-linear address translation routine

This patch moves the common code for traversing through the PGD, PTE
tables in userspace virtual address translation and vmalloc address translation
to a new routine. This will help us to make changes to the common code
at a single place. This will be used for board based definitions for address
translation

Signed-off-by: Suzuki K. Poulose <suzuki@in.ibm.com>
---

ppc.c | 184 +++++++++++++++++++++++------------------------------------------
1 files changed, 65 insertions(+), 119 deletions(-)

diff --git a/ppc.c b/ppc.c
index 9e704d0..cfa3f5f 100755
--- a/ppc.c
+++ b/ppc.c
@@ -262,6 +262,69 @@ ppc_dump_machdep_table(ulong arg)
fprintf(fp, " machspec: %lx
", (ulong)machdep->machspec);
}

+static int
+ppc_pgd_vtop(ulong *pgd, ulong vaddr, physaddr_t *paddr, int verbose)
+{
+ ulong *page_dir;
+ ulong *page_middle;
+ ulong *page_table;
+ ulong pgd_pte;
+ ulong pte;
+
+ if (verbose)
+ fprintf(fp, "PAGE DIRECTORY: %lx
", (ulong)pgd);
+
+ page_dir = pgd + (vaddr >> PGDIR_SHIFT);
+
+ FILL_PGD(PAGEBASE(pgd), KVADDR, PAGESIZE());
+ pgd_pte = ULONG(machdep->pgd + PAGEOFFSET(page_dir));
+
+ if (verbose)
+ fprintf(fp, " PGD: %lx => %lx
", (ulong)page_dir, pgd_pte);
+
+ if (!pgd_pte)
+ goto no_page;
+
+ page_middle = (ulong *)pgd_pte;
+
+ if (machdep->flags & CPU_BOOKE)
+ page_table = page_middle + (BTOP(vaddr) & (PTRS_PER_PTE - 1));
+ else {
+ page_table = (ulong *)((pgd_pte & (ulong)machdep->pagemask) + machdep->kvbase);
+ page_table += ((ulong)BTOP(vaddr) & (PTRS_PER_PTE-1));
+ }
+
+ if (verbose)
+ fprintf(fp, " PMD: %lx => %lx
", (ulong)page_middle,
+ (ulong)page_table);
+
+ FILL_PTBL(PAGEBASE(page_table), KVADDR, PAGESIZE());
+ pte = ULONG(machdep->ptbl + PAGEOFFSET(page_table));
+
+ if (verbose)
+ fprintf(fp, " PTE: %lx => %lx
", (ulong)page_table, pte);
+
+ if (!(pte & _PAGE_PRESENT)) {
+ if (pte && verbose) {
+ fprintf(fp, "
");
+ ppc_translate_pte(pte, 0, 0);
+ }
+ goto no_page;
+ }
+
+ if (verbose) {
+ fprintf(fp, " PAGE: %lx

", PAGEBASE(pte));
+ ppc_translate_pte(pte, 0, 0);
+ }
+
+ *paddr = PAGEBASE(pte) + PAGEOFFSET(vaddr);
+
+ return TRUE;
+
+no_page:
+ return FALSE;
+
+}

/*
* Translates a user virtual address to its physical address. cmd_vtop()
@@ -278,11 +341,6 @@ ppc_uvtop(struct task_context *tc, ulong vaddr, physaddr_t *paddr, int verbose)
{
ulong mm, active_mm;
ulong *pgd;
- ulong *page_dir;
- ulong *page_middle;
- ulong *page_table;
- ulong pgd_pte;
- ulong pte;

if (!tc)
error(FATAL, "current context invalid
");
@@ -318,62 +376,7 @@ ppc_uvtop(struct task_context *tc, ulong vaddr, physaddr_t *paddr, int verbose)
FAULT_ON_ERROR);
}

- if (verbose)
- fprintf(fp, "PAGE DIRECTORY: %lx
", (ulong)pgd);
-
- page_dir = pgd + (vaddr >> PGDIR_SHIFT);
-
- FILL_PGD(PAGEBASE(pgd), KVADDR, PAGESIZE());
- pgd_pte = ULONG(machdep->pgd + PAGEOFFSET(page_dir));
-
- if (verbose)
- fprintf(fp, " PGD: %lx => %lx
", (ulong)page_dir, pgd_pte);
-
- if (!pgd_pte)
- goto no_upage;
-
- page_middle = (ulong *)pgd_pte;
-
- if (machdep->flags & CPU_BOOKE)
- page_table = page_middle + (BTOP(vaddr) & (PTRS_PER_PTE - 1));
- else {
- page_table = (ulong *)((pgd_pte & (ulong)machdep->pagemask) + machdep->kvbase);
- page_table += ((ulong)BTOP(vaddr) & (PTRS_PER_PTE-1));
- }
-
- if (verbose)
- fprintf(fp, " PMD: %lx => %lx
",(ulong)page_middle,
- (ulong)page_table);
-
- FILL_PTBL(PAGEBASE(page_table), KVADDR, PAGESIZE());
- pte = ULONG(machdep->ptbl + PAGEOFFSET(page_table));
-
- if (verbose)
- fprintf(fp, " PTE: %lx => %lx
", (ulong)page_table, pte);
-
- if (!(pte & _PAGE_PRESENT)) {
- *paddr = pte;
- if (pte && verbose) {
- fprintf(fp, "
");
- ppc_translate_pte(pte, 0, 0);
- }
- goto no_upage;
- }
-
- if (!pte)
- goto no_upage;
-
- *paddr = PAGEBASE(pte) + PAGEOFFSET(vaddr);
-
- if (verbose) {
- fprintf(fp, " PAGE: %lx

", PAGEBASE(pte));
- ppc_translate_pte(pte, 0, 0);
- }
-
- return TRUE;
-
-no_upage:
- return FALSE;
+ return ppc_pgd_vtop(pgd, vaddr, paddr, verbose);
}

/*
@@ -385,11 +388,6 @@ static int
ppc_kvtop(struct task_context *tc, ulong kvaddr, physaddr_t *paddr, int verbose)
{
ulong *pgd;
- ulong *page_dir;
- ulong *page_middle;
- ulong *page_table;
- ulong pgd_pte;
- ulong pte;

if (!IS_KVADDR(kvaddr))
return FALSE;
@@ -406,59 +404,7 @@ ppc_kvtop(struct task_context *tc, ulong kvaddr, physaddr_t *paddr, int verbose)
}

pgd = (ulong *)vt->kernel_pgd[0];
-
- if (verbose)
- fprintf(fp, "PAGE DIRECTORY: %lx
", (ulong)pgd);
-
- page_dir = pgd + (kvaddr >> PGDIR_SHIFT);
-
- FILL_PGD(PAGEBASE(pgd), KVADDR, PAGESIZE());
- pgd_pte = ULONG(machdep->pgd + PAGEOFFSET(page_dir));
-
- if (verbose)
- fprintf(fp, " PGD: %lx => %lx
", (ulong)page_dir, pgd_pte);
-
- if (!pgd_pte)
- goto no_kpage;
-
- page_middle = (ulong *)pgd_pte;
-
- if (machdep->flags & CPU_BOOKE)
- page_table = page_middle + (BTOP(kvaddr) & (PTRS_PER_PTE - 1));
- else {
- page_table = (ulong *)((pgd_pte & (ulong)machdep->pagemask) + machdep->kvbase);
- page_table += ((ulong)BTOP(kvaddr) & (PTRS_PER_PTE-1));
- }
-
- if (verbose)
- fprintf(fp, " PMD: %lx => %lx
", (ulong)page_middle,
- (ulong)page_table);
-
- FILL_PTBL(PAGEBASE(page_table), KVADDR, PAGESIZE());
- pte = ULONG(machdep->ptbl + PAGEOFFSET(page_table));
-
- if (verbose)
- fprintf(fp, " PTE: %lx => %lx
", (ulong)page_table, pte);
-
- if (!(pte & _PAGE_PRESENT)) {
- if (pte && verbose) {
- fprintf(fp, "
");
- ppc_translate_pte(pte, 0, 0);
- }
- goto no_kpage;
- }
-
- if (verbose) {
- fprintf(fp, " PAGE: %lx

", PAGEBASE(pte));
- ppc_translate_pte(pte, 0, 0);
- }
-
- *paddr = PAGEBASE(pte) + PAGEOFFSET(kvaddr);
-
- return TRUE;
-
-no_kpage:
- return FALSE;
+ return ppc_pgd_vtop(pgd, kvaddr, paddr, verbose);
}

/*

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 
Old 02-13-2012, 05:54 AM
"Suzuki K. Poulose"
 
Default Non-linear address translation routine

This patch moves the common code for traversing through the PGD, PTE
tables in userspace virtual address translation and vmalloc address translation
to a new routine. This will help us to make changes to the common code
at a single place. This will be used for board based definitions for address
translation

Signed-off-by: Suzuki K. Poulose <suzuki@in.ibm.com>
---

ppc.c | 184 +++++++++++++++++++++++------------------------------------------
1 files changed, 65 insertions(+), 119 deletions(-)

diff --git a/ppc.c b/ppc.c
index a9068c2..3834e7f 100755
--- a/ppc.c
+++ b/ppc.c
@@ -259,6 +259,69 @@ ppc_dump_machdep_table(ulong arg)
fprintf(fp, " machspec: %lx
", (ulong)machdep->machspec);
}

+static int
+ppc_pgd_vtop(ulong *pgd, ulong vaddr, physaddr_t *paddr, int verbose)
+{
+ ulong *page_dir;
+ ulong *page_middle;
+ ulong *page_table;
+ ulong pgd_pte;
+ ulong pte;
+
+ if (verbose)
+ fprintf(fp, "PAGE DIRECTORY: %lx
", (ulong)pgd);
+
+ page_dir = pgd + (vaddr >> PGDIR_SHIFT);
+
+ FILL_PGD(PAGEBASE(pgd), KVADDR, PAGESIZE());
+ pgd_pte = ULONG(machdep->pgd + PAGEOFFSET(page_dir));
+
+ if (verbose)
+ fprintf(fp, " PGD: %lx => %lx
", (ulong)page_dir, pgd_pte);
+
+ if (!pgd_pte)
+ goto no_page;
+
+ page_middle = (ulong *)pgd_pte;
+
+ if (machdep->flags & CPU_BOOKE)
+ page_table = page_middle + (BTOP(vaddr) & (PTRS_PER_PTE - 1));
+ else {
+ page_table = (ulong *)((pgd_pte & (ulong)machdep->pagemask) + machdep->kvbase);
+ page_table += ((ulong)BTOP(vaddr) & (PTRS_PER_PTE-1));
+ }
+
+ if (verbose)
+ fprintf(fp, " PMD: %lx => %lx
", (ulong)page_middle,
+ (ulong)page_table);
+
+ FILL_PTBL(PAGEBASE(page_table), KVADDR, PAGESIZE());
+ pte = ULONG(machdep->ptbl + PAGEOFFSET(page_table));
+
+ if (verbose)
+ fprintf(fp, " PTE: %lx => %lx
", (ulong)page_table, pte);
+
+ if (!(pte & _PAGE_PRESENT)) {
+ if (pte && verbose) {
+ fprintf(fp, "
");
+ ppc_translate_pte(pte, 0, 0);
+ }
+ goto no_page;
+ }
+
+ if (verbose) {
+ fprintf(fp, " PAGE: %lx

", PAGEBASE(pte));
+ ppc_translate_pte(pte, 0, 0);
+ }
+
+ *paddr = PAGEBASE(pte) + PAGEOFFSET(vaddr);
+
+ return TRUE;
+
+no_page:
+ return FALSE;
+
+}

/*
* Translates a user virtual address to its physical address. cmd_vtop()
@@ -275,11 +338,6 @@ ppc_uvtop(struct task_context *tc, ulong vaddr, physaddr_t *paddr, int verbose)
{
ulong mm, active_mm;
ulong *pgd;
- ulong *page_dir;
- ulong *page_middle;
- ulong *page_table;
- ulong pgd_pte;
- ulong pte;

if (!tc)
error(FATAL, "current context invalid
");
@@ -315,62 +373,7 @@ ppc_uvtop(struct task_context *tc, ulong vaddr, physaddr_t *paddr, int verbose)
FAULT_ON_ERROR);
}

- if (verbose)
- fprintf(fp, "PAGE DIRECTORY: %lx
", (ulong)pgd);
-
- page_dir = pgd + (vaddr >> PGDIR_SHIFT);
-
- FILL_PGD(PAGEBASE(pgd), KVADDR, PAGESIZE());
- pgd_pte = ULONG(machdep->pgd + PAGEOFFSET(page_dir));
-
- if (verbose)
- fprintf(fp, " PGD: %lx => %lx
", (ulong)page_dir, pgd_pte);
-
- if (!pgd_pte)
- goto no_upage;
-
- page_middle = (ulong *)pgd_pte;
-
- if (machdep->flags & CPU_BOOKE)
- page_table = page_middle + (BTOP(vaddr) & (PTRS_PER_PTE - 1));
- else {
- page_table = (ulong *)((pgd_pte & (ulong)machdep->pagemask) + machdep->kvbase);
- page_table += ((ulong)BTOP(vaddr) & (PTRS_PER_PTE-1));
- }
-
- if (verbose)
- fprintf(fp, " PMD: %lx => %lx
",(ulong)page_middle,
- (ulong)page_table);
-
- FILL_PTBL(PAGEBASE(page_table), KVADDR, PAGESIZE());
- pte = ULONG(machdep->ptbl + PAGEOFFSET(page_table));
-
- if (verbose)
- fprintf(fp, " PTE: %lx => %lx
", (ulong)page_table, pte);
-
- if (!(pte & _PAGE_PRESENT)) {
- *paddr = pte;
- if (pte && verbose) {
- fprintf(fp, "
");
- ppc_translate_pte(pte, 0, 0);
- }
- goto no_upage;
- }
-
- if (!pte)
- goto no_upage;
-
- *paddr = PAGEBASE(pte) + PAGEOFFSET(vaddr);
-
- if (verbose) {
- fprintf(fp, " PAGE: %lx

", PAGEBASE(pte));
- ppc_translate_pte(pte, 0, 0);
- }
-
- return TRUE;
-
-no_upage:
- return FALSE;
+ return ppc_pgd_vtop(pgd, vaddr, paddr, verbose);
}

/*
@@ -382,11 +385,6 @@ static int
ppc_kvtop(struct task_context *tc, ulong kvaddr, physaddr_t *paddr, int verbose)
{
ulong *pgd;
- ulong *page_dir;
- ulong *page_middle;
- ulong *page_table;
- ulong pgd_pte;
- ulong pte;

if (!IS_KVADDR(kvaddr))
return FALSE;
@@ -403,59 +401,7 @@ ppc_kvtop(struct task_context *tc, ulong kvaddr, physaddr_t *paddr, int verbose)
}

pgd = (ulong *)vt->kernel_pgd[0];
-
- if (verbose)
- fprintf(fp, "PAGE DIRECTORY: %lx
", (ulong)pgd);
-
- page_dir = pgd + (kvaddr >> PGDIR_SHIFT);
-
- FILL_PGD(PAGEBASE(pgd), KVADDR, PAGESIZE());
- pgd_pte = ULONG(machdep->pgd + PAGEOFFSET(page_dir));
-
- if (verbose)
- fprintf(fp, " PGD: %lx => %lx
", (ulong)page_dir, pgd_pte);
-
- if (!pgd_pte)
- goto no_kpage;
-
- page_middle = (ulong *)pgd_pte;
-
- if (machdep->flags & CPU_BOOKE)
- page_table = page_middle + (BTOP(kvaddr) & (PTRS_PER_PTE - 1));
- else {
- page_table = (ulong *)((pgd_pte & (ulong)machdep->pagemask) + machdep->kvbase);
- page_table += ((ulong)BTOP(kvaddr) & (PTRS_PER_PTE-1));
- }
-
- if (verbose)
- fprintf(fp, " PMD: %lx => %lx
", (ulong)page_middle,
- (ulong)page_table);
-
- FILL_PTBL(PAGEBASE(page_table), KVADDR, PAGESIZE());
- pte = ULONG(machdep->ptbl + PAGEOFFSET(page_table));
-
- if (verbose)
- fprintf(fp, " PTE: %lx => %lx
", (ulong)page_table, pte);
-
- if (!(pte & _PAGE_PRESENT)) {
- if (pte && verbose) {
- fprintf(fp, "
");
- ppc_translate_pte(pte, 0, 0);
- }
- goto no_kpage;
- }
-
- if (verbose) {
- fprintf(fp, " PAGE: %lx

", PAGEBASE(pte));
- ppc_translate_pte(pte, 0, 0);
- }
-
- *paddr = PAGEBASE(pte) + PAGEOFFSET(kvaddr);
-
- return TRUE;
-
-no_kpage:
- return FALSE;
+ return ppc_pgd_vtop(pgd, kvaddr, paddr, verbose);
}

/*

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 
Old 02-20-2012, 10:05 AM
"Suzuki K. Poulose"
 
Default Non-linear address translation routine

This patch moves the common code for traversing through the PGD, PTE
tables in userspace virtual address translation and vmalloc address translation
to a new routine. This will help us to make changes to the common code
at a single place. This will be used for board based definitions for address
translation

Signed-off-by: Suzuki K. Poulose <suzuki@in.ibm.com>
---

ppc.c | 184 +++++++++++++++++++++++------------------------------------------
1 files changed, 65 insertions(+), 119 deletions(-)

diff --git a/ppc.c b/ppc.c
index a9068c2..3834e7f 100755
--- a/ppc.c
+++ b/ppc.c
@@ -259,6 +259,69 @@ ppc_dump_machdep_table(ulong arg)
fprintf(fp, " machspec: %lx
", (ulong)machdep->machspec);
}

+static int
+ppc_pgd_vtop(ulong *pgd, ulong vaddr, physaddr_t *paddr, int verbose)
+{
+ ulong *page_dir;
+ ulong *page_middle;
+ ulong *page_table;
+ ulong pgd_pte;
+ ulong pte;
+
+ if (verbose)
+ fprintf(fp, "PAGE DIRECTORY: %lx
", (ulong)pgd);
+
+ page_dir = pgd + (vaddr >> PGDIR_SHIFT);
+
+ FILL_PGD(PAGEBASE(pgd), KVADDR, PAGESIZE());
+ pgd_pte = ULONG(machdep->pgd + PAGEOFFSET(page_dir));
+
+ if (verbose)
+ fprintf(fp, " PGD: %lx => %lx
", (ulong)page_dir, pgd_pte);
+
+ if (!pgd_pte)
+ goto no_page;
+
+ page_middle = (ulong *)pgd_pte;
+
+ if (machdep->flags & CPU_BOOKE)
+ page_table = page_middle + (BTOP(vaddr) & (PTRS_PER_PTE - 1));
+ else {
+ page_table = (ulong *)((pgd_pte & (ulong)machdep->pagemask) + machdep->kvbase);
+ page_table += ((ulong)BTOP(vaddr) & (PTRS_PER_PTE-1));
+ }
+
+ if (verbose)
+ fprintf(fp, " PMD: %lx => %lx
", (ulong)page_middle,
+ (ulong)page_table);
+
+ FILL_PTBL(PAGEBASE(page_table), KVADDR, PAGESIZE());
+ pte = ULONG(machdep->ptbl + PAGEOFFSET(page_table));
+
+ if (verbose)
+ fprintf(fp, " PTE: %lx => %lx
", (ulong)page_table, pte);
+
+ if (!(pte & _PAGE_PRESENT)) {
+ if (pte && verbose) {
+ fprintf(fp, "
");
+ ppc_translate_pte(pte, 0, 0);
+ }
+ goto no_page;
+ }
+
+ if (verbose) {
+ fprintf(fp, " PAGE: %lx

", PAGEBASE(pte));
+ ppc_translate_pte(pte, 0, 0);
+ }
+
+ *paddr = PAGEBASE(pte) + PAGEOFFSET(vaddr);
+
+ return TRUE;
+
+no_page:
+ return FALSE;
+
+}

/*
* Translates a user virtual address to its physical address. cmd_vtop()
@@ -275,11 +338,6 @@ ppc_uvtop(struct task_context *tc, ulong vaddr, physaddr_t *paddr, int verbose)
{
ulong mm, active_mm;
ulong *pgd;
- ulong *page_dir;
- ulong *page_middle;
- ulong *page_table;
- ulong pgd_pte;
- ulong pte;

if (!tc)
error(FATAL, "current context invalid
");
@@ -315,62 +373,7 @@ ppc_uvtop(struct task_context *tc, ulong vaddr, physaddr_t *paddr, int verbose)
FAULT_ON_ERROR);
}

- if (verbose)
- fprintf(fp, "PAGE DIRECTORY: %lx
", (ulong)pgd);
-
- page_dir = pgd + (vaddr >> PGDIR_SHIFT);
-
- FILL_PGD(PAGEBASE(pgd), KVADDR, PAGESIZE());
- pgd_pte = ULONG(machdep->pgd + PAGEOFFSET(page_dir));
-
- if (verbose)
- fprintf(fp, " PGD: %lx => %lx
", (ulong)page_dir, pgd_pte);
-
- if (!pgd_pte)
- goto no_upage;
-
- page_middle = (ulong *)pgd_pte;
-
- if (machdep->flags & CPU_BOOKE)
- page_table = page_middle + (BTOP(vaddr) & (PTRS_PER_PTE - 1));
- else {
- page_table = (ulong *)((pgd_pte & (ulong)machdep->pagemask) + machdep->kvbase);
- page_table += ((ulong)BTOP(vaddr) & (PTRS_PER_PTE-1));
- }
-
- if (verbose)
- fprintf(fp, " PMD: %lx => %lx
",(ulong)page_middle,
- (ulong)page_table);
-
- FILL_PTBL(PAGEBASE(page_table), KVADDR, PAGESIZE());
- pte = ULONG(machdep->ptbl + PAGEOFFSET(page_table));
-
- if (verbose)
- fprintf(fp, " PTE: %lx => %lx
", (ulong)page_table, pte);
-
- if (!(pte & _PAGE_PRESENT)) {
- *paddr = pte;
- if (pte && verbose) {
- fprintf(fp, "
");
- ppc_translate_pte(pte, 0, 0);
- }
- goto no_upage;
- }
-
- if (!pte)
- goto no_upage;
-
- *paddr = PAGEBASE(pte) + PAGEOFFSET(vaddr);
-
- if (verbose) {
- fprintf(fp, " PAGE: %lx

", PAGEBASE(pte));
- ppc_translate_pte(pte, 0, 0);
- }
-
- return TRUE;
-
-no_upage:
- return FALSE;
+ return ppc_pgd_vtop(pgd, vaddr, paddr, verbose);
}

/*
@@ -382,11 +385,6 @@ static int
ppc_kvtop(struct task_context *tc, ulong kvaddr, physaddr_t *paddr, int verbose)
{
ulong *pgd;
- ulong *page_dir;
- ulong *page_middle;
- ulong *page_table;
- ulong pgd_pte;
- ulong pte;

if (!IS_KVADDR(kvaddr))
return FALSE;
@@ -403,59 +401,7 @@ ppc_kvtop(struct task_context *tc, ulong kvaddr, physaddr_t *paddr, int verbose)
}

pgd = (ulong *)vt->kernel_pgd[0];
-
- if (verbose)
- fprintf(fp, "PAGE DIRECTORY: %lx
", (ulong)pgd);
-
- page_dir = pgd + (kvaddr >> PGDIR_SHIFT);
-
- FILL_PGD(PAGEBASE(pgd), KVADDR, PAGESIZE());
- pgd_pte = ULONG(machdep->pgd + PAGEOFFSET(page_dir));
-
- if (verbose)
- fprintf(fp, " PGD: %lx => %lx
", (ulong)page_dir, pgd_pte);
-
- if (!pgd_pte)
- goto no_kpage;
-
- page_middle = (ulong *)pgd_pte;
-
- if (machdep->flags & CPU_BOOKE)
- page_table = page_middle + (BTOP(kvaddr) & (PTRS_PER_PTE - 1));
- else {
- page_table = (ulong *)((pgd_pte & (ulong)machdep->pagemask) + machdep->kvbase);
- page_table += ((ulong)BTOP(kvaddr) & (PTRS_PER_PTE-1));
- }
-
- if (verbose)
- fprintf(fp, " PMD: %lx => %lx
", (ulong)page_middle,
- (ulong)page_table);
-
- FILL_PTBL(PAGEBASE(page_table), KVADDR, PAGESIZE());
- pte = ULONG(machdep->ptbl + PAGEOFFSET(page_table));
-
- if (verbose)
- fprintf(fp, " PTE: %lx => %lx
", (ulong)page_table, pte);
-
- if (!(pte & _PAGE_PRESENT)) {
- if (pte && verbose) {
- fprintf(fp, "
");
- ppc_translate_pte(pte, 0, 0);
- }
- goto no_kpage;
- }
-
- if (verbose) {
- fprintf(fp, " PAGE: %lx

", PAGEBASE(pte));
- ppc_translate_pte(pte, 0, 0);
- }
-
- *paddr = PAGEBASE(pte) + PAGEOFFSET(kvaddr);
-
- return TRUE;
-
-no_kpage:
- return FALSE;
+ return ppc_pgd_vtop(pgd, kvaddr, paddr, verbose);
}

/*

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 

Thread Tools




All times are GMT. The time now is 03:49 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org