mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user