Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 140542
b: refs/heads/master
c: bc9b83d
h: refs/heads/master
v: v3
  • Loading branch information
Rusty Russell committed Mar 13, 2009
1 parent ca4613f commit 4da31e1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 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: d3d2e7f24384cccedd29a0582ad4b014ac646abc
refs/heads/master: bc9b83dd1f66402b870301c3c7117b9c1484abb4
10 changes: 6 additions & 4 deletions trunk/arch/x86/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -474,12 +474,12 @@ static int __cpuinit check_c1e_idle(const struct cpuinfo_x86 *c)
return 1;
}

static cpumask_t c1e_mask = CPU_MASK_NONE;
static cpumask_var_t c1e_mask;
static int c1e_detected;

void c1e_remove_cpu(int cpu)
{
cpu_clear(cpu, c1e_mask);
cpumask_clear_cpu(cpu, c1e_mask);
}

/*
Expand Down Expand Up @@ -508,8 +508,8 @@ static void c1e_idle(void)
if (c1e_detected) {
int cpu = smp_processor_id();

if (!cpu_isset(cpu, c1e_mask)) {
cpu_set(cpu, c1e_mask);
if (!cpumask_test_cpu(cpu, c1e_mask)) {
cpumask_set_cpu(cpu, c1e_mask);
/*
* Force broadcast so ACPI can not interfere. Needs
* to run with interrupts enabled as it uses
Expand Down Expand Up @@ -556,6 +556,8 @@ void __cpuinit select_idle_routine(const struct cpuinfo_x86 *c)
pm_idle = mwait_idle;
} else if (check_c1e_idle(c)) {
printk(KERN_INFO "using C1E aware idle routine\n");
alloc_cpumask_var(&c1e_mask, GFP_KERNEL);
cpumask_clear(c1e_mask);
pm_idle = c1e_idle;
} else
pm_idle = default_idle;
Expand Down

0 comments on commit 4da31e1

Please sign in to comment.