[S390] Improve address space mode selection.
Introduce user_mode to replace the two variables switch_amode and s390_noexec. There are three valid combinations of the old values: 1) switch_amode == 0 && s390_noexec == 0 2) switch_amode == 1 && s390_noexec == 0 3) switch_amode == 1 && s390_noexec == 1 They get replaced by 1) user_mode == HOME_SPACE_MODE 2) user_mode == PRIMARY_SPACE_MODE 3) user_mode == SECONDARY_SPACE_MODE The new kernel parameter user_mode=[primary,secondary,home] lets you choose the address space mode the user space processes should use. In addition the CONFIG_S390_SWITCH_AMODE config option is removed. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:

committed by
Martin Schwidefsky

parent
61365e132e
commit
b11b533427
@@ -86,7 +86,8 @@ static void vdso_init_data(struct vdso_data *vd)
|
||||
unsigned int facility_list;
|
||||
|
||||
facility_list = stfl();
|
||||
vd->ectg_available = switch_amode && (facility_list & 1);
|
||||
vd->ectg_available =
|
||||
user_mode != HOME_SPACE_MODE && (facility_list & 1);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_64BIT
|
||||
@@ -114,7 +115,7 @@ int vdso_alloc_per_cpu(int cpu, struct _lowcore *lowcore)
|
||||
|
||||
lowcore->vdso_per_cpu_data = __LC_PASTE;
|
||||
|
||||
if (!switch_amode || !vdso_enabled)
|
||||
if (user_mode == HOME_SPACE_MODE || !vdso_enabled)
|
||||
return 0;
|
||||
|
||||
segment_table = __get_free_pages(GFP_KERNEL, SEGMENT_ORDER);
|
||||
@@ -160,7 +161,7 @@ void vdso_free_per_cpu(int cpu, struct _lowcore *lowcore)
|
||||
unsigned long segment_table, page_table, page_frame;
|
||||
u32 *psal, *aste;
|
||||
|
||||
if (!switch_amode || !vdso_enabled)
|
||||
if (user_mode == HOME_SPACE_MODE || !vdso_enabled)
|
||||
return;
|
||||
|
||||
psal = (u32 *)(addr_t) lowcore->paste[4];
|
||||
@@ -184,7 +185,7 @@ static void __vdso_init_cr5(void *dummy)
|
||||
|
||||
static void vdso_init_cr5(void)
|
||||
{
|
||||
if (switch_amode && vdso_enabled)
|
||||
if (user_mode != HOME_SPACE_MODE && vdso_enabled)
|
||||
on_each_cpu(__vdso_init_cr5, NULL, 1);
|
||||
}
|
||||
#endif /* CONFIG_64BIT */
|
||||
|
Reference in New Issue
Block a user