]> Git Repo - linux.git/commitdiff
arm64: Ensure the instruction emulation is ready for userspace
authorSuzuki K Poulose <[email protected]>
Fri, 6 Oct 2017 13:16:52 +0000 (14:16 +0100)
committerCatalin Marinas <[email protected]>
Fri, 6 Oct 2017 15:35:21 +0000 (16:35 +0100)
We trap and emulate some instructions (e.g, mrs, deprecated instructions)
for the userspace. However the handlers for these are registered as
late_initcalls and the userspace could be up and running from the initramfs
by that time (with populate_rootfs, which is a rootfs_initcall()). This
could cause problems for the early applications ending up in failure
like :

[   11.152061] modprobe[93]: undefined instruction: pc=0000ffff8ca48ff4

This patch promotes the specific calls to core_initcalls, which are
guaranteed to be completed before we hit userspace.

Cc: [email protected]
Cc: Dave Martin <[email protected]>
Cc: Matthias Brugger <[email protected]>
Cc: James Morse <[email protected]>
Reported-by: Matwey V. Kornilov <[email protected]>
Signed-off-by: Suzuki K Poulose <[email protected]>
Signed-off-by: Catalin Marinas <[email protected]>
arch/arm64/kernel/armv8_deprecated.c
arch/arm64/kernel/cpufeature.c

index f0e6d717885b1fcf3b22f64c10c38f19c25f809d..d06fbe4cd38d7423c900aff64b0e728f995478d3 100644 (file)
@@ -649,4 +649,4 @@ static int __init armv8_deprecated_init(void)
        return 0;
 }
 
-late_initcall(armv8_deprecated_init);
+core_initcall(armv8_deprecated_init);
index cd52d365d1f01aefae2f63e6a0207e65e0fdcb57..21e2c95d24e72a8e339406af601f02690675d3d8 100644 (file)
@@ -1307,4 +1307,4 @@ static int __init enable_mrs_emulation(void)
        return 0;
 }
 
-late_initcall(enable_mrs_emulation);
+core_initcall(enable_mrs_emulation);
This page took 0.06706 seconds and 4 git commands to generate.