Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 35981
b: refs/heads/master
c: 66aea99
h: refs/heads/master
i:
  35979: 84c0839
v: v3
  • Loading branch information
Dmitriy Zavin authored and Andi Kleen committed Sep 26, 2006
1 parent c604980 commit d46c234
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 15d5f8398311f565682959daaca30e3ca7aea600
refs/heads/master: 66aea9913cf435fe92ebb7bf869b4f15901ab993
7 changes: 4 additions & 3 deletions trunk/arch/i386/kernel/cpu/mcheck/therm_throt.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/* How long to wait between reporting thermal events */
#define CHECK_INTERVAL (300 * HZ)

static DEFINE_PER_CPU(unsigned long, next_check);
static DEFINE_PER_CPU(__u64, next_check);

/***
* therm_throt_process - Process thermal throttling event
Expand All @@ -39,11 +39,12 @@ static DEFINE_PER_CPU(unsigned long, next_check);
int therm_throt_process(int curr)
{
unsigned int cpu = smp_processor_id();
__u64 tmp_jiffs = get_jiffies_64();

if (time_before(jiffies, __get_cpu_var(next_check)))
if (time_before64(tmp_jiffs, __get_cpu_var(next_check)))
return 0;

__get_cpu_var(next_check) = jiffies + CHECK_INTERVAL;
__get_cpu_var(next_check) = tmp_jiffs + CHECK_INTERVAL;

/* if we just entered the thermal event */
if (curr) {
Expand Down

0 comments on commit d46c234

Please sign in to comment.