aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-07-26 17:28:55 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-07-26 17:28:55 -0400
commit476525004ac7e2f990b6956efcd44d0780c2ab4c (patch)
tree158cd2bbfb232b4f4327b6c20a4e14c6b095a438 /include/linux
parentbd22dc17e49973d3d4925970260e9e37f7580a9f (diff)
parentec033d0a02901551346b9f43f8ff9bad51378891 (diff)
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux
Pull ACPI & power management update from Len Brown: "Re-write of the turbostat tool. lower overhead was necessary for measuring very large system when they are very idle. IVB support in intel_idle It's what I run on my IVB, others should be able to also:-) ACPICA core update We have found some bugs due to divergence between Linux and the upstream ACPICA base. Most of these patches are to reduce that divergence to reduce the risk of future bugs. Some cpuidle updates, mostly for non-Intel More will be coming, as they depend on this part. Some thermal management changes needed by non-ACPI systems. Some _OST (OS Status Indication) updates for hot ACPI hot-plug." * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: (51 commits) Thermal: Documentation update Thermal: Add Hysteresis attributes Thermal: Make Thermal trip points writeable ACPI/AC: prevent OOPS on some boxes due to missing check power_supply_register() return value check tools/power: turbostat: fix large c1% issue tools/power: turbostat v2 - re-write for efficiency ACPICA: Update to version 20120711 ACPICA: AcpiSrc: Fix some translation issues for Linux conversion ACPICA: Update header files copyrights to 2012 ACPICA: Add new ACPI table load/unload external interfaces ACPICA: Split file: tbxface.c -> tbxfload.c ACPICA: Add PCC address space to space ID decode function ACPICA: Fix some comment fields ACPICA: Table manager: deploy new firmware error/warning interfaces ACPICA: Add new interfaces for BIOS(firmware) errors and warnings ACPICA: Split exception code utilities to a new file, utexcep.c ACPI: acpi_pad: tune round_robin_time ACPICA: Update to version 20120620 ACPICA: Add support for implicit notify on multiple devices ACPICA: Update comments; no functional change ...
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/acpi.h40
-rw-r--r--include/linux/cpuidle.h11
-rw-r--r--include/linux/platform_data/spear_thermal.h26
-rw-r--r--include/linux/thermal.h20
4 files changed, 67 insertions, 30 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index f421dd84f29..b2b4d2ad710 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -277,7 +277,7 @@ acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context);
277#define OSC_SB_PAD_SUPPORT 1 277#define OSC_SB_PAD_SUPPORT 1
278#define OSC_SB_PPC_OST_SUPPORT 2 278#define OSC_SB_PPC_OST_SUPPORT 2
279#define OSC_SB_PR3_SUPPORT 4 279#define OSC_SB_PR3_SUPPORT 4
280#define OSC_SB_CPUHP_OST_SUPPORT 8 280#define OSC_SB_HOTPLUG_OST_SUPPORT 8
281#define OSC_SB_APEI_SUPPORT 16 281#define OSC_SB_APEI_SUPPORT 16
282 282
283extern bool osc_sb_apei_support_acked; 283extern bool osc_sb_apei_support_acked;
@@ -309,6 +309,44 @@ extern bool osc_sb_apei_support_acked;
309 309
310extern acpi_status acpi_pci_osc_control_set(acpi_handle handle, 310extern acpi_status acpi_pci_osc_control_set(acpi_handle handle,
311 u32 *mask, u32 req); 311 u32 *mask, u32 req);
312
313/* Enable _OST when all relevant hotplug operations are enabled */
314#if defined(CONFIG_ACPI_HOTPLUG_CPU) && \
315 (defined(CONFIG_ACPI_HOTPLUG_MEMORY) || \
316 defined(CONFIG_ACPI_HOTPLUG_MEMORY_MODULE)) && \
317 (defined(CONFIG_ACPI_CONTAINER) || \
318 defined(CONFIG_ACPI_CONTAINER_MODULE))
319#define ACPI_HOTPLUG_OST
320#endif
321
322/* _OST Source Event Code (OSPM Action) */
323#define ACPI_OST_EC_OSPM_SHUTDOWN 0x100
324#define ACPI_OST_EC_OSPM_EJECT 0x103
325#define ACPI_OST_EC_OSPM_INSERTION 0x200
326
327/* _OST General Processing Status Code */
328#define ACPI_OST_SC_SUCCESS 0x0
329#define ACPI_OST_SC_NON_SPECIFIC_FAILURE 0x1
330#define ACPI_OST_SC_UNRECOGNIZED_NOTIFY 0x2
331
332/* _OST OS Shutdown Processing (0x100) Status Code */
333#define ACPI_OST_SC_OS_SHUTDOWN_DENIED 0x80
334#define ACPI_OST_SC_OS_SHUTDOWN_IN_PROGRESS 0x81
335#define ACPI_OST_SC_OS_SHUTDOWN_COMPLETED 0x82
336#define ACPI_OST_SC_OS_SHUTDOWN_NOT_SUPPORTED 0x83
337
338/* _OST Ejection Request (0x3, 0x103) Status Code */
339#define ACPI_OST_SC_EJECT_NOT_SUPPORTED 0x80
340#define ACPI_OST_SC_DEVICE_IN_USE 0x81
341#define ACPI_OST_SC_DEVICE_BUSY 0x82
342#define ACPI_OST_SC_EJECT_DEPENDENCY_BUSY 0x83
343#define ACPI_OST_SC_EJECT_IN_PROGRESS 0x84
344
345/* _OST Insertion Request (0x200) Status Code */
346#define ACPI_OST_SC_INSERT_IN_PROGRESS 0x80
347#define ACPI_OST_SC_DRIVER_LOAD_FAILURE 0x81
348#define ACPI_OST_SC_INSERT_NOT_SUPPORTED 0x82
349
312extern void acpi_early_init(void); 350extern void acpi_early_init(void);
313 351
314extern int acpi_nvs_register(__u64 start, __u64 size); 352extern int acpi_nvs_register(__u64 start, __u64 size);
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h
index 89dcd30ac8e..040b13b5c14 100644
--- a/include/linux/cpuidle.h
+++ b/include/linux/cpuidle.h
@@ -58,6 +58,7 @@ struct cpuidle_state {
58 58
59/* Idle State Flags */ 59/* Idle State Flags */
60#define CPUIDLE_FLAG_TIME_VALID (0x01) /* is residency time measurable? */ 60#define CPUIDLE_FLAG_TIME_VALID (0x01) /* is residency time measurable? */
61#define CPUIDLE_FLAG_COUPLED (0x02) /* state applies to multiple cpus */
61 62
62#define CPUIDLE_DRIVER_FLAGS_MASK (0xFFFF0000) 63#define CPUIDLE_DRIVER_FLAGS_MASK (0xFFFF0000)
63 64
@@ -101,6 +102,12 @@ struct cpuidle_device {
101 struct list_head device_list; 102 struct list_head device_list;
102 struct kobject kobj; 103 struct kobject kobj;
103 struct completion kobj_unregister; 104 struct completion kobj_unregister;
105
106#ifdef CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED
107 int safe_state_index;
108 cpumask_t coupled_cpus;
109 struct cpuidle_coupled *coupled;
110#endif
104}; 111};
105 112
106DECLARE_PER_CPU(struct cpuidle_device *, cpuidle_devices); 113DECLARE_PER_CPU(struct cpuidle_device *, cpuidle_devices);
@@ -185,6 +192,10 @@ static inline int cpuidle_play_dead(void) {return -ENODEV; }
185 192
186#endif 193#endif
187 194
195#ifdef CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED
196void cpuidle_coupled_parallel_barrier(struct cpuidle_device *dev, atomic_t *a);
197#endif
198
188/****************************** 199/******************************
189 * CPUIDLE GOVERNOR INTERFACE * 200 * CPUIDLE GOVERNOR INTERFACE *
190 ******************************/ 201 ******************************/
diff --git a/include/linux/platform_data/spear_thermal.h b/include/linux/platform_data/spear_thermal.h
deleted file mode 100644
index 724f2e1cbbc..00000000000
--- a/include/linux/platform_data/spear_thermal.h
+++ /dev/null
@@ -1,26 +0,0 @@
1/*
2 * SPEAr thermal driver platform data.
3 *
4 * Copyright (C) 2011-2012 ST Microelectronics
5 * Author: Vincenzo Frascino <vincenzo.frascino@st.com>
6 *
7 * This software is licensed under the terms of the GNU General Public
8 * License version 2, as published by the Free Software Foundation, and
9 * may be copied, distributed, and modified under those terms.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 */
17#ifndef SPEAR_THERMAL_H
18#define SPEAR_THERMAL_H
19
20/* SPEAr Thermal Sensor Platform Data */
21struct spear_thermal_pdata {
22 /* flags used to enable thermal sensor */
23 unsigned int thermal_flags;
24};
25
26#endif /* SPEAR_THERMAL_H */
diff --git a/include/linux/thermal.h b/include/linux/thermal.h
index 796f1ff0388..cfc8d908892 100644
--- a/include/linux/thermal.h
+++ b/include/linux/thermal.h
@@ -58,6 +58,12 @@ struct thermal_zone_device_ops {
58 enum thermal_trip_type *); 58 enum thermal_trip_type *);
59 int (*get_trip_temp) (struct thermal_zone_device *, int, 59 int (*get_trip_temp) (struct thermal_zone_device *, int,
60 unsigned long *); 60 unsigned long *);
61 int (*set_trip_temp) (struct thermal_zone_device *, int,
62 unsigned long);
63 int (*get_trip_hyst) (struct thermal_zone_device *, int,
64 unsigned long *);
65 int (*set_trip_hyst) (struct thermal_zone_device *, int,
66 unsigned long);
61 int (*get_crit_temp) (struct thermal_zone_device *, unsigned long *); 67 int (*get_crit_temp) (struct thermal_zone_device *, unsigned long *);
62 int (*notify) (struct thermal_zone_device *, int, 68 int (*notify) (struct thermal_zone_device *, int,
63 enum thermal_trip_type); 69 enum thermal_trip_type);
@@ -85,10 +91,18 @@ struct thermal_cooling_device {
85 ((long)t-2732+5)/10 : ((long)t-2732-5)/10) 91 ((long)t-2732+5)/10 : ((long)t-2732-5)/10)
86#define CELSIUS_TO_KELVIN(t) ((t)*10+2732) 92#define CELSIUS_TO_KELVIN(t) ((t)*10+2732)
87 93
94struct thermal_attr {
95 struct device_attribute attr;
96 char name[THERMAL_NAME_LENGTH];
97};
98
88struct thermal_zone_device { 99struct thermal_zone_device {
89 int id; 100 int id;
90 char type[THERMAL_NAME_LENGTH]; 101 char type[THERMAL_NAME_LENGTH];
91 struct device device; 102 struct device device;
103 struct thermal_attr *trip_temp_attrs;
104 struct thermal_attr *trip_type_attrs;
105 struct thermal_attr *trip_hyst_attrs;
92 void *devdata; 106 void *devdata;
93 int trips; 107 int trips;
94 int tc1; 108 int tc1;
@@ -137,9 +151,9 @@ enum {
137}; 151};
138#define THERMAL_GENL_CMD_MAX (__THERMAL_GENL_CMD_MAX - 1) 152#define THERMAL_GENL_CMD_MAX (__THERMAL_GENL_CMD_MAX - 1)
139 153
140struct thermal_zone_device *thermal_zone_device_register(char *, int, void *, 154struct thermal_zone_device *thermal_zone_device_register(char *, int, int,
141 const struct thermal_zone_device_ops *, int tc1, int tc2, 155 void *, const struct thermal_zone_device_ops *, int tc1,
142 int passive_freq, int polling_freq); 156 int tc2, int passive_freq, int polling_freq);
143void thermal_zone_device_unregister(struct thermal_zone_device *); 157void thermal_zone_device_unregister(struct thermal_zone_device *);
144 158
145int thermal_zone_bind_cooling_device(struct thermal_zone_device *, int, 159int thermal_zone_bind_cooling_device(struct thermal_zone_device *, int,