Re: [kvm-devel] [PATCH 3/4] kvm/host: fix paravirt clocksource to be compatible with xen.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Gerd Hoffmann wrote:
>   
>>> +static uint32_t div_frac(uint32_t dividend, uint32_t divisor)
>>> +{
>>> +    uint32_t quotient, remainder;
>>> +
>>> +    __asm__ ( "divl %4"
>>> +          : "=a" (quotient), "=d" (remainder)
>>> +          : "0" (0), "1" (dividend), "r" (divisor) );
>>> +    return quotient;   
>>> +}
>>>   
>>>       
>> do_div()?
>>     
>
> No, this one does something else.  Already tried to get rid of that one
> before ;)
>
>   

Ah yes, it calculates (dividend << 32) / divisor.

-- 
error compiling committee.c: too many arguments to function

_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/virtualization

[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux