diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/acpi/acconfig.h | 2 | ||||
-rw-r--r-- | include/acpi/acexcep.h | 4 | ||||
-rw-r--r-- | include/acpi/acpi_io.h | 2 | ||||
-rw-r--r-- | include/acpi/acpi_numa.h | 4 | ||||
-rw-r--r-- | include/acpi/acpixf.h | 2 | ||||
-rw-r--r-- | include/acpi/actypes.h | 2 | ||||
-rw-r--r-- | include/acpi/acuuid.h | 7 | ||||
-rw-r--r-- | include/acpi/battery.h | 2 | ||||
-rw-r--r-- | include/acpi/platform/aclinux.h | 7 | ||||
-rw-r--r-- | include/linux/acpi.h | 27 | ||||
-rw-r--r-- | include/linux/cpuidle.h | 5 | ||||
-rw-r--r-- | include/linux/intel_rapl.h | 7 | ||||
-rw-r--r-- | include/linux/isapnp.h | 6 | ||||
-rw-r--r-- | include/linux/nodemask.h | 1 | ||||
-rw-r--r-- | include/linux/pm_domain.h | 24 | ||||
-rw-r--r-- | include/linux/pm_runtime.h | 2 |
16 files changed, 63 insertions, 41 deletions
diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h index 5940a3c68a96..a225eff499c8 100644 --- a/include/acpi/acconfig.h +++ b/include/acpi/acconfig.h @@ -121,7 +121,7 @@ * *****************************************************************************/ -/* Method info (in WALK_STATE), containing local variables and argumetns */ +/* Method info (in WALK_STATE), containing local variables and arguments */ #define ACPI_METHOD_NUM_LOCALS 8 #define ACPI_METHOD_MAX_LOCAL 7 diff --git a/include/acpi/acexcep.h b/include/acpi/acexcep.h index 436cd1411c3a..2fc624a61769 100644 --- a/include/acpi/acexcep.h +++ b/include/acpi/acexcep.h @@ -40,12 +40,12 @@ struct acpi_exception_info { char *name; -#ifdef ACPI_HELP_APP +#if defined (ACPI_HELP_APP) || defined (ACPI_ASL_COMPILER) char *description; #endif }; -#ifdef ACPI_HELP_APP +#if defined (ACPI_HELP_APP) || defined (ACPI_ASL_COMPILER) #define EXCEP_TXT(name,description) {name, description} #else #define EXCEP_TXT(name,description) {name} diff --git a/include/acpi/acpi_io.h b/include/acpi/acpi_io.h index 12d8bd333fe7..027faa8883aa 100644 --- a/include/acpi/acpi_io.h +++ b/include/acpi/acpi_io.h @@ -21,7 +21,7 @@ void __iomem __ref void __ref acpi_os_unmap_iomem(void __iomem *virt, acpi_size size); void __iomem *acpi_os_get_iomem(acpi_physical_address phys, unsigned int size); -int acpi_os_map_generic_address(struct acpi_generic_address *addr); +void __iomem *acpi_os_map_generic_address(struct acpi_generic_address *addr); void acpi_os_unmap_generic_address(struct acpi_generic_address *addr); #endif diff --git a/include/acpi/acpi_numa.h b/include/acpi/acpi_numa.h index 0e9302285f14..a4c6ef809e27 100644 --- a/include/acpi/acpi_numa.h +++ b/include/acpi/acpi_numa.h @@ -26,6 +26,10 @@ extern int srat_disabled(void); static inline void disable_srat(void) { } +static inline int pxm_to_node(int pxm) +{ + return 0; +} #endif /* CONFIG_ACPI_NUMA */ #ifdef CONFIG_ACPI_HMAT diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 9dc816641286..be7de305a622 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h @@ -12,7 +12,7 @@ /* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20200717 +#define ACPI_CA_VERSION 0x20200925 #include <acpi/acconfig.h> #include <acpi/actypes.h> diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index d50e61384f1f..647cb11d0a0a 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h @@ -824,7 +824,7 @@ typedef u8 acpi_adr_space_type; * * Note: A Data Table region is a special type of operation region * that has its own AML opcode. However, internally, the AML - * interpreter simply creates an operation region with an an address + * interpreter simply creates an operation region with an address * space type of ACPI_ADR_SPACE_DATA_TABLE. */ #define ACPI_ADR_SPACE_DATA_TABLE (acpi_adr_space_type) 0x7E /* Internal to ACPICA only */ diff --git a/include/acpi/acuuid.h b/include/acpi/acuuid.h index 9e1367b19069..10e30a5030ee 100644 --- a/include/acpi/acuuid.h +++ b/include/acpi/acuuid.h @@ -27,6 +27,10 @@ #define UUID_PCI_HOST_BRIDGE "33db4d5b-1ff7-401c-9657-7441c03dd766" #define UUID_I2C_DEVICE "3cdff6f7-4267-4555-ad05-b30a3d8938de" #define UUID_POWER_BUTTON "dfbcf3c5-e7a5-44e6-9c1f-29c76f6e059c" +#define UUID_MEMORY_DEVICE "03b19910-f473-11dd-87af-0800200c9a66" +#define UUID_GENERIC_BUTTONS_DEVICE "fa6bd625-9ce8-470d-a2c7-b3ca36c4282e" +#define UUID_NVDIMM_ROOT_DEVICE "2f10e7a4-9e91-11e4-89d3-123b93f75cba" +#define UUID_CONTROL_METHOD_BATTERY "f18fc78b-0f15-4978-b793-53f833a1d35b" /* Interfaces */ @@ -56,5 +60,8 @@ #define UUID_BATTERY_THERMAL_LIMIT "4c2067e3-887d-475c-9720-4af1d3ed602e" #define UUID_THERMAL_EXTENSIONS "14d399cd-7a27-4b18-8fb4-7cb7b9f4e500" #define UUID_DEVICE_PROPERTIES "daffd814-6eba-4d8c-8a91-bc9bbf4aa301" +#define UUID_DEVICE_GRAPHS "ab02a46b-74c7-45a2-bd68-f7d344ef2153" +#define UUID_HIERARCHICAL_DATA_EXTENSION "dbb8e3e6-5886-4ba6-8795-1319f52a966b" +#define UUID_CORESIGHT_GRAPH "3ecbc8b6-1d0e-4fb3-8107-e627f805c6cd" #endif /* __ACUUID_H__ */ diff --git a/include/acpi/battery.h b/include/acpi/battery.h index 5d8f5d910c82..b8d56b702c7a 100644 --- a/include/acpi/battery.h +++ b/include/acpi/battery.h @@ -2,6 +2,8 @@ #ifndef __ACPI_BATTERY_H #define __ACPI_BATTERY_H +#include <linux/power_supply.h> + #define ACPI_BATTERY_CLASS "battery" #define ACPI_BATTERY_NOTIFY_STATUS 0x80 diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index 987e2af7c335..72f52a1342a0 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h @@ -118,6 +118,10 @@ #define USE_NATIVE_ALLOCATE_ZEROED +/* Use logical addresses for accessing GPE registers in system memory */ + +#define ACPI_GPE_USE_LOGICAL_ADDRESSES + /* * Overrides for in-kernel ACPICA */ @@ -190,7 +194,8 @@ #if defined(__ia64__) || (defined(__x86_64__) && !defined(__ILP32__)) ||\ defined(__aarch64__) || defined(__PPC64__) ||\ - defined(__s390x__) + defined(__s390x__) ||\ + (defined(__riscv) && (defined(__LP64__) || defined(_LP64))) #define ACPI_MACHINE_WIDTH 64 #define COMPILER_DEPENDENT_INT64 long #define COMPILER_DEPENDENT_UINT64 unsigned long diff --git a/include/linux/acpi.h b/include/linux/acpi.h index cfa8c0015863..143c6ffce2db 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -420,28 +420,27 @@ int acpi_map_pxm_to_node(int pxm); int acpi_get_node(acpi_handle handle); /** - * acpi_map_pxm_to_online_node - Map proximity ID to online node + * pxm_to_online_node - Map proximity ID to online node * @pxm: ACPI proximity ID * - * This is similar to acpi_map_pxm_to_node(), but always returns an online + * This is similar to pxm_to_node(), but always returns an online * node. When the mapped node from a given proximity ID is offline, it * looks up the node distance table and returns the nearest online node. * * ACPI device drivers, which are called after the NUMA initialization has * completed in the kernel, can call this interface to obtain their device * NUMA topology from ACPI tables. Such drivers do not have to deal with - * offline nodes. A node may be offline when a device proximity ID is - * unique, SRAT memory entry does not exist, or NUMA is disabled, ex. - * "numa=off" on x86. + * offline nodes. A node may be offline when SRAT memory entry does not exist, + * or NUMA is disabled, ex. "numa=off" on x86. */ -static inline int acpi_map_pxm_to_online_node(int pxm) +static inline int pxm_to_online_node(int pxm) { - int node = acpi_map_pxm_to_node(pxm); + int node = pxm_to_node(pxm); return numa_map_to_online_node(node); } #else -static inline int acpi_map_pxm_to_online_node(int pxm) +static inline int pxm_to_online_node(int pxm) { return 0; } @@ -546,6 +545,7 @@ acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context); #define OSC_SB_PCLPI_SUPPORT 0x00000080 #define OSC_SB_OSLPI_SUPPORT 0x00000100 #define OSC_SB_CPC_DIVERSE_HIGH_SUPPORT 0x00001000 +#define OSC_SB_GENERIC_INITIATOR_SUPPORT 0x00002000 extern bool osc_sb_apei_support_acked; extern bool osc_pc_lpi_support_confirmed; @@ -867,7 +867,7 @@ static inline bool acpi_driver_match_device(struct device *dev, static inline union acpi_object *acpi_evaluate_dsm(acpi_handle handle, const guid_t *guid, - int rev, int func, + u64 rev, u64 func, union acpi_object *argv4) { return NULL; @@ -979,8 +979,6 @@ int acpi_subsys_runtime_suspend(struct device *dev); int acpi_subsys_runtime_resume(struct device *dev); int acpi_dev_pm_attach(struct device *dev, bool power_on); #else -static inline int acpi_dev_runtime_suspend(struct device *dev) { return 0; } -static inline int acpi_dev_runtime_resume(struct device *dev) { return 0; } static inline int acpi_subsys_runtime_suspend(struct device *dev) { return 0; } static inline int acpi_subsys_runtime_resume(struct device *dev) { return 0; } static inline int acpi_dev_pm_attach(struct device *dev, bool power_on) @@ -1218,13 +1216,6 @@ static inline int acpi_node_prop_get(const struct fwnode_handle *fwnode, return -ENXIO; } -static inline int acpi_dev_prop_get(const struct acpi_device *adev, - const char *propname, - void **valptr) -{ - return -ENXIO; -} - static inline int acpi_dev_prop_read_single(const struct acpi_device *adev, const char *propname, enum dev_prop_type proptype, diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index ed0da0e58e8b..bd605b5585cf 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h @@ -271,13 +271,8 @@ struct cpuidle_governor { void (*reflect) (struct cpuidle_device *dev, int index); }; -#ifdef CONFIG_CPU_IDLE extern int cpuidle_register_governor(struct cpuidle_governor *gov); extern s64 cpuidle_governor_latency_req(unsigned int cpu); -#else -static inline int cpuidle_register_governor(struct cpuidle_governor *gov) -{return 0;} -#endif #define __CPU_PM_CPU_IDLE_ENTER(low_level_idle_enter, \ idx, \ diff --git a/include/linux/intel_rapl.h b/include/linux/intel_rapl.h index 3582176a1eca..50b8398ffd21 100644 --- a/include/linux/intel_rapl.h +++ b/include/linux/intel_rapl.h @@ -79,8 +79,10 @@ struct rapl_power_limit { struct rapl_package; +#define RAPL_DOMAIN_NAME_LENGTH 16 + struct rapl_domain { - const char *name; + char name[RAPL_DOMAIN_NAME_LENGTH]; enum rapl_domain_type id; u64 regs[RAPL_DOMAIN_REG_MAX]; struct powercap_zone power_zone; @@ -152,7 +154,4 @@ struct rapl_package *rapl_find_package_domain(int cpu, struct rapl_if_priv *priv struct rapl_package *rapl_add_package(int cpu, struct rapl_if_priv *priv); void rapl_remove_package(struct rapl_package *rp); -int rapl_add_platform_domain(struct rapl_if_priv *priv); -void rapl_remove_platform_domain(struct rapl_if_priv *priv); - #endif /* __INTEL_RAPL_H__ */ diff --git a/include/linux/isapnp.h b/include/linux/isapnp.h index 11edb2109a68..dba18c95844b 100644 --- a/include/linux/isapnp.h +++ b/include/linux/isapnp.h @@ -75,9 +75,6 @@ static inline int isapnp_proc_done(void) { return 0; } #endif /* compat */ -struct pnp_card *pnp_find_card(unsigned short vendor, - unsigned short device, - struct pnp_card *from); struct pnp_dev *pnp_find_dev(struct pnp_card *card, unsigned short vendor, unsigned short function, @@ -92,9 +89,6 @@ static inline int isapnp_cfg_end(void) { return -ENODEV; } static inline unsigned char isapnp_read_byte(unsigned char idx) { return 0xff; } static inline void isapnp_write_byte(unsigned char idx, unsigned char val) { ; } -static inline struct pnp_card *pnp_find_card(unsigned short vendor, - unsigned short device, - struct pnp_card *from) { return NULL; } static inline struct pnp_dev *pnp_find_dev(struct pnp_card *card, unsigned short vendor, unsigned short function, diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h index 27e7fa36f707..3334ce056335 100644 --- a/include/linux/nodemask.h +++ b/include/linux/nodemask.h @@ -399,6 +399,7 @@ enum node_states { #endif N_MEMORY, /* The node has memory(regular, high, movable) */ N_CPU, /* The node has one or more cpus */ + N_GENERIC_INITIATOR, /* The node has one or more Generic Initiators */ NR_NODE_STATES }; diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h index 66f3c5d64d81..1ad0ec481416 100644 --- a/include/linux/pm_domain.h +++ b/include/linux/pm_domain.h @@ -68,6 +68,13 @@ enum gpd_status { GENPD_STATE_OFF, /* PM domain is off */ }; +enum genpd_notication { + GENPD_NOTIFY_PRE_OFF = 0, + GENPD_NOTIFY_OFF, + GENPD_NOTIFY_PRE_ON, + GENPD_NOTIFY_ON, +}; + struct dev_power_governor { bool (*power_down_ok)(struct dev_pm_domain *domain); bool (*suspend_ok)(struct device *dev); @@ -82,6 +89,8 @@ struct genpd_power_state { s64 power_off_latency_ns; s64 power_on_latency_ns; s64 residency_ns; + u64 usage; + u64 rejected; struct fwnode_handle *fwnode; ktime_t idle_time; void *data; @@ -112,6 +121,7 @@ struct generic_pm_domain { cpumask_var_t cpus; /* A cpumask of the attached CPUs */ int (*power_off)(struct generic_pm_domain *domain); int (*power_on)(struct generic_pm_domain *domain); + struct raw_notifier_head power_notifiers; /* Power on/off notifiers */ struct opp_table *opp_table; /* OPP table of the genpd */ unsigned int (*opp_to_performance_state)(struct generic_pm_domain *genpd, struct dev_pm_opp *opp); @@ -178,6 +188,7 @@ struct generic_pm_domain_data { struct pm_domain_data base; struct gpd_timing_data td; struct notifier_block nb; + struct notifier_block *power_nb; int cpu; unsigned int performance_state; void *data; @@ -204,6 +215,8 @@ int pm_genpd_init(struct generic_pm_domain *genpd, struct dev_power_governor *gov, bool is_off); int pm_genpd_remove(struct generic_pm_domain *genpd); int dev_pm_genpd_set_performance_state(struct device *dev, unsigned int state); +int dev_pm_genpd_add_notifier(struct device *dev, struct notifier_block *nb); +int dev_pm_genpd_remove_notifier(struct device *dev); extern struct dev_power_governor simple_qos_governor; extern struct dev_power_governor pm_domain_always_on_gov; @@ -251,6 +264,17 @@ static inline int dev_pm_genpd_set_performance_state(struct device *dev, return -ENOTSUPP; } +static inline int dev_pm_genpd_add_notifier(struct device *dev, + struct notifier_block *nb) +{ + return -ENOTSUPP; +} + +static inline int dev_pm_genpd_remove_notifier(struct device *dev) +{ + return -ENOTSUPP; +} + #define simple_qos_governor (*(struct dev_power_governor *)(NULL)) #define pm_domain_always_on_gov (*(struct dev_power_governor *)(NULL)) #endif diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h index 6245caa18034..18b02dcc168e 100644 --- a/include/linux/pm_runtime.h +++ b/include/linux/pm_runtime.h @@ -479,7 +479,7 @@ static inline int pm_runtime_set_active(struct device *dev) } /** - * pm_runtime_set_suspended - Set runtime PM status to "active". + * pm_runtime_set_suspended - Set runtime PM status to "suspended". * @dev: Target device. * * Set the runtime PM status of @dev to %RPM_SUSPENDED and ensure that |