diff options
author | Per Fransson <per.xx.fransson@stericsson.com> | 2011-01-27 14:08:16 +0100 |
---|---|---|
committer | Philippe Langlais <philippe.langlais@linaro.org> | 2011-05-03 08:25:44 +0200 |
commit | 374b0ad94620566888780dfdb0d9b8f7158984ce (patch) | |
tree | 643e3dc4029783c3db3e37962cb618335d3113cd | |
parent | 8ca6db73fb00b354ff65ea13fd61e8c2fb1a01e5 (diff) |
mpcore_wdt: Stop watchdog of non-crashing cores
When kexec'ing to u-boot only the crashing core is used (and will have
to be kicked by u-boot). The watchdog of other core has to be stopped
before leaving linux.
ST-Ericsson ID: -
Change-Id: I329630fd8040f8af3e54fc51aa7187217938f0b8
Signed-off-by: Per Fransson <per.xx.fransson@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/13678
Reviewed-by: QATOOLS
Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
-rw-r--r-- | arch/arm/kernel/machine_kexec.c | 1 | ||||
-rw-r--r-- | include/linux/kexec.h | 1 | ||||
-rw-r--r-- | kernel/kexec.c | 2 |
3 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/kernel/machine_kexec.c b/arch/arm/kernel/machine_kexec.c index e59bbd496c3..ae1d73a15d3 100644 --- a/arch/arm/kernel/machine_kexec.c +++ b/arch/arm/kernel/machine_kexec.c @@ -47,6 +47,7 @@ void machine_crash_nonpanic_core(void *unused) printk(KERN_DEBUG "CPU %u will stop doing anything useful since another CPU has crashed\n", smp_processor_id()); crash_save_cpu(®s, smp_processor_id()); + atomic_notifier_call_chain(&crash_percpu_notifier_list, 0, NULL); flush_cache_all(); atomic_dec(&waiting_for_crash_ipi); diff --git a/include/linux/kexec.h b/include/linux/kexec.h index 03e8e8dbc57..7ce556f555c 100644 --- a/include/linux/kexec.h +++ b/include/linux/kexec.h @@ -158,6 +158,7 @@ unsigned long paddr_vmcoreinfo_note(void); extern struct kimage *kexec_image; extern struct kimage *kexec_crash_image; +extern struct atomic_notifier_head crash_percpu_notifier_list; #ifndef kexec_flush_icache_page #define kexec_flush_icache_page(page) diff --git a/kernel/kexec.c b/kernel/kexec.c index 779f0031929..8071465dcec 100644 --- a/kernel/kexec.c +++ b/kernel/kexec.c @@ -53,6 +53,8 @@ u32 vmcoreinfo_note[VMCOREINFO_NOTE_SIZE/4]; size_t vmcoreinfo_size; size_t vmcoreinfo_max_size = sizeof(vmcoreinfo_data); +ATOMIC_NOTIFIER_HEAD(crash_percpu_notifier_list); + /* Location of the reserved area for the crash kernel */ struct resource crashk_res = { .name = "Crash kernel", |