aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2010-10-26 14:51:00 -0400
committerLen Brown <len.brown@intel.com>2010-10-26 14:51:00 -0400
commit7e31842441776b4d6ec7fd916c91663ad05b7814 (patch)
tree8d97d41b4f6861dcbc0dc3ac96fab7afddbed731
parent1bd64d42abdd4f9d44f77011a31f0292112f4c3b (diff)
parentb1d248d96c71665c79befb81207f38f894c7c082 (diff)
Merge branch 'misc' into release
-rw-r--r--MAINTAINERS15
-rw-r--r--drivers/acpi/Kconfig2
-rw-r--r--drivers/acpi/bus.c7
-rw-r--r--drivers/acpi/dock.c6
-rw-r--r--drivers/acpi/osl.c25
-rw-r--r--drivers/acpi/processor_driver.c2
-rw-r--r--drivers/acpi/processor_thermal.c178
-rw-r--r--drivers/acpi/sleep.c12
-rw-r--r--drivers/acpi/sleep.h1
-rw-r--r--include/acpi/acpi_drivers.h2
-rw-r--r--include/acpi/acpiosxf.h2
-rw-r--r--include/linux/acpi.h8
12 files changed, 20 insertions, 240 deletions
diff --git a/MAINTAINERS b/MAINTAINERS
index f2a2b8e647c5..2a3163e527fe 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -241,21 +241,6 @@ F: drivers/pnp/pnpacpi/
241F: include/linux/acpi.h 241F: include/linux/acpi.h
242F: include/acpi/ 242F: include/acpi/
243 243
244ACPI BATTERY DRIVERS
245M: Alexey Starikovskiy <astarikovskiy@suse.de>
246L: linux-acpi@vger.kernel.org
247W: http://www.lesswatts.org/projects/acpi/
248S: Supported
249F: drivers/acpi/battery.c
250F: drivers/acpi/*sbs*
251
252ACPI EC DRIVER
253M: Alexey Starikovskiy <astarikovskiy@suse.de>
254L: linux-acpi@vger.kernel.org
255W: http://www.lesswatts.org/projects/acpi/
256S: Supported
257F: drivers/acpi/ec.c
258
259ACPI FAN DRIVER 244ACPI FAN DRIVER
260M: Zhang Rui <rui.zhang@intel.com> 245M: Zhang Rui <rui.zhang@intel.com>
261L: linux-acpi@vger.kernel.org 246L: linux-acpi@vger.kernel.org
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index 0f9de2b44c0c..3f3489c5ca8c 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -9,7 +9,6 @@ menuconfig ACPI
9 depends on PCI 9 depends on PCI
10 depends on PM 10 depends on PM
11 select PNP 11 select PNP
12 select CPU_IDLE
13 default y 12 default y
14 help 13 help
15 Advanced Configuration and Power Interface (ACPI) support for 14 Advanced Configuration and Power Interface (ACPI) support for
@@ -200,6 +199,7 @@ config ACPI_DOCK
200config ACPI_PROCESSOR 199config ACPI_PROCESSOR
201 tristate "Processor" 200 tristate "Processor"
202 select THERMAL 201 select THERMAL
202 select CPU_IDLE
203 default y 203 default y
204 help 204 help
205 This driver installs ACPI as the idle handler for Linux and uses 205 This driver installs ACPI as the idle handler for Linux and uses
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index 310e3b9749cb..d68bd61072bb 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -935,6 +935,12 @@ static int __init acpi_bus_init(void)
935 goto error1; 935 goto error1;
936 } 936 }
937 937
938 /*
939 * _PDC control method may load dynamic SSDT tables,
940 * and we need to install the table handler before that.
941 */
942 acpi_sysfs_init();
943
938 acpi_early_processor_set_pdc(); 944 acpi_early_processor_set_pdc();
939 945
940 /* 946 /*
@@ -1026,7 +1032,6 @@ static int __init acpi_init(void)
1026 acpi_scan_init(); 1032 acpi_scan_init();
1027 acpi_ec_init(); 1033 acpi_ec_init();
1028 acpi_power_init(); 1034 acpi_power_init();
1029 acpi_sysfs_init();
1030 acpi_debugfs_init(); 1035 acpi_debugfs_init();
1031 acpi_sleep_proc_init(); 1036 acpi_sleep_proc_init();
1032 acpi_wakeup_device_init(); 1037 acpi_wakeup_device_init();
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c
index 44f99bd83741..81514a4918cc 100644
--- a/drivers/acpi/dock.c
+++ b/drivers/acpi/dock.c
@@ -930,7 +930,7 @@ static struct attribute_group dock_attribute_group = {
930 * allocated and initialize a new dock station device. Find all devices 930 * allocated and initialize a new dock station device. Find all devices
931 * that are on the dock station, and register for dock event notifications. 931 * that are on the dock station, and register for dock event notifications.
932 */ 932 */
933static int dock_add(acpi_handle handle) 933static int __init dock_add(acpi_handle handle)
934{ 934{
935 int ret, id; 935 int ret, id;
936 struct dock_station ds, *dock_station; 936 struct dock_station ds, *dock_station;
@@ -1024,7 +1024,7 @@ static int dock_remove(struct dock_station *ds)
1024 * 1024 *
1025 * This is called by acpi_walk_namespace to look for dock stations. 1025 * This is called by acpi_walk_namespace to look for dock stations.
1026 */ 1026 */
1027static acpi_status 1027static __init acpi_status
1028find_dock(acpi_handle handle, u32 lvl, void *context, void **rv) 1028find_dock(acpi_handle handle, u32 lvl, void *context, void **rv)
1029{ 1029{
1030 if (is_dock(handle)) 1030 if (is_dock(handle))
@@ -1033,7 +1033,7 @@ find_dock(acpi_handle handle, u32 lvl, void *context, void **rv)
1033 return AE_OK; 1033 return AE_OK;
1034} 1034}
1035 1035
1036static acpi_status 1036static __init acpi_status
1037find_bay(acpi_handle handle, u32 lvl, void *context, void **rv) 1037find_bay(acpi_handle handle, u32 lvl, void *context, void **rv)
1038{ 1038{
1039 /* If bay is a dock, it's already handled */ 1039 /* If bay is a dock, it's already handled */
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 0c2e445410ab..966feddf6b1b 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -875,16 +875,6 @@ void acpi_os_wait_events_complete(void *context)
875EXPORT_SYMBOL(acpi_os_wait_events_complete); 875EXPORT_SYMBOL(acpi_os_wait_events_complete);
876 876
877/* 877/*
878 * Allocate the memory for a spinlock and initialize it.
879 */
880acpi_status acpi_os_create_lock(acpi_spinlock * handle)
881{
882 spin_lock_init(*handle);
883
884 return AE_OK;
885}
886
887/*
888 * Deallocate the memory for a spinlock. 878 * Deallocate the memory for a spinlock.
889 */ 879 */
890void acpi_os_delete_lock(acpi_spinlock handle) 880void acpi_os_delete_lock(acpi_spinlock handle)
@@ -1265,21 +1255,6 @@ int acpi_check_region(resource_size_t start, resource_size_t n,
1265} 1255}
1266EXPORT_SYMBOL(acpi_check_region); 1256EXPORT_SYMBOL(acpi_check_region);
1267 1257
1268int acpi_check_mem_region(resource_size_t start, resource_size_t n,
1269 const char *name)
1270{
1271 struct resource res = {
1272 .start = start,
1273 .end = start + n - 1,
1274 .name = name,
1275 .flags = IORESOURCE_MEM,
1276 };
1277
1278 return acpi_check_resource_conflict(&res);
1279
1280}
1281EXPORT_SYMBOL(acpi_check_mem_region);
1282
1283/* 1258/*
1284 * Let drivers know whether the resource checks are effective 1259 * Let drivers know whether the resource checks are effective
1285 */ 1260 */
diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c
index 356c320bdd08..85e48047d7b0 100644
--- a/drivers/acpi/processor_driver.c
+++ b/drivers/acpi/processor_driver.c
@@ -917,6 +917,4 @@ static void __exit acpi_processor_exit(void)
917module_init(acpi_processor_init); 917module_init(acpi_processor_init);
918module_exit(acpi_processor_exit); 918module_exit(acpi_processor_exit);
919 919
920EXPORT_SYMBOL(acpi_processor_set_thermal_limit);
921
922MODULE_ALIAS("processor"); 920MODULE_ALIAS("processor");
diff --git a/drivers/acpi/processor_thermal.c b/drivers/acpi/processor_thermal.c
index 953b25fb9869..fde49b9b1d99 100644
--- a/drivers/acpi/processor_thermal.c
+++ b/drivers/acpi/processor_thermal.c
@@ -44,47 +44,6 @@
44#define _COMPONENT ACPI_PROCESSOR_COMPONENT 44#define _COMPONENT ACPI_PROCESSOR_COMPONENT
45ACPI_MODULE_NAME("processor_thermal"); 45ACPI_MODULE_NAME("processor_thermal");
46 46
47/* --------------------------------------------------------------------------
48 Limit Interface
49 -------------------------------------------------------------------------- */
50static int acpi_processor_apply_limit(struct acpi_processor *pr)
51{
52 int result = 0;
53 u16 px = 0;
54 u16 tx = 0;
55
56
57 if (!pr)
58 return -EINVAL;
59
60 if (!pr->flags.limit)
61 return -ENODEV;
62
63 if (pr->flags.throttling) {
64 if (pr->limit.user.tx > tx)
65 tx = pr->limit.user.tx;
66 if (pr->limit.thermal.tx > tx)
67 tx = pr->limit.thermal.tx;
68
69 result = acpi_processor_set_throttling(pr, tx, false);
70 if (result)
71 goto end;
72 }
73
74 pr->limit.state.px = px;
75 pr->limit.state.tx = tx;
76
77 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
78 "Processor [%d] limit set to (P%d:T%d)\n", pr->id,
79 pr->limit.state.px, pr->limit.state.tx));
80
81 end:
82 if (result)
83 printk(KERN_ERR PREFIX "Unable to set limit\n");
84
85 return result;
86}
87
88#ifdef CONFIG_CPU_FREQ 47#ifdef CONFIG_CPU_FREQ
89 48
90/* If a passive cooling situation is detected, primarily CPUfreq is used, as it 49/* 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 return 1; 66 return 1;
108} 67}
109 68
110static int acpi_thermal_cpufreq_increase(unsigned int cpu)
111{
112 if (!cpu_has_cpufreq(cpu))
113 return -ENODEV;
114
115 if (per_cpu(cpufreq_thermal_reduction_pctg, cpu) <
116 CPUFREQ_THERMAL_MAX_STEP) {
117 per_cpu(cpufreq_thermal_reduction_pctg, cpu)++;
118 cpufreq_update_policy(cpu);
119 return 0;
120 }
121
122 return -ERANGE;
123}
124
125static int acpi_thermal_cpufreq_decrease(unsigned int cpu)
126{
127 if (!cpu_has_cpufreq(cpu))
128 return -ENODEV;
129
130 if (per_cpu(cpufreq_thermal_reduction_pctg, cpu) >
131 (CPUFREQ_THERMAL_MIN_STEP + 1))
132 per_cpu(cpufreq_thermal_reduction_pctg, cpu)--;
133 else
134 per_cpu(cpufreq_thermal_reduction_pctg, cpu) = 0;
135 cpufreq_update_policy(cpu);
136 /* We reached max freq again and can leave passive mode */
137 return !per_cpu(cpufreq_thermal_reduction_pctg, cpu);
138}
139
140static int acpi_thermal_cpufreq_notifier(struct notifier_block *nb, 69static int acpi_thermal_cpufreq_notifier(struct notifier_block *nb,
141 unsigned long event, void *data) 70 unsigned long event, void *data)
142{ 71{
@@ -238,113 +167,6 @@ static int acpi_thermal_cpufreq_decrease(unsigned int cpu)
238 167
239#endif 168#endif
240 169
241int acpi_processor_set_thermal_limit(acpi_handle handle, int type)
242{
243 int result = 0;
244 struct acpi_processor *pr = NULL;
245 struct acpi_device *device = NULL;
246 int tx = 0, max_tx_px = 0;
247
248
249 if ((type < ACPI_PROCESSOR_LIMIT_NONE)
250 || (type > ACPI_PROCESSOR_LIMIT_DECREMENT))
251 return -EINVAL;
252
253 result = acpi_bus_get_device(handle, &device);
254 if (result)
255 return result;
256
257 pr = acpi_driver_data(device);
258 if (!pr)
259 return -ENODEV;
260
261 /* Thermal limits are always relative to the current Px/Tx state. */
262 if (pr->flags.throttling)
263 pr->limit.thermal.tx = pr->throttling.state;
264
265 /*
266 * Our default policy is to only use throttling at the lowest
267 * performance state.
268 */
269
270 tx = pr->limit.thermal.tx;
271
272 switch (type) {
273
274 case ACPI_PROCESSOR_LIMIT_NONE:
275 do {
276 result = acpi_thermal_cpufreq_decrease(pr->id);
277 } while (!result);
278 tx = 0;
279 break;
280
281 case ACPI_PROCESSOR_LIMIT_INCREMENT:
282 /* if going up: P-states first, T-states later */
283
284 result = acpi_thermal_cpufreq_increase(pr->id);
285 if (!result)
286 goto end;
287 else if (result == -ERANGE)
288 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
289 "At maximum performance state\n"));
290
291 if (pr->flags.throttling) {
292 if (tx == (pr->throttling.state_count - 1))
293 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
294 "At maximum throttling state\n"));
295 else
296 tx++;
297 }
298 break;
299
300 case ACPI_PROCESSOR_LIMIT_DECREMENT:
301 /* if going down: T-states first, P-states later */
302
303 if (pr->flags.throttling) {
304 if (tx == 0) {
305 max_tx_px = 1;
306 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
307 "At minimum throttling state\n"));
308 } else {
309 tx--;
310 goto end;
311 }
312 }
313
314 result = acpi_thermal_cpufreq_decrease(pr->id);
315 if (result) {
316 /*
317 * We only could get -ERANGE, 1 or 0.
318 * In the first two cases we reached max freq again.
319 */
320 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
321 "At minimum performance state\n"));
322 max_tx_px = 1;
323 } else
324 max_tx_px = 0;
325
326 break;
327 }
328
329 end:
330 if (pr->flags.throttling) {
331 pr->limit.thermal.px = 0;
332 pr->limit.thermal.tx = tx;
333
334 result = acpi_processor_apply_limit(pr);
335 if (result)
336 printk(KERN_ERR PREFIX "Unable to set thermal limit\n");
337
338 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Thermal limit now (P%d:T%d)\n",
339 pr->limit.thermal.px, pr->limit.thermal.tx));
340 } else
341 result = 0;
342 if (max_tx_px)
343 return 1;
344 else
345 return result;
346}
347
348int acpi_processor_get_limit_info(struct acpi_processor *pr) 170int acpi_processor_get_limit_info(struct acpi_processor *pr)
349{ 171{
350 172
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
index e807f4196f89..721d93b3ceee 100644
--- a/drivers/acpi/sleep.c
+++ b/drivers/acpi/sleep.c
@@ -25,7 +25,7 @@
25#include "internal.h" 25#include "internal.h"
26#include "sleep.h" 26#include "sleep.h"
27 27
28u8 sleep_states[ACPI_S_STATE_COUNT]; 28static u8 sleep_states[ACPI_S_STATE_COUNT];
29 29
30static u32 acpi_target_sleep_state = ACPI_STATE_S0; 30static u32 acpi_target_sleep_state = ACPI_STATE_S0;
31 31
@@ -419,6 +419,14 @@ static struct dmi_system_id __initdata acpisleep_dmi_table[] = {
419 DMI_MATCH(DMI_PRODUCT_NAME, "Everex StepNote Series"), 419 DMI_MATCH(DMI_PRODUCT_NAME, "Everex StepNote Series"),
420 }, 420 },
421 }, 421 },
422 {
423 .callback = init_nvs_nosave,
424 .ident = "Sony Vaio VPCEB1Z1E",
425 .matches = {
426 DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
427 DMI_MATCH(DMI_PRODUCT_NAME, "VPCEB1Z1E"),
428 },
429 },
422 {}, 430 {},
423}; 431};
424#endif /* CONFIG_SUSPEND */ 432#endif /* CONFIG_SUSPEND */
@@ -706,7 +714,7 @@ static void acpi_power_off(void)
706 * paths through the BIOS, so disable _GTS and _BFS by default, 714 * paths through the BIOS, so disable _GTS and _BFS by default,
707 * but do speak up and offer the option to enable them. 715 * but do speak up and offer the option to enable them.
708 */ 716 */
709void __init acpi_gts_bfs_check(void) 717static void __init acpi_gts_bfs_check(void)
710{ 718{
711 acpi_handle dummy; 719 acpi_handle dummy;
712 720
diff --git a/drivers/acpi/sleep.h b/drivers/acpi/sleep.h
index d8821805c3bc..74d59c8f4678 100644
--- a/drivers/acpi/sleep.h
+++ b/drivers/acpi/sleep.h
@@ -1,5 +1,4 @@
1 1
2extern u8 sleep_states[];
3extern int acpi_suspend(u32 state); 2extern int acpi_suspend(u32 state);
4 3
5extern void acpi_enable_wakeup_devices(u8 sleep_state); 4extern void acpi_enable_wakeup_devices(u8 sleep_state);
diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h
index 23d78b4d088b..3090471b2a5e 100644
--- a/include/acpi/acpi_drivers.h
+++ b/include/acpi/acpi_drivers.h
@@ -115,8 +115,6 @@ void pci_acpi_crs_quirks(void);
115#define ACPI_PROCESSOR_LIMIT_INCREMENT 0x01 115#define ACPI_PROCESSOR_LIMIT_INCREMENT 0x01
116#define ACPI_PROCESSOR_LIMIT_DECREMENT 0x02 116#define ACPI_PROCESSOR_LIMIT_DECREMENT 0x02
117 117
118int acpi_processor_set_thermal_limit(acpi_handle handle, int type);
119
120/*-------------------------------------------------------------------------- 118/*--------------------------------------------------------------------------
121 Dock Station 119 Dock Station
122 -------------------------------------------------------------------------- */ 120 -------------------------------------------------------------------------- */
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h
index 43027432a055..65b3f5888f42 100644
--- a/include/acpi/acpiosxf.h
+++ b/include/acpi/acpiosxf.h
@@ -98,8 +98,6 @@ acpi_os_table_override(struct acpi_table_header *existing_table,
98/* 98/*
99 * Spinlock primitives 99 * Spinlock primitives
100 */ 100 */
101acpi_status acpi_os_create_lock(acpi_spinlock * out_handle);
102
103void acpi_os_delete_lock(acpi_spinlock handle); 101void acpi_os_delete_lock(acpi_spinlock handle);
104 102
105acpi_cpu_flags acpi_os_acquire_lock(acpi_spinlock handle); 103acpi_cpu_flags acpi_os_acquire_lock(acpi_spinlock handle);
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 7774e6d8fddd..050a7bccb836 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -245,8 +245,6 @@ int acpi_check_resource_conflict(const struct resource *res);
245 245
246int acpi_check_region(resource_size_t start, resource_size_t n, 246int acpi_check_region(resource_size_t start, resource_size_t n,
247 const char *name); 247 const char *name);
248int acpi_check_mem_region(resource_size_t start, resource_size_t n,
249 const char *name);
250 248
251int acpi_resources_are_enforced(void); 249int acpi_resources_are_enforced(void);
252 250
@@ -347,12 +345,6 @@ static inline int acpi_check_region(resource_size_t start, resource_size_t n,
347 return 0; 345 return 0;
348} 346}
349 347
350static inline int acpi_check_mem_region(resource_size_t start,
351 resource_size_t n, const char *name)
352{
353 return 0;
354}
355
356struct acpi_table_header; 348struct acpi_table_header;
357static inline int acpi_table_parse(char *id, 349static inline int acpi_table_parse(char *id,
358 int (*handler)(struct acpi_table_header *)) 350 int (*handler)(struct acpi_table_header *))