Changes for KSE3.

Submitted by:	Peter Grehan <peterg@ptree32.com.au>
This commit is contained in:
Benno Rice 2002-07-09 12:57:23 +00:00
parent f5db3c1695
commit 7ade8bb67c
7 changed files with 158 additions and 0 deletions

View file

@ -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

View file

@ -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);
}

38
sys/powerpc/include/kse.h Normal file
View file

@ -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_ */

View file

@ -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);

View file

@ -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

View file

@ -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

View file

@ -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);
}