Commit d3baaeb5 authored by Vasily Gorbik's avatar Vasily Gorbik

s390: avoid double handling of "noexec" option

"noexec" option is already parsed during startup and its value is
exposed via noexec_disabled variable. Simply reuse that value during
machine facilities detection.
Suggested-by: default avatarIlya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
parent f653e29b
...@@ -238,7 +238,7 @@ static __init void detect_machine_facilities(void) ...@@ -238,7 +238,7 @@ static __init void detect_machine_facilities(void)
S390_lowcore.machine_flags |= MACHINE_FLAG_VX; S390_lowcore.machine_flags |= MACHINE_FLAG_VX;
__ctl_set_bit(0, 17); __ctl_set_bit(0, 17);
} }
if (test_facility(130)) { if (test_facility(130) && !noexec_disabled) {
S390_lowcore.machine_flags |= MACHINE_FLAG_NX; S390_lowcore.machine_flags |= MACHINE_FLAG_NX;
__ctl_set_bit(0, 20); __ctl_set_bit(0, 20);
} }
...@@ -268,21 +268,6 @@ static int __init disable_vector_extension(char *str) ...@@ -268,21 +268,6 @@ static int __init disable_vector_extension(char *str)
} }
early_param("novx", disable_vector_extension); early_param("novx", disable_vector_extension);
static int __init noexec_setup(char *str)
{
bool enabled;
int rc;
rc = kstrtobool(str, &enabled);
if (!rc && !enabled) {
/* Disable no-execute support */
S390_lowcore.machine_flags &= ~MACHINE_FLAG_NX;
__ctl_clear_bit(0, 20);
}
return rc;
}
early_param("noexec", noexec_setup);
static int __init cad_setup(char *str) static int __init cad_setup(char *str)
{ {
bool enabled; bool enabled;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment