diff options
author | Paul Irofti <pirofti@cvs.openbsd.org> | 2013-06-05 01:28:05 +0000 |
---|---|---|
committer | Paul Irofti <pirofti@cvs.openbsd.org> | 2013-06-05 01:28:05 +0000 |
commit | 84050dd577799258600664672aa1292bbd03bd96 (patch) | |
tree | f7d118a5416dea63e24ee5f8b3dbcf01b909fea2 /sys/arch | |
parent | 9fd1f32608c5b921fe7865c4be916bede8e50ea9 (diff) |
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@
Diffstat (limited to 'sys/arch')
-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 */ |