Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 331488
b: refs/heads/master
c: a42c362
h: refs/heads/master
v: v3
  • Loading branch information
Russell King committed Sep 15, 2012
1 parent aff95ee commit 9a8c770
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a67e1ce145785d884b29b17e4d82a6ecd67bb97a
refs/heads/master: a42c362980430be74b77ec8f374964f61062379f
8 changes: 8 additions & 0 deletions trunk/arch/arm/kernel/sched_clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <linux/init.h>
#include <linux/jiffies.h>
#include <linux/kernel.h>
#include <linux/moduleparam.h>
#include <linux/sched.h>
#include <linux/syscore_ops.h>
#include <linux/timer.h>
Expand All @@ -25,6 +26,9 @@ struct clock_data {

static void sched_clock_poll(unsigned long wrap_ticks);
static DEFINE_TIMER(sched_clock_timer, sched_clock_poll, 0, 0);
static int irqtime = -1;

core_param(irqtime, irqtime, int, 0400);

static struct clock_data cd = {
.mult = NSEC_PER_SEC / HZ,
Expand Down Expand Up @@ -145,6 +149,10 @@ void __init setup_sched_clock(u32 (*read)(void), int bits, unsigned long rate)
*/
cd.epoch_ns = 0;

/* Enable IRQ time accounting if we have a fast enough sched_clock */
if (irqtime > 0 || (irqtime == -1 && rate >= 1000000))
enable_sched_clock_irqtime();

pr_debug("Registered %pF as sched_clock source\n", read);
}

Expand Down

0 comments on commit 9a8c770

Please sign in to comment.