M_CLUSTER -> M_EXT_CLUSTER
This commit is contained in:
parent
6bcbbb2d9d
commit
f8f3c934e0
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: bus_dma.c,v 1.107 2018/04/01 04:35:03 ryo Exp $ */
|
||||
/* $NetBSD: bus_dma.c,v 1.108 2018/04/27 07:53:07 maxv Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -36,7 +36,7 @@
|
|||
#include "opt_cputypes.h"
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.107 2018/04/01 04:35:03 ryo Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.108 2018/04/27 07:53:07 maxv Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/bus.h>
|
||||
|
@ -585,8 +585,8 @@ _bus_dmamap_load_mbuf(bus_dma_tag_t t, bus_dmamap_t map, struct mbuf *m0,
|
|||
error = EFAULT;
|
||||
break;
|
||||
}
|
||||
switch (m->m_flags & (M_EXT|M_CLUSTER|M_EXT_PAGES)) {
|
||||
case M_EXT|M_CLUSTER:
|
||||
switch (m->m_flags & (M_EXT|M_EXT_CLUSTER|M_EXT_PAGES)) {
|
||||
case M_EXT|M_EXT_CLUSTER:
|
||||
/* XXX KDASSERT */
|
||||
KASSERT(m->m_ext.ext_paddr != M_PADDR_INVALID);
|
||||
paddr = m->m_ext.ext_paddr +
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: bus_dma.c,v 1.47 2016/12/23 07:15:28 cherry Exp $ */
|
||||
/* $NetBSD: bus_dma.c,v 1.48 2018/04/27 07:53:07 maxv Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -32,7 +32,7 @@
|
|||
|
||||
#define _POWERPC_BUS_DMA_PRIVATE
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.47 2016/12/23 07:15:28 cherry Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.48 2018/04/27 07:53:07 maxv Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -307,8 +307,8 @@ _bus_dmamap_load_mbuf(bus_dma_tag_t t, bus_dmamap_t map, struct mbuf *m0, int fl
|
|||
#ifdef POOL_VTOPHYS
|
||||
/* XXX Could be better about coalescing. */
|
||||
/* XXX Doesn't check boundaries. */
|
||||
switch (m->m_flags & (M_EXT|M_CLUSTER)) {
|
||||
case M_EXT|M_CLUSTER:
|
||||
switch (m->m_flags & (M_EXT|M_EXT_CLUSTER)) {
|
||||
case M_EXT|M_EXT_CLUSTER:
|
||||
/* XXX KDASSERT */
|
||||
KASSERT(m->m_ext.ext_paddr != M_PADDR_INVALID);
|
||||
lastaddr = m->m_ext.ext_paddr +
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: bus_dma.c,v 1.34 2010/11/12 13:18:59 uebayasi Exp $ */
|
||||
/* $NetBSD: bus_dma.c,v 1.35 2018/04/27 07:53:07 maxv Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -35,7 +35,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.34 2010/11/12 13:18:59 uebayasi Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.35 2018/04/27 07:53:07 maxv Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -223,9 +223,9 @@ _bus_dmamap_load_mbuf(bus_dma_tag_t t, bus_dmamap_t map, struct mbuf *m0,
|
|||
if (m->m_len == 0)
|
||||
continue;
|
||||
#if 0
|
||||
switch (m->m_flags & (M_EXT|M_CLUSTER)) {
|
||||
switch (m->m_flags & (M_EXT|M_EXT_CLUSTER)) {
|
||||
#if 0
|
||||
case M_EXT|M_CLUSTER:
|
||||
case M_EXT|M_EXT_CLUSTER:
|
||||
KASSERT(m->m_ext.ext_paddr != M_PADDR_INVALID);
|
||||
lastaddr = m->m_ext.ext_paddr
|
||||
+ (m->m_data - m->m_ext.ext_buf);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: xennetback_xenbus.c,v 1.61 2017/11/11 21:03:01 riastradh Exp $ */
|
||||
/* $NetBSD: xennetback_xenbus.c,v 1.62 2018/04/27 07:53:07 maxv Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2006 Manuel Bouyer.
|
||||
|
@ -25,7 +25,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: xennetback_xenbus.c,v 1.61 2017/11/11 21:03:01 riastradh Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: xennetback_xenbus.c,v 1.62 2018/04/27 07:53:07 maxv Exp $");
|
||||
|
||||
#include "opt_xen.h"
|
||||
|
||||
|
@ -1011,7 +1011,7 @@ xennetback_ifsoftstart_transfer(void *arg)
|
|||
if (__predict_false(
|
||||
xennetback_get_mcl_page(&newp_ma) != 0))
|
||||
break; /* out of memory */
|
||||
if ((m->m_flags & M_CLUSTER) != 0 &&
|
||||
if ((m->m_flags & M_EXT_CLUSTER) != 0 &&
|
||||
!M_READONLY(m) && MCLBYTES == PAGE_SIZE) {
|
||||
/* we can give this page away */
|
||||
xmit_pa = m->m_ext.ext_paddr;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: uipc_mbuf.c,v 1.203 2018/04/27 07:41:58 maxv Exp $ */
|
||||
/* $NetBSD: uipc_mbuf.c,v 1.204 2018/04/27 07:53:07 maxv Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999, 2001 The NetBSD Foundation, Inc.
|
||||
|
@ -62,7 +62,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.203 2018/04/27 07:41:58 maxv Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.204 2018/04/27 07:53:07 maxv Exp $");
|
||||
|
||||
#ifdef _KERNEL_OPT
|
||||
#include "opt_mbuftrace.h"
|
||||
|
@ -1750,7 +1750,7 @@ mowner_ref(struct mbuf *m, int flags)
|
|||
mc = percpu_getref(mo->mo_counters);
|
||||
if ((flags & M_EXT) != 0)
|
||||
mc->mc_counter[MOWNER_COUNTER_EXT_CLAIMS]++;
|
||||
if ((flags & M_CLUSTER) != 0)
|
||||
if ((flags & M_EXT_CLUSTER) != 0)
|
||||
mc->mc_counter[MOWNER_COUNTER_CLUSTER_CLAIMS]++;
|
||||
percpu_putref(mo->mo_counters);
|
||||
splx(s);
|
||||
|
@ -1767,7 +1767,7 @@ mowner_revoke(struct mbuf *m, bool all, int flags)
|
|||
mc = percpu_getref(mo->mo_counters);
|
||||
if ((flags & M_EXT) != 0)
|
||||
mc->mc_counter[MOWNER_COUNTER_EXT_RELEASES]++;
|
||||
if ((flags & M_CLUSTER) != 0)
|
||||
if ((flags & M_EXT_CLUSTER) != 0)
|
||||
mc->mc_counter[MOWNER_COUNTER_CLUSTER_RELEASES]++;
|
||||
if (all)
|
||||
mc->mc_counter[MOWNER_COUNTER_RELEASES]++;
|
||||
|
@ -1789,7 +1789,7 @@ mowner_claim(struct mbuf *m, struct mowner *mo)
|
|||
mc->mc_counter[MOWNER_COUNTER_CLAIMS]++;
|
||||
if ((flags & M_EXT) != 0)
|
||||
mc->mc_counter[MOWNER_COUNTER_EXT_CLAIMS]++;
|
||||
if ((flags & M_CLUSTER) != 0)
|
||||
if ((flags & M_EXT_CLUSTER) != 0)
|
||||
mc->mc_counter[MOWNER_COUNTER_CLUSTER_CLAIMS]++;
|
||||
percpu_putref(mo->mo_counters);
|
||||
splx(s);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mbuf.h,v 1.193 2018/04/27 07:41:58 maxv Exp $ */
|
||||
/* $NetBSD: mbuf.h,v 1.194 2018/04/27 07:53:07 maxv Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996, 1997, 1999, 2001, 2007 The NetBSD Foundation, Inc.
|
||||
|
@ -118,8 +118,8 @@ struct mowner {
|
|||
enum mowner_counter_index {
|
||||
MOWNER_COUNTER_CLAIMS, /* # of small mbuf claimed */
|
||||
MOWNER_COUNTER_RELEASES, /* # of small mbuf released */
|
||||
MOWNER_COUNTER_CLUSTER_CLAIMS, /* # of M_CLUSTER mbuf claimed */
|
||||
MOWNER_COUNTER_CLUSTER_RELEASES,/* # of M_CLUSTER mbuf released */
|
||||
MOWNER_COUNTER_CLUSTER_CLAIMS, /* # of cluster mbuf claimed */
|
||||
MOWNER_COUNTER_CLUSTER_RELEASES,/* # of cluster mbuf released */
|
||||
MOWNER_COUNTER_EXT_CLAIMS, /* # of M_EXT mbuf claimed */
|
||||
MOWNER_COUNTER_EXT_RELEASES, /* # of M_EXT mbuf released */
|
||||
|
||||
|
@ -518,13 +518,13 @@ do { \
|
|||
MCLINITREFERENCE(m); \
|
||||
(m)->m_data = (m)->m_ext.ext_buf; \
|
||||
(m)->m_flags = ((m)->m_flags & ~M_EXTCOPYFLAGS) | \
|
||||
M_EXT|M_CLUSTER|M_EXT_RW; \
|
||||
M_EXT|M_EXT_CLUSTER|M_EXT_RW; \
|
||||
(m)->m_ext.ext_flags = 0; \
|
||||
(m)->m_ext.ext_size = (size); \
|
||||
(m)->m_ext.ext_free = NULL; \
|
||||
(m)->m_ext.ext_arg = (pool_cache); \
|
||||
/* ext_paddr initialized above */ \
|
||||
mowner_ref((m), M_EXT|M_CLUSTER); \
|
||||
mowner_ref((m), M_EXT|M_EXT_CLUSTER); \
|
||||
} \
|
||||
} while (/* CONSTCOND */ 0)
|
||||
|
||||
|
|
Loading…
Reference in New Issue