[Crash-utility] crash version 4.0-3.21 is available
Dave Anderson
anderson at redhat.com
Mon Mar 19 15:12:12 UTC 2007
Bernhard Walle wrote:
> * Dave Anderson <anderson at redhat.com> [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 at ru.mvista.com)
>
> 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.
>
Figures... I took that patch on blind faith since I don't have
any 32-bit ppc hardware to compile it on, never mind test it:
https://www.redhat.com/archives/crash-utility/2007-March/msg00020.html
Anyway, I'll still defer to the MontaVista guys to come up with
a patch that they can confirm works -- and that compiles, please...
Thanks,
Dave
>
> ---
> 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,
>
> ------------------------------------------------------------------------------------------------------------------------
> Part 1.1.2Type: application/pgp-signature
>
> ------------------------------------------------------------------------------------------------------------------------
> --
> Crash-utility mailing list
> Crash-utility at redhat.com
> https://www.redhat.com/mailman/listinfo/crash-utility
More information about the Crash-utility
mailing list