dma-attrs.h revision 331756
11573Srgrimes/*-
21573Srgrimes * Copyright (c) 2010 Isilon Systems, Inc.
31573Srgrimes * Copyright (c) 2010 iX Systems, Inc.
41573Srgrimes * Copyright (c) 2010 Panasas, Inc.
51573Srgrimes * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd.
61573Srgrimes * All rights reserved.
71573Srgrimes *
81573Srgrimes * Redistribution and use in source and binary forms, with or without
91573Srgrimes * modification, are permitted provided that the following conditions
101573Srgrimes * are met:
111573Srgrimes * 1. Redistributions of source code must retain the above copyright
121573Srgrimes *    notice unmodified, this list of conditions, and the following
131573Srgrimes *    disclaimer.
141573Srgrimes * 2. Redistributions in binary form must reproduce the above copyright
151573Srgrimes *    notice, this list of conditions and the following disclaimer in the
161573Srgrimes *    documentation and/or other materials provided with the distribution.
171573Srgrimes *
181573Srgrimes * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
191573Srgrimes * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
201573Srgrimes * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
211573Srgrimes * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
221573Srgrimes * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
231573Srgrimes * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
241573Srgrimes * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
251573Srgrimes * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
261573Srgrimes * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
271573Srgrimes * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
281573Srgrimes *
291573Srgrimes * $FreeBSD: stable/11/sys/compat/linuxkpi/common/include/linux/dma-attrs.h 331756 2018-03-30 02:04:46Z emaste $
301573Srgrimes */
311573Srgrimes#ifndef	_LINUX_DMA_ATTR_H_
321573Srgrimes#define	_LINUX_DMA_ATTR_H_
331573Srgrimes
341573Srgrimesenum dma_attr { DMA_ATTR_WRITE_BARRIER, DMA_ATTR_WEAK_ORDERING, DMA_ATTR_MAX, };
351573Srgrimes
361573Srgrimes#define __DMA_ATTRS_LONGS BITS_TO_LONGS(DMA_ATTR_MAX)
371573Srgrimes
381573Srgrimesstruct dma_attrs {
391573Srgrimes	unsigned long flags;
401573Srgrimes};
411573Srgrimes
421573Srgrimes#define DEFINE_DMA_ATTRS(x) struct dma_attrs x = { }
431573Srgrimes
441573Srgrimesstatic inline void
451573Srgrimesinit_dma_attrs(struct dma_attrs *attrs)
461573Srgrimes{
471573Srgrimes	attrs->flags = 0;
481573Srgrimes}
491573Srgrimes
501573Srgrimes#endif	/* _LINUX_DMA_ATTR_H_ */
511573Srgrimes