Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Pass the abst to alpha_pci_mem_unmap() so that the real size...



details:   https://anonhg.NetBSD.org/src/rev/47b330d6d22d
branches:  trunk
changeset: 494070:47b330d6d22d
user:      simonb <simonb%NetBSD.org@localhost>
date:      Fri Jun 30 18:19:28 2000 +0000

description:
Pass the abst to alpha_pci_mem_unmap() so that the real size of the
mapped area can be unmapped.

diffstat:

 lib/libarch/alpha/alpha_pci_mem.c |  7 ++++---
 sys/arch/alpha/include/sysarch.h  |  5 +++--
 2 files changed, 7 insertions(+), 5 deletions(-)

diffs (42 lines):

diff -r 059eda102b9b -r 47b330d6d22d lib/libarch/alpha/alpha_pci_mem.c
--- a/lib/libarch/alpha/alpha_pci_mem.c Fri Jun 30 18:07:16 2000 +0000
+++ b/lib/libarch/alpha/alpha_pci_mem.c Fri Jun 30 18:19:28 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: alpha_pci_mem.c,v 1.1 2000/02/26 18:59:36 thorpej Exp $        */
+/*     $NetBSD: alpha_pci_mem.c,v 1.2 2000/06/30 18:19:28 simonb Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -124,10 +124,11 @@
 }
 
 void
-alpha_pci_mem_unmap(addr, size)
+alpha_pci_mem_unmap(abst, addr, size)
+       struct alpha_bus_space_translation *abst;
        void *addr;
        bus_size_t size;
 {
 
-       (void) munmap(addr, size);
+       (void) munmap(addr, size << abst->abst_addr_shift);
 }
diff -r 059eda102b9b -r 47b330d6d22d sys/arch/alpha/include/sysarch.h
--- a/sys/arch/alpha/include/sysarch.h  Fri Jun 30 18:07:16 2000 +0000
+++ b/sys/arch/alpha/include/sysarch.h  Fri Jun 30 18:19:28 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sysarch.h,v 1.5 2000/06/08 03:10:06 thorpej Exp $ */
+/* $NetBSD: sysarch.h,v 1.6 2000/06/30 18:19:28 simonb Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -98,7 +98,8 @@
 
 void   *alpha_pci_mem_map(bus_addr_t, bus_size_t, int,
            struct alpha_bus_space_translation *);
-void   alpha_pci_mem_unmap(void *addr, bus_size_t);
+void   alpha_pci_mem_unmap(struct alpha_bus_space_translation *,
+           void *addr, bus_size_t);
 
 u_int32_t alpha_pci_conf_read(u_int, u_int, u_int, u_int);
 void   alpha_pci_conf_write(u_int, u_int, u_int, u_int, u_int32_t);



Home | Main Index | Thread Index | Old Index