Skip to content

Commit

Permalink
introduce lower_32_bits() macro
Browse files Browse the repository at this point in the history
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.

Cc: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Joerg Roedel authored and Linus Torvalds committed Jul 30, 2008
1 parent 87547ee commit 204b885
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/linux/kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,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) ((u32)(n))

#define KERN_EMERG "<0>" /* system is unusable */
#define KERN_ALERT "<1>" /* action must be taken immediately */
#define KERN_CRIT "<2>" /* critical conditions */
Expand Down

0 comments on commit 204b885

Please sign in to comment.