[PATCH 3.16 061/366] parisc: Fix HPMC handler by increasing size to multiple of 16 bytes

Ben Hutchings
2018-10-14T23:34:13Z

From: Helge Deller <deller@gmx.de>

commit d5654e156bc4d68a87bbaa6d7e020baceddf6e68 upstream.

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>
[bwh: Backported to 3.16: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
arch/parisc/kernel/hpmc.S | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

--- a/arch/parisc/kernel/hpmc.S
+++ b/arch/parisc/kernel/hpmc.S
@@ -79,6 +79,7 @@ END(hpmc_pim_data)
.text

.import intr_save, code
+ .align 16
ENTRY(os_hpmc)
.os_hpmc:

@@ -295,11 +296,14 @@ os_hpmc_6:

b .
nop
+ .align 16 /* make function length multiple of 16 bytes */
ENDPROC(os_hpmc)
.os_hpmc_end:
nop
.data
+.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