summaryrefslogtreecommitdiff
path: root/arch/loongarch/include/asm/stackframe.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/loongarch/include/asm/stackframe.h')
-rw-r--r--arch/loongarch/include/asm/stackframe.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/loongarch/include/asm/stackframe.h b/arch/loongarch/include/asm/stackframe.h
index 7df80e6ae9d2..4fb1e6408b98 100644
--- a/arch/loongarch/include/asm/stackframe.h
+++ b/arch/loongarch/include/asm/stackframe.h
@@ -158,6 +158,10 @@
cfi_st u0, PT_R21, \docfi
csrrd u0, PERCPU_BASE_KS
9:
+#ifdef CONFIG_KGDB
+ li.w t0, CSR_CRMD_WE
+ csrxchg t0, t0, LOONGARCH_CSR_CRMD
+#endif
.endm
.macro SAVE_ALL docfi=0