parisc: Fix HPMC handler by increasing size to multiple of 16 bytes
authorHelge Deller <deller@gmx.de>
Sat, 24 Mar 2018 20:18:25 +0000 (21:18 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Nov 2018 08:25:58 +0000 (09:25 +0100)
[ Upstream commit d5654e156bc4d68a87bbaa6d7e020baceddf6e68 ]

Make sure that the HPMC (High Priority Machine Check) handler is 16-byte
aligned and that it's length in the IVT is a multiple of 16 bytes.
Otherwise PDC may decide not to call the HPMC crash handler.

Signed-off-by: Helge Deller <deller@gmx.de>
Cc: stable@vger.kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/parisc/kernel/hpmc.S

index 38d461aec46dee32bf5ff0cbe50a37fc1bb32a8f..407b3aa5aa07c0c1f8886016f98d113a2dcb4719 100644 (file)
@@ -83,6 +83,7 @@ END(hpmc_pim_data)
        .text
 
        .import intr_save, code
+       .align 16
 ENTRY_CFI(os_hpmc)
 .os_hpmc:
 
@@ -299,12 +300,15 @@ os_hpmc_6:
 
        b .
        nop
+       .align 16       /* make function length multiple of 16 bytes */
 ENDPROC_CFI(os_hpmc)
 .os_hpmc_end:
 
 
        __INITRODATA
+.globl os_hpmc_size
        .align 4
-       .export os_hpmc_size
+       .type   os_hpmc_size, @object
+       .size   os_hpmc_size, 4
 os_hpmc_size:
        .word .os_hpmc_end-.os_hpmc