Skip to contentSkip to conversation

unicore32 core architecture: signals

PATCH In review Guan Xuetao 2 participants 2 messages Dec 25, 2010 – Jan 7, 2011 Generic include/asm header files

lore
Share & tools
lore
#0 lore raw

PATCH 11/12 unicore32 core architecture: signals

From: Guan Xuetao <[email protected]>

Patch 11 implements signals.

---
 arch/unicore32/include/asm/sigcontext.h |   61 ++++
 arch/unicore32/kernel/signal.c          |  571 +++++++++++++++++++++++++++++++
 arch/unicore32/kernel/signal.h          |   16 +
 3 files changed, 648 insertions(+), 0 deletions(-)
arch/unicore32/include/asm/sigcontext.h new file +61 -0
new file mode 100644
index 0000000..68e05e7
@@ -0,0 +1,61 @@
+/*
+ * linux/arch/unicore32/include/asm/sigcontext.h
+ *
+ * Code specific to PKUnity SoC and UniCore ISA
+ *
+ * Copyright (C) 2001-2010 GUAN Xue-tao
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#ifndef __UNICORE_SIGCONTEXT_H__
+#define __UNICORE_SIGCONTEXT_H__
+
+/*
+ * Signal context structure - contains all info to do with the state
+ * before the signal handler was invoked.  Note: only add new entries
+ * to the end of the structure.
+ */
+struct sigcontext {
+	unsigned long trap_no;
+	unsigned long error_code;
+	unsigned long oldmask;
+	unsigned long ucreg_00;
+	unsigned long ucreg_01;
+	unsigned long ucreg_02;
+	unsigned long ucreg_03;
+	unsigned long ucreg_04;
+	unsigned long ucreg_05;
+	unsigned long ucreg_06;
+	unsigned long ucreg_07;
+	unsigned long ucreg_08;
+	unsigned long ucreg_09;
+	unsigned long ucreg_10;
+	unsigned long ucreg_11;
+	unsigned long ucreg_12;
+	unsigned long ucreg_13;
+	unsigned long ucreg_14;
+	unsigned long ucreg_15;
+	unsigned long ucreg_16;
+	unsigned long ucreg_17;
+	unsigned long ucreg_18;
+	unsigned long ucreg_19;
+	unsigned long ucreg_20;
+	unsigned long ucreg_21;
+	unsigned long ucreg_22;
+	unsigned long ucreg_23;
+	unsigned long ucreg_24;
+	unsigned long ucreg_25;
+	unsigned long ucreg_26;
+	unsigned long ucreg_fp;
+	unsigned long ucreg_ip;
+	unsigned long ucreg_sp;
+	unsigned long ucreg_lr;
+	unsigned long ucreg_pc;
+	unsigned long ucreg_asr;
+	unsigned long fault_address;
+};
+
+
+#endif
arch/unicore32/kernel/signal.c new file +571 -0

571 lines not on this page · raw message

arch/unicore32/kernel/signal.h new file +16 -0
new file mode 100644
index 0000000..4b56698
@@ -0,0 +1,16 @@
+/*
+ * linux/arch/unicore32/kernel/signal.h
+ *
+ * Code specific to PKUnity SoC and UniCore ISA
+ *
+ * Copyright (C) 2001-2010 GUAN Xue-tao
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#define KERN_SIGRETURN_CODE	(KUSER_VECPAGE_BASE + 0x00000500)
+#define KERN_RESTART_CODE	(KERN_SIGRETURN_CODE + sizeof(sigreturn_codes))
+
+extern const unsigned long sigreturn_codes[3];
+extern const unsigned long syscall_restart_code[2];
maintainer
#1 lore raw
Quoted 10 lines · Guan Xuetao

From: Guan Xuetao <[email protected]>

Patch 11 implements signals.

---
 arch/unicore32/include/asm/sigcontext.h |   61 ++++
 arch/unicore32/kernel/signal.c          |  571 +++++++++++++++++++++++++++++++
 arch/unicore32/kernel/signal.h          |   16 +
 3 files changed, 648 insertions(+), 0 deletions(-)

Al Viro recently did a major cleanup of the signal handling code in a number of architectures. He can probably give much better feedback on this one than I can.

The one thing that sticks out to me is that you implement both legacy and rt signals, where new architectures should generally only need the rt variant.

Arnd