* move the "cheating" conditional into unmapiodev() implementation

itself (instead of memio_unmap()), as it differs between OEA and
  ibm4xx.

OK by matt@
This commit is contained in:
freza 2006-08-31 23:14:38 +00:00
parent 8f274ce5a8
commit fd156a0bc9
2 changed files with 8 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: oea_machdep.c,v 1.27 2006/08/31 18:23:40 matt Exp $ */
/* $NetBSD: oea_machdep.c,v 1.28 2006/08/31 23:14:38 freza Exp $ */
/*
* Copyright (C) 2002 Matt Thomas
@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: oea_machdep.c,v 1.27 2006/08/31 18:23:40 matt Exp $");
__KERNEL_RCSID(0, "$NetBSD: oea_machdep.c,v 1.28 2006/08/31 23:14:38 freza Exp $");
#include "opt_compat_netbsd.h"
#include "opt_ddb.h"
@ -834,6 +834,9 @@ unmapiodev(vaddr_t va, vsize_t len)
{
paddr_t faddr;
if (! va)
return;
faddr = trunc_page(va);
len = round_page(va - faddr + len);

View File

@ -1,4 +1,4 @@
/* $NetBSD: bus_space.c,v 1.8 2006/08/31 18:28:47 matt Exp $ */
/* $NetBSD: bus_space.c,v 1.9 2006/08/31 23:14:38 freza Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: bus_space.c,v 1.8 2006/08/31 18:28:47 matt Exp $");
__KERNEL_RCSID(0, "$NetBSD: bus_space.c,v 1.9 2006/08/31 23:14:38 freza Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -649,8 +649,7 @@ memio_unmap(bus_space_tag_t t, bus_space_handle_t bsh, bus_size_t size)
printf("memio_unmap: can't free region\n");
}
if (va)
unmapiodev(va, size);
unmapiodev(va, size);
}
int