Title: [6888] trunk/kernel/kgdb.c: Fix bug[#5253] switch master cpu to itself as well.
- Revision
- 6888
- Author
- sonicz
- Date
- 2009-07-01 01:40:03 -0500 (Wed, 01 Jul 2009)
Log Message
Fix bug[#5253] switch master cpu to itself as well.
keep cpu switch the same among all cpus, so the context after swith cpu
are similar to gdb.
Modified Paths
Diff
Modified: trunk/kernel/kgdb.c (6887 => 6888)
--- trunk/kernel/kgdb.c 2009-07-01 04:08:23 UTC (rev 6887)
+++ trunk/kernel/kgdb.c 2009-07-01 06:40:03 UTC (rev 6888)
@@ -1118,8 +1118,7 @@
strcpy(remcom_out_buffer, "OK");
#ifdef CONFIG_SMP
if ((arch_kgdb_ops.flags & KGDB_THR_PROC_SWAP) &&
- !ks->thr_query && ks->kgdb_usethreadid < -1 &&
- - ks->kgdb_usethreadid - 2 != raw_smp_processor_id()) {
+ !ks->thr_query && ks->kgdb_usethreadid < -1) {
kgdb_roundup_cpu(raw_smp_processor_id(), 0);
kgdb_contthread = kgdb_usethread;
return 1;
@@ -1138,21 +1137,6 @@
break;
}
kgdb_contthread = thread;
-#ifdef CONFIG_SMP
- if ((arch_kgdb_ops.flags & KGDB_THR_PROC_SWAP) &&
- thread != current) {
- int cpu;
- for_each_online_cpu(cpu) {
- if (thread == kgdb_info[cpu].task) {
- kgdb_roundup_cpu(
- raw_smp_processor_id(),
- 0);
- ks->kgdb_usethreadid = -cpu-2;
- return 1;
- }
- }
- }
-#endif
}
strcpy(remcom_out_buffer, "OK");
break;
@@ -1579,7 +1563,7 @@
#ifdef CONFIG_SMP
i = -(ks->kgdb_usethreadid + 2);
if ((arch_kgdb_ops.flags & KGDB_THR_PROC_SWAP) &&
- kgdb_contthread && i != cpu) {
+ kgdb_contthread) {
atomic_set(&passive_cpu_wait[i], 0);
}
#endif
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits