aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kernel.h
diff options
context:
space:
mode:
authorEduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>2008-07-05 05:14:23 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-05 16:10:50 -0400
commitca31e146d5c2fe51498e619eb3a64782d02e310a (patch)
tree121916bb92004ca138fc8d8e436e68435c8d5de0 /include/linux/kernel.h
parent84df87b7ebdcbbc0f59df9526f4e63fda70647d3 (diff)
Move _RET_IP_ and _THIS_IP_ to include/linux/kernel.h
These two macros are useful beyond lock debugging. Moved definitions from include/linux/debug_locks.h to include/linux/kernel.h, so code that needs them does not have to include the former, which would have been a less intuitive choice of a header. Signed-off-by: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro> Acked-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/kernel.h')
-rw-r--r--include/linux/kernel.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 792bf0aa779b..2e70006c7fa8 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -46,6 +46,9 @@ extern const char linux_proc_banner[];
46#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) 46#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
47#define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) 47#define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y))
48 48
49#define _RET_IP_ (unsigned long)__builtin_return_address(0)
50#define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; })
51
49#ifdef CONFIG_LBD 52#ifdef CONFIG_LBD
50# include <asm/div64.h> 53# include <asm/div64.h>
51# define sector_div(a, b) do_div(a, b) 54# define sector_div(a, b) do_div(a, b)