mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: "Hadimani, Jagadish" <Jagadish.Hadimani@amd.com>,
	"Shah, Nehal-bakulchandra" <Nehal-bakulchandra.Shah@amd.com>,
	"a.zummo@towertech.it" <a.zummo@towertech.it>,
	"rtc-linux@googlegroups.com" <rtc-linux@googlegroups.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@kernel.org>
Subject: Re: Kernel without RTC
Date: Wed, 8 Mar 2017 16:06:23 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.20.1703081602460.3521@nanos> (raw)
In-Reply-To: <20170308134748.yk52f7aqm7d4kwdg@piout.net>

On Wed, 8 Mar 2017, Alexandre Belloni wrote:
> On 08/03/2017 at 13:33:33 +0000, Hadimani, Jagadish wrote:
> > Hello Alexandre,
> > 
> > I guess the Linux kernel uses HPET timer...
> > But can we can force Linux kernel to use Tsc or per core timer...
> > 
> 
> That is probably the case but your are targeting the wrong subsystem.
> The timekeeping is done using two different devices: clocksource and
> clockevent. Usually, the drivers are in drivers/clocksource. I'm
> definitively not an expert in x86 but the clockevent seems to be
> registered from arch/x86/kernel/hpet.c and the clocksource from
> arch/x86/kernel/tsc.c
> 
> IIRC the clocksource is optional but the clockevent is mandatory so if
> you don't have an HPET, you will need to register a clockevent device
> from somewhere else.
> 
> Maybe the simplest thing to do is to ask the x86 maintainers and the
> time maintainers. Luckily for you, they are the same people (Thomas and
> Ingo, added in cc).

The scheduler uses TSC anyway.

The RTC is only used for setting the wall clock time at boot and for
figuring out the time a system spent in suspend. If you don't have an RTC
then the boot wall clock time will be simply 1/1/1970 00:00:00.

Jagadish, can you please explain what your problem is. Does the system fail
to boot or does it behave strange or what?

Thanks,

	tglx

      reply	other threads:[~2017-03-08 15:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-06 19:18 Shah, Nehal-bakulchandra
2017-03-08 13:17 ` Alexandre Belloni
2017-03-08 13:33   ` Hadimani, Jagadish
2017-03-08 13:47     ` Alexandre Belloni
2017-03-08 15:06       ` Thomas Gleixner [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=alpine.DEB.2.20.1703081602460.3521@nanos \
    --to=tglx@linutronix.de \
    --cc=Jagadish.Hadimani@amd.com \
    --cc=Nehal-bakulchandra.Shah@amd.com \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@free-electrons.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=rtc-linux@googlegroups.com \
    /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

all inboxes | Powered by JetHome®