aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r--arch/s390/kernel/head31.S4
-rw-r--r--arch/s390/kernel/head64.S4
-rw-r--r--arch/s390/kernel/setup.c46
3 files changed, 40 insertions, 14 deletions
diff --git a/arch/s390/kernel/head31.S b/arch/s390/kernel/head31.S
index d00de17b3778..a4dc61f3285e 100644
--- a/arch/s390/kernel/head31.S
+++ b/arch/s390/kernel/head31.S
@@ -273,7 +273,7 @@ startup_continue:
273.Lbss_end: .long _end 273.Lbss_end: .long _end
274.Lparmaddr: .long PARMAREA 274.Lparmaddr: .long PARMAREA
275.Lsccbaddr: .long .Lsccb 275.Lsccbaddr: .long .Lsccb
276 .align 4096 276 .org 0x12000
277.Lsccb: 277.Lsccb:
278 .hword 0x1000 # length, one page 278 .hword 0x1000 # length, one page
279 .byte 0x00,0x00,0x00 279 .byte 0x00,0x00,0x00
@@ -290,7 +290,7 @@ startup_continue:
290.Lscpincr2: 290.Lscpincr2:
291 .quad 0x00 291 .quad 0x00
292 .fill 3984,1,0 292 .fill 3984,1,0
293 .align 4096 293 .org 0x13000
294 294
295#ifdef CONFIG_SHARED_KERNEL 295#ifdef CONFIG_SHARED_KERNEL
296 .org 0x100000 296 .org 0x100000
diff --git a/arch/s390/kernel/head64.S b/arch/s390/kernel/head64.S
index 47744fcca930..9d80c5b1ef95 100644
--- a/arch/s390/kernel/head64.S
+++ b/arch/s390/kernel/head64.S
@@ -268,7 +268,7 @@ startup_continue:
268.Lparmaddr: 268.Lparmaddr:
269 .quad PARMAREA 269 .quad PARMAREA
270 270
271 .align 4096 271 .org 0x12000
272.Lsccb: 272.Lsccb:
273 .hword 0x1000 # length, one page 273 .hword 0x1000 # length, one page
274 .byte 0x00,0x00,0x00 274 .byte 0x00,0x00,0x00
@@ -285,7 +285,7 @@ startup_continue:
285.Lscpincr2: 285.Lscpincr2:
286 .quad 0x00 286 .quad 0x00
287 .fill 3984,1,0 287 .fill 3984,1,0
288 .align 4096 288 .org 0x13000
289 289
290#ifdef CONFIG_SHARED_KERNEL 290#ifdef CONFIG_SHARED_KERNEL
291 .org 0x100000 291 .org 0x100000
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index 1ca34f54ea8a..c902f059c7aa 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -877,31 +877,57 @@ static struct bin_attribute ipl_scp_data_attr = {
877 877
878static decl_subsys(ipl, NULL, NULL); 878static decl_subsys(ipl, NULL, NULL);
879 879
880static int ipl_register_fcp_files(void)
881{
882 int rc;
883
884 rc = sysfs_create_group(&ipl_subsys.kset.kobj,
885 &ipl_fcp_attr_group);
886 if (rc)
887 goto out;
888 rc = sysfs_create_bin_file(&ipl_subsys.kset.kobj,
889 &ipl_parameter_attr);
890 if (rc)
891 goto out_ipl_parm;
892 rc = sysfs_create_bin_file(&ipl_subsys.kset.kobj,
893 &ipl_scp_data_attr);
894 if (!rc)
895 goto out;
896
897 sysfs_remove_bin_file(&ipl_subsys.kset.kobj, &ipl_parameter_attr);
898
899out_ipl_parm:
900 sysfs_remove_group(&ipl_subsys.kset.kobj, &ipl_fcp_attr_group);
901out:
902 return rc;
903}
904
880static int __init 905static int __init
881ipl_device_sysfs_register(void) { 906ipl_device_sysfs_register(void) {
882 int rc; 907 int rc;
883 908
884 rc = firmware_register(&ipl_subsys); 909 rc = firmware_register(&ipl_subsys);
885 if (rc) 910 if (rc)
886 return rc; 911 goto out;
887 912
888 switch (get_ipl_type()) { 913 switch (get_ipl_type()) {
889 case ipl_type_ccw: 914 case ipl_type_ccw:
890 sysfs_create_group(&ipl_subsys.kset.kobj, &ipl_ccw_attr_group); 915 rc = sysfs_create_group(&ipl_subsys.kset.kobj,
916 &ipl_ccw_attr_group);
891 break; 917 break;
892 case ipl_type_fcp: 918 case ipl_type_fcp:
893 sysfs_create_group(&ipl_subsys.kset.kobj, &ipl_fcp_attr_group); 919 rc = ipl_register_fcp_files();
894 sysfs_create_bin_file(&ipl_subsys.kset.kobj,
895 &ipl_parameter_attr);
896 sysfs_create_bin_file(&ipl_subsys.kset.kobj,
897 &ipl_scp_data_attr);
898 break; 920 break;
899 default: 921 default:
900 sysfs_create_group(&ipl_subsys.kset.kobj, 922 rc = sysfs_create_group(&ipl_subsys.kset.kobj,
901 &ipl_unknown_attr_group); 923 &ipl_unknown_attr_group);
902 break; 924 break;
903 } 925 }
904 return 0; 926
927 if (rc)
928 firmware_unregister(&ipl_subsys);
929out:
930 return rc;
905} 931}
906 932
907__initcall(ipl_device_sysfs_register); 933__initcall(ipl_device_sysfs_register);