Pull Kconfig into release branch
[linux-2.6] / arch / s390 / kernel / reipl_diag.c
1 /*
2  * This file contains the implementation of the
3  * Linux re-IPL support
4  *
5  * (C) Copyright IBM Corp. 2005
6  *
7  * Author(s): Volker Sameske (sameske@de.ibm.com)
8  *
9  */
10
11 #include <linux/kernel.h>
12
13 static unsigned int reipl_diag_rc1;
14 static unsigned int reipl_diag_rc2;
15
16 /*
17  * re-IPL the system using the last used IPL parameters
18  */
19 void reipl_diag(void)
20 {
21         asm volatile (
22                 "   la   %%r4,0\n"
23                 "   la   %%r5,0\n"
24                 "   diag %%r4,%2,0x308\n"
25                 "0:\n"
26                 "   st   %%r4,%0\n"
27                 "   st   %%r5,%1\n"
28                 ".section __ex_table,\"a\"\n"
29 #ifdef CONFIG_64BIT
30                 "   .align 8\n"
31                 "   .quad 0b, 0b\n"
32 #else
33                 "   .align 4\n"
34                 "   .long 0b, 0b\n"
35 #endif
36                 ".previous\n"
37                 : "=m" (reipl_diag_rc1), "=m" (reipl_diag_rc2)
38                 : "d" (3) : "cc", "4", "5" );
39 }