public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@qumranet.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: kvm-devel@lists.sourceforge.net, virtualization@lists.osdl.org
Subject: Re: [kvm-devel] [PATCH 3/4] kvm/host: fix paravirt clocksource to be	compatible with xen.
Date: Sun, 18 May 2008 09:05:19 +0300	[thread overview]
Message-ID: <482FC71F.7000502@qumranet.com> (raw)
In-Reply-To: <482D3C00.80707@redhat.com>

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 ;)
>
>   

There is actually a simpler way of coding this:


   return  dividend / divisor;

-- 
Do not meddle in the internals of kernels, for they are subtle and quick to panic.

  reply	other threads:[~2008-05-18  6:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-08 11:48 [PATCH 0/4] paravirt clock series Gerd Hoffmann
2008-05-08 11:48 ` [PATCH 1/4] Add helper functions for paravirtual clocksources Gerd Hoffmann
2008-05-08 11:48 ` [PATCH 2/4] Make xen use the generic paravirt clocksource code Gerd Hoffmann
2008-05-08 11:48 ` [PATCH 3/4] kvm/host: fix paravirt clocksource to be compatible with xen Gerd Hoffmann
2008-05-13  8:03   ` [kvm-devel] " Avi Kivity
2008-05-16  7:47     ` Gerd Hoffmann
2008-05-18  6:05       ` Avi Kivity [this message]
2008-05-21 15:24       ` [kvm-devel] " Avi Kivity
2008-05-08 11:48 ` [PATCH 4/4] kvm/guest: fix paravirt clocksource to be compartible " Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=482FC71F.7000502@qumranet.com \
    --to=avi@qumranet.com \
    --cc=kraxel@redhat.com \
    --cc=kvm-devel@lists.sourceforge.net \
    --cc=virtualization@lists.osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox