public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: tglx@linutronix.de (Thomas Gleixner)
To: linux-arm-kernel@lists.infradead.org
Subject: [patch 07/16] arm: omap: Use clocksource based sched_clock
Date: Fri, 29 Apr 2011 14:28:32 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LFD.2.02.1104291420240.3005@ionos> (raw)
In-Reply-To: <20110429115744.GZ3755@atomide.com>

B1;2601;0cOn Fri, 29 Apr 2011, Tony Lindgren wrote:

> * Thomas Gleixner <tglx@linutronix.de> [110423 13:51]:
> > Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> > ---
> >  arch/arm/mach-omap1/time.c               |   62 +--------------------------
> >  arch/arm/mach-omap2/timer-gp.c           |   17 -------
> >  arch/arm/plat-omap/counter_32k.c         |   71 ++-----------------------------
> >  arch/arm/plat-omap/dmtimer.c             |    4 -
> >  arch/arm/plat-omap/include/plat/common.h |    1 
> >  5 files changed, 13 insertions(+), 142 deletions(-)
> 
> This one needs the following patch to compile. Also, this
> fails with following, probably because the clocks are not
> set up at that point.
> 
> Unable to handle kernel NULL pointer dereference at virtual address 00000000
> pgd = c0004000
> [00000000] *pgd=00000000
> Internal error: Oops: 80000005 [#1] SMP
> last sysfs file: 
> Modules linked in:
> CPU: 0    Not tainted  (2.6.39-rc5-00081-gc3dec8c #166)
> PC is at 0x0
> LR is at read_persistent_clock+0x24/0xb4

> The generic code should probably just return 0 until the clocks are
> initialized. Or do you have some other solution for that in mind?

The generic sched_clock implementation returns a jiffies based value
as long as there is no clocksource registered. But the above does not
fail in sched_clock() it fails in read_persistent_clock() which does

        last_cycles = cycles;
        cycles = clocksource_32k.read(&clocksource_32k);

So the following change causes this:

-     .read           = omap_32k_read_dummy,

Which leads to the question why you have a read_persistent_clock() at
all if it always reads 0 via omap_32k_read_dummy ? Or is this meant
just for the resume case? Then the above and the removal of
omap_32k_read_dummy() needs to be undone.

Thanks,

	tglx

  reply	other threads:[~2011-04-29 12:28 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-23 20:54 [patch 00/16] arm: Replace arm sched_clock by clocksource based sched_clock Thomas Gleixner
2011-04-23 20:54 ` [patch 01/16] time: Provide clocksource based sched_clock() Thomas Gleixner
2011-04-23 21:33   ` Stephen Boyd
2011-04-23 21:40     ` Thomas Gleixner
2011-04-25  7:10   ` Kukjin Kim
2011-04-26 16:36   ` Stephen Boyd
2011-04-23 20:54 ` [patch 02/16] arm: plat-orion: Use clocksource based sched_clock Thomas Gleixner
2011-04-23 20:54 ` [patch 03/16] arm: s5p: " Thomas Gleixner
2011-04-23 21:33   ` Stephen Boyd
2011-04-23 21:41     ` Thomas Gleixner
2011-04-25  7:08   ` Kukjin Kim
2011-04-23 20:54 ` [patch 04/16] arm: davinci: " Thomas Gleixner
2011-04-26 15:40   ` Nori, Sekhar
2011-04-23 20:54 ` [patch 05/16] arm: ixp4xx: " Thomas Gleixner
2011-04-23 20:54 ` [patch 06/16] arm: mmp: " Thomas Gleixner
2011-04-23 20:54 ` [patch 07/16] arm: omap: " Thomas Gleixner
2011-04-29 11:57   ` Tony Lindgren
2011-04-29 12:28     ` Thomas Gleixner [this message]
2011-04-29 12:51       ` Tony Lindgren
2011-04-29 14:19         ` Thomas Gleixner
2011-05-02  8:10           ` Tony Lindgren
2011-04-23 20:54 ` [patch 08/16] arm: pxa: " Thomas Gleixner
2011-04-25 16:25   ` Eric
2011-04-26  7:23     ` Sascha Hauer
2011-04-26  7:26       ` Eric Miao
2011-04-23 20:54 ` [patch 09/16] arm: sa1100: " Thomas Gleixner
2011-04-23 20:54 ` [patch 10/16] arm: tegra: " Thomas Gleixner
2011-04-23 20:54 ` [patch 11/16] arm: u300: " Thomas Gleixner
2011-04-24  7:03   ` Linus Walleij
2011-04-23 20:54 ` [patch 12/16] arm: plat-iop: " Thomas Gleixner
2011-04-23 20:54 ` [patch 13/16] arm plat-mxc: " Thomas Gleixner
2011-04-26  7:23   ` Sascha Hauer
2011-04-23 20:54 ` [patch 14/16] arm: nomadik: " Thomas Gleixner
2011-04-24  7:04   ` Linus Walleij
2011-04-23 20:54 ` [patch 15/16] arm: versatile: " Thomas Gleixner
2011-04-23 20:54 ` [patch 16/16] arm: Remove sched_clock code Thomas Gleixner
2011-04-25  7:11   ` Kukjin Kim
2011-04-24  7:27 ` [patch 00/16] arm: Replace arm sched_clock by clocksource based sched_clock Linus Walleij
2011-04-25 19:10   ` john stultz
2011-04-26  7:45     ` Linus Walleij
2011-04-26  8:50       ` Tony Lindgren
2011-04-26  8:02   ` Thomas Gleixner
2011-04-29  9:46 ` Russell King - ARM Linux
2011-04-29 10:22   ` Thomas Gleixner
2011-04-29 10:32     ` Tony Lindgren
2011-04-29 17:01       ` Thomas Gleixner
2011-04-29 21:53         ` Linus Walleij
2011-04-29 21:57           ` Thomas Gleixner
2011-05-02  8:18             ` Tony Lindgren
2011-05-08 20:34             ` Linus Walleij
2011-06-13  2:32 ` Rob Herring

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.LFD.2.02.1104291420240.3005@ionos \
    --to=tglx@linutronix.de \
    --cc=linux-arm-kernel@lists.infradead.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