diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-02-27 19:20:17 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-02-27 19:20:17 -0500 |
commit | 7981164791d18d5ed1dcdfa9598949ed158a5333 (patch) | |
tree | 6565e7406dd55eb5014efd3e54109159a47cb10e /arch/s390/kernel/ipl.c | |
parent | f1dd6ad599732fc89f36fdd65a2c2cf3c63a8711 (diff) | |
parent | a8d6356cdabf4495aaae7d3e89eb058b1909761c (diff) |
Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6: (35 commits)
[S390] time: remove unused code
[S390] zcore: Add prefix registers to dump header
[S390] correct vdso version string
[S390] add support for compressed kernels
[S390] Define new s390 ELF note sections in elf.h
[S390] codepage conversion of kernel parameter line
[S390] seq_file: convert drivers/s390/
[S390] add z9-ec/z10 instruction to kernel disassembler
[S390] dasd: correct offline processing
[S390] dasd: fix refcounting.
[S390] dasd: fix online/offline race
[S390] use kprobes_built_in() in mm/fault code
[S390] bug: use relative pointers in bug table entries
[S390] Cleanup struct _lowcore usage and defines.
[S390] free_initmem: reduce code duplication
[S390] Replace ENOTSUPP usage with EOPNOTSUPP
[S390] spinlock: check virtual cpu running status
[S390] sysinfo: fix SYSIB 3,2,2 structure
[S390] add MACHINE_IS_LPAR flag
[S390] qdio: optimize cache line usage of struct qdio_irq
...
Diffstat (limited to 'arch/s390/kernel/ipl.c')
-rw-r--r-- | arch/s390/kernel/ipl.c | 41 |
1 files changed, 27 insertions, 14 deletions
diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c index 4d73296fed74..7eedbbcb54aa 100644 --- a/arch/s390/kernel/ipl.c +++ b/arch/s390/kernel/ipl.c | |||
@@ -553,7 +553,7 @@ out: | |||
553 | return rc; | 553 | return rc; |
554 | } | 554 | } |
555 | 555 | ||
556 | static void ipl_run(struct shutdown_trigger *trigger) | 556 | static void __ipl_run(void *unused) |
557 | { | 557 | { |
558 | diag308(DIAG308_IPL, NULL); | 558 | diag308(DIAG308_IPL, NULL); |
559 | if (MACHINE_IS_VM) | 559 | if (MACHINE_IS_VM) |
@@ -562,6 +562,11 @@ static void ipl_run(struct shutdown_trigger *trigger) | |||
562 | reipl_ccw_dev(&ipl_info.data.ccw.dev_id); | 562 | reipl_ccw_dev(&ipl_info.data.ccw.dev_id); |
563 | } | 563 | } |
564 | 564 | ||
565 | static void ipl_run(struct shutdown_trigger *trigger) | ||
566 | { | ||
567 | smp_switch_to_ipl_cpu(__ipl_run, NULL); | ||
568 | } | ||
569 | |||
565 | static int __init ipl_init(void) | 570 | static int __init ipl_init(void) |
566 | { | 571 | { |
567 | int rc; | 572 | int rc; |
@@ -1039,7 +1044,7 @@ static void get_ipl_string(char *dst, struct ipl_parameter_block *ipb, | |||
1039 | sprintf(dst + pos, " PARM %s", vmparm); | 1044 | sprintf(dst + pos, " PARM %s", vmparm); |
1040 | } | 1045 | } |
1041 | 1046 | ||
1042 | static void reipl_run(struct shutdown_trigger *trigger) | 1047 | static void __reipl_run(void *unused) |
1043 | { | 1048 | { |
1044 | struct ccw_dev_id devid; | 1049 | struct ccw_dev_id devid; |
1045 | static char buf[128]; | 1050 | static char buf[128]; |
@@ -1087,6 +1092,11 @@ static void reipl_run(struct shutdown_trigger *trigger) | |||
1087 | disabled_wait((unsigned long) __builtin_return_address(0)); | 1092 | disabled_wait((unsigned long) __builtin_return_address(0)); |
1088 | } | 1093 | } |
1089 | 1094 | ||
1095 | static void reipl_run(struct shutdown_trigger *trigger) | ||
1096 | { | ||
1097 | smp_switch_to_ipl_cpu(__reipl_run, NULL); | ||
1098 | } | ||
1099 | |||
1090 | static void reipl_block_ccw_init(struct ipl_parameter_block *ipb) | 1100 | static void reipl_block_ccw_init(struct ipl_parameter_block *ipb) |
1091 | { | 1101 | { |
1092 | ipb->hdr.len = IPL_PARM_BLK_CCW_LEN; | 1102 | ipb->hdr.len = IPL_PARM_BLK_CCW_LEN; |
@@ -1369,20 +1379,18 @@ static struct kobj_attribute dump_type_attr = | |||
1369 | 1379 | ||
1370 | static struct kset *dump_kset; | 1380 | static struct kset *dump_kset; |
1371 | 1381 | ||
1372 | static void dump_run(struct shutdown_trigger *trigger) | 1382 | static void __dump_run(void *unused) |
1373 | { | 1383 | { |
1374 | struct ccw_dev_id devid; | 1384 | struct ccw_dev_id devid; |
1375 | static char buf[100]; | 1385 | static char buf[100]; |
1376 | 1386 | ||
1377 | switch (dump_method) { | 1387 | switch (dump_method) { |
1378 | case DUMP_METHOD_CCW_CIO: | 1388 | case DUMP_METHOD_CCW_CIO: |
1379 | smp_send_stop(); | ||
1380 | devid.devno = dump_block_ccw->ipl_info.ccw.devno; | 1389 | devid.devno = dump_block_ccw->ipl_info.ccw.devno; |
1381 | devid.ssid = 0; | 1390 | devid.ssid = 0; |
1382 | reipl_ccw_dev(&devid); | 1391 | reipl_ccw_dev(&devid); |
1383 | break; | 1392 | break; |
1384 | case DUMP_METHOD_CCW_VM: | 1393 | case DUMP_METHOD_CCW_VM: |
1385 | smp_send_stop(); | ||
1386 | sprintf(buf, "STORE STATUS"); | 1394 | sprintf(buf, "STORE STATUS"); |
1387 | __cpcmd(buf, NULL, 0, NULL); | 1395 | __cpcmd(buf, NULL, 0, NULL); |
1388 | sprintf(buf, "IPL %X", dump_block_ccw->ipl_info.ccw.devno); | 1396 | sprintf(buf, "IPL %X", dump_block_ccw->ipl_info.ccw.devno); |
@@ -1396,10 +1404,17 @@ static void dump_run(struct shutdown_trigger *trigger) | |||
1396 | diag308(DIAG308_SET, dump_block_fcp); | 1404 | diag308(DIAG308_SET, dump_block_fcp); |
1397 | diag308(DIAG308_DUMP, NULL); | 1405 | diag308(DIAG308_DUMP, NULL); |
1398 | break; | 1406 | break; |
1399 | case DUMP_METHOD_NONE: | 1407 | default: |
1400 | return; | 1408 | break; |
1401 | } | 1409 | } |
1402 | printk(KERN_EMERG "Dump failed!\n"); | 1410 | } |
1411 | |||
1412 | static void dump_run(struct shutdown_trigger *trigger) | ||
1413 | { | ||
1414 | if (dump_method == DUMP_METHOD_NONE) | ||
1415 | return; | ||
1416 | smp_send_stop(); | ||
1417 | smp_switch_to_ipl_cpu(__dump_run, NULL); | ||
1403 | } | 1418 | } |
1404 | 1419 | ||
1405 | static int __init dump_ccw_init(void) | 1420 | static int __init dump_ccw_init(void) |
@@ -1577,7 +1592,7 @@ static void vmcmd_run(struct shutdown_trigger *trigger) | |||
1577 | static int vmcmd_init(void) | 1592 | static int vmcmd_init(void) |
1578 | { | 1593 | { |
1579 | if (!MACHINE_IS_VM) | 1594 | if (!MACHINE_IS_VM) |
1580 | return -ENOTSUPP; | 1595 | return -EOPNOTSUPP; |
1581 | vmcmd_kset = kset_create_and_add("vmcmd", NULL, firmware_kobj); | 1596 | vmcmd_kset = kset_create_and_add("vmcmd", NULL, firmware_kobj); |
1582 | if (!vmcmd_kset) | 1597 | if (!vmcmd_kset) |
1583 | return -ENOMEM; | 1598 | return -ENOMEM; |
@@ -1595,7 +1610,7 @@ static void stop_run(struct shutdown_trigger *trigger) | |||
1595 | { | 1610 | { |
1596 | if (strcmp(trigger->name, ON_PANIC_STR) == 0) | 1611 | if (strcmp(trigger->name, ON_PANIC_STR) == 0) |
1597 | disabled_wait((unsigned long) __builtin_return_address(0)); | 1612 | disabled_wait((unsigned long) __builtin_return_address(0)); |
1598 | while (signal_processor(smp_processor_id(), sigp_stop) == sigp_busy) | 1613 | while (sigp(smp_processor_id(), sigp_stop) == sigp_busy) |
1599 | cpu_relax(); | 1614 | cpu_relax(); |
1600 | for (;;); | 1615 | for (;;); |
1601 | } | 1616 | } |
@@ -1902,7 +1917,6 @@ void __init ipl_update_parameters(void) | |||
1902 | void __init ipl_save_parameters(void) | 1917 | void __init ipl_save_parameters(void) |
1903 | { | 1918 | { |
1904 | struct cio_iplinfo iplinfo; | 1919 | struct cio_iplinfo iplinfo; |
1905 | unsigned int *ipl_ptr; | ||
1906 | void *src, *dst; | 1920 | void *src, *dst; |
1907 | 1921 | ||
1908 | if (cio_get_iplinfo(&iplinfo)) | 1922 | if (cio_get_iplinfo(&iplinfo)) |
@@ -1913,11 +1927,10 @@ void __init ipl_save_parameters(void) | |||
1913 | if (!iplinfo.is_qdio) | 1927 | if (!iplinfo.is_qdio) |
1914 | return; | 1928 | return; |
1915 | ipl_flags |= IPL_PARMBLOCK_VALID; | 1929 | ipl_flags |= IPL_PARMBLOCK_VALID; |
1916 | ipl_ptr = (unsigned int *)__LC_IPL_PARMBLOCK_PTR; | 1930 | src = (void *)(unsigned long)S390_lowcore.ipl_parmblock_ptr; |
1917 | src = (void *)(unsigned long)*ipl_ptr; | ||
1918 | dst = (void *)IPL_PARMBLOCK_ORIGIN; | 1931 | dst = (void *)IPL_PARMBLOCK_ORIGIN; |
1919 | memmove(dst, src, PAGE_SIZE); | 1932 | memmove(dst, src, PAGE_SIZE); |
1920 | *ipl_ptr = IPL_PARMBLOCK_ORIGIN; | 1933 | S390_lowcore.ipl_parmblock_ptr = IPL_PARMBLOCK_ORIGIN; |
1921 | } | 1934 | } |
1922 | 1935 | ||
1923 | static LIST_HEAD(rcall); | 1936 | static LIST_HEAD(rcall); |