aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/machine_kexec.c
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2006-12-04 09:40:26 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2006-12-04 09:40:26 -0500
commit15e9b586e0bd3692e2a21c5be178810d9d32214e (patch)
tree8bcf2c9b3780281c9562eab965e3ca6ba64e5bc0 /arch/s390/kernel/machine_kexec.c
parent2254f5a7779452395e37ea2f7d6e1a550d34e678 (diff)
[S390] Reset infrastructure for re-IPL.
In case of re-IPL and diag308 doesn't work we have to reset all devices manually and wait synchronously that each reset finished. This patch adds the necessary infrastucture and the first exploiter of it. Subsystems that need to add a function that needs to be called at re-IPL may register/unregister this function via struct reset_call { struct reset_call *next; void (*fn)(void); }; void register_reset_call(struct reset_call *reset); void unregister_reset_call(struct reset_call *reset); When the registered function get called the context is: - all cpus beside the current one are stopped - all machine checks and interrupts are disabled - prefixing is disabled - a default machine check handler is available for use The registered functions may not take any locks are sleep. For the common I/O layer part of this patch: Introduce a reset_call css_reset that does the following: - clear all subchannels - perform a rchp on all channel paths and wait for the resulting machine checks This replaces the calls to clear_all_subchannels() and cio_reset_channel_paths() for kexec and ccw reipl. reipl_ccw_dev() now uses reipl_find_schid() to determine the subchannel id for a given device id. Also remove cio_reset_channel_paths() and friends since they are not needed anymore. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/machine_kexec.c')
-rw-r--r--arch/s390/kernel/machine_kexec.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/s390/kernel/machine_kexec.c b/arch/s390/kernel/machine_kexec.c
index 60b1ea9f946b..202bf1fdfe39 100644
--- a/arch/s390/kernel/machine_kexec.c
+++ b/arch/s390/kernel/machine_kexec.c
@@ -22,6 +22,7 @@
22#include <asm/pgalloc.h> 22#include <asm/pgalloc.h>
23#include <asm/system.h> 23#include <asm/system.h>
24#include <asm/smp.h> 24#include <asm/smp.h>
25#include <asm/reset.h>
25 26
26static void kexec_halt_all_cpus(void *); 27static void kexec_halt_all_cpus(void *);
27 28
@@ -62,12 +63,6 @@ machine_shutdown(void)
62NORET_TYPE void 63NORET_TYPE void
63machine_kexec(struct kimage *image) 64machine_kexec(struct kimage *image)
64{ 65{
65 clear_all_subchannels();
66 cio_reset_channel_paths();
67
68 /* Disable lowcore protection */
69 ctl_clear_bit(0,28);
70
71 on_each_cpu(kexec_halt_all_cpus, image, 0, 0); 66 on_each_cpu(kexec_halt_all_cpus, image, 0, 0);
72 for (;;); 67 for (;;);
73} 68}
@@ -98,6 +93,8 @@ kexec_halt_all_cpus(void *kernel_image)
98 cpu_relax(); 93 cpu_relax();
99 } 94 }
100 95
96 s390_reset_system();
97
101 image = (struct kimage *) kernel_image; 98 image = (struct kimage *) kernel_image;
102 data_mover = (relocate_kernel_t) 99 data_mover = (relocate_kernel_t)
103 (page_to_pfn(image->control_code_page) << PAGE_SHIFT); 100 (page_to_pfn(image->control_code_page) << PAGE_SHIFT);