lkml.org 
[lkml]   [2008]   [Jul]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] introduce lower_32_bits() macro
Date
The file kernel.h contains the upper_32_bits macro. This patch adds the other
part, the lower_32_bits macro. Its first use will be in the driver for AMD
IOMMU.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
---
include/linux/kernel.h | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index f9cd7a5..6fd2977 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -73,6 +73,12 @@ extern const char linux_proc_banner[];
*/
#define upper_32_bits(n) ((u32)(((n) >> 16) >> 16))

+/**
+ * lower_32_bits - return bits 0-31 of a number
+ * @n: the number we're accessing
+ */
+#define lower_32_bits(n) ((n) & 0xffffffffULL)
+
#define KERN_EMERG "<0>" /* system is unusable */
#define KERN_ALERT "<1>" /* action must be taken immediately */
#define KERN_CRIT "<2>" /* critical conditions */
--
1.5.3.7



\
 
 \ /
  Last update: 2008-07-25 17:15    [W:0.138 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site