From 4d919148fb35ed6121f9d18b6e18493e1b36edaa Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Tue, 12 Jun 2018 09:36:28 +1000 Subject: Don't clobber d0 in interrupts And keep them masked during breaks Signed-off-by: Benjamin Herrenschmidt --- cf-code/cf-fsi-fw.S | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'cf-code') diff --git a/cf-code/cf-fsi-fw.S b/cf-code/cf-fsi-fw.S index 9fa5804..44a02d2 100644 --- a/cf-code/cf-fsi-fw.S +++ b/cf-code/cf-fsi-fw.S @@ -297,6 +297,9 @@ arbitration_request: 0: move.b %a1@(ARB_REG),%d1 bne 1f + /* Mask interrupts */ + move.w #0x2007,%sr + /* Got it, re-load the GPIO caches */ move.l %a5@(0),%DCLK move.l %a4@(0),%DDAT @@ -570,9 +573,11 @@ config_gpio_in: * Note: Must only clobber %d0 */ _int: + move.l %d0,%a7@- addq.l #1,%a1@(INT_CNT) moveq.l #CVIC_SW_IRQ,%d0 move.l %d0,%a2@(CVIC_SW_IRQ_CLR) + move.l %a7@+,%d0 rte /* Bad exception handler */ -- cgit v1.2.1