summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbenno <benno@FreeBSD.org>2002-07-09 12:57:23 +0000
committerbenno <benno@FreeBSD.org>2002-07-09 12:57:23 +0000
commit3b1e5e1a741414c5de68c34b12263bfe5b766e2d (patch)
tree77d98803a2b6d904c82dfc6c6811d6363d0abd2a
parente53166ffd0587a89895076b2733e457ee9fedebd (diff)
downloadFreeBSD-src-3b1e5e1a741414c5de68c34b12263bfe5b766e2d.zip
FreeBSD-src-3b1e5e1a741414c5de68c34b12263bfe5b766e2d.tar.gz
Changes for KSE3.
Submitted by: Peter Grehan <peterg@ptree32.com.au>
-rw-r--r--sys/powerpc/aim/swtch.S2
-rw-r--r--sys/powerpc/aim/vm_machdep.c53
-rw-r--r--sys/powerpc/include/kse.h38
-rw-r--r--sys/powerpc/powerpc/genassym.c8
-rw-r--r--sys/powerpc/powerpc/swtch.S2
-rw-r--r--sys/powerpc/powerpc/swtch.s2
-rw-r--r--sys/powerpc/powerpc/vm_machdep.c53
7 files changed, 158 insertions, 0 deletions
diff --git a/sys/powerpc/aim/swtch.S b/sys/powerpc/aim/swtch.S
index e02367a..cf82169 100644
--- a/sys/powerpc/aim/swtch.S
+++ b/sys/powerpc/aim/swtch.S
@@ -121,6 +121,8 @@ ENTRY(cpu_switch)
/* thread to restore is in r3 */
.L2:
+ li %r15,TDS_RUNNING
+ stw %r15,TD_STATE(%r3) /* Set KSE state */
lwz %r3, TD_PCB(%r3)
lmw %r12,PCB_CONTEXT(%r3) /* Load the non-volatile GP regs */
mr %r2,%r12
diff --git a/sys/powerpc/aim/vm_machdep.c b/sys/powerpc/aim/vm_machdep.c
index fe9cab7..7a9074d 100644
--- a/sys/powerpc/aim/vm_machdep.c
+++ b/sys/powerpc/aim/vm_machdep.c
@@ -351,3 +351,56 @@ is_physical_memory(addr)
return 1;
}
+
+/*
+ * KSE functions
+ */
+void
+cpu_thread_exit(struct thread *td)
+{
+
+ return;
+}
+
+void
+cpu_thread_setup(struct thread *td)
+{
+
+ return;
+}
+
+void
+cpu_save_upcall(struct thread *td, struct kse *newkse)
+{
+
+ return;
+}
+
+void
+cpu_set_upcall(struct thread *td, void *pcb)
+{
+
+ return;
+}
+
+void
+cpu_set_args(struct thread *td, struct kse *ke)
+{
+
+ return;
+}
+
+void
+cpu_free_kse_mdstorage(struct kse *ke)
+{
+
+ return;
+}
+
+int
+cpu_export_context(struct thread *td)
+{
+
+ return (0);
+}
+
diff --git a/sys/powerpc/include/kse.h b/sys/powerpc/include/kse.h
new file mode 100644
index 0000000..a7dbbf3
--- /dev/null
+++ b/sys/powerpc/include/kse.h
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2002 Julian Elischer <julian@freebsd.org>.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice(s), this list of conditions and the following disclaimer as
+ * the first lines of this file unmodified other than the possible
+ * addition of one or more copyright notices.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice(s), this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef _MACHINE_KSE_H_
+#define _MACHINE_KSE_H_
+
+union kse_td_ctx {
+ int dummy;
+};
+
+#endif /* _MACHINE_KSE_H_ */
diff --git a/sys/powerpc/powerpc/genassym.c b/sys/powerpc/powerpc/genassym.c
index 6ff94de..e9dabba 100644
--- a/sys/powerpc/powerpc/genassym.c
+++ b/sys/powerpc/powerpc/genassym.c
@@ -139,7 +139,15 @@ ASSYM(PCB_FLAGS, offsetof(struct pcb, pcb_flags));
ASSYM(TD_PROC, offsetof(struct thread, td_proc));
ASSYM(TD_PCB, offsetof(struct thread, td_pcb));
+ASSYM(TD_KSE, offsetof(struct thread, td_kse));
+ASSYM(TD_STATE, offsetof(struct thread, td_state));
+ASSYM(TDS_RUNNING, TDS_RUNNING);
ASSYM(P_VMSPACE, offsetof(struct proc, p_vmspace));
ASSYM(VM_PMAP, offsetof(struct vmspace, vm_pmap));
+
+ASSYM(KE_FLAGS, offsetof(struct kse, ke_flags));
+
+ASSYM(KEF_ASTPENDING, KEF_ASTPENDING);
+ASSYM(KEF_NEEDRESCHED, KEF_NEEDRESCHED);
diff --git a/sys/powerpc/powerpc/swtch.S b/sys/powerpc/powerpc/swtch.S
index e02367a..cf82169 100644
--- a/sys/powerpc/powerpc/swtch.S
+++ b/sys/powerpc/powerpc/swtch.S
@@ -121,6 +121,8 @@ ENTRY(cpu_switch)
/* thread to restore is in r3 */
.L2:
+ li %r15,TDS_RUNNING
+ stw %r15,TD_STATE(%r3) /* Set KSE state */
lwz %r3, TD_PCB(%r3)
lmw %r12,PCB_CONTEXT(%r3) /* Load the non-volatile GP regs */
mr %r2,%r12
diff --git a/sys/powerpc/powerpc/swtch.s b/sys/powerpc/powerpc/swtch.s
index e02367a..cf82169 100644
--- a/sys/powerpc/powerpc/swtch.s
+++ b/sys/powerpc/powerpc/swtch.s
@@ -121,6 +121,8 @@ ENTRY(cpu_switch)
/* thread to restore is in r3 */
.L2:
+ li %r15,TDS_RUNNING
+ stw %r15,TD_STATE(%r3) /* Set KSE state */
lwz %r3, TD_PCB(%r3)
lmw %r12,PCB_CONTEXT(%r3) /* Load the non-volatile GP regs */
mr %r2,%r12
diff --git a/sys/powerpc/powerpc/vm_machdep.c b/sys/powerpc/powerpc/vm_machdep.c
index fe9cab7..7a9074d 100644
--- a/sys/powerpc/powerpc/vm_machdep.c
+++ b/sys/powerpc/powerpc/vm_machdep.c
@@ -351,3 +351,56 @@ is_physical_memory(addr)
return 1;
}
+
+/*
+ * KSE functions
+ */
+void
+cpu_thread_exit(struct thread *td)
+{
+
+ return;
+}
+
+void
+cpu_thread_setup(struct thread *td)
+{
+
+ return;
+}
+
+void
+cpu_save_upcall(struct thread *td, struct kse *newkse)
+{
+
+ return;
+}
+
+void
+cpu_set_upcall(struct thread *td, void *pcb)
+{
+
+ return;
+}
+
+void
+cpu_set_args(struct thread *td, struct kse *ke)
+{
+
+ return;
+}
+
+void
+cpu_free_kse_mdstorage(struct kse *ke)
+{
+
+ return;
+}
+
+int
+cpu_export_context(struct thread *td)
+{
+
+ return (0);
+}
+
OpenPOWER on IntegriCloud