vm_machdep.c (177091) | vm_machdep.c (177253) |
---|---|
1/*- 2 * Copyright (C) 2006 Semihalf, Marian Balakowicz <m8@semihalf.com> 3 * Copyright (C) 2006 Semihalf, Rafal Jaworowski <raj@semihalf.com> 4 * All rights reserved. 5 * 6 * Adapted for Freescale's e500 core CPUs. 7 * sf_buf implementation was derived from sys/arm/arm/vm_machdep. 8 * --- 14 unchanged lines hidden (view full) --- 23 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 25 * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 * | 1/*- 2 * Copyright (C) 2006 Semihalf, Marian Balakowicz <m8@semihalf.com> 3 * Copyright (C) 2006 Semihalf, Rafal Jaworowski <raj@semihalf.com> 4 * All rights reserved. 5 * 6 * Adapted for Freescale's e500 core CPUs. 7 * sf_buf implementation was derived from sys/arm/arm/vm_machdep. 8 * --- 14 unchanged lines hidden (view full) --- 23 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 25 * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 * |
31 * from: $FreeBSD: head/sys/powerpc/booke/vm_machdep.c 177091 2008-03-12 10:12:01Z jeff $ | 31 * from: $FreeBSD: head/sys/powerpc/booke/vm_machdep.c 177253 2008-03-16 10:58:09Z rwatson $ |
32 */ 33/*- 34 * Copyright (c) 1982, 1986 The Regents of the University of California. 35 * Copyright (c) 1989, 1990 William Jolitz 36 * Copyright (c) 1994 John Dyson 37 * All rights reserved. 38 * 39 * This code is derived from software contributed to Berkeley by --- 54 unchanged lines hidden (view full) --- 94 * Carnegie Mellon University 95 * Pittsburgh PA 15213-3890 96 * 97 * any improvements or extensions that they make and grant Carnegie the 98 * rights to redistribute these changes. 99 */ 100 101#include <sys/cdefs.h> | 32 */ 33/*- 34 * Copyright (c) 1982, 1986 The Regents of the University of California. 35 * Copyright (c) 1989, 1990 William Jolitz 36 * Copyright (c) 1994 John Dyson 37 * All rights reserved. 38 * 39 * This code is derived from software contributed to Berkeley by --- 54 unchanged lines hidden (view full) --- 94 * Carnegie Mellon University 95 * Pittsburgh PA 15213-3890 96 * 97 * any improvements or extensions that they make and grant Carnegie the 98 * rights to redistribute these changes. 99 */ 100 101#include <sys/cdefs.h> |
102__FBSDID("$FreeBSD: head/sys/powerpc/booke/vm_machdep.c 177091 2008-03-12 10:12:01Z jeff $"); | 102__FBSDID("$FreeBSD: head/sys/powerpc/booke/vm_machdep.c 177253 2008-03-16 10:58:09Z rwatson $"); |
103 104#include <sys/param.h> 105#include <sys/systm.h> 106#include <sys/proc.h> 107#include <sys/malloc.h> 108#include <sys/bio.h> 109#include <sys/buf.h> 110#include <sys/ktr.h> --- 22 unchanged lines hidden (view full) --- 133#include <vm/vm_map.h> 134#include <vm/vm_extern.h> 135 136#ifndef NSFBUFS 137#define NSFBUFS (512 + maxusers * 16) 138#endif 139 140static void sf_buf_init(void *arg); | 103 104#include <sys/param.h> 105#include <sys/systm.h> 106#include <sys/proc.h> 107#include <sys/malloc.h> 108#include <sys/bio.h> 109#include <sys/buf.h> 110#include <sys/ktr.h> --- 22 unchanged lines hidden (view full) --- 133#include <vm/vm_map.h> 134#include <vm/vm_extern.h> 135 136#ifndef NSFBUFS 137#define NSFBUFS (512 + maxusers * 16) 138#endif 139 140static void sf_buf_init(void *arg); |
141SYSINIT(sock_sf, SI_SUB_MBUF, SI_ORDER_ANY, sf_buf_init, NULL) | 141SYSINIT(sock_sf, SI_SUB_MBUF, SI_ORDER_ANY, sf_buf_init, NULL); |
142 143LIST_HEAD(sf_head, sf_buf); 144 145/* A hash table of active sendfile(2) buffers */ 146static struct sf_head *sf_buf_active; 147static u_long sf_buf_hashmask; 148 149#define SF_BUF_HASH(m) (((m) - vm_page_array) & sf_buf_hashmask) --- 368 unchanged lines hidden --- | 142 143LIST_HEAD(sf_head, sf_buf); 144 145/* A hash table of active sendfile(2) buffers */ 146static struct sf_head *sf_buf_active; 147static u_long sf_buf_hashmask; 148 149#define SF_BUF_HASH(m) (((m) - vm_page_array) & sf_buf_hashmask) --- 368 unchanged lines hidden --- |