Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Mar 2018 16:22:33 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r330854 - stable/11/sys/compat/linuxkpi/common/include/linux
Message-ID:  <201803131622.w2DGMXLD004997@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Tue Mar 13 16:22:32 2018
New Revision: 330854
URL: https://svnweb.freebsd.org/changeset/base/330854

Log:
  MFC r330388:
  Implement GENMASK_ULL() function macro in the LinuxKPI.
  
  Submitted by:	Johannes Lundberg <johalun0@gmail.com>
  Sponsored by:	Mellanox Technologies
  Sponsored by:	Limelight Networks

Modified:
  stable/11/sys/compat/linuxkpi/common/include/linux/bitops.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/compat/linuxkpi/common/include/linux/bitops.h
==============================================================================
--- stable/11/sys/compat/linuxkpi/common/include/linux/bitops.h	Tue Mar 13 16:20:59 2018	(r330853)
+++ stable/11/sys/compat/linuxkpi/common/include/linux/bitops.h	Tue Mar 13 16:22:32 2018	(r330854)
@@ -45,12 +45,15 @@
 #define	BITS_PER_LONG		32
 #endif
 
+#define	BITS_PER_LONG_LONG	64
+
 #define	BITMAP_FIRST_WORD_MASK(start)	(~0UL << ((start) % BITS_PER_LONG))
 #define	BITMAP_LAST_WORD_MASK(n)	(~0UL >> (BITS_PER_LONG - (n)))
 #define	BITS_TO_LONGS(n)	howmany((n), BITS_PER_LONG)
 #define	BIT_MASK(nr)		(1UL << ((nr) & (BITS_PER_LONG - 1)))
 #define BIT_WORD(nr)		((nr) / BITS_PER_LONG)
 #define	GENMASK(h, l)		(((~0UL) >> (BITS_PER_LONG - (h) - 1)) & ((~0UL) << (l)))
+#define	GENMASK_ULL(h, l)	(((~0ULL) >> (BITS_PER_LONG_LONG - (h) - 1)) & ((~0ULL) << (l)))
 #define BITS_PER_BYTE           8
 
 #define	hweight8(x)	bitcount((uint8_t)(x))



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803131622.w2DGMXLD004997>