Skip to content

Commit 96c0cdb

Browse files
Vasily GorbikMartin Schwidefsky
authored andcommitted
s390/ipl: remove reipl_method and dump_method
reipl_method and dump_method have been used in addition to reipl_type and dump_type, because a single reipl_type could be achieved with multiple reipl_method (same for dump_type/method). After dropping non-diag308_set based reipl methods, there is a single method per reipl_type/dump_type and reipl_method and dump_method could be simply removed. Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
1 parent 3b96784 commit 96c0cdb

File tree

1 file changed

+11
-46
lines changed

1 file changed

+11
-46
lines changed

arch/s390/kernel/ipl.c

Lines changed: 11 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -117,35 +117,19 @@ static char *dump_type_str(enum dump_type type)
117117
}
118118
}
119119

120-
enum ipl_method {
121-
REIPL_METHOD_CCW_DIAG,
122-
REIPL_METHOD_FCP_DIAG,
123-
REIPL_METHOD_FCP_DUMP,
124-
REIPL_METHOD_NSS_DIAG,
125-
REIPL_METHOD_DEFAULT,
126-
};
127-
128-
enum dump_method {
129-
DUMP_METHOD_NONE,
130-
DUMP_METHOD_CCW_DIAG,
131-
DUMP_METHOD_FCP_DIAG,
132-
};
133-
134120
static int ipl_block_valid;
135121
static struct ipl_parameter_block ipl_block;
136122

137123
static int reipl_capabilities = IPL_TYPE_UNKNOWN;
138124

139125
static enum ipl_type reipl_type = IPL_TYPE_UNKNOWN;
140-
static enum ipl_method reipl_method = REIPL_METHOD_DEFAULT;
141126
static struct ipl_parameter_block *reipl_block_fcp;
142127
static struct ipl_parameter_block *reipl_block_ccw;
143128
static struct ipl_parameter_block *reipl_block_nss;
144129
static struct ipl_parameter_block *reipl_block_actual;
145130

146131
static int dump_capabilities = DUMP_TYPE_NONE;
147132
static enum dump_type dump_type = DUMP_TYPE_NONE;
148-
static enum dump_method dump_method = DUMP_METHOD_NONE;
149133
static struct ipl_parameter_block *dump_block_fcp;
150134
static struct ipl_parameter_block *dump_block_ccw;
151135

@@ -928,25 +912,16 @@ static int reipl_set_type(enum ipl_type type)
928912

929913
switch(type) {
930914
case IPL_TYPE_CCW:
931-
reipl_method = REIPL_METHOD_CCW_DIAG;
932915
reipl_block_actual = reipl_block_ccw;
933916
break;
934917
case IPL_TYPE_FCP:
935-
reipl_method = REIPL_METHOD_FCP_DIAG;
936918
reipl_block_actual = reipl_block_fcp;
937919
break;
938-
case IPL_TYPE_FCP_DUMP:
939-
reipl_method = REIPL_METHOD_FCP_DUMP;
940-
break;
941920
case IPL_TYPE_NSS:
942-
reipl_method = REIPL_METHOD_NSS_DIAG;
943921
reipl_block_actual = reipl_block_nss;
944922
break;
945-
case IPL_TYPE_UNKNOWN:
946-
reipl_method = REIPL_METHOD_DEFAULT;
947-
break;
948923
default:
949-
BUG();
924+
break;
950925
}
951926
reipl_type = type;
952927
return 0;
@@ -981,23 +956,23 @@ static struct kset *reipl_fcp_kset;
981956

982957
static void __reipl_run(void *unused)
983958
{
984-
switch (reipl_method) {
985-
case REIPL_METHOD_CCW_DIAG:
959+
switch (reipl_type) {
960+
case IPL_TYPE_CCW:
986961
diag308(DIAG308_SET, reipl_block_ccw);
987962
diag308(DIAG308_LOAD_CLEAR, NULL);
988963
break;
989-
case REIPL_METHOD_FCP_DIAG:
964+
case IPL_TYPE_FCP:
990965
diag308(DIAG308_SET, reipl_block_fcp);
991966
diag308(DIAG308_LOAD_CLEAR, NULL);
992967
break;
993-
case REIPL_METHOD_NSS_DIAG:
968+
case IPL_TYPE_NSS:
994969
diag308(DIAG308_SET, reipl_block_nss);
995970
diag308(DIAG308_LOAD_CLEAR, NULL);
996971
break;
997-
case REIPL_METHOD_DEFAULT:
972+
case IPL_TYPE_UNKNOWN:
998973
diag308(DIAG308_LOAD_CLEAR, NULL);
999974
break;
1000-
case REIPL_METHOD_FCP_DUMP:
975+
case IPL_TYPE_FCP_DUMP:
1001976
break;
1002977
}
1003978
disabled_wait((unsigned long) __builtin_return_address(0));
@@ -1230,16 +1205,6 @@ static int dump_set_type(enum dump_type type)
12301205
{
12311206
if (!(dump_capabilities & type))
12321207
return -EINVAL;
1233-
switch (type) {
1234-
case DUMP_TYPE_CCW:
1235-
dump_method = DUMP_METHOD_CCW_DIAG;
1236-
break;
1237-
case DUMP_TYPE_FCP:
1238-
dump_method = DUMP_METHOD_FCP_DIAG;
1239-
break;
1240-
default:
1241-
dump_method = DUMP_METHOD_NONE;
1242-
}
12431208
dump_type = type;
12441209
return 0;
12451210
}
@@ -1282,11 +1247,11 @@ static void diag308_dump(void *dump_block)
12821247

12831248
static void __dump_run(void *unused)
12841249
{
1285-
switch (dump_method) {
1286-
case DUMP_METHOD_CCW_DIAG:
1250+
switch (dump_type) {
1251+
case DUMP_TYPE_CCW:
12871252
diag308_dump(dump_block_ccw);
12881253
break;
1289-
case DUMP_METHOD_FCP_DIAG:
1254+
case DUMP_TYPE_FCP:
12901255
diag308_dump(dump_block_fcp);
12911256
break;
12921257
default:
@@ -1296,7 +1261,7 @@ static void __dump_run(void *unused)
12961261

12971262
static void dump_run(struct shutdown_trigger *trigger)
12981263
{
1299-
if (dump_method == DUMP_METHOD_NONE)
1264+
if (dump_type == DUMP_TYPE_NONE)
13001265
return;
13011266
smp_send_stop();
13021267
smp_call_ipl_cpu(__dump_run, NULL);

0 commit comments

Comments
 (0)