diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/acpi/acpi_bus.h | 12 | ||||
| -rw-r--r-- | include/acpi/acpixf.h | 20 | ||||
| -rw-r--r-- | include/acpi/actypes.h | 52 | ||||
| -rw-r--r-- | include/acpi/processor.h | 6 | ||||
| -rw-r--r-- | include/linux/acpi.h | 10 | ||||
| -rw-r--r-- | include/linux/cper.h | 86 | ||||
| -rw-r--r-- | include/linux/ipmi.h | 38 | ||||
| -rw-r--r-- | include/linux/ipmi_smi.h | 8 | ||||
| -rw-r--r-- | include/linux/suspend.h | 17 | ||||
| -rw-r--r-- | include/linux/thermal.h | 47 |
10 files changed, 230 insertions, 66 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 359ef11725a6..78ca429929f7 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 */ |
| @@ -242,20 +240,14 @@ struct acpi_device_perf { | |||
| 242 | struct acpi_device_wakeup_flags { | 240 | struct 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 | ||
| 249 | struct acpi_device_wakeup_state { | ||
| 250 | u8 enabled:1; | ||
| 251 | }; | ||
| 252 | |||
| 253 | struct acpi_device_wakeup { | 246 | struct 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; | 253 | int run_wake_count; |
| @@ -328,8 +320,8 @@ void acpi_bus_data_handler(acpi_handle handle, void *context); | |||
| 328 | acpi_status acpi_bus_get_status_handle(acpi_handle handle, | 320 | acpi_status acpi_bus_get_status_handle(acpi_handle handle, |
| 329 | unsigned long long *sta); | 321 | unsigned long long *sta); |
| 330 | int acpi_bus_get_status(struct acpi_device *device); | 322 | int acpi_bus_get_status(struct acpi_device *device); |
| 331 | int acpi_bus_get_power(acpi_handle handle, int *state); | ||
| 332 | int acpi_bus_set_power(acpi_handle handle, int state); | 323 | int acpi_bus_set_power(acpi_handle handle, int state); |
| 324 | int acpi_bus_update_power(acpi_handle handle, int *state_p); | ||
| 333 | bool acpi_bus_power_manageable(acpi_handle handle); | 325 | bool acpi_bus_power_manageable(acpi_handle handle); |
| 334 | bool acpi_bus_can_wakeup(acpi_handle handle); | 326 | bool acpi_bus_can_wakeup(acpi_handle handle); |
| 335 | #ifdef CONFIG_ACPI_PROC_EVENT | 327 | #ifdef CONFIG_ACPI_PROC_EVENT |
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 53b7cfd924a3..241b8a04c83c 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h | |||
| @@ -47,7 +47,7 @@ | |||
| 47 | 47 | ||
| 48 | /* Current ACPICA subsystem version in YYYYMMDD format */ | 48 | /* Current ACPICA subsystem version in YYYYMMDD format */ |
| 49 | 49 | ||
| 50 | #define ACPI_CA_VERSION 0x20101013 | 50 | #define ACPI_CA_VERSION 0x20101209 |
| 51 | 51 | ||
| 52 | #include "actypes.h" | 52 | #include "actypes.h" |
| 53 | #include "actbl.h" | 53 | #include "actbl.h" |
| @@ -229,6 +229,10 @@ acpi_status | |||
| 229 | acpi_install_initialization_handler(acpi_init_handler handler, u32 function); | 229 | acpi_install_initialization_handler(acpi_init_handler handler, u32 function); |
| 230 | 230 | ||
| 231 | acpi_status | 231 | acpi_status |
| 232 | acpi_install_global_event_handler(ACPI_GBL_EVENT_HANDLER handler, | ||
| 233 | void *context); | ||
| 234 | |||
| 235 | acpi_status | ||
| 232 | acpi_install_fixed_event_handler(u32 acpi_event, | 236 | acpi_install_fixed_event_handler(u32 acpi_event, |
| 233 | acpi_event_handler handler, void *context); | 237 | acpi_event_handler handler, void *context); |
| 234 | 238 | ||
| @@ -258,11 +262,11 @@ acpi_remove_address_space_handler(acpi_handle device, | |||
| 258 | acpi_status | 262 | acpi_status |
| 259 | acpi_install_gpe_handler(acpi_handle gpe_device, | 263 | acpi_install_gpe_handler(acpi_handle gpe_device, |
| 260 | u32 gpe_number, | 264 | u32 gpe_number, |
| 261 | u32 type, acpi_event_handler address, void *context); | 265 | u32 type, acpi_gpe_handler address, void *context); |
| 262 | 266 | ||
| 263 | acpi_status | 267 | acpi_status |
| 264 | acpi_remove_gpe_handler(acpi_handle gpe_device, | 268 | acpi_remove_gpe_handler(acpi_handle gpe_device, |
| 265 | u32 gpe_number, acpi_event_handler address); | 269 | u32 gpe_number, acpi_gpe_handler address); |
| 266 | 270 | ||
| 267 | #ifdef ACPI_FUTURE_USAGE | 271 | #ifdef ACPI_FUTURE_USAGE |
| 268 | acpi_status acpi_install_exception_handler(acpi_exception_handler handler); | 272 | acpi_status acpi_install_exception_handler(acpi_exception_handler handler); |
| @@ -292,11 +296,13 @@ acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number); | |||
| 292 | 296 | ||
| 293 | acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number); | 297 | acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number); |
| 294 | 298 | ||
| 295 | acpi_status acpi_gpe_can_wake(acpi_handle gpe_device, u32 gpe_number); | ||
| 296 | |||
| 297 | acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number); | 299 | acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number); |
| 298 | 300 | ||
| 299 | acpi_status acpi_gpe_wakeup(acpi_handle gpe_device, u32 gpe_number, u8 action); | 301 | acpi_status |
| 302 | acpi_setup_gpe_for_wake(acpi_handle parent_device, | ||
| 303 | acpi_handle gpe_device, u32 gpe_number); | ||
| 304 | |||
| 305 | acpi_status acpi_set_gpe_wake_mask(acpi_handle gpe_device, u32 gpe_number, u8 action); | ||
| 300 | 306 | ||
| 301 | acpi_status | 307 | acpi_status |
| 302 | acpi_get_gpe_status(acpi_handle gpe_device, | 308 | acpi_get_gpe_status(acpi_handle gpe_device, |
| @@ -315,7 +321,7 @@ acpi_install_gpe_block(acpi_handle gpe_device, | |||
| 315 | 321 | ||
| 316 | acpi_status acpi_remove_gpe_block(acpi_handle gpe_device); | 322 | acpi_status acpi_remove_gpe_block(acpi_handle gpe_device); |
| 317 | 323 | ||
| 318 | acpi_status acpi_update_gpes(void); | 324 | acpi_status acpi_update_all_gpes(void); |
| 319 | 325 | ||
| 320 | /* | 326 | /* |
| 321 | * Resource interfaces | 327 | * Resource interfaces |
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index 2b134b691e34..939a431a6ab6 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h | |||
| @@ -656,33 +656,34 @@ typedef u32 acpi_event_status; | |||
| 656 | #define ACPI_GPE_MAX 0xFF | 656 | #define ACPI_GPE_MAX 0xFF |
| 657 | #define ACPI_NUM_GPE 256 | 657 | #define ACPI_NUM_GPE 256 |
| 658 | 658 | ||
| 659 | /* Actions for acpi_gpe_wakeup, acpi_hw_low_set_gpe */ | 659 | /* Actions for acpi_set_gpe_wake_mask, acpi_hw_low_set_gpe */ |
| 660 | 660 | ||
| 661 | #define ACPI_GPE_ENABLE 0 | 661 | #define ACPI_GPE_ENABLE 0 |
| 662 | #define ACPI_GPE_DISABLE 1 | 662 | #define ACPI_GPE_DISABLE 1 |
| 663 | #define ACPI_GPE_COND_ENABLE 2 | 663 | #define ACPI_GPE_CONDITIONAL_ENABLE 2 |
| 664 | 664 | ||
| 665 | /* | 665 | /* |
| 666 | * GPE info flags - Per GPE | 666 | * GPE info flags - Per GPE |
| 667 | * +-------+---+-+-+ | 667 | * +-------+-+-+---+ |
| 668 | * | 7:4 |3:2|1|0| | 668 | * | 7:4 |3|2|1:0| |
| 669 | * +-------+---+-+-+ | 669 | * +-------+-+-+---+ |
| 670 | * | | | | | 670 | * | | | | |
| 671 | * | | | +--- Interrupt type: edge or level triggered | 671 | * | | | +-- Type of dispatch:to method, handler, notify, or none |
| 672 | * | | +----- GPE can wake the system | 672 | * | | +----- Interrupt type: edge or level triggered |
| 673 | * | +-------- Type of dispatch:to method, handler, or none | 673 | * | +------- Is a Wake GPE |
| 674 | * +-------------- <Reserved> | 674 | * +------------ <Reserved> |
| 675 | */ | 675 | */ |
| 676 | #define ACPI_GPE_XRUPT_TYPE_MASK (u8) 0x01 | 676 | #define ACPI_GPE_DISPATCH_NONE (u8) 0x00 |
| 677 | #define ACPI_GPE_LEVEL_TRIGGERED (u8) 0x01 | 677 | #define ACPI_GPE_DISPATCH_METHOD (u8) 0x01 |
| 678 | #define ACPI_GPE_EDGE_TRIGGERED (u8) 0x00 | 678 | #define ACPI_GPE_DISPATCH_HANDLER (u8) 0x02 |
| 679 | #define ACPI_GPE_DISPATCH_NOTIFY (u8) 0x03 | ||
| 680 | #define ACPI_GPE_DISPATCH_MASK (u8) 0x03 | ||
| 679 | 681 | ||
| 680 | #define ACPI_GPE_CAN_WAKE (u8) 0x02 | 682 | #define ACPI_GPE_LEVEL_TRIGGERED (u8) 0x04 |
| 683 | #define ACPI_GPE_EDGE_TRIGGERED (u8) 0x00 | ||
| 684 | #define ACPI_GPE_XRUPT_TYPE_MASK (u8) 0x04 | ||
| 681 | 685 | ||
| 682 | #define ACPI_GPE_DISPATCH_MASK (u8) 0x0C | 686 | #define ACPI_GPE_CAN_WAKE (u8) 0x08 |
| 683 | #define ACPI_GPE_DISPATCH_HANDLER (u8) 0x04 | ||
| 684 | #define ACPI_GPE_DISPATCH_METHOD (u8) 0x08 | ||
| 685 | #define ACPI_GPE_DISPATCH_NOT_USED (u8) 0x00 | ||
| 686 | 687 | ||
| 687 | /* | 688 | /* |
| 688 | * Flags for GPE and Lock interfaces | 689 | * Flags for GPE and Lock interfaces |
| @@ -894,9 +895,20 @@ typedef void | |||
| 894 | /* | 895 | /* |
| 895 | * Various handlers and callback procedures | 896 | * Various handlers and callback procedures |
| 896 | */ | 897 | */ |
| 898 | typedef | ||
| 899 | void (*ACPI_GBL_EVENT_HANDLER) (u32 event_type, | ||
| 900 | acpi_handle device, | ||
| 901 | u32 event_number, void *context); | ||
| 902 | |||
| 903 | #define ACPI_EVENT_TYPE_GPE 0 | ||
| 904 | #define ACPI_EVENT_TYPE_FIXED 1 | ||
| 905 | |||
| 897 | typedef u32(*acpi_event_handler) (void *context); | 906 | typedef u32(*acpi_event_handler) (void *context); |
| 898 | 907 | ||
| 899 | typedef | 908 | typedef |
| 909 | u32 (*acpi_gpe_handler) (acpi_handle gpe_device, u32 gpe_number, void *context); | ||
| 910 | |||
| 911 | typedef | ||
| 900 | void (*acpi_notify_handler) (acpi_handle device, u32 value, void *context); | 912 | void (*acpi_notify_handler) (acpi_handle device, u32 value, void *context); |
| 901 | 913 | ||
| 902 | typedef | 914 | typedef |
| @@ -951,6 +963,10 @@ u32 (*acpi_interface_handler) (acpi_string interface_name, u32 supported); | |||
| 951 | #define ACPI_INTERRUPT_NOT_HANDLED 0x00 | 963 | #define ACPI_INTERRUPT_NOT_HANDLED 0x00 |
| 952 | #define ACPI_INTERRUPT_HANDLED 0x01 | 964 | #define ACPI_INTERRUPT_HANDLED 0x01 |
| 953 | 965 | ||
| 966 | /* GPE handler return values */ | ||
| 967 | |||
| 968 | #define ACPI_REENABLE_GPE 0x80 | ||
| 969 | |||
| 954 | /* Length of 32-bit EISAID values when converted back to a string */ | 970 | /* Length of 32-bit EISAID values when converted back to a string */ |
| 955 | 971 | ||
| 956 | #define ACPI_EISAID_STRING_SIZE 8 /* Includes null terminator */ | 972 | #define ACPI_EISAID_STRING_SIZE 8 /* Includes null terminator */ |
diff --git a/include/acpi/processor.h b/include/acpi/processor.h index 1b62102fbb67..55192ac0cede 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h | |||
| @@ -324,6 +324,12 @@ int acpi_processor_tstate_has_changed(struct acpi_processor *pr); | |||
| 324 | int acpi_processor_get_throttling_info(struct acpi_processor *pr); | 324 | int acpi_processor_get_throttling_info(struct acpi_processor *pr); |
| 325 | extern int acpi_processor_set_throttling(struct acpi_processor *pr, | 325 | extern int acpi_processor_set_throttling(struct acpi_processor *pr, |
| 326 | int state, bool force); | 326 | int state, bool force); |
| 327 | /* | ||
| 328 | * Reevaluate whether the T-state is invalid after one cpu is | ||
| 329 | * onlined/offlined. In such case the flags.throttling will be updated. | ||
| 330 | */ | ||
| 331 | extern void acpi_processor_reevaluate_tstate(struct acpi_processor *pr, | ||
| 332 | unsigned long action); | ||
| 327 | extern const struct file_operations acpi_processor_throttling_fops; | 333 | extern const struct file_operations acpi_processor_throttling_fops; |
| 328 | extern void acpi_processor_throttling_init(void); | 334 | extern void acpi_processor_throttling_init(void); |
| 329 | /* in processor_idle.c */ | 335 | /* in processor_idle.c */ |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 67c91b4418b0..eb176bb1b15b 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
| @@ -352,4 +352,14 @@ static inline int acpi_table_parse(char *id, | |||
| 352 | return -1; | 352 | return -1; |
| 353 | } | 353 | } |
| 354 | #endif /* !CONFIG_ACPI */ | 354 | #endif /* !CONFIG_ACPI */ |
| 355 | |||
| 356 | #ifdef CONFIG_ACPI_SLEEP | ||
| 357 | int suspend_nvs_register(unsigned long start, unsigned long size); | ||
| 358 | #else | ||
| 359 | static inline int suspend_nvs_register(unsigned long a, unsigned long b) | ||
| 360 | { | ||
| 361 | return 0; | ||
| 362 | } | ||
| 363 | #endif | ||
| 364 | |||
| 355 | #endif /*_LINUX_ACPI_H*/ | 365 | #endif /*_LINUX_ACPI_H*/ |
diff --git a/include/linux/cper.h b/include/linux/cper.h index bf972f81e2a7..3104aaff5dd0 100644 --- a/include/linux/cper.h +++ b/include/linux/cper.h | |||
| @@ -39,10 +39,12 @@ | |||
| 39 | * Severity difinition for error_severity in struct cper_record_header | 39 | * Severity difinition for error_severity in struct cper_record_header |
| 40 | * and section_severity in struct cper_section_descriptor | 40 | * and section_severity in struct cper_section_descriptor |
| 41 | */ | 41 | */ |
| 42 | #define CPER_SEV_RECOVERABLE 0x0 | 42 | enum { |
| 43 | #define CPER_SEV_FATAL 0x1 | 43 | CPER_SEV_RECOVERABLE, |
| 44 | #define CPER_SEV_CORRECTED 0x2 | 44 | CPER_SEV_FATAL, |
| 45 | #define CPER_SEV_INFORMATIONAL 0x3 | 45 | CPER_SEV_CORRECTED, |
| 46 | CPER_SEV_INFORMATIONAL, | ||
| 47 | }; | ||
| 46 | 48 | ||
| 47 | /* | 49 | /* |
| 48 | * Validation bits difinition for validation_bits in struct | 50 | * Validation bits difinition for validation_bits in struct |
| @@ -201,6 +203,47 @@ | |||
| 201 | UUID_LE(0x036F84E1, 0x7F37, 0x428c, 0xA7, 0x9E, 0x57, 0x5F, \ | 203 | UUID_LE(0x036F84E1, 0x7F37, 0x428c, 0xA7, 0x9E, 0x57, 0x5F, \ |
| 202 | 0xDF, 0xAA, 0x84, 0xEC) | 204 | 0xDF, 0xAA, 0x84, 0xEC) |
| 203 | 205 | ||
| 206 | #define CPER_PROC_VALID_TYPE 0x0001 | ||
| 207 | #define CPER_PROC_VALID_ISA 0x0002 | ||
| 208 | #define CPER_PROC_VALID_ERROR_TYPE 0x0004 | ||
| 209 | #define CPER_PROC_VALID_OPERATION 0x0008 | ||
| 210 | #define CPER_PROC_VALID_FLAGS 0x0010 | ||
| 211 | #define CPER_PROC_VALID_LEVEL 0x0020 | ||
| 212 | #define CPER_PROC_VALID_VERSION 0x0040 | ||
| 213 | #define CPER_PROC_VALID_BRAND_INFO 0x0080 | ||
| 214 | #define CPER_PROC_VALID_ID 0x0100 | ||
| 215 | #define CPER_PROC_VALID_TARGET_ADDRESS 0x0200 | ||
| 216 | #define CPER_PROC_VALID_REQUESTOR_ID 0x0400 | ||
| 217 | #define CPER_PROC_VALID_RESPONDER_ID 0x0800 | ||
| 218 | #define CPER_PROC_VALID_IP 0x1000 | ||
| 219 | |||
| 220 | #define CPER_MEM_VALID_ERROR_STATUS 0x0001 | ||
| 221 | #define CPER_MEM_VALID_PHYSICAL_ADDRESS 0x0002 | ||
| 222 | #define CPER_MEM_VALID_PHYSICAL_ADDRESS_MASK 0x0004 | ||
| 223 | #define CPER_MEM_VALID_NODE 0x0008 | ||
| 224 | #define CPER_MEM_VALID_CARD 0x0010 | ||
| 225 | #define CPER_MEM_VALID_MODULE 0x0020 | ||
| 226 | #define CPER_MEM_VALID_BANK 0x0040 | ||
| 227 | #define CPER_MEM_VALID_DEVICE 0x0080 | ||
| 228 | #define CPER_MEM_VALID_ROW 0x0100 | ||
| 229 | #define CPER_MEM_VALID_COLUMN 0x0200 | ||
| 230 | #define CPER_MEM_VALID_BIT_POSITION 0x0400 | ||
| 231 | #define CPER_MEM_VALID_REQUESTOR_ID 0x0800 | ||
| 232 | #define CPER_MEM_VALID_RESPONDER_ID 0x1000 | ||
| 233 | #define CPER_MEM_VALID_TARGET_ID 0x2000 | ||
| 234 | #define CPER_MEM_VALID_ERROR_TYPE 0x4000 | ||
| 235 | |||
| 236 | #define CPER_PCIE_VALID_PORT_TYPE 0x0001 | ||
| 237 | #define CPER_PCIE_VALID_VERSION 0x0002 | ||
| 238 | #define CPER_PCIE_VALID_COMMAND_STATUS 0x0004 | ||
| 239 | #define CPER_PCIE_VALID_DEVICE_ID 0x0008 | ||
| 240 | #define CPER_PCIE_VALID_SERIAL_NUMBER 0x0010 | ||
| 241 | #define CPER_PCIE_VALID_BRIDGE_CONTROL_STATUS 0x0020 | ||
| 242 | #define CPER_PCIE_VALID_CAPABILITY 0x0040 | ||
| 243 | #define CPER_PCIE_VALID_AER_INFO 0x0080 | ||
| 244 | |||
| 245 | #define CPER_PCIE_SLOT_SHIFT 3 | ||
| 246 | |||
| 204 | /* | 247 | /* |
| 205 | * All tables and structs must be byte-packed to match CPER | 248 | * All tables and structs must be byte-packed to match CPER |
| 206 | * specification, since the tables are provided by the system BIOS | 249 | * specification, since the tables are provided by the system BIOS |
| @@ -306,6 +349,41 @@ struct cper_sec_mem_err { | |||
| 306 | __u8 error_type; | 349 | __u8 error_type; |
| 307 | }; | 350 | }; |
| 308 | 351 | ||
| 352 | struct cper_sec_pcie { | ||
| 353 | __u64 validation_bits; | ||
| 354 | __u32 port_type; | ||
| 355 | struct { | ||
| 356 | __u8 minor; | ||
| 357 | __u8 major; | ||
| 358 | __u8 reserved[2]; | ||
| 359 | } version; | ||
| 360 | __u16 command; | ||
| 361 | __u16 status; | ||
| 362 | __u32 reserved; | ||
| 363 | struct { | ||
| 364 | __u16 vendor_id; | ||
| 365 | __u16 device_id; | ||
| 366 | __u8 class_code[3]; | ||
| 367 | __u8 function; | ||
| 368 | __u8 device; | ||
| 369 | __u16 segment; | ||
| 370 | __u8 bus; | ||
| 371 | __u8 secondary_bus; | ||
| 372 | __u16 slot; | ||
| 373 | __u8 reserved; | ||
| 374 | } device_id; | ||
| 375 | struct { | ||
| 376 | __u32 lower; | ||
| 377 | __u32 upper; | ||
| 378 | } serial_number; | ||
| 379 | struct { | ||
| 380 | __u16 secondary_status; | ||
| 381 | __u16 control; | ||
| 382 | } bridge; | ||
| 383 | __u8 capability[60]; | ||
| 384 | __u8 aer_info[96]; | ||
| 385 | }; | ||
| 386 | |||
| 309 | /* Reset to default packing */ | 387 | /* Reset to default packing */ |
| 310 | #pragma pack() | 388 | #pragma pack() |
| 311 | 389 | ||
diff --git a/include/linux/ipmi.h b/include/linux/ipmi.h index 65aae34759de..045f2f275cd0 100644 --- a/include/linux/ipmi.h +++ b/include/linux/ipmi.h | |||
| @@ -454,6 +454,44 @@ unsigned int ipmi_addr_length(int addr_type); | |||
| 454 | /* Validate that the given IPMI address is valid. */ | 454 | /* Validate that the given IPMI address is valid. */ |
| 455 | int ipmi_validate_addr(struct ipmi_addr *addr, int len); | 455 | int ipmi_validate_addr(struct ipmi_addr *addr, int len); |
| 456 | 456 | ||
| 457 | /* | ||
| 458 | * How did the IPMI driver find out about the device? | ||
| 459 | */ | ||
| 460 | enum ipmi_addr_src { | ||
| 461 | SI_INVALID = 0, SI_HOTMOD, SI_HARDCODED, SI_SPMI, SI_ACPI, SI_SMBIOS, | ||
| 462 | SI_PCI, SI_DEVICETREE, SI_DEFAULT | ||
| 463 | }; | ||
| 464 | |||
| 465 | union ipmi_smi_info_union { | ||
| 466 | /* | ||
| 467 | * the acpi_info element is defined for the SI_ACPI | ||
| 468 | * address type | ||
| 469 | */ | ||
| 470 | struct { | ||
| 471 | void *acpi_handle; | ||
| 472 | } acpi_info; | ||
| 473 | }; | ||
| 474 | |||
| 475 | struct ipmi_smi_info { | ||
| 476 | enum ipmi_addr_src addr_src; | ||
| 477 | |||
| 478 | /* | ||
| 479 | * Base device for the interface. Don't forget to put this when | ||
| 480 | * you are done. | ||
| 481 | */ | ||
| 482 | struct device *dev; | ||
| 483 | |||
| 484 | /* | ||
| 485 | * The addr_info provides more detailed info for some IPMI | ||
| 486 | * devices, depending on the addr_src. Currently only SI_ACPI | ||
| 487 | * info is provided. | ||
| 488 | */ | ||
| 489 | union ipmi_smi_info_union addr_info; | ||
| 490 | }; | ||
| 491 | |||
| 492 | /* This is to get the private info of ipmi_smi_t */ | ||
| 493 | extern int ipmi_get_smi_info(int if_num, struct ipmi_smi_info *data); | ||
| 494 | |||
| 457 | #endif /* __KERNEL__ */ | 495 | #endif /* __KERNEL__ */ |
| 458 | 496 | ||
| 459 | 497 | ||
diff --git a/include/linux/ipmi_smi.h b/include/linux/ipmi_smi.h index 4b48318ac542..906590aa6907 100644 --- a/include/linux/ipmi_smi.h +++ b/include/linux/ipmi_smi.h | |||
| @@ -39,6 +39,7 @@ | |||
| 39 | #include <linux/module.h> | 39 | #include <linux/module.h> |
| 40 | #include <linux/device.h> | 40 | #include <linux/device.h> |
| 41 | #include <linux/platform_device.h> | 41 | #include <linux/platform_device.h> |
| 42 | #include <linux/ipmi.h> | ||
| 42 | 43 | ||
| 43 | /* This files describes the interface for IPMI system management interface | 44 | /* This files describes the interface for IPMI system management interface |
| 44 | drivers to bind into the IPMI message handler. */ | 45 | drivers to bind into the IPMI message handler. */ |
| @@ -86,6 +87,13 @@ struct ipmi_smi_handlers { | |||
| 86 | int (*start_processing)(void *send_info, | 87 | int (*start_processing)(void *send_info, |
| 87 | ipmi_smi_t new_intf); | 88 | ipmi_smi_t new_intf); |
| 88 | 89 | ||
| 90 | /* | ||
| 91 | * Get the detailed private info of the low level interface and store | ||
| 92 | * it into the structure of ipmi_smi_data. For example: the | ||
| 93 | * ACPI device handle will be returned for the pnp_acpi IPMI device. | ||
| 94 | */ | ||
| 95 | int (*get_smi_info)(void *send_info, struct ipmi_smi_info *data); | ||
| 96 | |||
| 89 | /* Called to enqueue an SMI message to be sent. This | 97 | /* Called to enqueue an SMI message to be sent. This |
| 90 | operation is not allowed to fail. If an error occurs, it | 98 | operation is not allowed to fail. If an error occurs, it |
| 91 | should report back the error in a received message. It may | 99 | should report back the error in a received message. It may |
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index c1f499835b2a..5a89e3612875 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h | |||
| @@ -258,23 +258,6 @@ static inline int hibernate(void) { return -ENOSYS; } | |||
| 258 | static inline bool system_entering_hibernation(void) { return false; } | 258 | static inline bool system_entering_hibernation(void) { return false; } |
| 259 | #endif /* CONFIG_HIBERNATION */ | 259 | #endif /* CONFIG_HIBERNATION */ |
| 260 | 260 | ||
| 261 | #ifdef CONFIG_SUSPEND_NVS | ||
| 262 | extern int suspend_nvs_register(unsigned long start, unsigned long size); | ||
| 263 | extern int suspend_nvs_alloc(void); | ||
| 264 | extern void suspend_nvs_free(void); | ||
| 265 | extern void suspend_nvs_save(void); | ||
| 266 | extern void suspend_nvs_restore(void); | ||
| 267 | #else /* CONFIG_SUSPEND_NVS */ | ||
| 268 | static inline int suspend_nvs_register(unsigned long a, unsigned long b) | ||
| 269 | { | ||
| 270 | return 0; | ||
| 271 | } | ||
| 272 | static inline int suspend_nvs_alloc(void) { return 0; } | ||
| 273 | static inline void suspend_nvs_free(void) {} | ||
| 274 | static inline void suspend_nvs_save(void) {} | ||
| 275 | static inline void suspend_nvs_restore(void) {} | ||
| 276 | #endif /* CONFIG_SUSPEND_NVS */ | ||
| 277 | |||
| 278 | #ifdef CONFIG_PM_SLEEP | 261 | #ifdef CONFIG_PM_SLEEP |
| 279 | void save_processor_state(void); | 262 | void save_processor_state(void); |
| 280 | void restore_processor_state(void); | 263 | void restore_processor_state(void); |
diff --git a/include/linux/thermal.h b/include/linux/thermal.h index 1de8b9eb841b..8651556dbd52 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h | |||
| @@ -77,7 +77,7 @@ struct thermal_cooling_device { | |||
| 77 | char type[THERMAL_NAME_LENGTH]; | 77 | char type[THERMAL_NAME_LENGTH]; |
| 78 | struct device device; | 78 | struct device device; |
| 79 | void *devdata; | 79 | void *devdata; |
| 80 | struct thermal_cooling_device_ops *ops; | 80 | const struct thermal_cooling_device_ops *ops; |
| 81 | struct list_head node; | 81 | struct list_head node; |
| 82 | }; | 82 | }; |
| 83 | 83 | ||
| @@ -114,7 +114,7 @@ struct thermal_zone_device { | |||
| 114 | int last_temperature; | 114 | int last_temperature; |
| 115 | bool passive; | 115 | bool passive; |
| 116 | unsigned int forced_passive; | 116 | unsigned int forced_passive; |
| 117 | struct thermal_zone_device_ops *ops; | 117 | const struct thermal_zone_device_ops *ops; |
| 118 | struct list_head cooling_devices; | 118 | struct list_head cooling_devices; |
| 119 | struct idr idr; | 119 | struct idr idr; |
| 120 | struct mutex lock; /* protect cooling devices list */ | 120 | struct mutex lock; /* protect cooling devices list */ |
| @@ -127,13 +127,41 @@ struct thermal_zone_device { | |||
| 127 | struct thermal_hwmon_attr temp_crit; /* hwmon sys attr */ | 127 | struct thermal_hwmon_attr temp_crit; /* hwmon sys attr */ |
| 128 | #endif | 128 | #endif |
| 129 | }; | 129 | }; |
| 130 | /* Adding event notification support elements */ | ||
| 131 | #define THERMAL_GENL_FAMILY_NAME "thermal_event" | ||
| 132 | #define THERMAL_GENL_VERSION 0x01 | ||
| 133 | #define THERMAL_GENL_MCAST_GROUP_NAME "thermal_mc_group" | ||
| 134 | |||
| 135 | enum events { | ||
| 136 | THERMAL_AUX0, | ||
| 137 | THERMAL_AUX1, | ||
| 138 | THERMAL_CRITICAL, | ||
| 139 | THERMAL_DEV_FAULT, | ||
| 140 | }; | ||
| 141 | |||
| 142 | struct thermal_genl_event { | ||
| 143 | u32 orig; | ||
| 144 | enum events event; | ||
| 145 | }; | ||
| 146 | /* attributes of thermal_genl_family */ | ||
| 147 | enum { | ||
| 148 | THERMAL_GENL_ATTR_UNSPEC, | ||
| 149 | THERMAL_GENL_ATTR_EVENT, | ||
| 150 | __THERMAL_GENL_ATTR_MAX, | ||
| 151 | }; | ||
| 152 | #define THERMAL_GENL_ATTR_MAX (__THERMAL_GENL_ATTR_MAX - 1) | ||
| 153 | |||
| 154 | /* commands supported by the thermal_genl_family */ | ||
| 155 | enum { | ||
| 156 | THERMAL_GENL_CMD_UNSPEC, | ||
| 157 | THERMAL_GENL_CMD_EVENT, | ||
| 158 | __THERMAL_GENL_CMD_MAX, | ||
| 159 | }; | ||
| 160 | #define THERMAL_GENL_CMD_MAX (__THERMAL_GENL_CMD_MAX - 1) | ||
| 130 | 161 | ||
| 131 | struct thermal_zone_device *thermal_zone_device_register(char *, int, void *, | 162 | struct thermal_zone_device *thermal_zone_device_register(char *, int, void *, |
| 132 | struct | 163 | const struct thermal_zone_device_ops *, int tc1, int tc2, |
| 133 | thermal_zone_device_ops | 164 | int passive_freq, int polling_freq); |
| 134 | *, int tc1, int tc2, | ||
| 135 | int passive_freq, | ||
| 136 | int polling_freq); | ||
| 137 | void thermal_zone_device_unregister(struct thermal_zone_device *); | 165 | void thermal_zone_device_unregister(struct thermal_zone_device *); |
| 138 | 166 | ||
| 139 | int thermal_zone_bind_cooling_device(struct thermal_zone_device *, int, | 167 | int thermal_zone_bind_cooling_device(struct thermal_zone_device *, int, |
| @@ -142,9 +170,8 @@ int thermal_zone_unbind_cooling_device(struct thermal_zone_device *, int, | |||
| 142 | struct thermal_cooling_device *); | 170 | struct thermal_cooling_device *); |
| 143 | void thermal_zone_device_update(struct thermal_zone_device *); | 171 | void thermal_zone_device_update(struct thermal_zone_device *); |
| 144 | struct thermal_cooling_device *thermal_cooling_device_register(char *, void *, | 172 | struct thermal_cooling_device *thermal_cooling_device_register(char *, void *, |
| 145 | struct | 173 | const struct thermal_cooling_device_ops *); |
| 146 | thermal_cooling_device_ops | ||
| 147 | *); | ||
| 148 | void thermal_cooling_device_unregister(struct thermal_cooling_device *); | 174 | void thermal_cooling_device_unregister(struct thermal_cooling_device *); |
| 175 | extern int generate_netlink_event(u32 orig, enum events event); | ||
| 149 | 176 | ||
| 150 | #endif /* __THERMAL_H__ */ | 177 | #endif /* __THERMAL_H__ */ |
