Commit 7e318424 authored by Len Brown's avatar Len Brown

Merge branch 'misc' into release

parents 1bd64d42 b1d248d9
...@@ -241,21 +241,6 @@ F: drivers/pnp/pnpacpi/ ...@@ -241,21 +241,6 @@ F: drivers/pnp/pnpacpi/
F: include/linux/acpi.h F: include/linux/acpi.h
F: include/acpi/ F: include/acpi/
ACPI BATTERY DRIVERS
M: Alexey Starikovskiy <astarikovskiy@suse.de>
L: linux-acpi@vger.kernel.org
W: http://www.lesswatts.org/projects/acpi/
S: Supported
F: drivers/acpi/battery.c
F: drivers/acpi/*sbs*
ACPI EC DRIVER
M: Alexey Starikovskiy <astarikovskiy@suse.de>
L: linux-acpi@vger.kernel.org
W: http://www.lesswatts.org/projects/acpi/
S: Supported
F: drivers/acpi/ec.c
ACPI FAN DRIVER ACPI FAN DRIVER
M: Zhang Rui <rui.zhang@intel.com> M: Zhang Rui <rui.zhang@intel.com>
L: linux-acpi@vger.kernel.org L: linux-acpi@vger.kernel.org
......
...@@ -9,7 +9,6 @@ menuconfig ACPI ...@@ -9,7 +9,6 @@ menuconfig ACPI
depends on PCI depends on PCI
depends on PM depends on PM
select PNP select PNP
select CPU_IDLE
default y default y
help help
Advanced Configuration and Power Interface (ACPI) support for Advanced Configuration and Power Interface (ACPI) support for
...@@ -200,6 +199,7 @@ config ACPI_DOCK ...@@ -200,6 +199,7 @@ config ACPI_DOCK
config ACPI_PROCESSOR config ACPI_PROCESSOR
tristate "Processor" tristate "Processor"
select THERMAL select THERMAL
select CPU_IDLE
default y default y
help help
This driver installs ACPI as the idle handler for Linux and uses This driver installs ACPI as the idle handler for Linux and uses
......
...@@ -935,6 +935,12 @@ static int __init acpi_bus_init(void) ...@@ -935,6 +935,12 @@ static int __init acpi_bus_init(void)
goto error1; goto error1;
} }
/*
* _PDC control method may load dynamic SSDT tables,
* and we need to install the table handler before that.
*/
acpi_sysfs_init();
acpi_early_processor_set_pdc(); acpi_early_processor_set_pdc();
/* /*
...@@ -1026,7 +1032,6 @@ static int __init acpi_init(void) ...@@ -1026,7 +1032,6 @@ static int __init acpi_init(void)
acpi_scan_init(); acpi_scan_init();
acpi_ec_init(); acpi_ec_init();
acpi_power_init(); acpi_power_init();
acpi_sysfs_init();
acpi_debugfs_init(); acpi_debugfs_init();
acpi_sleep_proc_init(); acpi_sleep_proc_init();
acpi_wakeup_device_init(); acpi_wakeup_device_init();
......
...@@ -930,7 +930,7 @@ static struct attribute_group dock_attribute_group = { ...@@ -930,7 +930,7 @@ static struct attribute_group dock_attribute_group = {
* allocated and initialize a new dock station device. Find all devices * allocated and initialize a new dock station device. Find all devices
* that are on the dock station, and register for dock event notifications. * that are on the dock station, and register for dock event notifications.
*/ */
static int dock_add(acpi_handle handle) static int __init dock_add(acpi_handle handle)
{ {
int ret, id; int ret, id;
struct dock_station ds, *dock_station; struct dock_station ds, *dock_station;
...@@ -1024,7 +1024,7 @@ static int dock_remove(struct dock_station *ds) ...@@ -1024,7 +1024,7 @@ static int dock_remove(struct dock_station *ds)
* *
* This is called by acpi_walk_namespace to look for dock stations. * This is called by acpi_walk_namespace to look for dock stations.
*/ */
static acpi_status static __init acpi_status
find_dock(acpi_handle handle, u32 lvl, void *context, void **rv) find_dock(acpi_handle handle, u32 lvl, void *context, void **rv)
{ {
if (is_dock(handle)) if (is_dock(handle))
...@@ -1033,7 +1033,7 @@ find_dock(acpi_handle handle, u32 lvl, void *context, void **rv) ...@@ -1033,7 +1033,7 @@ find_dock(acpi_handle handle, u32 lvl, void *context, void **rv)
return AE_OK; return AE_OK;
} }
static acpi_status static __init acpi_status
find_bay(acpi_handle handle, u32 lvl, void *context, void **rv) find_bay(acpi_handle handle, u32 lvl, void *context, void **rv)
{ {
/* If bay is a dock, it's already handled */ /* If bay is a dock, it's already handled */
......
...@@ -874,16 +874,6 @@ void acpi_os_wait_events_complete(void *context) ...@@ -874,16 +874,6 @@ void acpi_os_wait_events_complete(void *context)
EXPORT_SYMBOL(acpi_os_wait_events_complete); EXPORT_SYMBOL(acpi_os_wait_events_complete);
/*
* Allocate the memory for a spinlock and initialize it.
*/
acpi_status acpi_os_create_lock(acpi_spinlock * handle)
{
spin_lock_init(*handle);
return AE_OK;
}
/* /*
* Deallocate the memory for a spinlock. * Deallocate the memory for a spinlock.
*/ */
...@@ -1265,21 +1255,6 @@ int acpi_check_region(resource_size_t start, resource_size_t n, ...@@ -1265,21 +1255,6 @@ int acpi_check_region(resource_size_t start, resource_size_t n,
} }
EXPORT_SYMBOL(acpi_check_region); EXPORT_SYMBOL(acpi_check_region);
int acpi_check_mem_region(resource_size_t start, resource_size_t n,
const char *name)
{
struct resource res = {
.start = start,
.end = start + n - 1,
.name = name,
.flags = IORESOURCE_MEM,
};
return acpi_check_resource_conflict(&res);
}
EXPORT_SYMBOL(acpi_check_mem_region);
/* /*
* Let drivers know whether the resource checks are effective * Let drivers know whether the resource checks are effective
*/ */
......
...@@ -917,6 +917,4 @@ static void __exit acpi_processor_exit(void) ...@@ -917,6 +917,4 @@ static void __exit acpi_processor_exit(void)
module_init(acpi_processor_init); module_init(acpi_processor_init);
module_exit(acpi_processor_exit); module_exit(acpi_processor_exit);
EXPORT_SYMBOL(acpi_processor_set_thermal_limit);
MODULE_ALIAS("processor"); MODULE_ALIAS("processor");
...@@ -44,47 +44,6 @@ ...@@ -44,47 +44,6 @@
#define _COMPONENT ACPI_PROCESSOR_COMPONENT #define _COMPONENT ACPI_PROCESSOR_COMPONENT
ACPI_MODULE_NAME("processor_thermal"); ACPI_MODULE_NAME("processor_thermal");
/* --------------------------------------------------------------------------
Limit Interface
-------------------------------------------------------------------------- */
static int acpi_processor_apply_limit(struct acpi_processor *pr)
{
int result = 0;
u16 px = 0;
u16 tx = 0;
if (!pr)
return -EINVAL;
if (!pr->flags.limit)
return -ENODEV;
if (pr->flags.throttling) {
if (pr->limit.user.tx > tx)
tx = pr->limit.user.tx;
if (pr->limit.thermal.tx > tx)
tx = pr->limit.thermal.tx;
result = acpi_processor_set_throttling(pr, tx, false);
if (result)
goto end;
}
pr->limit.state.px = px;
pr->limit.state.tx = tx;
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"Processor [%d] limit set to (P%d:T%d)\n", pr->id,
pr->limit.state.px, pr->limit.state.tx));
end:
if (result)
printk(KERN_ERR PREFIX "Unable to set limit\n");
return result;
}
#ifdef CONFIG_CPU_FREQ #ifdef CONFIG_CPU_FREQ
/* If a passive cooling situation is detected, primarily CPUfreq is used, as it /* If a passive cooling situation is detected, primarily CPUfreq is used, as it
...@@ -107,36 +66,6 @@ static int cpu_has_cpufreq(unsigned int cpu) ...@@ -107,36 +66,6 @@ static int cpu_has_cpufreq(unsigned int cpu)
return 1; return 1;
} }
static int acpi_thermal_cpufreq_increase(unsigned int cpu)
{
if (!cpu_has_cpufreq(cpu))
return -ENODEV;
if (per_cpu(cpufreq_thermal_reduction_pctg, cpu) <
CPUFREQ_THERMAL_MAX_STEP) {
per_cpu(cpufreq_thermal_reduction_pctg, cpu)++;
cpufreq_update_policy(cpu);
return 0;
}
return -ERANGE;
}
static int acpi_thermal_cpufreq_decrease(unsigned int cpu)
{
if (!cpu_has_cpufreq(cpu))
return -ENODEV;
if (per_cpu(cpufreq_thermal_reduction_pctg, cpu) >
(CPUFREQ_THERMAL_MIN_STEP + 1))
per_cpu(cpufreq_thermal_reduction_pctg, cpu)--;
else
per_cpu(cpufreq_thermal_reduction_pctg, cpu) = 0;
cpufreq_update_policy(cpu);
/* We reached max freq again and can leave passive mode */
return !per_cpu(cpufreq_thermal_reduction_pctg, cpu);
}
static int acpi_thermal_cpufreq_notifier(struct notifier_block *nb, static int acpi_thermal_cpufreq_notifier(struct notifier_block *nb,
unsigned long event, void *data) unsigned long event, void *data)
{ {
...@@ -238,113 +167,6 @@ static int acpi_thermal_cpufreq_decrease(unsigned int cpu) ...@@ -238,113 +167,6 @@ static int acpi_thermal_cpufreq_decrease(unsigned int cpu)
#endif #endif
int acpi_processor_set_thermal_limit(acpi_handle handle, int type)
{
int result = 0;
struct acpi_processor *pr = NULL;
struct acpi_device *device = NULL;
int tx = 0, max_tx_px = 0;
if ((type < ACPI_PROCESSOR_LIMIT_NONE)
|| (type > ACPI_PROCESSOR_LIMIT_DECREMENT))
return -EINVAL;
result = acpi_bus_get_device(handle, &device);
if (result)
return result;
pr = acpi_driver_data(device);
if (!pr)
return -ENODEV;
/* Thermal limits are always relative to the current Px/Tx state. */
if (pr->flags.throttling)
pr->limit.thermal.tx = pr->throttling.state;
/*
* Our default policy is to only use throttling at the lowest
* performance state.
*/
tx = pr->limit.thermal.tx;
switch (type) {
case ACPI_PROCESSOR_LIMIT_NONE:
do {
result = acpi_thermal_cpufreq_decrease(pr->id);
} while (!result);
tx = 0;
break;
case ACPI_PROCESSOR_LIMIT_INCREMENT:
/* if going up: P-states first, T-states later */
result = acpi_thermal_cpufreq_increase(pr->id);
if (!result)
goto end;
else if (result == -ERANGE)
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"At maximum performance state\n"));
if (pr->flags.throttling) {
if (tx == (pr->throttling.state_count - 1))
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"At maximum throttling state\n"));
else
tx++;
}
break;
case ACPI_PROCESSOR_LIMIT_DECREMENT:
/* if going down: T-states first, P-states later */
if (pr->flags.throttling) {
if (tx == 0) {
max_tx_px = 1;
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"At minimum throttling state\n"));
} else {
tx--;
goto end;
}
}
result = acpi_thermal_cpufreq_decrease(pr->id);
if (result) {
/*
* We only could get -ERANGE, 1 or 0.
* In the first two cases we reached max freq again.
*/
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"At minimum performance state\n"));
max_tx_px = 1;
} else
max_tx_px = 0;
break;
}
end:
if (pr->flags.throttling) {
pr->limit.thermal.px = 0;
pr->limit.thermal.tx = tx;
result = acpi_processor_apply_limit(pr);
if (result)
printk(KERN_ERR PREFIX "Unable to set thermal limit\n");
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Thermal limit now (P%d:T%d)\n",
pr->limit.thermal.px, pr->limit.thermal.tx));
} else
result = 0;
if (max_tx_px)
return 1;
else
return result;
}
int acpi_processor_get_limit_info(struct acpi_processor *pr) int acpi_processor_get_limit_info(struct acpi_processor *pr)
{ {
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#include "internal.h" #include "internal.h"
#include "sleep.h" #include "sleep.h"
u8 sleep_states[ACPI_S_STATE_COUNT]; static u8 sleep_states[ACPI_S_STATE_COUNT];
static u32 acpi_target_sleep_state = ACPI_STATE_S0; static u32 acpi_target_sleep_state = ACPI_STATE_S0;
...@@ -419,6 +419,14 @@ static struct dmi_system_id __initdata acpisleep_dmi_table[] = { ...@@ -419,6 +419,14 @@ static struct dmi_system_id __initdata acpisleep_dmi_table[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "Everex StepNote Series"), DMI_MATCH(DMI_PRODUCT_NAME, "Everex StepNote Series"),
}, },
}, },
{
.callback = init_nvs_nosave,
.ident = "Sony Vaio VPCEB1Z1E",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
DMI_MATCH(DMI_PRODUCT_NAME, "VPCEB1Z1E"),
},
},
{}, {},
}; };
#endif /* CONFIG_SUSPEND */ #endif /* CONFIG_SUSPEND */
...@@ -706,7 +714,7 @@ static void acpi_power_off(void) ...@@ -706,7 +714,7 @@ static void acpi_power_off(void)
* paths through the BIOS, so disable _GTS and _BFS by default, * paths through the BIOS, so disable _GTS and _BFS by default,
* but do speak up and offer the option to enable them. * but do speak up and offer the option to enable them.
*/ */
void __init acpi_gts_bfs_check(void) static void __init acpi_gts_bfs_check(void)
{ {
acpi_handle dummy; acpi_handle dummy;
......
extern u8 sleep_states[];
extern int acpi_suspend(u32 state); extern int acpi_suspend(u32 state);
extern void acpi_enable_wakeup_devices(u8 sleep_state); extern void acpi_enable_wakeup_devices(u8 sleep_state);
......
...@@ -115,8 +115,6 @@ void pci_acpi_crs_quirks(void); ...@@ -115,8 +115,6 @@ void pci_acpi_crs_quirks(void);
#define ACPI_PROCESSOR_LIMIT_INCREMENT 0x01 #define ACPI_PROCESSOR_LIMIT_INCREMENT 0x01
#define ACPI_PROCESSOR_LIMIT_DECREMENT 0x02 #define ACPI_PROCESSOR_LIMIT_DECREMENT 0x02
int acpi_processor_set_thermal_limit(acpi_handle handle, int type);
/*-------------------------------------------------------------------------- /*--------------------------------------------------------------------------
Dock Station Dock Station
-------------------------------------------------------------------------- */ -------------------------------------------------------------------------- */
......
...@@ -98,8 +98,6 @@ acpi_os_table_override(struct acpi_table_header *existing_table, ...@@ -98,8 +98,6 @@ acpi_os_table_override(struct acpi_table_header *existing_table,
/* /*
* Spinlock primitives * Spinlock primitives
*/ */
acpi_status acpi_os_create_lock(acpi_spinlock * out_handle);
void acpi_os_delete_lock(acpi_spinlock handle); void acpi_os_delete_lock(acpi_spinlock handle);
acpi_cpu_flags acpi_os_acquire_lock(acpi_spinlock handle); acpi_cpu_flags acpi_os_acquire_lock(acpi_spinlock handle);
......
...@@ -245,8 +245,6 @@ int acpi_check_resource_conflict(const struct resource *res); ...@@ -245,8 +245,6 @@ int acpi_check_resource_conflict(const struct resource *res);
int acpi_check_region(resource_size_t start, resource_size_t n, int acpi_check_region(resource_size_t start, resource_size_t n,
const char *name); const char *name);
int acpi_check_mem_region(resource_size_t start, resource_size_t n,
const char *name);
int acpi_resources_are_enforced(void); int acpi_resources_are_enforced(void);
...@@ -347,12 +345,6 @@ static inline int acpi_check_region(resource_size_t start, resource_size_t n, ...@@ -347,12 +345,6 @@ static inline int acpi_check_region(resource_size_t start, resource_size_t n,
return 0; return 0;
} }
static inline int acpi_check_mem_region(resource_size_t start,
resource_size_t n, const char *name)
{
return 0;
}
struct acpi_table_header; struct acpi_table_header;
static inline int acpi_table_parse(char *id, static inline int acpi_table_parse(char *id,
int (*handler)(struct acpi_table_header *)) int (*handler)(struct acpi_table_header *))
......
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