diff options
Diffstat (limited to 'kernel/kgdb.c')
| -rw-r--r-- | kernel/kgdb.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/kernel/kgdb.c b/kernel/kgdb.c index eaa21fc9ad1d..e4dcfb2272a4 100644 --- a/kernel/kgdb.c +++ b/kernel/kgdb.c | |||
| @@ -488,7 +488,7 @@ static int write_mem_msg(int binary) | |||
| 488 | if (err) | 488 | if (err) |
| 489 | return err; | 489 | return err; |
| 490 | if (CACHE_FLUSH_IS_SAFE) | 490 | if (CACHE_FLUSH_IS_SAFE) |
| 491 | flush_icache_range(addr, addr + length + 1); | 491 | flush_icache_range(addr, addr + length); |
| 492 | return 0; | 492 | return 0; |
| 493 | } | 493 | } |
| 494 | 494 | ||
| @@ -590,6 +590,7 @@ static void kgdb_wait(struct pt_regs *regs) | |||
| 590 | 590 | ||
| 591 | /* Signal the primary CPU that we are done: */ | 591 | /* Signal the primary CPU that we are done: */ |
| 592 | atomic_set(&cpu_in_kgdb[cpu], 0); | 592 | atomic_set(&cpu_in_kgdb[cpu], 0); |
| 593 | touch_softlockup_watchdog(); | ||
| 593 | clocksource_touch_watchdog(); | 594 | clocksource_touch_watchdog(); |
| 594 | local_irq_restore(flags); | 595 | local_irq_restore(flags); |
| 595 | } | 596 | } |
| @@ -1432,6 +1433,7 @@ acquirelock: | |||
| 1432 | atomic_read(&kgdb_cpu_doing_single_step) != cpu) { | 1433 | atomic_read(&kgdb_cpu_doing_single_step) != cpu) { |
| 1433 | 1434 | ||
| 1434 | atomic_set(&kgdb_active, -1); | 1435 | atomic_set(&kgdb_active, -1); |
| 1436 | touch_softlockup_watchdog(); | ||
| 1435 | clocksource_touch_watchdog(); | 1437 | clocksource_touch_watchdog(); |
| 1436 | local_irq_restore(flags); | 1438 | local_irq_restore(flags); |
| 1437 | 1439 | ||
| @@ -1462,7 +1464,7 @@ acquirelock: | |||
| 1462 | * Get the passive CPU lock which will hold all the non-primary | 1464 | * Get the passive CPU lock which will hold all the non-primary |
| 1463 | * CPU in a spin state while the debugger is active | 1465 | * CPU in a spin state while the debugger is active |
| 1464 | */ | 1466 | */ |
| 1465 | if (!kgdb_single_step || !kgdb_contthread) { | 1467 | if (!kgdb_single_step) { |
| 1466 | for (i = 0; i < NR_CPUS; i++) | 1468 | for (i = 0; i < NR_CPUS; i++) |
| 1467 | atomic_set(&passive_cpu_wait[i], 1); | 1469 | atomic_set(&passive_cpu_wait[i], 1); |
| 1468 | } | 1470 | } |
| @@ -1475,7 +1477,7 @@ acquirelock: | |||
| 1475 | 1477 | ||
| 1476 | #ifdef CONFIG_SMP | 1478 | #ifdef CONFIG_SMP |
| 1477 | /* Signal the other CPUs to enter kgdb_wait() */ | 1479 | /* Signal the other CPUs to enter kgdb_wait() */ |
| 1478 | if ((!kgdb_single_step || !kgdb_contthread) && kgdb_do_roundup) | 1480 | if ((!kgdb_single_step) && kgdb_do_roundup) |
| 1479 | kgdb_roundup_cpus(flags); | 1481 | kgdb_roundup_cpus(flags); |
| 1480 | #endif | 1482 | #endif |
| 1481 | 1483 | ||
| @@ -1494,7 +1496,7 @@ acquirelock: | |||
| 1494 | kgdb_post_primary_code(ks->linux_regs, ks->ex_vector, ks->err_code); | 1496 | kgdb_post_primary_code(ks->linux_regs, ks->ex_vector, ks->err_code); |
| 1495 | kgdb_deactivate_sw_breakpoints(); | 1497 | kgdb_deactivate_sw_breakpoints(); |
| 1496 | kgdb_single_step = 0; | 1498 | kgdb_single_step = 0; |
| 1497 | kgdb_contthread = NULL; | 1499 | kgdb_contthread = current; |
| 1498 | exception_level = 0; | 1500 | exception_level = 0; |
| 1499 | 1501 | ||
| 1500 | /* Talk to debugger with gdbserial protocol */ | 1502 | /* Talk to debugger with gdbserial protocol */ |
| @@ -1508,7 +1510,7 @@ acquirelock: | |||
| 1508 | kgdb_info[ks->cpu].task = NULL; | 1510 | kgdb_info[ks->cpu].task = NULL; |
| 1509 | atomic_set(&cpu_in_kgdb[ks->cpu], 0); | 1511 | atomic_set(&cpu_in_kgdb[ks->cpu], 0); |
| 1510 | 1512 | ||
| 1511 | if (!kgdb_single_step || !kgdb_contthread) { | 1513 | if (!kgdb_single_step) { |
| 1512 | for (i = NR_CPUS-1; i >= 0; i--) | 1514 | for (i = NR_CPUS-1; i >= 0; i--) |
| 1513 | atomic_set(&passive_cpu_wait[i], 0); | 1515 | atomic_set(&passive_cpu_wait[i], 0); |
| 1514 | /* | 1516 | /* |
| @@ -1524,6 +1526,7 @@ acquirelock: | |||
| 1524 | kgdb_restore: | 1526 | kgdb_restore: |
| 1525 | /* Free kgdb_active */ | 1527 | /* Free kgdb_active */ |
| 1526 | atomic_set(&kgdb_active, -1); | 1528 | atomic_set(&kgdb_active, -1); |
| 1529 | touch_softlockup_watchdog(); | ||
| 1527 | clocksource_touch_watchdog(); | 1530 | clocksource_touch_watchdog(); |
| 1528 | local_irq_restore(flags); | 1531 | local_irq_restore(flags); |
| 1529 | 1532 | ||
