summaryrefslogtreecommitdiff
path: root/fs/posix_acl.c
diff options
context:
space:
mode:
authorZachary Amsden <zamsden@redhat.com>2010-09-19 00:38:13 (GMT)
committerAvi Kivity <avi@redhat.com>2010-10-24 08:53:04 (GMT)
commit5f4e3f882731c65b5d64a2ff743fda96eaebb9ee (patch)
tree25d538b6a58066d01711daa505acbabf47aaf125 /fs/posix_acl.c
parent624d84cfe63b5afdd087bf5b2075a8a8cac5c83f (diff)
downloadlinux-fsl-qoriq-5f4e3f882731c65b5d64a2ff743fda96eaebb9ee.tar.xz
KVM: x86: Make math work for other scales
The math in kvm_get_time_scale relies on the fact that NSEC_PER_SEC < 2^32. To use the same function to compute arbitrary time scales, we must extend the first reduction step to shrink the base rate to a 32-bit value, and possibly reduce the scaled rate into a 32-bit as well. Note we must take care to avoid an arithmetic overflow when scaling up the tps32 value (this could not happen with the fixed scaled value of NSEC_PER_SEC, but can happen with scaled rates above 2^31. Signed-off-by: Zachary Amsden <zamsden@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'fs/posix_acl.c')
0 files changed, 0 insertions, 0 deletions