diff options
author | 2013-06-05 01:28:04 +0000 | |
---|---|---|
committer | 2013-06-05 01:28:04 +0000 | |
commit | ede1548bc55a834f46a78e585bf9192de88f91db (patch) | |
tree | 655d4c00b6a487df80aa94ba30880a966ead0e24 | |
parent | Move FHASLOCK from f_flag to f_iflags, freeing up a bit for passing (diff) | |
download | wireguard-openbsd-ede1548bc55a834f46a78e585bf9192de88f91db.tar.xz wireguard-openbsd-ede1548bc55a834f46a78e585bf9192de88f91db.zip |
Implement hibernate_flush.
Might have to find a better place for the cache.h header but until then
it will have to do.
Discussed with miod@
-rw-r--r-- | sys/arch/loongson/loongson/hibernate_machdep.c | 9 | ||||
-rw-r--r-- | sys/arch/loongson/loongson/locore.S | 7 |
2 files changed, 9 insertions, 7 deletions
diff --git a/sys/arch/loongson/loongson/hibernate_machdep.c b/sys/arch/loongson/loongson/hibernate_machdep.c index df45d74755b..99d9308136b 100644 --- a/sys/arch/loongson/loongson/hibernate_machdep.c +++ b/sys/arch/loongson/loongson/hibernate_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hibernate_machdep.c,v 1.1 2013/06/02 21:46:04 pirofti Exp $ */ +/* $OpenBSD: hibernate_machdep.c,v 1.2 2013/06/05 01:28:04 pirofti Exp $ */ /* * Copyright (c) 2013 Paul Irofti. @@ -31,6 +31,8 @@ #include <uvm/uvm_extern.h> #include <uvm/uvm_pmemrange.h> +#include <mips64/cache.h> + #include <machine/hibernate.h> #include <machine/hibernate_var.h> #include <machine/kcore.h> @@ -204,3 +206,8 @@ hibernate_disable_intr_machdep(void) disableintr(); } +void +hibernate_flush(void) +{ + Mips_SyncCache(curcpu()); +} diff --git a/sys/arch/loongson/loongson/locore.S b/sys/arch/loongson/loongson/locore.S index 1bf9849f2fd..bd1b71069b8 100644 --- a/sys/arch/loongson/loongson/locore.S +++ b/sys/arch/loongson/loongson/locore.S @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.S,v 1.4 2013/06/02 21:46:04 pirofti Exp $ */ +/* $OpenBSD: locore.S,v 1.5 2013/06/05 01:28:04 pirofti Exp $ */ /* * Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -77,11 +77,6 @@ start: #ifdef HIBERNATE -LEAF(hibernate_flush, 0) /* { */ - /* XXX TBD */ - j ra -END(hibernate_flush) /* } */ - /* Switch to hibernate resume pagetable */ LEAF(hibernate_activate_resume_pt_machdep, 0) /* { */ /* XXX TBD */ |