Commit 632f2e90 authored by Patrick Mochel's avatar Patrick Mochel

[acpi] Fix CONFIG_ACPI_HT dependencies. Again.

Hyperthreading is a Pentium 4-specific feature. It should only depend on 
whether the user has configured P4 support in. 
parents 76e8b3a4 da94d134
......@@ -6,7 +6,7 @@ menu "ACPI (Advanced Configuration and Power Interface) Support"
config ACPI_HT
bool "ACPI Processor Enumeration for HT"
depends on X86
depends on MPENTIUM4
default y
---help---
ACPI enumerates both logical (a.k.a. Hyper-Threaded -- HT)
......@@ -30,7 +30,7 @@ config ACPI
bool "Full ACPI Support"
depends on !X86_VISWS
depends on !IA64_HP_SIM
depends on IA64 || (X86 && ACPI_HT)
depends on IA64 || (X86 || ACPI_HT)
default y
---help---
Advanced Configuration and Power Interface (ACPI) support for
......
This diff is collapsed.
......@@ -13,80 +13,12 @@
#include "sleep.h"
#define ACPI_SYSTEM_FILE_SLEEP "sleep"
#define ACPI_SYSTEM_FILE_ALARM "alarm"
#define _COMPONENT ACPI_SYSTEM_COMPONENT
ACPI_MODULE_NAME ("sleep")
static int acpi_system_sleep_seq_show(struct seq_file *seq, void *offset)
{
int i;
ACPI_FUNCTION_TRACE("acpi_system_sleep_seq_show");
for (i = 0; i <= ACPI_STATE_S5; i++) {
if (sleep_states[i]) {
seq_printf(seq,"S%d ", i);
if (i == ACPI_STATE_S4 && acpi_gbl_FACS->S4bios_f)
seq_printf(seq, "S4bios ");
}
}
seq_puts(seq, "\n");
return 0;
}
static int acpi_system_sleep_open_fs(struct inode *inode, struct file *file)
{
return single_open(file, acpi_system_sleep_seq_show, PDE(inode)->data);
}
static int
acpi_system_write_sleep (
struct file *file,
const char *buffer,
size_t count,
loff_t *ppos)
{
acpi_status status = AE_ERROR;
char state_string[12] = {'\0'};
u32 state = 0;
ACPI_FUNCTION_TRACE("acpi_system_write_sleep");
if (count > sizeof(state_string) - 1)
goto Done;
if (copy_from_user(state_string, buffer, count))
return_VALUE(-EFAULT);
state_string[count] = '\0';
state = simple_strtoul(state_string, NULL, 0);
if (state < 1 || state > 4)
goto Done;
if (!sleep_states[state])
goto Done;
#ifdef CONFIG_SOFTWARE_SUSPEND
if (state == 4) {
software_suspend();
goto Done;
}
#endif
status = acpi_suspend(state);
Done:
if (ACPI_FAILURE(status))
return_VALUE(-EINVAL);
else
return_VALUE(count);
}
static int acpi_system_alarm_seq_show(struct seq_file *seq, void *offset)
{
u32 sec, min, hr;
......@@ -362,14 +294,6 @@ acpi_system_write_alarm (
}
static struct file_operations acpi_system_sleep_fops = {
.open = acpi_system_sleep_open_fs,
.read = seq_read,
.write = acpi_system_write_sleep,
.llseek = seq_lseek,
.release = single_release,
};
static struct file_operations acpi_system_alarm_fops = {
.open = acpi_system_alarm_open_fs,
.read = seq_read,
......@@ -383,12 +307,6 @@ static int acpi_sleep_proc_init(void)
{
struct proc_dir_entry *entry = NULL;
/* 'sleep' [R/W]*/
entry = create_proc_entry(ACPI_SYSTEM_FILE_SLEEP,
S_IFREG|S_IRUGO|S_IWUSR, acpi_root_dir);
if (entry)
entry->proc_fops = &acpi_system_sleep_fops;
/* 'alarm' [R/W] */
entry = create_proc_entry(ACPI_SYSTEM_FILE_ALARM,
S_IFREG|S_IRUGO|S_IWUSR, acpi_root_dir);
......
......@@ -76,6 +76,7 @@ int device_pm_add(struct device * dev)
pr_debug("PM: Adding info for %s:%s\n",
dev->bus ? dev->bus->name : "No Bus", dev->kobj.name);
atomic_set(&dev->power.pm_users,0);
down(&dpm_sem);
list_add_tail(&dev->power.entry,&dpm_active);
device_pm_set_parent(dev,dev->parent);
......
......@@ -186,9 +186,46 @@ static inline void pm_dev_idle(struct pm_dev *dev) {}
#endif /* CONFIG_PM */
/*
* Callbacks for platform drivers to implement.
*/
extern void (*pm_idle)(void);
extern void (*pm_power_off)(void);
enum {
PM_SUSPEND_ON,
PM_SUSPEND_STANDBY,
PM_SUSPEND_MEM,
PM_SUSPEND_DISK,
PM_SUSPEND_MAX,
};
enum {
PM_DISK_FIRMWARE = 1,
PM_DISK_PLATFORM,
PM_DISK_SHUTDOWN,
PM_DISK_REBOOT,
PM_DISK_MAX,
};
struct pm_ops {
u32 pm_disk_mode;
int (*prepare)(u32 state);
int (*enter)(u32 state);
int (*finish)(u32 state);
};
extern void pm_set_ops(struct pm_ops *);
extern int pm_suspend(u32 state);
/*
* Device power management
*/
struct device;
struct dev_pm_info {
......
This diff is collapsed.
......@@ -7,3 +7,33 @@
#if defined(CONFIG_VT) && defined(CONFIG_VT_CONSOLE)
#define SUSPEND_CONSOLE (MAX_NR_CONSOLES-1)
#endif
#ifdef CONFIG_SOFTWARE_SUSPEND
extern int swsusp_save(void);
extern int swsusp_write(void);
extern int swsusp_read(void);
extern int swsusp_restore(void);
extern int swsusp_free(void);
#else
static inline int swsusp_save(void)
{
return 0;
}
static inline int swsusp_write(void)
{
return 0;
}
static inline int swsusp_read(void)
{
return 0;
}
static inline int swsusp_restore(void)
{
return 0;
}
static inline int swsusp_free(void)
{
return 0;
}
#endif
......@@ -1062,6 +1062,56 @@ static int software_resume(void)
late_initcall(software_resume);
/**
* swsusp_save - Snapshot memory
*/
int swsusp_save(void)
{
return -EPERM;
}
/**
* swsusp_write - Write saved memory image to swap.
*/
int swsusp_write(void)
{
return 0;
}
/**
* swsusp_read - Read saved image from swap.
*/
int swsusp_read(void)
{
return -ENOENT;
}
/**
* swsusp_restore - Replace running kernel with saved image.
*/
int swsusp_restore(void)
{
return 0;
}
/**
* swsusp_free - Free memory allocated to hold snapshot.
*/
int swsusp_free(void)
{
return 0;
}
static int __init resume_setup(char *str)
{
strncpy( resume_file, str, 255 );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment