diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/xmon/xmon.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c index d66c3a170327..6b9d720f7ff8 100644 --- a/arch/powerpc/xmon/xmon.c +++ b/arch/powerpc/xmon/xmon.c | |||
@@ -2748,13 +2748,13 @@ static void restart_spus(void) | |||
2748 | } | 2748 | } |
2749 | 2749 | ||
2750 | #define DUMP_WIDTH 23 | 2750 | #define DUMP_WIDTH 23 |
2751 | #define DUMP_FIELD(obj, format, field) \ | 2751 | #define DUMP_VALUE(format, field, value) \ |
2752 | do { \ | 2752 | do { \ |
2753 | if (setjmp(bus_error_jmp) == 0) { \ | 2753 | if (setjmp(bus_error_jmp) == 0) { \ |
2754 | catch_memory_errors = 1; \ | 2754 | catch_memory_errors = 1; \ |
2755 | sync(); \ | 2755 | sync(); \ |
2756 | printf(" %-*s = "format"\n", DUMP_WIDTH, \ | 2756 | printf(" %-*s = "format"\n", DUMP_WIDTH, \ |
2757 | #field, obj->field); \ | 2757 | #field, value); \ |
2758 | sync(); \ | 2758 | sync(); \ |
2759 | __delay(200); \ | 2759 | __delay(200); \ |
2760 | } else { \ | 2760 | } else { \ |
@@ -2765,6 +2765,9 @@ do { \ | |||
2765 | catch_memory_errors = 0; \ | 2765 | catch_memory_errors = 0; \ |
2766 | } while (0) | 2766 | } while (0) |
2767 | 2767 | ||
2768 | #define DUMP_FIELD(obj, format, field) \ | ||
2769 | DUMP_VALUE(format, field, obj->field) | ||
2770 | |||
2768 | static void dump_spu_fields(struct spu *spu) | 2771 | static void dump_spu_fields(struct spu *spu) |
2769 | { | 2772 | { |
2770 | printf("Dumping spu fields at address %p:\n", spu); | 2773 | printf("Dumping spu fields at address %p:\n", spu); |
@@ -2793,13 +2796,18 @@ static void dump_spu_fields(struct spu *spu) | |||
2793 | DUMP_FIELD(spu, "0x%p", timestamp); | 2796 | DUMP_FIELD(spu, "0x%p", timestamp); |
2794 | DUMP_FIELD(spu, "0x%lx", problem_phys); | 2797 | DUMP_FIELD(spu, "0x%lx", problem_phys); |
2795 | DUMP_FIELD(spu, "0x%p", problem); | 2798 | DUMP_FIELD(spu, "0x%p", problem); |
2796 | DUMP_FIELD(spu, "0x%x", problem->spu_runcntl_RW); | 2799 | DUMP_VALUE("0x%x", problem->spu_runcntl_RW, |
2797 | DUMP_FIELD(spu, "0x%x", problem->spu_status_R); | 2800 | in_be32(&spu->problem->spu_runcntl_RW)); |
2798 | DUMP_FIELD(spu, "0x%x", problem->spu_npc_RW); | 2801 | DUMP_VALUE("0x%x", problem->spu_status_R, |
2802 | in_be32(&spu->problem->spu_status_R)); | ||
2803 | DUMP_VALUE("0x%x", problem->spu_npc_RW, | ||
2804 | in_be32(&spu->problem->spu_npc_RW)); | ||
2799 | DUMP_FIELD(spu, "0x%p", priv1); | 2805 | DUMP_FIELD(spu, "0x%p", priv1); |
2800 | 2806 | ||
2801 | if (spu->priv1) | 2807 | if (spu->priv1) { |
2802 | DUMP_FIELD(spu, "0x%lx", priv1->mfc_sr1_RW); | 2808 | DUMP_VALUE("0x%lx", priv1->mfc_sr1_RW, |
2809 | in_be64(&spu->priv1->mfc_sr1_RW)); | ||
2810 | } | ||
2803 | 2811 | ||
2804 | DUMP_FIELD(spu, "0x%p", priv2); | 2812 | DUMP_FIELD(spu, "0x%p", priv2); |
2805 | } | 2813 | } |