From: Rabin Vincent <rabinv(a)axis.com>
Set a default value for machdep->hz to 100, which will be used if the in
kernel config data is unavailable.
---
mips.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/mips.c b/mips.c
index a4fc8b6..7ad6f61 100644
--- a/mips.c
+++ b/mips.c
@@ -57,6 +57,7 @@ static struct machine_specific mips_machine_specific = { 0
};
static void
mips_display_machine_stats(void)
{
+ fprintf(fp, " HZ: %d\n", machdep->hz);
fprintf(fp, " PAGE SIZE: %d\n", PAGESIZE());
fprintf(fp, "\n");
@@ -776,6 +777,7 @@ mips_dump_machdep_table(ulong arg)
fprintf(fp, " ptrs_per_pgd: %lu\n", PTRS_PER_PGD);
fprintf(fp, " ptrs_per_pte: %d\n", PTRS_PER_PTE);
fprintf(fp, " stacksize: %ld\n", machdep->stacksize);
+ fprintf(fp, " hz: %d\n", machdep->hz);
fprintf(fp, " memsize: %lld (0x%llx)\n",
machdep->memsize, machdep->memsize);
fprintf(fp, " bits: %d\n", machdep->bits);
@@ -904,6 +906,9 @@ mips_init(int when)
ARRAY_LENGTH_INIT(machdep->nr_irqs, irq_desc,
"irq_desc", NULL, 0);
mips_stackframe_init();
+
+ if (!machdep->hz)
+ machdep->hz = 100;
break;
}
}
--
2.1.4
--
Crash-utility mailing list
Crash-utility(a)redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility