diff options
Diffstat (limited to 'arch/s390/kernel/setup.c')
-rw-r--r-- | arch/s390/kernel/setup.c | 31 |
1 files changed, 2 insertions, 29 deletions
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index f5434d1ecb31..0c35dee10b00 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
@@ -305,8 +305,7 @@ static int set_amode_and_uaccess(unsigned long user_amode, | |||
305 | */ | 305 | */ |
306 | static int __init early_parse_switch_amode(char *p) | 306 | static int __init early_parse_switch_amode(char *p) |
307 | { | 307 | { |
308 | if (user_mode != SECONDARY_SPACE_MODE) | 308 | user_mode = PRIMARY_SPACE_MODE; |
309 | user_mode = PRIMARY_SPACE_MODE; | ||
310 | return 0; | 309 | return 0; |
311 | } | 310 | } |
312 | early_param("switch_amode", early_parse_switch_amode); | 311 | early_param("switch_amode", early_parse_switch_amode); |
@@ -315,10 +314,6 @@ static int __init early_parse_user_mode(char *p) | |||
315 | { | 314 | { |
316 | if (p && strcmp(p, "primary") == 0) | 315 | if (p && strcmp(p, "primary") == 0) |
317 | user_mode = PRIMARY_SPACE_MODE; | 316 | user_mode = PRIMARY_SPACE_MODE; |
318 | #ifdef CONFIG_S390_EXEC_PROTECT | ||
319 | else if (p && strcmp(p, "secondary") == 0) | ||
320 | user_mode = SECONDARY_SPACE_MODE; | ||
321 | #endif | ||
322 | else if (!p || strcmp(p, "home") == 0) | 317 | else if (!p || strcmp(p, "home") == 0) |
323 | user_mode = HOME_SPACE_MODE; | 318 | user_mode = HOME_SPACE_MODE; |
324 | else | 319 | else |
@@ -327,31 +322,9 @@ static int __init early_parse_user_mode(char *p) | |||
327 | } | 322 | } |
328 | early_param("user_mode", early_parse_user_mode); | 323 | early_param("user_mode", early_parse_user_mode); |
329 | 324 | ||
330 | #ifdef CONFIG_S390_EXEC_PROTECT | ||
331 | /* | ||
332 | * Enable execute protection? | ||
333 | */ | ||
334 | static int __init early_parse_noexec(char *p) | ||
335 | { | ||
336 | if (!strncmp(p, "off", 3)) | ||
337 | return 0; | ||
338 | user_mode = SECONDARY_SPACE_MODE; | ||
339 | return 0; | ||
340 | } | ||
341 | early_param("noexec", early_parse_noexec); | ||
342 | #endif /* CONFIG_S390_EXEC_PROTECT */ | ||
343 | |||
344 | static void setup_addressing_mode(void) | 325 | static void setup_addressing_mode(void) |
345 | { | 326 | { |
346 | if (user_mode == SECONDARY_SPACE_MODE) { | 327 | if (user_mode == PRIMARY_SPACE_MODE) { |
347 | if (set_amode_and_uaccess(PSW_ASC_SECONDARY, | ||
348 | PSW32_ASC_SECONDARY)) | ||
349 | pr_info("Execute protection active, " | ||
350 | "mvcos available\n"); | ||
351 | else | ||
352 | pr_info("Execute protection active, " | ||
353 | "mvcos not available\n"); | ||
354 | } else if (user_mode == PRIMARY_SPACE_MODE) { | ||
355 | if (set_amode_and_uaccess(PSW_ASC_PRIMARY, PSW32_ASC_PRIMARY)) | 328 | if (set_amode_and_uaccess(PSW_ASC_PRIMARY, PSW32_ASC_PRIMARY)) |
356 | pr_info("Address spaces switched, " | 329 | pr_info("Address spaces switched, " |
357 | "mvcos available\n"); | 330 | "mvcos available\n"); |