aboutsummaryrefslogtreecommitdiffstats
path: root/include/acpi/acpi_bus.h
diff options
context:
space:
mode:
authorAndrea Bastoni <bastoni@cs.unc.edu>2011-08-27 09:43:54 -0400
committerAndrea Bastoni <bastoni@cs.unc.edu>2011-08-27 10:06:11 -0400
commit7b1bb388bc879ffcc6c69b567816d5c354afe42b (patch)
tree5a217fdfb0b5e5a327bdcd624506337c1ae1fe32 /include/acpi/acpi_bus.h
parent7d754596756240fa918b94cd0c3011c77a638987 (diff)
parent02f8c6aee8df3cdc935e9bdd4f2d020306035dbe (diff)
Merge 'Linux v3.0' into Litmus
Some notes: * Litmus^RT scheduling class is the topmost scheduling class (above stop_sched_class). * scheduler_ipi() function (e.g., in smp_reschedule_interrupt()) may increase IPI latencies. * Added path into schedule() to quickly re-evaluate scheduling decision without becoming preemptive again. This used to be a standard path before the removal of BKL. Conflicts: Makefile arch/arm/kernel/calls.S arch/arm/kernel/smp.c arch/x86/include/asm/unistd_32.h arch/x86/kernel/smp.c arch/x86/kernel/syscall_table_32.S include/linux/hrtimer.h kernel/printk.c kernel/sched.c kernel/sched_fair.c
Diffstat (limited to 'include/acpi/acpi_bus.h')
-rw-r--r--include/acpi/acpi_bus.h29
1 files changed, 12 insertions, 17 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index 4de84ce3a927..6cd5b6403a7b 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -148,9 +148,7 @@ struct acpi_device_flags {
148 u32 suprise_removal_ok:1; 148 u32 suprise_removal_ok:1;
149 u32 power_manageable:1; 149 u32 power_manageable:1;
150 u32 performance_manageable:1; 150 u32 performance_manageable:1;
151 u32 wake_capable:1; /* Wakeup(_PRW) supported? */ 151 u32 reserved:24;
152 u32 force_power_state:1;
153 u32 reserved:22;
154}; 152};
155 153
156/* File System */ 154/* File System */
@@ -184,7 +182,7 @@ struct acpi_device_pnp {
184 182
185#define acpi_device_bid(d) ((d)->pnp.bus_id) 183#define acpi_device_bid(d) ((d)->pnp.bus_id)
186#define acpi_device_adr(d) ((d)->pnp.bus_address) 184#define acpi_device_adr(d) ((d)->pnp.bus_address)
187char *acpi_device_hid(struct acpi_device *device); 185const char *acpi_device_hid(struct acpi_device *device);
188#define acpi_device_name(d) ((d)->pnp.device_name) 186#define acpi_device_name(d) ((d)->pnp.device_name)
189#define acpi_device_class(d) ((d)->pnp.device_class) 187#define acpi_device_class(d) ((d)->pnp.device_class)
190 188
@@ -212,7 +210,7 @@ struct acpi_device_power_state {
212struct acpi_device_power { 210struct acpi_device_power {
213 int state; /* Current state */ 211 int state; /* Current state */
214 struct acpi_device_power_flags flags; 212 struct acpi_device_power_flags flags;
215 struct acpi_device_power_state states[4]; /* Power states (D0-D3) */ 213 struct acpi_device_power_state states[ACPI_D_STATE_COUNT]; /* Power states (D0-D3Cold) */
216}; 214};
217 215
218/* Performance Management */ 216/* Performance Management */
@@ -242,23 +240,16 @@ struct acpi_device_perf {
242struct acpi_device_wakeup_flags { 240struct acpi_device_wakeup_flags {
243 u8 valid:1; /* Can successfully enable wakeup? */ 241 u8 valid:1; /* Can successfully enable wakeup? */
244 u8 run_wake:1; /* Run-Wake GPE devices */ 242 u8 run_wake:1; /* Run-Wake GPE devices */
245 u8 always_enabled:1; /* Run-wake devices that are always enabled */
246 u8 notifier_present:1; /* Wake-up notify handler has been installed */ 243 u8 notifier_present:1; /* Wake-up notify handler has been installed */
247}; 244};
248 245
249struct acpi_device_wakeup_state {
250 u8 enabled:1;
251};
252
253struct acpi_device_wakeup { 246struct acpi_device_wakeup {
254 acpi_handle gpe_device; 247 acpi_handle gpe_device;
255 u64 gpe_number; 248 u64 gpe_number;
256 u64 sleep_state; 249 u64 sleep_state;
257 struct acpi_handle_list resources; 250 struct acpi_handle_list resources;
258 struct acpi_device_wakeup_state state;
259 struct acpi_device_wakeup_flags flags; 251 struct acpi_device_wakeup_flags flags;
260 int prepare_count; 252 int prepare_count;
261 int run_wake_count;
262}; 253};
263 254
264/* Device */ 255/* Device */
@@ -328,8 +319,8 @@ void acpi_bus_data_handler(acpi_handle handle, void *context);
328acpi_status acpi_bus_get_status_handle(acpi_handle handle, 319acpi_status acpi_bus_get_status_handle(acpi_handle handle,
329 unsigned long long *sta); 320 unsigned long long *sta);
330int acpi_bus_get_status(struct acpi_device *device); 321int acpi_bus_get_status(struct acpi_device *device);
331int acpi_bus_get_power(acpi_handle handle, int *state);
332int acpi_bus_set_power(acpi_handle handle, int state); 322int acpi_bus_set_power(acpi_handle handle, int state);
323int acpi_bus_update_power(acpi_handle handle, int *state_p);
333bool acpi_bus_power_manageable(acpi_handle handle); 324bool acpi_bus_power_manageable(acpi_handle handle);
334bool acpi_bus_can_wakeup(acpi_handle handle); 325bool acpi_bus_can_wakeup(acpi_handle handle);
335#ifdef CONFIG_ACPI_PROC_EVENT 326#ifdef CONFIG_ACPI_PROC_EVENT
@@ -389,21 +380,25 @@ struct acpi_pci_root *acpi_pci_find_root(acpi_handle handle);
389int acpi_enable_wakeup_device_power(struct acpi_device *dev, int state); 380int acpi_enable_wakeup_device_power(struct acpi_device *dev, int state);
390int acpi_disable_wakeup_device_power(struct acpi_device *dev); 381int acpi_disable_wakeup_device_power(struct acpi_device *dev);
391 382
392#ifdef CONFIG_PM_SLEEP 383#ifdef CONFIG_PM
393int acpi_pm_device_sleep_state(struct device *, int *); 384int acpi_pm_device_sleep_state(struct device *, int *);
394int acpi_pm_device_sleep_wake(struct device *, bool); 385#else
395#else /* !CONFIG_PM_SLEEP */
396static inline int acpi_pm_device_sleep_state(struct device *d, int *p) 386static inline int acpi_pm_device_sleep_state(struct device *d, int *p)
397{ 387{
398 if (p) 388 if (p)
399 *p = ACPI_STATE_D0; 389 *p = ACPI_STATE_D0;
400 return ACPI_STATE_D3; 390 return ACPI_STATE_D3;
401} 391}
392#endif
393
394#ifdef CONFIG_PM_SLEEP
395int acpi_pm_device_sleep_wake(struct device *, bool);
396#else
402static inline int acpi_pm_device_sleep_wake(struct device *dev, bool enable) 397static inline int acpi_pm_device_sleep_wake(struct device *dev, bool enable)
403{ 398{
404 return -ENODEV; 399 return -ENODEV;
405} 400}
406#endif /* !CONFIG_PM_SLEEP */ 401#endif
407 402
408#endif /* CONFIG_ACPI */ 403#endif /* CONFIG_ACPI */
409 404