dma-attrs.h revision 331756
1157114Sscottl/*-
2157114Sscottl * Copyright (c) 2010 Isilon Systems, Inc.
3157114Sscottl * Copyright (c) 2010 iX Systems, Inc.
4157114Sscottl * Copyright (c) 2010 Panasas, Inc.
5157114Sscottl * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd.
6157114Sscottl * All rights reserved.
7157114Sscottl *
8157114Sscottl * Redistribution and use in source and binary forms, with or without
9157114Sscottl * modification, are permitted provided that the following conditions
10157114Sscottl * are met:
11157114Sscottl * 1. Redistributions of source code must retain the above copyright
12157114Sscottl *    notice unmodified, this list of conditions, and the following
13157114Sscottl *    disclaimer.
14157114Sscottl * 2. Redistributions in binary form must reproduce the above copyright
15157114Sscottl *    notice, this list of conditions and the following disclaimer in the
16157114Sscottl *    documentation and/or other materials provided with the distribution.
17157114Sscottl *
18157114Sscottl * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
19157114Sscottl * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20157114Sscottl * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21157114Sscottl * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
22157114Sscottl * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23157114Sscottl * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24157114Sscottl * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25157114Sscottl * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26157114Sscottl * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27157114Sscottl * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28157114Sscottl *
29157114Sscottl * $FreeBSD: stable/11/sys/compat/linuxkpi/common/include/linux/dma-attrs.h 331756 2018-03-30 02:04:46Z emaste $
30196200Sscottl */
31196200Sscottl#ifndef	_LINUX_DMA_ATTR_H_
32164281Sambrisko#define	_LINUX_DMA_ATTR_H_
33164281Sambrisko
34164281Sambriskoenum dma_attr { DMA_ATTR_WRITE_BARRIER, DMA_ATTR_WEAK_ORDERING, DMA_ATTR_MAX, };
35164281Sambrisko
36164281Sambrisko#define __DMA_ATTRS_LONGS BITS_TO_LONGS(DMA_ATTR_MAX)
37157114Sscottl
38157114Sscottlstruct dma_attrs {
39157114Sscottl	unsigned long flags;
40157114Sscottl};
41157114Sscottl
42157114Sscottl#define DEFINE_DMA_ATTRS(x) struct dma_attrs x = { }
43157114Sscottl
44157114Sscottlstatic inline void
45157114Sscottlinit_dma_attrs(struct dma_attrs *attrs)
46157114Sscottl{
47157114Sscottl	attrs->flags = 0;
48157114Sscottl}
49157114Sscottl
50157114Sscottl#endif	/* _LINUX_DMA_ATTR_H_ */
51157114Sscottl