diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2009-11-29 21:21:07 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2009-11-29 21:21:07 +0000 |
commit | c02327466c9a22bbc79915d511a32897506fd5ad (patch) | |
tree | 167da353bcae58e1d46421c5d38f78d895a15740 /sys/arch | |
parent | 05c676591a9bf01ddc0515d256287e49087e37de (diff) |
At suspend time there is no need for a fancy cr3 dance to decide if
pmap_activate() should be called to force the kthread into the kernel pmap.
If it is i386 it is lazy pmap it may not be in the kernel kthread, so
it must be called so that pmap_activate can decide. If it is amd64
without lazy pmap, it must not be called.
A comment is added to remind us about this in the future in case these
assumptions change.
ok kettenis
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/amd64/amd64/acpi_machdep.c | 8 | ||||
-rw-r--r-- | sys/arch/i386/i386/acpi_machdep.c | 9 |
2 files changed, 5 insertions, 12 deletions
diff --git a/sys/arch/amd64/amd64/acpi_machdep.c b/sys/arch/amd64/amd64/acpi_machdep.c index 46038691d50..abeae9a1998 100644 --- a/sys/arch/amd64/amd64/acpi_machdep.c +++ b/sys/arch/amd64/amd64/acpi_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi_machdep.c,v 1.31 2009/11/26 22:08:30 mlarkin Exp $ */ +/* $OpenBSD: acpi_machdep.c,v 1.32 2009/11/29 21:21:06 deraadt Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * @@ -202,11 +202,7 @@ acpi_sleep_machdep(struct acpi_softc *sc, int state) return (ENXIO); } - if (rcr3() != pmap_kernel()->pm_pdirpa) { - pmap_activate(curproc); - - KASSERT(rcr3() == pmap_kernel()->pm_pdirpa); - } + /* amd64 does not do lazy pmap_activate */ /* * diff --git a/sys/arch/i386/i386/acpi_machdep.c b/sys/arch/i386/i386/acpi_machdep.c index a5cc64cfc77..42ca7069e00 100644 --- a/sys/arch/i386/i386/acpi_machdep.c +++ b/sys/arch/i386/i386/acpi_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi_machdep.c,v 1.26 2009/11/26 22:08:30 mlarkin Exp $ */ +/* $OpenBSD: acpi_machdep.c,v 1.27 2009/11/29 21:21:06 deraadt Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * @@ -219,11 +219,8 @@ acpi_sleep_machdep(struct acpi_softc *sc, int state) return (ENXIO); } - if (rcr3() != pmap_kernel()->pm_pdirpa) { - pmap_activate(curproc); - - KASSERT(rcr3() == pmap_kernel()->pm_pdirpa); - } + /* i386 does lazy pmap_activate */ + pmap_activate(curproc); /* * |