Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 109976
b: refs/heads/master
c: 4faac97
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Gleixner committed Sep 23, 2008
1 parent 20da3b3 commit 13c4219
Show file tree
Hide file tree
Showing 5 changed files with 14 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: 6441402b1f173fa38e561d3cee7c01c32e5281ad
refs/heads/master: 4faac97d44ac27bdbb010a9c3597401a8f89341f
11 changes: 8 additions & 3 deletions trunk/arch/x86/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,16 +246,21 @@ static int __cpuinit check_c1e_idle(const struct cpuinfo_x86 *c)
return 1;
}

static cpumask_t c1e_mask = CPU_MASK_NONE;
static int c1e_detected;

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

/*
* C1E aware idle routine. We check for C1E active in the interrupt
* pending message MSR. If we detect C1E, then we handle it the same
* way as C3 power states (local apic timer and TSC stop)
*/
static void c1e_idle(void)
{
static cpumask_t c1e_mask = CPU_MASK_NONE;
static int c1e_detected;

if (need_resched())
return;

Expand Down
1 change: 1 addition & 0 deletions trunk/arch/x86/kernel/process_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ static void cpu_exit_clear(void)
cpu_clear(cpu, cpu_callin_map);

numa_remove_cpu(cpu);
c1e_remove_cpu(cpu);
}

/* We don't actually take CPU down, just spin without interrupts. */
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/x86/kernel/process_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ DECLARE_PER_CPU(int, cpu_state);
static inline void play_dead(void)
{
idle_task_exit();
c1e_remove_cpu(raw_smp_processor_id());

mb();
/* Ack it */
__get_cpu_var(cpu_state) = CPU_DEAD;
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/asm-x86/idle.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ void idle_notifier_register(struct notifier_block *n);
void enter_idle(void);
void exit_idle(void);

void c1e_remove_cpu(int cpu);

#endif

0 comments on commit 13c4219

Please sign in to comment.