From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
To: linux-kernel@vger.kernel.org
Cc: linux-pm@vger.kernel.org, gregkh@linuxfoundation.org,
len.brown@intel.com, rjw@sisk.pl, arjan@linux.intel.com,
jacob.jun.pan@linux.intel.com,
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Subject: [PATCH v3 5/6] bitops: Introduce BIT_ULL
Date: Fri, 11 Oct 2013 16:54:59 -0700 [thread overview]
Message-ID: <1381535700-2408-6-git-send-email-srinivas.pandruvada@linux.intel.com> (raw)
In-Reply-To: <1381535700-2408-1-git-send-email-srinivas.pandruvada@linux.intel.com>
Adding BIT(x) equivalent for unsigned long long type, BIT_ULL(x). Also
added BIT_ULL_MASK and BIT_ULL_WORD.
Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
include/linux/bitops.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/linux/bitops.h b/include/linux/bitops.h
index a3b6b82..5a1c8b7 100644
--- a/include/linux/bitops.h
+++ b/include/linux/bitops.h
@@ -4,8 +4,11 @@
#ifdef __KERNEL__
#define BIT(nr) (1UL << (nr))
+#define BIT_ULL(nr) (1ULL << (nr))
#define BIT_MASK(nr) (1UL << ((nr) % BITS_PER_LONG))
#define BIT_WORD(nr) ((nr) / BITS_PER_LONG)
+#define BIT_ULL_MASK(nr) (1ULL << ((nr) % BITS_PER_LONG_LONG))
+#define BIT_ULL_WORD(nr) ((nr) / BITS_PER_LONG_LONG)
#define BITS_PER_BYTE 8
#define BITS_TO_LONGS(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(long))
#endif
--
1.8.3.1
next prev parent reply other threads:[~2013-10-11 23:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-11 23:54 [PATCH v3 0/6] Power Capping Framework and RAPL Driver Srinivas Pandruvada
2013-10-11 23:54 ` [PATCH v3 1/6] PowerCap: Documentation Srinivas Pandruvada
2013-10-11 23:54 ` [PATCH v3 2/6] PowerCap: Add class driver Srinivas Pandruvada
2013-10-11 23:54 ` [PATCH v3 3/6] PowerCap: Added to drivers build Srinivas Pandruvada
2013-10-11 23:54 ` [PATCH v3 4/6] x86/msr: add 64bit _on_cpu access functions Srinivas Pandruvada
2013-10-11 23:54 ` Srinivas Pandruvada [this message]
2013-10-11 23:55 ` [PATCH v3 6/6] Introduce Intel RAPL power capping driver Srinivas Pandruvada
2013-10-16 22:41 ` [PATCH v3 0/6] Power Capping Framework and RAPL Driver Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1381535700-2408-6-git-send-email-srinivas.pandruvada@linux.intel.com \
--to=srinivas.pandruvada@linux.intel.com \
--cc=arjan@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=jacob.jun.pan@linux.intel.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@sisk.pl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).