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

From: Ben Hutchings
Date: Sun Oct 14 2018 - 11:52:51 EST


3.16.60-rc1 review patch. If anyone has any objections, please let me know.

------------------

From: Helge Deller <deller@xxxxxx>

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@xxxxxx>
[bwh: Backported to 3.16: adjust context]
Signed-off-by: Ben Hutchings <ben@xxxxxxxxxxxxxxx>
---
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