mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +00:00
- Modify pmap_activate so it only marks the pmap as active.
- Add a pmap_deactivate function.
This commit is contained in:
parent
167b8d0334
commit
ac6ba8bd4a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=91483
@ -750,7 +750,9 @@ pmap_activate(struct thread *td)
|
||||
|
||||
/*
|
||||
* XXX: Address this again later?
|
||||
* NetBSD only change the segment registers on return to userland.
|
||||
*/
|
||||
#if 0
|
||||
critical_enter();
|
||||
|
||||
for (i = 0; i < 16; i++) {
|
||||
@ -759,6 +761,16 @@ pmap_activate(struct thread *td)
|
||||
__asm __volatile("sync; isync");
|
||||
|
||||
critical_exit();
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
pmap_deactivate(struct thread *td)
|
||||
{
|
||||
pmap_t pm;
|
||||
|
||||
pm = &td->td_proc->p_vmspace->vm_pmap;
|
||||
pm->pm_active &= ~(PCPU_GET(cpumask));
|
||||
}
|
||||
|
||||
vm_offset_t
|
||||
|
@ -69,6 +69,7 @@ extern struct pmap kernel_pmap_store;
|
||||
#ifdef _KERNEL
|
||||
|
||||
void pmap_bootstrap(vm_offset_t, vm_offset_t);
|
||||
void pmap_deactivate(struct thread *);
|
||||
vm_offset_t pmap_kextract(vm_offset_t);
|
||||
|
||||
int pmap_pte_spill(vm_offset_t);
|
||||
|
@ -750,7 +750,9 @@ pmap_activate(struct thread *td)
|
||||
|
||||
/*
|
||||
* XXX: Address this again later?
|
||||
* NetBSD only change the segment registers on return to userland.
|
||||
*/
|
||||
#if 0
|
||||
critical_enter();
|
||||
|
||||
for (i = 0; i < 16; i++) {
|
||||
@ -759,6 +761,16 @@ pmap_activate(struct thread *td)
|
||||
__asm __volatile("sync; isync");
|
||||
|
||||
critical_exit();
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
pmap_deactivate(struct thread *td)
|
||||
{
|
||||
pmap_t pm;
|
||||
|
||||
pm = &td->td_proc->p_vmspace->vm_pmap;
|
||||
pm->pm_active &= ~(PCPU_GET(cpumask));
|
||||
}
|
||||
|
||||
vm_offset_t
|
||||
|
@ -750,7 +750,9 @@ pmap_activate(struct thread *td)
|
||||
|
||||
/*
|
||||
* XXX: Address this again later?
|
||||
* NetBSD only change the segment registers on return to userland.
|
||||
*/
|
||||
#if 0
|
||||
critical_enter();
|
||||
|
||||
for (i = 0; i < 16; i++) {
|
||||
@ -759,6 +761,16 @@ pmap_activate(struct thread *td)
|
||||
__asm __volatile("sync; isync");
|
||||
|
||||
critical_exit();
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
pmap_deactivate(struct thread *td)
|
||||
{
|
||||
pmap_t pm;
|
||||
|
||||
pm = &td->td_proc->p_vmspace->vm_pmap;
|
||||
pm->pm_active &= ~(PCPU_GET(cpumask));
|
||||
}
|
||||
|
||||
vm_offset_t
|
||||
|
Loading…
Reference in New Issue
Block a user