diff options
Diffstat (limited to 'include/acpi/processor.h')
| -rw-r--r-- | include/acpi/processor.h | 60 | 
1 files changed, 35 insertions, 25 deletions
diff --git a/include/acpi/processor.h b/include/acpi/processor.h index 1b62102fbb6..9b9b6f29bbf 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h @@ -3,10 +3,13 @@  #include <linux/kernel.h>  #include <linux/cpu.h> -#include <linux/cpuidle.h>  #include <linux/thermal.h>  #include <asm/acpi.h> +#define ACPI_PROCESSOR_CLASS		"processor" +#define ACPI_PROCESSOR_DEVICE_NAME	"Processor" +#define ACPI_PROCESSOR_DEVICE_HID	"ACPI0007" +  #define ACPI_PROCESSOR_BUSY_METRIC	10  #define ACPI_PROCESSOR_MAX_POWER	8 @@ -50,7 +53,7 @@ struct acpi_power_register {  	u8 bit_offset;  	u8 access_size;  	u64 address; -} __attribute__ ((packed)); +} __packed;  struct acpi_processor_cx {  	u8 valid; @@ -59,16 +62,11 @@ struct acpi_processor_cx {  	u8 entry_method;  	u8 index;  	u32 latency; -	u32 latency_ticks; -	u32 power; -	u32 usage; -	u64 time;  	u8 bm_sts_skip;  	char desc[ACPI_CX_DESC_LEN];  };  struct acpi_processor_power { -	struct cpuidle_device dev;  	struct acpi_processor_cx *state;  	unsigned long bm_check_timestamp;  	u32 default_state; @@ -85,7 +83,7 @@ struct acpi_psd_package {  	u64 domain;  	u64 coord_type;  	u64 num_processors; -} __attribute__ ((packed)); +} __packed;  struct acpi_pct_register {  	u8 descriptor; @@ -95,7 +93,7 @@ struct acpi_pct_register {  	u8 bit_offset;  	u8 reserved;  	u64 address; -} __attribute__ ((packed)); +} __packed;  struct acpi_processor_px {  	u64 core_frequency;	/* megahertz */ @@ -126,7 +124,7 @@ struct acpi_tsd_package {  	u64 domain;  	u64 coord_type;  	u64 num_processors; -} __attribute__ ((packed)); +} __packed;  struct acpi_ptc_register {  	u8 descriptor; @@ -136,7 +134,7 @@ struct acpi_ptc_register {  	u8 bit_offset;  	u8 reserved;  	u64 address; -} __attribute__ ((packed)); +} __packed;  struct acpi_processor_tx_tss {  	u64 freqpercentage;	/* */ @@ -195,11 +193,13 @@ struct acpi_processor_flags {  	u8 has_cst:1;  	u8 power_setup_done:1;  	u8 bm_rld_set:1; +	u8 need_hotplug_init:1;  };  struct acpi_processor {  	acpi_handle handle;  	u32 acpi_id; +	u32 apic_id;  	u32 id;  	u32 pblk;  	int performance_platform_limit; @@ -212,6 +212,7 @@ struct acpi_processor {  	struct acpi_processor_throttling throttling;  	struct acpi_processor_limit limit;  	struct thermal_cooling_device *cdev; +	struct device *dev; /* Processor device. */  };  struct acpi_processor_errata { @@ -239,6 +240,9 @@ extern void acpi_processor_unregister_performance(struct           if a _PPC object exists, rmmod is disallowed then */  int acpi_processor_notify_smm(struct module *calling_module); +/* parsing the _P* objects. */ +extern int acpi_processor_get_performance_info(struct acpi_processor *pr); +  /* for communication between multiple parts of the processor kernel module */  DECLARE_PER_CPU(struct acpi_processor *, processors);  extern struct acpi_processor_errata errata; @@ -310,35 +314,41 @@ static inline int acpi_processor_get_bios_limit(int cpu, unsigned int *limit)  /* in processor_core.c */  void acpi_processor_set_pdc(acpi_handle handle); -#ifdef CONFIG_SMP +int acpi_get_apicid(acpi_handle, int type, u32 acpi_id); +int acpi_map_cpuid(int apic_id, u32 acpi_id);  int acpi_get_cpuid(acpi_handle, int type, u32 acpi_id); -#else -static inline int acpi_get_cpuid(acpi_handle handle, int type, u32 acpi_id) -{ -	return -1; -} -#endif  /* in processor_throttling.c */  int acpi_processor_tstate_has_changed(struct acpi_processor *pr);  int acpi_processor_get_throttling_info(struct acpi_processor *pr);  extern int acpi_processor_set_throttling(struct acpi_processor *pr,  					 int state, bool force); +/* + * Reevaluate whether the T-state is invalid after one cpu is + * onlined/offlined. In such case the flags.throttling will be updated. + */ +extern void acpi_processor_reevaluate_tstate(struct acpi_processor *pr, +			unsigned long action);  extern const struct file_operations acpi_processor_throttling_fops;  extern void acpi_processor_throttling_init(void);  /* in processor_idle.c */ -int acpi_processor_power_init(struct acpi_processor *pr, -			      struct acpi_device *device); +int acpi_processor_power_init(struct acpi_processor *pr); +int acpi_processor_power_exit(struct acpi_processor *pr);  int acpi_processor_cst_has_changed(struct acpi_processor *pr); -int acpi_processor_power_exit(struct acpi_processor *pr, -			      struct acpi_device *device); -int acpi_processor_suspend(struct acpi_device * device, pm_message_t state); -int acpi_processor_resume(struct acpi_device * device); +int acpi_processor_hotplug(struct acpi_processor *pr);  extern struct cpuidle_driver acpi_idle_driver; +#ifdef CONFIG_PM_SLEEP +void acpi_processor_syscore_init(void); +void acpi_processor_syscore_exit(void); +#else +static inline void acpi_processor_syscore_init(void) {} +static inline void acpi_processor_syscore_exit(void) {} +#endif +  /* in processor_thermal.c */  int acpi_processor_get_limit_info(struct acpi_processor *pr); -extern struct thermal_cooling_device_ops processor_cooling_ops; +extern const struct thermal_cooling_device_ops processor_cooling_ops;  #ifdef CONFIG_CPU_FREQ  void acpi_thermal_cpufreq_init(void);  void acpi_thermal_cpufreq_exit(void);  | 
