Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 161381
b: refs/heads/master
c: 86886e5
h: refs/heads/master
i:
  161379: 26c6d1c
v: v3
  • Loading branch information
Joseph Cihula authored and H. Peter Anvin committed Jul 21, 2009
1 parent d2d721f commit 40e2811
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 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: 840c2baf2d4cdf35ecc3b7fcbba7740f97de30a4
refs/heads/master: 86886e55b273f565935491816c7c96b82469d4f8
2 changes: 2 additions & 0 deletions trunk/arch/x86/kernel/smpboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
#include <asm/vmi.h>
#include <asm/apic.h>
#include <asm/setup.h>
#include <asm/tboot.h>
#include <asm/uv/uv.h>
#include <linux/mc146818rtc.h>

Expand Down Expand Up @@ -1317,6 +1318,7 @@ void play_dead_common(void)
void native_play_dead(void)
{
play_dead_common();
tboot_shutdown(TB_SHUTDOWN_WFS);
wbinvd_halt();
}

Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/acpi/acpica/hwsleep.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
#include <acpi/acpi.h>
#include "accommon.h"
#include "actables.h"
#include <asm/tboot.h>

#define _COMPONENT ACPI_HARDWARE
ACPI_MODULE_NAME("hwsleep")
Expand Down Expand Up @@ -342,6 +343,8 @@ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state)

ACPI_FLUSH_CPU_CACHE();

tboot_sleep(sleep_state, pm1a_control, pm1b_control);

/* Write #2: Write both SLP_TYP + SLP_EN */

status = acpi_hw_write_pm1_control(pm1a_control, pm1b_control);
Expand Down
7 changes: 6 additions & 1 deletion trunk/kernel/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <linux/kthread.h>
#include <linux/stop_machine.h>
#include <linux/mutex.h>
#include <asm/tboot.h>

#ifdef CONFIG_SMP
/* Serializes the updates to cpu_online_mask, cpu_present_mask */
Expand Down Expand Up @@ -376,7 +377,7 @@ static cpumask_var_t frozen_cpus;

int disable_nonboot_cpus(void)
{
int cpu, first_cpu, error;
int cpu, first_cpu, error, num_cpus = 0;

error = stop_machine_create();
if (error)
Expand All @@ -391,6 +392,7 @@ int disable_nonboot_cpus(void)
for_each_online_cpu(cpu) {
if (cpu == first_cpu)
continue;
num_cpus++;
error = _cpu_down(cpu, 1);
if (!error) {
cpumask_set_cpu(cpu, frozen_cpus);
Expand All @@ -401,6 +403,9 @@ int disable_nonboot_cpus(void)
break;
}
}
/* ensure all CPUs have gone into wait-for-SIPI */
error |= tboot_wait_for_aps(num_cpus);

if (!error) {
BUG_ON(num_online_cpus() > 1);
/* Make sure the CPUs won't be enabled by someone else */
Expand Down

0 comments on commit 40e2811

Please sign in to comment.