Deleted Added
full compact
dsp.c (193640) dsp.c (201223)
1/*-
2 * Copyright (c) 2005-2009 Ariff Abdullah <ariff@FreeBSD.org>
3 * Portions Copyright (c) Ryan Beasley <ryan.beasley@gmail.com> - GSoC 2006
4 * Copyright (c) 1999 Cameron Grant <cg@FreeBSD.org>
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 20 unchanged lines hidden (view full) ---

29#ifdef HAVE_KERNEL_OPTION_HEADERS
30#include "opt_snd.h"
31#endif
32
33#include <dev/sound/pcm/sound.h>
34#include <sys/ctype.h>
35#include <sys/sysent.h>
36
1/*-
2 * Copyright (c) 2005-2009 Ariff Abdullah <ariff@FreeBSD.org>
3 * Portions Copyright (c) Ryan Beasley <ryan.beasley@gmail.com> - GSoC 2006
4 * Copyright (c) 1999 Cameron Grant <cg@FreeBSD.org>
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 20 unchanged lines hidden (view full) ---

29#ifdef HAVE_KERNEL_OPTION_HEADERS
30#include "opt_snd.h"
31#endif
32
33#include <dev/sound/pcm/sound.h>
34#include <sys/ctype.h>
35#include <sys/sysent.h>
36
37SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pcm/dsp.c 193640 2009-06-07 19:12:08Z ariff $");
37SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pcm/dsp.c 201223 2009-12-29 21:51:28Z rnoland $");
38
39static int dsp_mmap_allow_prot_exec = 0;
40SYSCTL_INT(_hw_snd, OID_AUTO, compat_linux_mmap, CTLFLAG_RW,
41 &dsp_mmap_allow_prot_exec, 0,
42 "linux mmap compatibility (-1=force disable 0=auto 1=force enable)");
43
44struct dsp_cdevinfo {
45 struct pcm_channel *rdch, *wrch;

--- 2128 unchanged lines hidden (view full) ---

2174 relchns(i_dev, rdch, wrch, SD_F_PRIO_RD | SD_F_PRIO_WR);
2175
2176 PCM_GIANT_LEAVE(d);
2177
2178 return (ret);
2179}
2180
2181static int
38
39static int dsp_mmap_allow_prot_exec = 0;
40SYSCTL_INT(_hw_snd, OID_AUTO, compat_linux_mmap, CTLFLAG_RW,
41 &dsp_mmap_allow_prot_exec, 0,
42 "linux mmap compatibility (-1=force disable 0=auto 1=force enable)");
43
44struct dsp_cdevinfo {
45 struct pcm_channel *rdch, *wrch;

--- 2128 unchanged lines hidden (view full) ---

2174 relchns(i_dev, rdch, wrch, SD_F_PRIO_RD | SD_F_PRIO_WR);
2175
2176 PCM_GIANT_LEAVE(d);
2177
2178 return (ret);
2179}
2180
2181static int
2182dsp_mmap(struct cdev *i_dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot)
2182dsp_mmap(struct cdev *i_dev, vm_ooffset_t offset, vm_paddr_t *paddr,
2183 int nprot, vm_memattr_t *memattr)
2183{
2184 struct snddev_info *d;
2185 struct pcm_channel *wrch, *rdch, *c;
2186
2187 /*
2188 * Reject PROT_EXEC by default. It just doesn't makes sense.
2189 * Unfortunately, we have to give up this one due to linux_mmap
2190 * changes.

--- 1150 unchanged lines hidden ---
2184{
2185 struct snddev_info *d;
2186 struct pcm_channel *wrch, *rdch, *c;
2187
2188 /*
2189 * Reject PROT_EXEC by default. It just doesn't makes sense.
2190 * Unfortunately, we have to give up this one due to linux_mmap
2191 * changes.

--- 1150 unchanged lines hidden ---