mem.c (190681) | mem.c (201223) |
---|---|
1/*- 2 * Copyright (c) 1988 University of Utah. 3 * Copyright (c) 1982, 1986, 1990 The Regents of the University of California. 4 * All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * the Systems Programming Group of the University of Utah Computer 8 * Science Department, and code derived from software contributed to --- 23 unchanged lines hidden (view full) --- 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * SUCH DAMAGE. 34 * 35 * from: Utah $Hdr: mem.c 1.13 89/10/08$ 36 * from: @(#)mem.c 7.2 (Berkeley) 5/9/91 37 */ 38 39#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1988 University of Utah. 3 * Copyright (c) 1982, 1986, 1990 The Regents of the University of California. 4 * All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * the Systems Programming Group of the University of Utah Computer 8 * Science Department, and code derived from software contributed to --- 23 unchanged lines hidden (view full) --- 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * SUCH DAMAGE. 34 * 35 * from: Utah $Hdr: mem.c 1.13 89/10/08$ 36 * from: @(#)mem.c 7.2 (Berkeley) 5/9/91 37 */ 38 39#include <sys/cdefs.h> |
40__FBSDID("$FreeBSD: head/sys/powerpc/powerpc/mem.c 190681 2009-04-04 00:22:44Z nwhitehorn $"); | 40__FBSDID("$FreeBSD: head/sys/powerpc/powerpc/mem.c 201223 2009-12-29 21:51:28Z rnoland $"); |
41 42/* 43 * Memory special file 44 */ 45 46#include <sys/param.h> 47#include <sys/conf.h> 48#include <sys/fcntl.h> --- 107 unchanged lines hidden (view full) --- 156 return (error); 157} 158 159/* 160 * allow user processes to MMAP some memory sections 161 * instead of going through read/write 162 */ 163int | 41 42/* 43 * Memory special file 44 */ 45 46#include <sys/param.h> 47#include <sys/conf.h> 48#include <sys/fcntl.h> --- 107 unchanged lines hidden (view full) --- 156 return (error); 157} 158 159/* 160 * allow user processes to MMAP some memory sections 161 * instead of going through read/write 162 */ 163int |
164memmmap(struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int prot) | 164memmmap(struct cdev *dev, vm_ooffset_t offset, vm_paddr_t *paddr, 165 int prot, vm_memattr_t *memattr) |
165{ 166 /* 167 * /dev/mem is the only one that makes sense through this 168 * interface. For /dev/kmem any physaddr we return here 169 * could be transient and hence incorrect or invalid at 170 * a later time. 171 */ 172 if (dev2unit(dev) != CDEV_MINOR_MEM) --- 16 unchanged lines hidden --- | 166{ 167 /* 168 * /dev/mem is the only one that makes sense through this 169 * interface. For /dev/kmem any physaddr we return here 170 * could be transient and hence incorrect or invalid at 171 * a later time. 172 */ 173 if (dev2unit(dev) != CDEV_MINOR_MEM) --- 16 unchanged lines hidden --- |