summaryrefslogtreecommitdiff
path: root/sys/arch/amd64
diff options
context:
space:
mode:
authorMike Larkin <mlarkin@cvs.openbsd.org>2014-05-31 06:30:17 +0000
committerMike Larkin <mlarkin@cvs.openbsd.org>2014-05-31 06:30:17 +0000
commit8d6d885afdf3b031f041566fbba839b892dd5936 (patch)
tree5aaa6dc41b63c3e854793502f074dca1f7a1b849 /sys/arch/amd64
parent713744c0293b3f2362b1ec99be1c806cf9866760 (diff)
Remove some unused code that we added at the 2013 Toronto hackathon but
don't need anymore.
Diffstat (limited to 'sys/arch/amd64')
-rw-r--r--sys/arch/amd64/amd64/hibernate_machdep.c36
-rw-r--r--sys/arch/amd64/include/hibernate.h3
2 files changed, 2 insertions, 37 deletions
diff --git a/sys/arch/amd64/amd64/hibernate_machdep.c b/sys/arch/amd64/amd64/hibernate_machdep.c
index 8143947bd4d..a4f4a6c666a 100644
--- a/sys/arch/amd64/amd64/hibernate_machdep.c
+++ b/sys/arch/amd64/amd64/hibernate_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hibernate_machdep.c,v 1.19 2014/01/10 22:34:41 mlarkin Exp $ */
+/* $OpenBSD: hibernate_machdep.c,v 1.20 2014/05/31 06:30:16 mlarkin Exp $ */
/*
* Copyright (c) 2012 Mike Larkin <mlarkin@openbsd.org>
@@ -321,40 +321,6 @@ hibernate_populate_resume_pt(union hibernate_info *hib_info,
}
/*
- * MD-specific resume preparation (creating resume time pagetables,
- * stacks, etc).
- */
-void
-hibernate_prepare_resume_machdep(union hibernate_info *hib_info)
-{
- paddr_t pa, piglet_end;
- vaddr_t va;
-
- /*
- * At this point, we are sure that the piglet's phys space is going to
- * have been unused by the suspending kernel, but the vaddrs used by
- * the suspending kernel may or may not be available to us here in the
- * resuming kernel, so we allocate a new range of VAs for the piglet.
- * Those VAs will be temporary and will cease to exist as soon as we
- * switch to the resume PT, so we need to ensure that any VAs required
- * during inflate are also entered into that map.
- */
-
- hib_info->piglet_va = (vaddr_t)km_alloc(HIBERNATE_CHUNK_SIZE*3,
- &kv_any, &kp_none, &kd_nowait);
- if (!hib_info->piglet_va)
- panic("Unable to allocate vaddr for hibernate resume piglet\n");
-
- piglet_end = hib_info->piglet_pa + HIBERNATE_CHUNK_SIZE*3;
-
- for (pa = hib_info->piglet_pa,va = hib_info->piglet_va;
- pa <= piglet_end; pa += PAGE_SIZE, va += PAGE_SIZE)
- pmap_kenter_pa(va, pa, VM_PROT_ALL);
-
- pmap_activate(curproc);
-}
-
-/*
* During inflate, certain pages that contain our bookkeeping information
* (eg, the chunk table, scratch pages, etc) need to be skipped over and
* not inflated into.
diff --git a/sys/arch/amd64/include/hibernate.h b/sys/arch/amd64/include/hibernate.h
index c00766f536f..9d620add2cf 100644
--- a/sys/arch/amd64/include/hibernate.h
+++ b/sys/arch/amd64/include/hibernate.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: hibernate.h,v 1.4 2013/06/04 01:20:23 pirofti Exp $ */
+/* $OpenBSD: hibernate.h,v 1.5 2014/05/31 06:30:16 mlarkin Exp $ */
/*
* Copyright (c) 2011 Mike Larkin <mlarkin@openbsd.org>
@@ -24,7 +24,6 @@ int get_hibernate_info_md(union hibernate_info *);
void hibernate_flush(void);
void hibernate_enter_resume_mapping(vaddr_t, paddr_t, int);
int hibernate_inflate_skip(union hibernate_info *, paddr_t);
-void hibernate_prepare_resume_machdep(union hibernate_info *);
int hibernate_suspend(void);
void hibernate_switch_stack_machdep(void);
void hibernate_resume_machdep(void);