All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	"Maciej W. Rozycki" <macro@linux-mips.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -tip] x86: apic LVTT - use APIC_DIVISOR on 64bit mode
Date: Sat, 12 Jul 2008 09:37:02 +0200	[thread overview]
Message-ID: <20080712073702.GA10429@elte.hu> (raw)
In-Reply-To: <20080712060504.GB14714@elte.hu>


* Ingo Molnar <mingo@elte.hu> wrote:

> 
> * Cyrill Gorcunov <gorcunov@gmail.com> wrote:
> 
> > We use APIC_TDR_DIV_16 while setting APIC_TDCR (divisor) it happened 
> > this moment is hidden from __setup_APIC_LVTT caller. So we better 
> > increment caller 'clocks' value to not change current behaviour and 
> > use APIC_DIVISOR (as already done in 32bit version).
> > 
> > The main benefit - unified procedure code for 32/64bit modes.
> 
> > Please review carefully. Any comments are welcome.
> > I'm _not_ 100% sure if this patch is safe.
> 
> hm, how about the other caller to __setup_APIC_LVTT(), 
> lapic_timer_setup():
> 
>         case CLOCK_EVT_MODE_ONESHOT:
>                 __setup_APIC_LVTT(calibration_result,
>                                   mode != CLOCK_EVT_MODE_PERIODIC, 1);
>                 break;
> 
> that will affect high-res timers. Wont calibration_result have the same 
> value after your patch as well, but only a 16th of it will be used in 
> __setup_APIC_LVTT(), causing 16 times shorter timeouts than intended?
> 
> I.e. are we fixing a bug, are we changing nothing, or are we 
> introducing a bug? :-)

i think we are introducing a bug :)

	Ingo

      parent reply	other threads:[~2008-07-12  7:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-09 19:02 [PATCH -tip] x86: apic LVTT - use APIC_DIVISOR on 64bit mode Cyrill Gorcunov
2008-07-12  6:05 ` Ingo Molnar
2008-07-12  7:22   ` Cyrill Gorcunov
2008-07-12  7:39     ` Ingo Molnar
2008-07-12  7:43       ` Cyrill Gorcunov
2008-07-12  7:37   ` Ingo Molnar [this message]

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=20080712073702.GA10429@elte.hu \
    --to=mingo@elte.hu \
    --cc=gorcunov@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=macro@linux-mips.org \
    --cc=tglx@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.