[#5213] kgdb debug on bf561 SMP kernel fails to show correct core ID
Submitted By: Mingquan Pan
Open Date
2009-06-05 06:12:04 Close Date
2009-06-11 05:51:14
Priority:
Medium Assignee:
Sonic Zhang
Status:
Closed Fixed In Release:
N/A
Found In Release:
N/A Release:
Category:
N/A Board:
N/A
Processor:
BF561 Silicon Revision:
Is this bug repeatable?:
Yes Resolution:
Fixed
Uboot version or rev.:
Toolchain version or rev.:
09r1-r7
App binary format:
N/A
Summary: kgdb debug on bf561 SMP kernel fails to show correct core ID
Details:
kgdb debug on bf561 SMP kernel fails to show correct core ID.
When booting up SMP 561 kernel, and setting up the gdb, do : x/xw 0xffe05000 right before and after switching thread, the valued shown are the same.
...
4 Thread 2 (kthreadd) 0x0000b0cc in resume ()
3 Thread 1 (init) 0x0000b0cc in resume ()
2 Thread -3 (shadowCPU1) default_idle () at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/processor.h:164
* 1 Thread -2 (shadowCPU0) kgdb_test (name=0x10c698 "hello world!", len=12, count=85, z=16) at arch/blackfin/kernel/kgdb_test.c:57
(gdb) x/xw 0xffe05000
0xffe05000: 0xe5040500
(gdb) thread 2
[Switching to thread 2 (Thread -3)]#0 default_idle ()
at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/processor.h:164
164 return bfin_read_DSPID();
(gdb) info thread
27 Thread 151 (cat) kgdb_test (name=0x10c698 "hello world!", len=12, count=85, z=16) at arch/blackfin/kernel/kgdb_test.c:57
26 Thread 143 (klogd) 0x0000b0cc in resume ()
25 Thread 142 (syslogd) 0x0000b0cc in resume ()
24 Thread 141 (inetd) 0x0000b0cc in resume ()
23 Thread 140 (sh) 0x0000b0cc in resume ()
22 Thread 106 (bfin-spi.0) 0x0000b0cc in resume ()
21 Thread 105 (mtdblockd) 0x0000b0cc in resume ()
20 Thread 65 (kswapd0) 0x0000b0cc in resume ()
19 Thread 64 (pdflush) 0x0000b0cc in resume ()
18 Thread 63 (pdflush) 0x0000b0cc in resume ()
17 Thread 47 (kblockd/1) 0x0000b0cc in resume ()
16 Thread 46 (kblockd/0) 0x0000b0cc in resume ()
15 Thread 15 (kstop/1) 0x0000b0cc in resume ()
14 Thread 14 (kstop/0) 0x0000b0cc in resume ()
13 Thread 11 (khelper) 0x0000b0cc in resume ()
12 Thread 10 (events/1) 0x0000b0cc in resume ()
11 Thread 9 (events/0) 0x0000b0cc in resume ()
10 Thread 8 (watchdog/1) 0x0000b0cc in resume ()
9 Thread 7 (ksoftirqd/1) 0x0000b0cc in resume ()
8 Thread 6 (migration/1) 0x0000b0cc in resume ()
7 Thread 5 (watchdog/0) 0x0000b0cc in resume ()
6 Thread 4 (ksoftirqd/0) 0x0000b0cc in resume ()
5 Thread 3 (migration/0) 0x0000b0cc in resume ()
4 Thread 2 (kthreadd) 0x0000b0cc in resume ()
3 Thread 1 (init) 0x0000b0cc in resume ()
* 2 Thread -3 (shadowCPU1) default_idle () at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/processor.h:164
1 Thread -2 (shadowCPU0) kgdb_test (name=0x10c698 "hello world!", len=12, count=85, z=16) at arch/blackfin/kernel/kgdb_test.c:57
(gdb) x/xw 0xffe05000
0xffe05000: 0xe5040500
root:/> version
kernel: Linux release 2.6.28.10-ADI-2009R1-svn6543, build #10 SMP Fri Jun 5 14:30:51 CST 2009
toolchain: bfin-uclinux-gcc release gcc version 4.1.2 (ADI svn)
user-dist: release svn-8191, build #5 Fri Jun 5 14:30:15 CST 2009
root:/> init: /bin/watchdogd respawning too fast
Follow-ups
--- Sonic Zhang 2009-06-10 05:26:04
blackfin is not cache coherent in SMP kernel. Slave cores should
invalidate whole icache and dcache in IPI kgdb trap before they are
released by master core in kgdb.
Fixed
--- Mingquan Pan 2009-06-11 05:51:14
Yes, it fixed.
With one core, it shows:
(gdb) x/xw 0xffe05000
0xffe05000: 0xe5040500
The other core shows:
(gdb) thread 3
[Switching to thread 3 (Thread -3)]#0 kgdb_breakpoint () at
kernel/kgdb.c:1796
1796 atomic_set(&kgdb_setting_breakpoint, 0);
(gdb) x/xw 0xffe05000
0xffe05000: 0xe5040501
Close.
Files
Changes
Commits
Dependencies
Duplicates
Associations
Tags
File Name File Type File Size Posted By
No Files Were Found