----- Original Message -----
Hi Dave/Mika/Jan and other Crash users,
Here's some code that can be thrown away. The __per_cpu_offset table is read in
arm.c:arm_get_crash_notes() even though it's already available.
Regards,
Per
Hi Per,
In the future, can you send your patches as attachments? I've tried two
different mailers, as well as the mailing list archives, and in all cases
all tabs have been changed to spaces. This patch is simple enough so that
I can do it by hand, so there's no need to resend it.
Thanks,
Dave
diff --git a/arm.c b/arm.c
index 5eb5649..36a26cc 100644
--- a/arm.c
+++ b/arm.c
@@ -497,8 +497,6 @@ arm_get_crash_notes(void)
ulong offset;
char *buf, *p;
ulong *notes_ptrs;
- ulong per_cpu_offsets_addr;
- ulong *per_cpu_offsets;
ulong i;
if (!symbol_exists("crash_notes"))
@@ -521,24 +519,9 @@ arm_get_crash_notes(void)
}
if (symbol_exists("__per_cpu_offset")) {
-
- /* Get the __per_cpu_offset array */
- per_cpu_offsets_addr =
symbol_value("__per_cpu_offset");
-
- per_cpu_offsets = (ulong
*)GETBUF(kt->cpus*sizeof(*per_cpu_offsets));
-
- if (!readmem(per_cpu_offsets_addr, KVADDR,
per_cpu_offsets,
- kt->cpus*sizeof(*per_cpu_offsets),
"per_cpu_offsets",
- RETURN_ON_ERROR)) {
- error(WARNING, "cannot read
per_cpu_offsets\n");
- FREEBUF(per_cpu_offsets);
- return FALSE;
- }
-
/* Add __per_cpu_offset for each cpu to form the
pointer to the notes */
for (i = 0; i<kt->cpus; i++)
- notes_ptrs[i] = notes_ptrs[kt->cpus-1] +
per_cpu_offsets[i];
- FREEBUF(per_cpu_offsets);
+ notes_ptrs[i] = notes_ptrs[kt->cpus-1] +
kt->__per_cpu_offset[i];
}
buf = GETBUF(SIZE(note_buf));
--
Crash-utility mailing list
Crash-utility(a)redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility