From d516268d78fd92f3d21ab3261249e471ef4c3106 Mon Sep 17 00:00:00 2001 From: Nicholas Bellinger Date: Tue, 26 Jul 2011 00:35:26 -0700 Subject: [PATCH] --- yaml --- r: 260829 b: refs/heads/master c: 36a26c69b4c70396ef569c3452690fba0c1dec08 h: refs/heads/master i: 260827: 817c56c73bb0cf82cc4325884c6ecd46d55aab73 v: v3 --- [refs] | 2 +- trunk/include/linux/kernel.h | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 28228510507a..166545f144ce 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e48354ce078c079996f89d715dfa44814b4eba01 +refs/heads/master: 36a26c69b4c70396ef569c3452690fba0c1dec08 diff --git a/trunk/include/linux/kernel.h b/trunk/include/linux/kernel.h index 567a6f7bbeed..2642497c36fb 100644 --- a/trunk/include/linux/kernel.h +++ b/trunk/include/linux/kernel.h @@ -56,6 +56,14 @@ #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f)) #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) +#define DIV_ROUND_UP_ULL(ll,d) \ + ({ unsigned long long _tmp = (ll)+(d)-1; do_div(_tmp, d); _tmp; }) + +#if BITS_PER_LONG == 32 +# define DIV_ROUND_UP_SECTOR_T(ll,d) DIV_ROUND_UP_ULL(ll, d) +#else +# define DIV_ROUND_UP_SECTOR_T(ll,d) DIV_ROUND_UP(ll,d) +#endif /* The `const' in roundup() prevents gcc-3.3 from calling __divdi3 */ #define roundup(x, y) ( \