summaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2007-04-27 16:01:25 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2007-04-27 16:01:38 +0200
commit6fc321fd7dd91f0592f37503219196835314fbb7 (patch)
treed512811f8f6761608829c8df44a55a2ada074cdc /arch/s390
parent29c380f5f06d0c5a320b9bb6f8987065e7b81c91 (diff)
downloadblackbird-obmc-linux-6fc321fd7dd91f0592f37503219196835314fbb7.tar.gz
blackbird-obmc-linux-6fc321fd7dd91f0592f37503219196835314fbb7.zip
[S390] cio/ipl: Clean interface between cio and ipl code.
Clean interface between cio and ipl code, so Peter stops complaining. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/kernel/ipl.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c
index f731185bf2bd..a83cf1fdd8f5 100644
--- a/arch/s390/kernel/ipl.c
+++ b/arch/s390/kernel/ipl.c
@@ -47,7 +47,7 @@ enum ipl_type {
* Must be in data section since the bss section
* is not cleared when these are accessed.
*/
-u16 ipl_devno __attribute__((__section__(".data"))) = 0;
+static u16 ipl_devno __attribute__((__section__(".data"))) = 0;
u32 ipl_flags __attribute__((__section__(".data"))) = 0;
static char *ipl_type_str(enum ipl_type type)
@@ -1038,6 +1038,27 @@ static int __init s390_ipl_init(void)
__initcall(s390_ipl_init);
+void __init ipl_save_parameters(void)
+{
+ struct cio_iplinfo iplinfo;
+ unsigned int *ipl_ptr;
+ void *src, *dst;
+
+ if (cio_get_iplinfo(&iplinfo))
+ return;
+
+ ipl_devno = iplinfo.devno;
+ ipl_flags |= IPL_DEVNO_VALID;
+ if (!iplinfo.is_qdio)
+ return;
+ ipl_flags |= IPL_PARMBLOCK_VALID;
+ ipl_ptr = (unsigned int *)__LC_IPL_PARMBLOCK_PTR;
+ src = (void *)(unsigned long)*ipl_ptr;
+ dst = (void *)IPL_PARMBLOCK_ORIGIN;
+ memmove(dst, src, PAGE_SIZE);
+ *ipl_ptr = IPL_PARMBLOCK_ORIGIN;
+}
+
static LIST_HEAD(rcall);
static DEFINE_MUTEX(rcall_mutex);
OpenPOWER on IntegriCloud