|
@@ -315,14 +315,18 @@ static void kgdb_remove_all_hw_break(void)
|
|
if (!breakinfo[i].enabled)
|
|
if (!breakinfo[i].enabled)
|
|
continue;
|
|
continue;
|
|
bp = *per_cpu_ptr(breakinfo[i].pev, cpu);
|
|
bp = *per_cpu_ptr(breakinfo[i].pev, cpu);
|
|
- if (bp->attr.disabled == 1)
|
|
|
|
|
|
+ if (!bp->attr.disabled) {
|
|
|
|
+ arch_uninstall_hw_breakpoint(bp);
|
|
|
|
+ bp->attr.disabled = 1;
|
|
continue;
|
|
continue;
|
|
|
|
+ }
|
|
if (dbg_is_early)
|
|
if (dbg_is_early)
|
|
early_dr7 &= ~encode_dr7(i, breakinfo[i].len,
|
|
early_dr7 &= ~encode_dr7(i, breakinfo[i].len,
|
|
breakinfo[i].type);
|
|
breakinfo[i].type);
|
|
- else
|
|
|
|
- arch_uninstall_hw_breakpoint(bp);
|
|
|
|
- bp->attr.disabled = 1;
|
|
|
|
|
|
+ else if (hw_break_release_slot(i))
|
|
|
|
+ printk(KERN_ERR "KGDB: hw bpt remove failed %lx\n",
|
|
|
|
+ breakinfo[i].addr);
|
|
|
|
+ breakinfo[i].enabled = 0;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|