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: Ilya Leoshkevich <iii@linux.ibm.com> Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
This commit is contained in:
Родитель
f653e29bc2
Коммит
d3baaeb5ae
|
@ -238,7 +238,7 @@ static __init void detect_machine_facilities(void)
|
|||
S390_lowcore.machine_flags |= MACHINE_FLAG_VX;
|
||||
__ctl_set_bit(0, 17);
|
||||
}
|
||||
if (test_facility(130)) {
|
||||
if (test_facility(130) && !noexec_disabled) {
|
||||
S390_lowcore.machine_flags |= MACHINE_FLAG_NX;
|
||||
__ctl_set_bit(0, 20);
|
||||
}
|
||||
|
@ -268,21 +268,6 @@ static int __init disable_vector_extension(char *str)
|
|||
}
|
||||
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)
|
||||
{
|
||||
bool enabled;
|
||||
|
|
Загрузка…
Ссылка в новой задаче