diff options
| author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-03-18 19:58:00 -0400 |
|---|---|---|
| committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-03-18 19:58:00 -0400 |
| commit | d608d71cd6d19792487d08333d63c7ff20294694 (patch) | |
| tree | c9cad98ad9cbba487d32812d59c456ed774d6ffb /kernel/debug/kdb/kdb_debugger.c | |
| parent | ed72d37a33fdf43dc47787fe220532cdec9da528 (diff) | |
| parent | a937536b868b8369b98967929045f1df54234323 (diff) | |
Merge tag 'v3.9-rc3' into v4l_for_linus
Linux 3.9-rc3
* tag 'v3.9-rc3': (11231 commits)
Linux 3.9-rc3
perf,x86: fix link failure for non-Intel configs
perf,x86: fix wrmsr_on_cpu() warning on suspend/resume
Btrfs: fix warning of free_extent_map
perf,x86: fix kernel crash with PEBS/BTS after suspend/resume
ALSA: hda - Fix missing EAPD/GPIO setup for Cirrus codecs
sound: sequencer: cap array index in seq_chn_common_event()
mfd: twl4030-madc: Remove __exit_p annotation
ALSA: hda/ca0132 - Remove extra setting of dsp_state.
ALSA: hda/ca0132 - Check download state of DSP.
ALSA: hda/ca0132 - Check if dspload_image succeeded.
mm/fremap.c: fix possible oops on error path
list: Fix double fetch of pointer in hlist_entry_safe()
Btrfs: fix warning when creating snapshots
Btrfs: return as soon as possible when edquot happens
Btrfs: return EIO if we have extent tree corruption
btrfs: use rcu_barrier() to wait for bdev puts at unmount
Btrfs: remove btrfs_try_spin_lock
Btrfs: get better concurrency for snapshot-aware defrag work
hwmon: (pmbus/ltc2978) Fix temperature reporting
...
Diffstat (limited to 'kernel/debug/kdb/kdb_debugger.c')
| -rw-r--r-- | kernel/debug/kdb/kdb_debugger.c | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/kernel/debug/kdb/kdb_debugger.c b/kernel/debug/kdb/kdb_debugger.c index be7b33b73d30..328d18ef31e4 100644 --- a/kernel/debug/kdb/kdb_debugger.c +++ b/kernel/debug/kdb/kdb_debugger.c | |||
| @@ -34,6 +34,22 @@ EXPORT_SYMBOL_GPL(kdb_poll_idx); | |||
| 34 | 34 | ||
| 35 | static struct kgdb_state *kdb_ks; | 35 | static struct kgdb_state *kdb_ks; |
| 36 | 36 | ||
| 37 | int kdb_common_init_state(struct kgdb_state *ks) | ||
| 38 | { | ||
| 39 | kdb_initial_cpu = atomic_read(&kgdb_active); | ||
| 40 | kdb_current_task = kgdb_info[ks->cpu].task; | ||
| 41 | kdb_current_regs = kgdb_info[ks->cpu].debuggerinfo; | ||
| 42 | return 0; | ||
| 43 | } | ||
| 44 | |||
| 45 | int kdb_common_deinit_state(void) | ||
| 46 | { | ||
| 47 | kdb_initial_cpu = -1; | ||
| 48 | kdb_current_task = NULL; | ||
| 49 | kdb_current_regs = NULL; | ||
| 50 | return 0; | ||
| 51 | } | ||
| 52 | |||
| 37 | int kdb_stub(struct kgdb_state *ks) | 53 | int kdb_stub(struct kgdb_state *ks) |
| 38 | { | 54 | { |
| 39 | int error = 0; | 55 | int error = 0; |
| @@ -94,13 +110,10 @@ int kdb_stub(struct kgdb_state *ks) | |||
| 94 | } | 110 | } |
| 95 | /* Set initial kdb state variables */ | 111 | /* Set initial kdb state variables */ |
| 96 | KDB_STATE_CLEAR(KGDB_TRANS); | 112 | KDB_STATE_CLEAR(KGDB_TRANS); |
| 97 | kdb_initial_cpu = atomic_read(&kgdb_active); | 113 | kdb_common_init_state(ks); |
| 98 | kdb_current_task = kgdb_info[ks->cpu].task; | ||
| 99 | kdb_current_regs = kgdb_info[ks->cpu].debuggerinfo; | ||
| 100 | /* Remove any breakpoints as needed by kdb and clear single step */ | 114 | /* Remove any breakpoints as needed by kdb and clear single step */ |
| 101 | kdb_bp_remove(); | 115 | kdb_bp_remove(); |
| 102 | KDB_STATE_CLEAR(DOING_SS); | 116 | KDB_STATE_CLEAR(DOING_SS); |
| 103 | KDB_STATE_CLEAR(DOING_SSB); | ||
| 104 | KDB_STATE_SET(PAGER); | 117 | KDB_STATE_SET(PAGER); |
| 105 | /* zero out any offline cpu data */ | 118 | /* zero out any offline cpu data */ |
| 106 | for_each_present_cpu(i) { | 119 | for_each_present_cpu(i) { |
| @@ -125,9 +138,7 @@ int kdb_stub(struct kgdb_state *ks) | |||
| 125 | * Upon exit from the kdb main loop setup break points and restart | 138 | * Upon exit from the kdb main loop setup break points and restart |
| 126 | * the system based on the requested continue state | 139 | * the system based on the requested continue state |
| 127 | */ | 140 | */ |
| 128 | kdb_initial_cpu = -1; | 141 | kdb_common_deinit_state(); |
| 129 | kdb_current_task = NULL; | ||
| 130 | kdb_current_regs = NULL; | ||
| 131 | KDB_STATE_CLEAR(PAGER); | 142 | KDB_STATE_CLEAR(PAGER); |
| 132 | kdbnearsym_cleanup(); | 143 | kdbnearsym_cleanup(); |
| 133 | if (error == KDB_CMD_KGDB) { | 144 | if (error == KDB_CMD_KGDB) { |
