public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] introduce lower_32_bits() macro
@ 2008-07-25 15:12 Joerg Roedel
  2008-07-25 16:06 ` H. Peter Anvin
  0 siblings, 1 reply; 8+ messages in thread
From: Joerg Roedel @ 2008-07-25 15:12 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, Joerg Roedel

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



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-07-28 12:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-25 15:12 [PATCH] introduce lower_32_bits() macro Joerg Roedel
2008-07-25 16:06 ` H. Peter Anvin
2008-07-25 20:47   ` Andrew Morton
2008-07-25 20:54     ` Roland Dreier
2008-07-25 21:39       ` H. Peter Anvin
2008-07-25 20:54     ` H. Peter Anvin
2008-07-28 10:59   ` Joerg Roedel
2008-07-28 12:07   ` Joerg Roedel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox