aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/debug
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@c-s.fr>2018-09-27 13:17:49 -0400
committerDaniel Thompson <daniel.thompson@linaro.org>2018-11-13 15:27:16 -0500
commitdded2e159208a9edc21dd5c5f583afa28d378d39 (patch)
treea9220138d6df1cbf2711ce3a085a9af59ded349f /kernel/debug
parentccda4af0f4b92f7b4c308d3acc262f4a7e3affad (diff)
kdb: use correct pointer when 'btc' calls 'btt'
On a powerpc 8xx, 'btc' fails as follows: Entering kdb (current=0x(ptrval), pid 282) due to Keyboard Entry kdb> btc btc: cpu status: Currently on cpu 0 Available cpus: 0 kdb_getarea: Bad address 0x0 when booting the kernel with 'debug_boot_weak_hash', it fails as well Entering kdb (current=0xba99ad80, pid 284) due to Keyboard Entry kdb> btc btc: cpu status: Currently on cpu 0 Available cpus: 0 kdb_getarea: Bad address 0xba99ad80 On other platforms, Oopses have been observed too, see https://github.com/linuxppc/linux/issues/139 This is due to btc calling 'btt' with %p pointer as an argument. This patch replaces %p by %px to get the real pointer value as expected by 'btt' Fixes: ad67b74d2469 ("printk: hash addresses printed with %p") Cc: <stable@vger.kernel.org> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
Diffstat (limited to 'kernel/debug')
-rw-r--r--kernel/debug/kdb/kdb_bt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/debug/kdb/kdb_bt.c b/kernel/debug/kdb/kdb_bt.c
index 6ad4a9fcbd6f..7921ae4fca8d 100644
--- a/kernel/debug/kdb/kdb_bt.c
+++ b/kernel/debug/kdb/kdb_bt.c
@@ -179,14 +179,14 @@ kdb_bt(int argc, const char **argv)
179 kdb_printf("no process for cpu %ld\n", cpu); 179 kdb_printf("no process for cpu %ld\n", cpu);
180 return 0; 180 return 0;
181 } 181 }
182 sprintf(buf, "btt 0x%p\n", KDB_TSK(cpu)); 182 sprintf(buf, "btt 0x%px\n", KDB_TSK(cpu));
183 kdb_parse(buf); 183 kdb_parse(buf);
184 return 0; 184 return 0;
185 } 185 }
186 kdb_printf("btc: cpu status: "); 186 kdb_printf("btc: cpu status: ");
187 kdb_parse("cpu\n"); 187 kdb_parse("cpu\n");
188 for_each_online_cpu(cpu) { 188 for_each_online_cpu(cpu) {
189 sprintf(buf, "btt 0x%p\n", KDB_TSK(cpu)); 189 sprintf(buf, "btt 0x%px\n", KDB_TSK(cpu));
190 kdb_parse(buf); 190 kdb_parse(buf);
191 touch_nmi_watchdog(); 191 touch_nmi_watchdog();
192 } 192 }