Pull in initial 32-bit support patches.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@156 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c
This commit is contained in:
behlendo
2008-08-11 22:42:04 +00:00
parent 3d061e9d10
commit b61a6e8bdc
5 changed files with 112 additions and 1 deletions
+24
View File
@@ -87,6 +87,30 @@ highbit(unsigned long i)
}
EXPORT_SYMBOL(highbit);
/*
* Implementation of div64_64(), for kernels that don't have it.
*
* Taken from a 2.6.24 kernel.
*/
uint64_t spl_div64_64(uint64_t dividend, uint64_t divisor)
{
uint32_t high, d;
high = divisor >> 32;
if (high) {
unsigned int shift = fls(high);
d = divisor >> shift;
dividend >>= shift;
} else
d = divisor;
do_div(dividend, d);
return dividend;
}
EXPORT_SYMBOL(spl_div64_64);
int
ddi_strtoul(const char *str, char **nptr, int base, unsigned long *result)
{