Wed Aug 12 10:03:30 2009 UTC ()
Fix non-DEBUG builds.


(skrll)
diff -r1.51 -r1.52 src/sys/arch/hppa/hppa/pmap.c

cvs diff -r1.51 -r1.52 src/sys/arch/hppa/hppa/pmap.c (expand / switch to unified diff)

--- src/sys/arch/hppa/hppa/pmap.c 2009/08/12 07:46:36 1.51
+++ src/sys/arch/hppa/hppa/pmap.c 2009/08/12 10:03:30 1.52
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: pmap.c,v 1.51 2009/08/12 07:46:36 skrll Exp $ */ 1/* $NetBSD: pmap.c,v 1.52 2009/08/12 10:03:30 skrll Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. 4 * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Matthew Fredette. 8 * by Matthew Fredette.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -55,27 +55,27 @@ @@ -55,27 +55,27 @@
55 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 55 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
56 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 56 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
57 * THE POSSIBILITY OF SUCH DAMAGE. 57 * THE POSSIBILITY OF SUCH DAMAGE.
58 */ 58 */
59/* 59/*
60 * References: 60 * References:
61 * 1. PA7100LC ERS, Hewlett-Packard, March 30 1999, Public version 1.0 61 * 1. PA7100LC ERS, Hewlett-Packard, March 30 1999, Public version 1.0
62 * 2. PA7300LC ERS, Hewlett-Packard, March 18 1996, Version 1.0 62 * 2. PA7300LC ERS, Hewlett-Packard, March 18 1996, Version 1.0
63 * 3. PA-RISC 1.1 Architecture and Instruction Set Reference Manual, 63 * 3. PA-RISC 1.1 Architecture and Instruction Set Reference Manual,
64 * Hewlett-Packard, February 1994, Third Edition 64 * Hewlett-Packard, February 1994, Third Edition
65 */ 65 */
66 66
67#include <sys/cdefs.h> 67#include <sys/cdefs.h>
68__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.51 2009/08/12 07:46:36 skrll Exp $"); 68__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.52 2009/08/12 10:03:30 skrll Exp $");
69 69
70#include <sys/param.h> 70#include <sys/param.h>
71#include <sys/systm.h> 71#include <sys/systm.h>
72#include <sys/malloc.h> 72#include <sys/malloc.h>
73#include <sys/user.h> 73#include <sys/user.h>
74#include <sys/proc.h> 74#include <sys/proc.h>
75 75
76#include <uvm/uvm.h> 76#include <uvm/uvm.h>
77 77
78#include <machine/reg.h> 78#include <machine/reg.h>
79#include <machine/psl.h> 79#include <machine/psl.h>
80#include <machine/cpu.h> 80#include <machine/cpu.h>
81#include <machine/pmap.h> 81#include <machine/pmap.h>
@@ -1720,51 +1720,49 @@ pmap_flush_page(struct vm_page *pg, bool @@ -1720,51 +1720,49 @@ pmap_flush_page(struct vm_page *pg, bool
1720 fdcache(pve->pv_pmap->pm_space, va, PAGE_SIZE); 1720 fdcache(pve->pv_pmap->pm_space, va, PAGE_SIZE);
1721 } 1721 }
1722 mutex_exit(&pg->mdpage.pvh_lock); 1722 mutex_exit(&pg->mdpage.pvh_lock);
1723} 1723}
1724 1724
1725/* 1725/*
1726 * pmap_zero_page(pa) 1726 * pmap_zero_page(pa)
1727 * 1727 *
1728 * Zeros the specified page. 1728 * Zeros the specified page.
1729 */ 1729 */
1730void 1730void
1731pmap_zero_page(paddr_t pa) 1731pmap_zero_page(paddr_t pa)
1732{ 1732{
1733 struct vm_page *pg = PHYS_TO_VM_PAGE(pa); 
1734 1733
1735 DPRINTF(PDB_FOLLOW|PDB_PHYS, ("%s(%x)\n", __func__, (int)pa)); 1734 DPRINTF(PDB_FOLLOW|PDB_PHYS, ("%s(%x)\n", __func__, (int)pa));
1736 1735
1737 KASSERT(pg->mdpage.pvh_list == NULL); 1736 KASSERT(PHYS_TO_VM_PAGE(pa)->mdpage.pvh_list == NULL);
1738 1737
1739 memset((void *)pa, 0, PAGE_SIZE); 1738 memset((void *)pa, 0, PAGE_SIZE);
1740 fdcache(HPPA_SID_KERNEL, pa, PAGE_SIZE); 1739 fdcache(HPPA_SID_KERNEL, pa, PAGE_SIZE);
1741} 1740}
1742 1741
1743/* 1742/*
1744 * pmap_copy_page(src, dst) 1743 * pmap_copy_page(src, dst)
1745 * 1744 *
1746 * pmap_copy_page copies the source page to the destination page. 1745 * pmap_copy_page copies the source page to the destination page.
1747 */ 1746 */
1748void 1747void
1749pmap_copy_page(paddr_t spa, paddr_t dpa) 1748pmap_copy_page(paddr_t spa, paddr_t dpa)
1750{ 1749{
1751 struct vm_page *srcpg = PHYS_TO_VM_PAGE(spa); 1750 struct vm_page *srcpg = PHYS_TO_VM_PAGE(spa);
1752 struct vm_page *dstpg = PHYS_TO_VM_PAGE(dpa); 
1753 1751
1754 DPRINTF(PDB_FOLLOW|PDB_PHYS, ("%s(%x, %x)\n", __func__, (int)spa, 1752 DPRINTF(PDB_FOLLOW|PDB_PHYS, ("%s(%x, %x)\n", __func__, (int)spa,
1755 (int)dpa)); 1753 (int)dpa));
1756 1754
1757 KASSERT(dstpg->mdpage.pvh_list == NULL); 1755 KASSERT(PHYS_TO_VM_PAGE(dpa)->mdpage.pvh_list == NULL);
1758 1756
1759 pmap_flush_page(srcpg, false); 1757 pmap_flush_page(srcpg, false);
1760 1758
1761 memcpy((void *)dpa, (void *)spa, PAGE_SIZE); 1759 memcpy((void *)dpa, (void *)spa, PAGE_SIZE);
1762 1760
1763 pdcache(HPPA_SID_KERNEL, spa, PAGE_SIZE); 1761 pdcache(HPPA_SID_KERNEL, spa, PAGE_SIZE);
1764 fdcache(HPPA_SID_KERNEL, dpa, PAGE_SIZE); 1762 fdcache(HPPA_SID_KERNEL, dpa, PAGE_SIZE);
1765} 1763}
1766 1764
1767void 1765void
1768pmap_kenter_pa(vaddr_t va, paddr_t pa, vm_prot_t prot) 1766pmap_kenter_pa(vaddr_t va, paddr_t pa, vm_prot_t prot)
1769{ 1767{
1770 volatile pt_entry_t *pde; 1768 volatile pt_entry_t *pde;