diff options
| author | Helge Deller <deller@gmx.de> | 2023-11-10 16:13:15 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-11-28 16:54:59 +0000 |
| commit | 064c697cac4bf75b4d739a54883f5cd376919bcb (patch) | |
| tree | 34af52519409a6f1200fac667c481c226cb83aba /arch/parisc | |
| parent | c6effcdd7dd03bd37ec3f72769e96f765e0390f5 (diff) | |
| download | linux-064c697cac4bf75b4d739a54883f5cd376919bcb.tar.gz linux-064c697cac4bf75b4d739a54883f5cd376919bcb.tar.bz2 linux-064c697cac4bf75b4d739a54883f5cd376919bcb.zip | |
parisc: Prevent booting 64-bit kernels on PA1.x machines
commit a406b8b424fa01f244c1aab02ba186258448c36b upstream.
Bail out early with error message when trying to boot a 64-bit kernel on
32-bit machines. This fixes the previous commit to include the check for
true 64-bit kernels as well.
Signed-off-by: Helge Deller <deller@gmx.de>
Fixes: 591d2108f3abc ("parisc: Add runtime check to prevent PA2.0 kernels on PA1.x machines")
Cc: <stable@vger.kernel.org> # v6.0+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/parisc')
| -rw-r--r-- | arch/parisc/kernel/head.S | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/parisc/kernel/head.S b/arch/parisc/kernel/head.S index 598d0938449d..2f95c2429f77 100644 --- a/arch/parisc/kernel/head.S +++ b/arch/parisc/kernel/head.S @@ -69,9 +69,8 @@ $bss_loop: stw,ma %arg2,4(%r1) stw,ma %arg3,4(%r1) -#if !defined(CONFIG_64BIT) && defined(CONFIG_PA20) - /* This 32-bit kernel was compiled for PA2.0 CPUs. Check current CPU - * and halt kernel if we detect a PA1.x CPU. */ +#if defined(CONFIG_PA20) + /* check for 64-bit capable CPU as required by current kernel */ ldi 32,%r10 mtctl %r10,%cr11 .level 2.0 |
