From 5ec23c41e2853d55df570f87ad28ccd0529f2e8a Mon Sep 17 00:00:00 2001 From: Michael Ellerman Date: Thu, 23 Nov 2006 00:46:39 +0100 Subject: [PATCH] --- yaml --- r: 42282 b: refs/heads/master c: 437a0706837d09d8ab071c6790da07d9d6bb3d22 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/powerpc/xmon/xmon.c | 22 +++++++++++++++------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index e187455348c5..fe6257f6967b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5850dd8f6d4e79484d498c0d77b223d1041f9954 +refs/heads/master: 437a0706837d09d8ab071c6790da07d9d6bb3d22 diff --git a/trunk/arch/powerpc/xmon/xmon.c b/trunk/arch/powerpc/xmon/xmon.c index d66c3a170327..6b9d720f7ff8 100644 --- a/trunk/arch/powerpc/xmon/xmon.c +++ b/trunk/arch/powerpc/xmon/xmon.c @@ -2748,13 +2748,13 @@ static void restart_spus(void) } #define DUMP_WIDTH 23 -#define DUMP_FIELD(obj, format, field) \ +#define DUMP_VALUE(format, field, value) \ do { \ if (setjmp(bus_error_jmp) == 0) { \ catch_memory_errors = 1; \ sync(); \ printf(" %-*s = "format"\n", DUMP_WIDTH, \ - #field, obj->field); \ + #field, value); \ sync(); \ __delay(200); \ } else { \ @@ -2765,6 +2765,9 @@ do { \ catch_memory_errors = 0; \ } while (0) +#define DUMP_FIELD(obj, format, field) \ + DUMP_VALUE(format, field, obj->field) + static void dump_spu_fields(struct spu *spu) { printf("Dumping spu fields at address %p:\n", spu); @@ -2793,13 +2796,18 @@ static void dump_spu_fields(struct spu *spu) DUMP_FIELD(spu, "0x%p", timestamp); DUMP_FIELD(spu, "0x%lx", problem_phys); DUMP_FIELD(spu, "0x%p", problem); - DUMP_FIELD(spu, "0x%x", problem->spu_runcntl_RW); - DUMP_FIELD(spu, "0x%x", problem->spu_status_R); - DUMP_FIELD(spu, "0x%x", problem->spu_npc_RW); + DUMP_VALUE("0x%x", problem->spu_runcntl_RW, + in_be32(&spu->problem->spu_runcntl_RW)); + DUMP_VALUE("0x%x", problem->spu_status_R, + in_be32(&spu->problem->spu_status_R)); + DUMP_VALUE("0x%x", problem->spu_npc_RW, + in_be32(&spu->problem->spu_npc_RW)); DUMP_FIELD(spu, "0x%p", priv1); - if (spu->priv1) - DUMP_FIELD(spu, "0x%lx", priv1->mfc_sr1_RW); + if (spu->priv1) { + DUMP_VALUE("0x%lx", priv1->mfc_sr1_RW, + in_be64(&spu->priv1->mfc_sr1_RW)); + } DUMP_FIELD(spu, "0x%p", priv2); }