summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2013-10-20 11:16:57 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2013-10-20 11:16:57 +0000
commitdc0fedc80f0fb82b052a6e4ca9890489716d2974 (patch)
tree74b877ff0f4ceb5144b26b0cbf400fb7bcf62754 /sys/arch
parent51af3a791d7649a044d750e62f6fadb6a19a067f (diff)
Simplify definition of the side-effect-free wd io routine.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/amd64/amd64/hibernate_machdep.c12
-rw-r--r--sys/arch/i386/i386/hibernate_machdep.c12
2 files changed, 10 insertions, 14 deletions
diff --git a/sys/arch/amd64/amd64/hibernate_machdep.c b/sys/arch/amd64/amd64/hibernate_machdep.c
index 7ba95610682..ec9f0b04dc9 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.15 2013/10/20 09:41:31 mlarkin Exp $ */
+/* $OpenBSD: hibernate_machdep.c,v 1.16 2013/10/20 11:16:56 deraadt Exp $ */
/*
* Copyright (c) 2012 Mike Larkin <mlarkin@openbsd.org>
@@ -47,11 +47,6 @@
#include "ahci.h"
#include "sd.h"
-#if NWD > 0
-#include <dev/ata/atavar.h>
-#include <dev/ata/wdvar.h>
-#endif
-
/* Hibernate support */
void hibernate_enter_resume_4k_pte(vaddr_t, paddr_t);
void hibernate_enter_resume_2m_pde(vaddr_t, paddr_t);
@@ -81,8 +76,11 @@ get_hibernate_io_function(void)
return NULL;
#if NWD > 0
- if (strcmp(blkname, "wd") == 0)
+ if (strcmp(blkname, "wd") == 0) {
+ extern int wd_hibernate_io(dev_t dev, daddr_t blkno,
+ vaddr_t addr, size_t size, int op, void *page);
return wd_hibernate_io;
+ }
#endif
#if NAHCI > 0 && NSD > 0
if (strcmp(blkname, "sd") == 0) {
diff --git a/sys/arch/i386/i386/hibernate_machdep.c b/sys/arch/i386/i386/hibernate_machdep.c
index 51f1ca25eb7..cd600eaf517 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.27 2013/10/20 09:41:31 mlarkin Exp $ */
+/* $OpenBSD: hibernate_machdep.c,v 1.28 2013/10/20 11:16:56 deraadt Exp $ */
/*
* Copyright (c) 2011 Mike Larkin <mlarkin@openbsd.org>
@@ -45,11 +45,6 @@
#include "ahci.h"
#include "sd.h"
-#if NWD > 0
-#include <dev/ata/atavar.h>
-#include <dev/ata/wdvar.h>
-#endif
-
/* Hibernate support */
void hibernate_enter_resume_4k_pte(vaddr_t, paddr_t);
void hibernate_enter_resume_4k_pde(vaddr_t);
@@ -79,8 +74,11 @@ get_hibernate_io_function(void)
if (blkname == NULL)
return NULL;
#if NWD > 0
- if (strcmp(blkname, "wd") == 0)
+ if (strcmp(blkname, "wd") == 0) {
+ extern int wd_hibernate_io(dev_t dev, daddr_t blkno,
+ vaddr_t addr, size_t size, int op, void *page);
return wd_hibernate_io;
+ }
#endif
#if NAHCI > 0 && NSD > 0
if (strcmp(blkname, "sd") == 0) {