Module Name: src Committed By: tsutsui Date: Mon Jan 13 15:48:09 UTC 2014
Modified Files: src/sys/arch/alpha/pci: pci_bwx_bus_mem_chipdep.c Log Message: bus_space_mmap(9) function should return alpha_btop(PA), not alpha_btop(VA). Pointed out in PR port-alpha/48431 from nullnilaki. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/arch/alpha/pci/pci_bwx_bus_mem_chipdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/alpha/pci/pci_bwx_bus_mem_chipdep.c diff -u src/sys/arch/alpha/pci/pci_bwx_bus_mem_chipdep.c:1.25 src/sys/arch/alpha/pci/pci_bwx_bus_mem_chipdep.c:1.26 --- src/sys/arch/alpha/pci/pci_bwx_bus_mem_chipdep.c:1.25 Mon Feb 6 02:14:15 2012 +++ src/sys/arch/alpha/pci/pci_bwx_bus_mem_chipdep.c Mon Jan 13 15:48:09 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_bwx_bus_mem_chipdep.c,v 1.25 2012/02/06 02:14:15 matt Exp $ */ +/* $NetBSD: pci_bwx_bus_mem_chipdep.c,v 1.26 2014/01/13 15:48:09 tsutsui Exp $ */ /*- * Copyright (c) 1997, 1998, 2000 The NetBSD Foundation, Inc. @@ -76,7 +76,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(1, "$NetBSD: pci_bwx_bus_mem_chipdep.c,v 1.25 2012/02/06 02:14:15 matt Exp $"); +__KERNEL_RCSID(1, "$NetBSD: pci_bwx_bus_mem_chipdep.c,v 1.26 2014/01/13 15:48:09 tsutsui Exp $"); #include <sys/extent.h> @@ -499,8 +499,10 @@ __C(CHIP,_mem_mmap)( int prot, int flags) { + bus_addr_t memaddr; - return (alpha_btop(CHIP_MEM_SYS_START(v) + addr + off)); + memaddr = CHIP_MEM_SYS_START(v) + addr + off; + return (alpha_btop(ALPHA_K0SEG_TO_PHYS(memaddr))); } static inline void