Commit a156f09c authored by Heiko Carstens's avatar Heiko Carstens Committed by Vasily Gorbik

s390/extable: sort amode31 extable early

The early program check handler is active before the amode31 extable
is sorted. Therefore in case a program check happens early within the
amode31 code the extable entry might not be found.

Fix this by sorting the amode31 extable early.
Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
parent 9d792ef1
...@@ -293,6 +293,11 @@ static void __init check_image_bootable(void) ...@@ -293,6 +293,11 @@ static void __init check_image_bootable(void)
disabled_wait(); disabled_wait();
} }
static void __init sort_amode31_extable(void)
{
sort_extable(__start_amode31_ex_table, __stop_amode31_ex_table);
}
void __init startup_init(void) void __init startup_init(void)
{ {
sclp_early_adjust_va(); sclp_early_adjust_va();
...@@ -301,6 +306,7 @@ void __init startup_init(void) ...@@ -301,6 +306,7 @@ void __init startup_init(void)
time_early_init(); time_early_init();
init_kernel_storage_key(); init_kernel_storage_key();
lockdep_off(); lockdep_off();
sort_amode31_extable();
setup_lowcore_early(); setup_lowcore_early();
setup_facility_list(); setup_facility_list();
detect_machine_type(); detect_machine_type();
......
...@@ -291,7 +291,6 @@ static void __init test_monitor_call(void) ...@@ -291,7 +291,6 @@ static void __init test_monitor_call(void)
void __init trap_init(void) void __init trap_init(void)
{ {
sort_extable(__start_amode31_ex_table, __stop_amode31_ex_table);
local_mcck_enable(); local_mcck_enable();
test_monitor_call(); test_monitor_call();
} }
......
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