summaryrefslogtreecommitdiffstats
path: root/arch/kvx/cpu/exception.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/kvx/cpu/exception.S')
-rw-r--r--arch/kvx/cpu/exception.S24
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/kvx/cpu/exception.S b/arch/kvx/cpu/exception.S
new file mode 100644
index 0000000000..0017e8ea12
--- /dev/null
+++ b/arch/kvx/cpu/exception.S
@@ -0,0 +1,24 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Copyright (C) 2019 Kalray Inc.
+ */
+
+#include <linux/linkage.h>
+
+/**
+ * We do not aim at handling exceptions but at least, we want the CPU to
+ * stop when taking one.
+ * Note that we can not expect to be able to issue a print since
+ * it might be the cause of trap...
+ */
+#define exception_stub(__type) \
+.section .exception.## __type, "ax", @progbits ;\
+ENTRY(kvx_## __type ##_early_handler): ;\
+ goto . ;\
+ ;; ;\
+ENDPROC(kvx_ ## __type ## _early_handler)
+
+exception_stub(debug)
+exception_stub(trap)
+exception_stub(interrupt)
+exception_stub(syscall)