diff options
Diffstat (limited to 'drivers/s390/cio/chsc.c')
-rw-r--r-- | drivers/s390/cio/chsc.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/drivers/s390/cio/chsc.c b/drivers/s390/cio/chsc.c index ea92ac4d6577..597c0c76a2ad 100644 --- a/drivers/s390/cio/chsc.c +++ b/drivers/s390/cio/chsc.c | |||
@@ -990,16 +990,20 @@ out: | |||
990 | return ret; | 990 | return ret; |
991 | } | 991 | } |
992 | 992 | ||
993 | static int __init | 993 | int __init chsc_alloc_sei_area(void) |
994 | chsc_alloc_sei_area(void) | ||
995 | { | 994 | { |
996 | sei_page = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA); | 995 | sei_page = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA); |
997 | if (!sei_page) | 996 | if (!sei_page) |
998 | printk(KERN_WARNING"Can't allocate page for processing of " \ | 997 | CIO_MSG_EVENT(0, "Can't allocate page for processing of " |
999 | "chsc machine checks!\n"); | 998 | "chsc machine checks!\n"); |
1000 | return (sei_page ? 0 : -ENOMEM); | 999 | return (sei_page ? 0 : -ENOMEM); |
1001 | } | 1000 | } |
1002 | 1001 | ||
1002 | void __init chsc_free_sei_area(void) | ||
1003 | { | ||
1004 | kfree(sei_page); | ||
1005 | } | ||
1006 | |||
1003 | int __init | 1007 | int __init |
1004 | chsc_enable_facility(int operation_code) | 1008 | chsc_enable_facility(int operation_code) |
1005 | { | 1009 | { |
@@ -1051,8 +1055,6 @@ chsc_enable_facility(int operation_code) | |||
1051 | return ret; | 1055 | return ret; |
1052 | } | 1056 | } |
1053 | 1057 | ||
1054 | subsys_initcall(chsc_alloc_sei_area); | ||
1055 | |||
1056 | struct css_general_char css_general_characteristics; | 1058 | struct css_general_char css_general_characteristics; |
1057 | struct css_chsc_char css_chsc_characteristics; | 1059 | struct css_chsc_char css_chsc_characteristics; |
1058 | 1060 | ||
@@ -1073,8 +1075,8 @@ chsc_determine_css_characteristics(void) | |||
1073 | 1075 | ||
1074 | scsc_area = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA); | 1076 | scsc_area = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA); |
1075 | if (!scsc_area) { | 1077 | if (!scsc_area) { |
1076 | printk(KERN_WARNING"cio: Was not able to determine available" \ | 1078 | CIO_MSG_EVENT(0, "Was not able to determine available" |
1077 | "CHSCs due to no memory.\n"); | 1079 | "CHSCs due to no memory.\n"); |
1078 | return -ENOMEM; | 1080 | return -ENOMEM; |
1079 | } | 1081 | } |
1080 | 1082 | ||
@@ -1083,15 +1085,15 @@ chsc_determine_css_characteristics(void) | |||
1083 | 1085 | ||
1084 | result = chsc(scsc_area); | 1086 | result = chsc(scsc_area); |
1085 | if (result) { | 1087 | if (result) { |
1086 | printk(KERN_WARNING"cio: Was not able to determine " \ | 1088 | CIO_MSG_EVENT(0, "Was not able to determine available CHSCs, " |
1087 | "available CHSCs, cc=%i.\n", result); | 1089 | "cc=%i.\n", result); |
1088 | result = -EIO; | 1090 | result = -EIO; |
1089 | goto exit; | 1091 | goto exit; |
1090 | } | 1092 | } |
1091 | 1093 | ||
1092 | if (scsc_area->response.code != 1) { | 1094 | if (scsc_area->response.code != 1) { |
1093 | printk(KERN_WARNING"cio: Was not able to determine " \ | 1095 | CIO_MSG_EVENT(0, "Was not able to determine " |
1094 | "available CHSCs.\n"); | 1096 | "available CHSCs.\n"); |
1095 | result = -EIO; | 1097 | result = -EIO; |
1096 | goto exit; | 1098 | goto exit; |
1097 | } | 1099 | } |