* Dave Anderson <anderson@xxxxxxxxxx> [2007-03-16 21:29]: > > - In current 2.6 kernels, it is now possible to recognize ppc BOOKE > processors, which is the current default in crash. If the processor > is confirmed to not be BOOKE, then page table translation is done > differently. (antipov@xxxxxxxxxxxxx) The current code doesn't build on PPC32. Follwing patch fixes the problem. However, I consider the patch as evil, so maybe it would be better to change some data types that are involved here, but I don't really know. --- ppc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) Index: crash-4.0-3.21/ppc.c =================================================================== --- crash-4.0-3.21.orig/ppc.c +++ crash-4.0-3.21/ppc.c @@ -301,8 +301,8 @@ ppc_uvtop(struct task_context *tc, ulong if (machdep->flags & CPU_BOOKE) page_table = page_middle + (BTOP(vaddr) & (PTRS_PER_PTE - 1)); else - page_table = ((page_middle & machdep->pagemask) + machdep->kvbase) + - (BTOP(vaddr) & (PTRS_PER_PTE-1)); + page_table = (ulong *)((ulong)( (((ulonglong)(ulong)page_middle & machdep->pagemask) + + machdep->kvbase) + ((BTOP(vaddr)) & (PTRS_PER_PTE-1)) )); if (verbose) fprintf(fp, " PMD: %lx => %lx\n",(ulong)page_middle, @@ -389,8 +389,8 @@ ppc_kvtop(struct task_context *tc, ulong if (machdep->flags & CPU_BOOKE) page_table = page_middle + (BTOP(kvaddr) & (PTRS_PER_PTE - 1)); else - page_table = ((page_middle & machdep->pagemask) + machdep->kvbase) + - (BTOP(kvaddr) & (PTRS_PER_PTE-1)); + page_table = (ulong *)((ulong)( (((ulonglong)(ulong)page_middle & machdep->pagemask) + + machdep->kvbase) + ((BTOP(kvaddr)) & (PTRS_PER_PTE-1)) )); if (verbose) fprintf(fp, " PMD: %lx => %lx\n", (ulong)page_middle,
Attachment:
pgp0t11DzZ5Nw.pgp
Description: PGP signature
-- Crash-utility mailing list Crash-utility@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/crash-utility