Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm2/include/linux Add Linux DMA_BIT_MASK.



details:   https://anonhg.NetBSD.org/src/rev/0b1a30f7b41f
branches:  trunk
changeset: 331243:0b1a30f7b41f
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Wed Aug 06 13:50:53 2014 +0000

description:
Add Linux DMA_BIT_MASK.

diffstat:

 sys/external/bsd/drm2/include/linux/dma-mapping.h |  9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diffs (21 lines):

diff -r 7b71098a1c7b -r 0b1a30f7b41f sys/external/bsd/drm2/include/linux/dma-mapping.h
--- a/sys/external/bsd/drm2/include/linux/dma-mapping.h Wed Aug 06 13:50:38 2014 +0000
+++ b/sys/external/bsd/drm2/include/linux/dma-mapping.h Wed Aug 06 13:50:53 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dma-mapping.h,v 1.2 2014/03/18 18:20:43 riastradh Exp $        */
+/*     $NetBSD: dma-mapping.h,v 1.3 2014/08/06 13:50:53 riastradh Exp $        */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -36,4 +36,11 @@
 
 typedef bus_addr_t dma_addr_t;
 
+static inline uintmax_t
+DMA_BIT_MASK(unsigned nbits)
+{
+
+       return ~(~(uintmax_t)0 << nbits);
+}
+
 #endif  /* _LINUX_DMA_MAPPING_H_ */



Home | Main Index | Thread Index | Old Index