Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: ACPI: hpet: ACPI Error (utglobal-0126): Unknown exception code: 0xFFFFFFF0 ACPI: CONFIG_ACPI_SLEEP=n power off regression in 2.6.23-rc8 (NOT in rc7) ACPI: suspend: build-fix for CONFIG_SUSPEND=n and CONFIG_HIBERNATION=y
This commit is contained in:
commit
1f23f4209f
|
@ -1,5 +1,5 @@
|
||||||
obj-y := wakeup.o
|
obj-y := wakeup.o
|
||||||
obj-$(CONFIG_ACPI_SLEEP) += main.o
|
obj-y += main.o
|
||||||
obj-$(CONFIG_ACPI_SLEEP) += proc.o
|
obj-$(CONFIG_ACPI_SLEEP) += proc.o
|
||||||
|
|
||||||
EXTRA_CFLAGS += $(ACPI_CFLAGS)
|
EXTRA_CFLAGS += $(ACPI_CFLAGS)
|
||||||
|
|
|
@ -24,7 +24,30 @@
|
||||||
|
|
||||||
u8 sleep_states[ACPI_S_STATE_COUNT];
|
u8 sleep_states[ACPI_S_STATE_COUNT];
|
||||||
|
|
||||||
|
#ifdef CONFIG_PM_SLEEP
|
||||||
static u32 acpi_target_sleep_state = ACPI_STATE_S0;
|
static u32 acpi_target_sleep_state = ACPI_STATE_S0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int acpi_sleep_prepare(u32 acpi_state)
|
||||||
|
{
|
||||||
|
#ifdef CONFIG_ACPI_SLEEP
|
||||||
|
/* do we have a wakeup address for S2 and S3? */
|
||||||
|
if (acpi_state == ACPI_STATE_S3) {
|
||||||
|
if (!acpi_wakeup_address) {
|
||||||
|
return -EFAULT;
|
||||||
|
}
|
||||||
|
acpi_set_firmware_waking_vector((acpi_physical_address)
|
||||||
|
virt_to_phys((void *)
|
||||||
|
acpi_wakeup_address));
|
||||||
|
|
||||||
|
}
|
||||||
|
ACPI_FLUSH_CPU_CACHE();
|
||||||
|
acpi_enable_wakeup_device_prep(acpi_state);
|
||||||
|
#endif
|
||||||
|
acpi_gpe_sleep_prepare(acpi_state);
|
||||||
|
acpi_enter_sleep_state_prep(acpi_state);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_SUSPEND
|
#ifdef CONFIG_SUSPEND
|
||||||
static struct pm_ops acpi_pm_ops;
|
static struct pm_ops acpi_pm_ops;
|
||||||
|
@ -60,27 +83,6 @@ static int acpi_pm_set_target(suspend_state_t pm_state)
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
int acpi_sleep_prepare(u32 acpi_state)
|
|
||||||
{
|
|
||||||
#ifdef CONFIG_ACPI_SLEEP
|
|
||||||
/* do we have a wakeup address for S2 and S3? */
|
|
||||||
if (acpi_state == ACPI_STATE_S3) {
|
|
||||||
if (!acpi_wakeup_address) {
|
|
||||||
return -EFAULT;
|
|
||||||
}
|
|
||||||
acpi_set_firmware_waking_vector((acpi_physical_address)
|
|
||||||
virt_to_phys((void *)
|
|
||||||
acpi_wakeup_address));
|
|
||||||
|
|
||||||
}
|
|
||||||
ACPI_FLUSH_CPU_CACHE();
|
|
||||||
acpi_enable_wakeup_device_prep(acpi_state);
|
|
||||||
#endif
|
|
||||||
acpi_gpe_sleep_prepare(acpi_state);
|
|
||||||
acpi_enter_sleep_state_prep(acpi_state);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* acpi_pm_prepare - Do preliminary suspend work.
|
* acpi_pm_prepare - Do preliminary suspend work.
|
||||||
* @pm_state: ignored
|
* @pm_state: ignored
|
||||||
|
@ -299,6 +301,7 @@ int acpi_suspend(u32 acpi_state)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_PM_SLEEP
|
||||||
/**
|
/**
|
||||||
* acpi_pm_device_sleep_state - return preferred power state of ACPI device
|
* acpi_pm_device_sleep_state - return preferred power state of ACPI device
|
||||||
* in the system sleep state given by %acpi_target_sleep_state
|
* in the system sleep state given by %acpi_target_sleep_state
|
||||||
|
@ -373,6 +376,7 @@ int acpi_pm_device_sleep_state(struct device *dev, int wake, int *d_min_p)
|
||||||
*d_min_p = d_min;
|
*d_min_p = d_min;
|
||||||
return d_max;
|
return d_max;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void acpi_power_off_prepare(void)
|
static void acpi_power_off_prepare(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -943,14 +943,14 @@ static acpi_status hpet_resources(struct acpi_resource *res, void *data)
|
||||||
printk(KERN_DEBUG "%s: 0x%lx is busy\n",
|
printk(KERN_DEBUG "%s: 0x%lx is busy\n",
|
||||||
__FUNCTION__, hdp->hd_phys_address);
|
__FUNCTION__, hdp->hd_phys_address);
|
||||||
iounmap(hdp->hd_address);
|
iounmap(hdp->hd_address);
|
||||||
return -EBUSY;
|
return AE_ALREADY_EXISTS;
|
||||||
}
|
}
|
||||||
} else if (res->type == ACPI_RESOURCE_TYPE_FIXED_MEMORY32) {
|
} else if (res->type == ACPI_RESOURCE_TYPE_FIXED_MEMORY32) {
|
||||||
struct acpi_resource_fixed_memory32 *fixmem32;
|
struct acpi_resource_fixed_memory32 *fixmem32;
|
||||||
|
|
||||||
fixmem32 = &res->data.fixed_memory32;
|
fixmem32 = &res->data.fixed_memory32;
|
||||||
if (!fixmem32)
|
if (!fixmem32)
|
||||||
return -EINVAL;
|
return AE_NO_MEMORY;
|
||||||
|
|
||||||
hdp->hd_phys_address = fixmem32->address;
|
hdp->hd_phys_address = fixmem32->address;
|
||||||
hdp->hd_address = ioremap(fixmem32->address,
|
hdp->hd_address = ioremap(fixmem32->address,
|
||||||
|
@ -960,7 +960,7 @@ static acpi_status hpet_resources(struct acpi_resource *res, void *data)
|
||||||
printk(KERN_DEBUG "%s: 0x%lx is busy\n",
|
printk(KERN_DEBUG "%s: 0x%lx is busy\n",
|
||||||
__FUNCTION__, hdp->hd_phys_address);
|
__FUNCTION__, hdp->hd_phys_address);
|
||||||
iounmap(hdp->hd_address);
|
iounmap(hdp->hd_address);
|
||||||
return -EBUSY;
|
return AE_ALREADY_EXISTS;
|
||||||
}
|
}
|
||||||
} else if (res->type == ACPI_RESOURCE_TYPE_EXTENDED_IRQ) {
|
} else if (res->type == ACPI_RESOURCE_TYPE_EXTENDED_IRQ) {
|
||||||
struct acpi_resource_extended_irq *irqp;
|
struct acpi_resource_extended_irq *irqp;
|
||||||
|
|
|
@ -147,10 +147,6 @@ static inline void unregister_hotplug_dock_device(acpi_handle handle)
|
||||||
/*--------------------------------------------------------------------------
|
/*--------------------------------------------------------------------------
|
||||||
Suspend/Resume
|
Suspend/Resume
|
||||||
-------------------------------------------------------------------------- */
|
-------------------------------------------------------------------------- */
|
||||||
#ifdef CONFIG_ACPI_SLEEP
|
|
||||||
extern int acpi_sleep_init(void);
|
extern int acpi_sleep_init(void);
|
||||||
#else
|
|
||||||
static inline int acpi_sleep_init(void) { return 0; }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /*__ACPI_DRIVERS_H__*/
|
#endif /*__ACPI_DRIVERS_H__*/
|
||||||
|
|
Reference in New Issue