diff options
author | 2014-05-31 06:30:16 +0000 | |
---|---|---|
committer | 2014-05-31 06:30:16 +0000 | |
commit | f9286d1544c16c0a16d9c58216c2c587cc0b5b68 (patch) | |
tree | 6e60ed40caee8078608bf9dc9f7de5c923cbbca3 | |
parent | Fix a format specifier in a debug printf. (diff) | |
download | wireguard-openbsd-f9286d1544c16c0a16d9c58216c2c587cc0b5b68.tar.xz wireguard-openbsd-f9286d1544c16c0a16d9c58216c2c587cc0b5b68.zip |
Remove some unused code that we added at the 2013 Toronto hackathon but
don't need anymore.
-rw-r--r-- | sys/arch/amd64/amd64/hibernate_machdep.c | 36 | ||||
-rw-r--r-- | sys/arch/amd64/include/hibernate.h | 3 | ||||
-rw-r--r-- | sys/arch/i386/i386/hibernate_machdep.c | 36 | ||||
-rw-r--r-- | sys/arch/i386/include/hibernate.h | 3 | ||||
-rw-r--r-- | sys/arch/loongson/include/hibernate.h | 3 | ||||
-rw-r--r-- | sys/arch/loongson/loongson/hibernate_machdep.c | 36 |
6 files changed, 6 insertions, 111 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); diff --git a/sys/arch/i386/i386/hibernate_machdep.c b/sys/arch/i386/i386/hibernate_machdep.c index 34a6c0fca15..b65b42c8321 100644 --- a/sys/arch/i386/i386/hibernate_machdep.c +++ b/sys/arch/i386/i386/hibernate_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hibernate_machdep.c,v 1.29 2013/10/20 20:03:03 mlarkin Exp $ */ +/* $OpenBSD: hibernate_machdep.c,v 1.30 2014/05/31 06:30:16 mlarkin Exp $ */ /* * Copyright (c) 2011 Mike Larkin <mlarkin@openbsd.org> @@ -267,40 +267,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/i386/include/hibernate.h b/sys/arch/i386/include/hibernate.h index 02b73734e21..f170ed82992 100644 --- a/sys/arch/i386/include/hibernate.h +++ b/sys/arch/i386/include/hibernate.h @@ -1,4 +1,4 @@ -/* $OpenBSD: hibernate.h,v 1.8 2013/06/04 01:20:23 pirofti Exp $ */ +/* $OpenBSD: hibernate.h,v 1.9 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); diff --git a/sys/arch/loongson/include/hibernate.h b/sys/arch/loongson/include/hibernate.h index cf324beb420..bd267aa0a13 100644 --- a/sys/arch/loongson/include/hibernate.h +++ b/sys/arch/loongson/include/hibernate.h @@ -1,4 +1,4 @@ -/* $OpenBSD: hibernate.h,v 1.1 2013/06/02 21:46:04 pirofti Exp $ */ +/* $OpenBSD: hibernate.h,v 1.2 2014/05/31 06:30:16 mlarkin Exp $ */ /* * Copyright (c) 2013 Paul Irofti. @@ -25,7 +25,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); diff --git a/sys/arch/loongson/loongson/hibernate_machdep.c b/sys/arch/loongson/loongson/hibernate_machdep.c index 70b47ef8e7a..107ff45e5de 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.3 2013/06/05 01:33:02 pirofti Exp $ */ +/* $OpenBSD: hibernate_machdep.c,v 1.4 2014/05/31 06:30:16 mlarkin Exp $ */ /* * Copyright (c) 2013 Paul Irofti. @@ -136,40 +136,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. |