diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/acpi/acpi_dbg.c | 2 | ||||
| -rw-r--r-- | drivers/acpi/acpi_lpat.c | 2 | ||||
| -rw-r--r-- | drivers/acpi/cppc_acpi.c | 34 | ||||
| -rw-r--r-- | drivers/acpi/device_pm.c | 3 | ||||
| -rw-r--r-- | drivers/acpi/dptf/dptf_power.c | 3 | ||||
| -rw-r--r-- | drivers/acpi/event.c | 4 | ||||
| -rw-r--r-- | drivers/acpi/power.c | 4 | ||||
| -rw-r--r-- | drivers/acpi/pptt.c | 48 | ||||
| -rw-r--r-- | drivers/acpi/scan.c | 19 | ||||
| -rw-r--r-- | drivers/acpi/spcr.c | 2 | ||||
| -rw-r--r-- | drivers/acpi/tables.c | 18 | ||||
| -rw-r--r-- | drivers/acpi/video_detect.c | 2 |
12 files changed, 66 insertions, 75 deletions
diff --git a/drivers/acpi/acpi_dbg.c b/drivers/acpi/acpi_dbg.c index 4a434c23a196..d18246a2a65e 100644 --- a/drivers/acpi/acpi_dbg.c +++ b/drivers/acpi/acpi_dbg.c | |||
| @@ -390,7 +390,7 @@ again: | |||
| 390 | return size > 0 ? size : ret; | 390 | return size > 0 ? size : ret; |
| 391 | } | 391 | } |
| 392 | 392 | ||
| 393 | static int acpi_aml_thread(void *unsed) | 393 | static int acpi_aml_thread(void *unused) |
| 394 | { | 394 | { |
| 395 | acpi_osd_exec_callback function = NULL; | 395 | acpi_osd_exec_callback function = NULL; |
| 396 | void *context; | 396 | void *context; |
diff --git a/drivers/acpi/acpi_lpat.c b/drivers/acpi/acpi_lpat.c index 2cd9f738812b..43f1b99c86ca 100644 --- a/drivers/acpi/acpi_lpat.c +++ b/drivers/acpi/acpi_lpat.c | |||
| @@ -22,7 +22,7 @@ | |||
| 22 | * LPAT conversion table | 22 | * LPAT conversion table |
| 23 | * | 23 | * |
| 24 | * @lpat_table: the temperature_raw mapping table structure | 24 | * @lpat_table: the temperature_raw mapping table structure |
| 25 | * @raw: the raw value, used as a key to get the temerature from the | 25 | * @raw: the raw value, used as a key to get the temperature from the |
| 26 | * above mapping table | 26 | * above mapping table |
| 27 | * | 27 | * |
| 28 | * A positive converted temperature value will be returned on success, | 28 | * A positive converted temperature value will be returned on success, |
diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c index d4244e7d0e38..653642a4cbdd 100644 --- a/drivers/acpi/cppc_acpi.c +++ b/drivers/acpi/cppc_acpi.c | |||
| @@ -81,9 +81,9 @@ struct cppc_pcc_data { | |||
| 81 | int refcount; | 81 | int refcount; |
| 82 | }; | 82 | }; |
| 83 | 83 | ||
| 84 | /* Array to represent the PCC channel per subspace id */ | 84 | /* Array to represent the PCC channel per subspace ID */ |
| 85 | static struct cppc_pcc_data *pcc_data[MAX_PCC_SUBSPACES]; | 85 | static struct cppc_pcc_data *pcc_data[MAX_PCC_SUBSPACES]; |
| 86 | /* The cpu_pcc_subspace_idx containsper CPU subspace id */ | 86 | /* The cpu_pcc_subspace_idx contains per CPU subspace ID */ |
| 87 | static DEFINE_PER_CPU(int, cpu_pcc_subspace_idx); | 87 | static DEFINE_PER_CPU(int, cpu_pcc_subspace_idx); |
| 88 | 88 | ||
| 89 | /* | 89 | /* |
| @@ -436,7 +436,7 @@ int acpi_get_psd_map(struct cppc_cpudata **all_cpu_data) | |||
| 436 | return -ENOMEM; | 436 | return -ENOMEM; |
| 437 | 437 | ||
| 438 | /* | 438 | /* |
| 439 | * Now that we have _PSD data from all CPUs, lets setup P-state | 439 | * Now that we have _PSD data from all CPUs, let's setup P-state |
| 440 | * domain info. | 440 | * domain info. |
| 441 | */ | 441 | */ |
| 442 | for_each_possible_cpu(i) { | 442 | for_each_possible_cpu(i) { |
| @@ -588,7 +588,7 @@ static int register_pcc_channel(int pcc_ss_idx) | |||
| 588 | return -ENOMEM; | 588 | return -ENOMEM; |
| 589 | } | 589 | } |
| 590 | 590 | ||
| 591 | /* Set flag so that we dont come here for each CPU. */ | 591 | /* Set flag so that we don't come here for each CPU. */ |
| 592 | pcc_data[pcc_ss_idx]->pcc_channel_acquired = true; | 592 | pcc_data[pcc_ss_idx]->pcc_channel_acquired = true; |
| 593 | } | 593 | } |
| 594 | 594 | ||
| @@ -613,7 +613,7 @@ bool __weak cpc_ffh_supported(void) | |||
| 613 | * | 613 | * |
| 614 | * Check and allocate the cppc_pcc_data memory. | 614 | * Check and allocate the cppc_pcc_data memory. |
| 615 | * In some processor configurations it is possible that same subspace | 615 | * In some processor configurations it is possible that same subspace |
| 616 | * is shared between multiple CPU's. This is seen especially in CPU's | 616 | * is shared between multiple CPUs. This is seen especially in CPUs |
| 617 | * with hardware multi-threading support. | 617 | * with hardware multi-threading support. |
| 618 | * | 618 | * |
| 619 | * Return: 0 for success, errno for failure | 619 | * Return: 0 for success, errno for failure |
| @@ -711,7 +711,7 @@ static bool is_cppc_supported(int revision, int num_ent) | |||
| 711 | 711 | ||
| 712 | /** | 712 | /** |
| 713 | * acpi_cppc_processor_probe - Search for per CPU _CPC objects. | 713 | * acpi_cppc_processor_probe - Search for per CPU _CPC objects. |
| 714 | * @pr: Ptr to acpi_processor containing this CPUs logical Id. | 714 | * @pr: Ptr to acpi_processor containing this CPU's logical ID. |
| 715 | * | 715 | * |
| 716 | * Return: 0 for success or negative value for err. | 716 | * Return: 0 for success or negative value for err. |
| 717 | */ | 717 | */ |
| @@ -728,7 +728,7 @@ int acpi_cppc_processor_probe(struct acpi_processor *pr) | |||
| 728 | acpi_status status; | 728 | acpi_status status; |
| 729 | int ret = -EFAULT; | 729 | int ret = -EFAULT; |
| 730 | 730 | ||
| 731 | /* Parse the ACPI _CPC table for this cpu. */ | 731 | /* Parse the ACPI _CPC table for this CPU. */ |
| 732 | status = acpi_evaluate_object_typed(handle, "_CPC", NULL, &output, | 732 | status = acpi_evaluate_object_typed(handle, "_CPC", NULL, &output, |
| 733 | ACPI_TYPE_PACKAGE); | 733 | ACPI_TYPE_PACKAGE); |
| 734 | if (ACPI_FAILURE(status)) { | 734 | if (ACPI_FAILURE(status)) { |
| @@ -840,7 +840,7 @@ int acpi_cppc_processor_probe(struct acpi_processor *pr) | |||
| 840 | if (ret) | 840 | if (ret) |
| 841 | goto out_free; | 841 | goto out_free; |
| 842 | 842 | ||
| 843 | /* Register PCC channel once for all PCC subspace id. */ | 843 | /* Register PCC channel once for all PCC subspace ID. */ |
| 844 | if (pcc_subspace_id >= 0 && !pcc_data[pcc_subspace_id]->pcc_channel_acquired) { | 844 | if (pcc_subspace_id >= 0 && !pcc_data[pcc_subspace_id]->pcc_channel_acquired) { |
| 845 | ret = register_pcc_channel(pcc_subspace_id); | 845 | ret = register_pcc_channel(pcc_subspace_id); |
| 846 | if (ret) | 846 | if (ret) |
| @@ -860,7 +860,7 @@ int acpi_cppc_processor_probe(struct acpi_processor *pr) | |||
| 860 | goto out_free; | 860 | goto out_free; |
| 861 | } | 861 | } |
| 862 | 862 | ||
| 863 | /* Plug PSD data into this CPUs CPC descriptor. */ | 863 | /* Plug PSD data into this CPU's CPC descriptor. */ |
| 864 | per_cpu(cpc_desc_ptr, pr->id) = cpc_ptr; | 864 | per_cpu(cpc_desc_ptr, pr->id) = cpc_ptr; |
| 865 | 865 | ||
| 866 | ret = kobject_init_and_add(&cpc_ptr->kobj, &cppc_ktype, &cpu_dev->kobj, | 866 | ret = kobject_init_and_add(&cpc_ptr->kobj, &cppc_ktype, &cpu_dev->kobj, |
| @@ -891,7 +891,7 @@ EXPORT_SYMBOL_GPL(acpi_cppc_processor_probe); | |||
| 891 | 891 | ||
| 892 | /** | 892 | /** |
| 893 | * acpi_cppc_processor_exit - Cleanup CPC structs. | 893 | * acpi_cppc_processor_exit - Cleanup CPC structs. |
| 894 | * @pr: Ptr to acpi_processor containing this CPUs logical Id. | 894 | * @pr: Ptr to acpi_processor containing this CPU's logical ID. |
| 895 | * | 895 | * |
| 896 | * Return: Void | 896 | * Return: Void |
| 897 | */ | 897 | */ |
| @@ -931,7 +931,7 @@ EXPORT_SYMBOL_GPL(acpi_cppc_processor_exit); | |||
| 931 | 931 | ||
| 932 | /** | 932 | /** |
| 933 | * cpc_read_ffh() - Read FFH register | 933 | * cpc_read_ffh() - Read FFH register |
| 934 | * @cpunum: cpu number to read | 934 | * @cpunum: CPU number to read |
| 935 | * @reg: cppc register information | 935 | * @reg: cppc register information |
| 936 | * @val: place holder for return value | 936 | * @val: place holder for return value |
| 937 | * | 937 | * |
| @@ -946,7 +946,7 @@ int __weak cpc_read_ffh(int cpunum, struct cpc_reg *reg, u64 *val) | |||
| 946 | 946 | ||
| 947 | /** | 947 | /** |
| 948 | * cpc_write_ffh() - Write FFH register | 948 | * cpc_write_ffh() - Write FFH register |
| 949 | * @cpunum: cpu number to write | 949 | * @cpunum: CPU number to write |
| 950 | * @reg: cppc register information | 950 | * @reg: cppc register information |
| 951 | * @val: value to write | 951 | * @val: value to write |
| 952 | * | 952 | * |
| @@ -1093,7 +1093,7 @@ int cppc_get_desired_perf(int cpunum, u64 *desired_perf) | |||
| 1093 | EXPORT_SYMBOL_GPL(cppc_get_desired_perf); | 1093 | EXPORT_SYMBOL_GPL(cppc_get_desired_perf); |
| 1094 | 1094 | ||
| 1095 | /** | 1095 | /** |
| 1096 | * cppc_get_perf_caps - Get a CPUs performance capabilities. | 1096 | * cppc_get_perf_caps - Get a CPU's performance capabilities. |
| 1097 | * @cpunum: CPU from which to get capabilities info. | 1097 | * @cpunum: CPU from which to get capabilities info. |
| 1098 | * @perf_caps: ptr to cppc_perf_caps. See cppc_acpi.h | 1098 | * @perf_caps: ptr to cppc_perf_caps. See cppc_acpi.h |
| 1099 | * | 1099 | * |
| @@ -1183,7 +1183,7 @@ out_err: | |||
| 1183 | EXPORT_SYMBOL_GPL(cppc_get_perf_caps); | 1183 | EXPORT_SYMBOL_GPL(cppc_get_perf_caps); |
| 1184 | 1184 | ||
| 1185 | /** | 1185 | /** |
| 1186 | * cppc_get_perf_ctrs - Read a CPUs performance feedback counters. | 1186 | * cppc_get_perf_ctrs - Read a CPU's performance feedback counters. |
| 1187 | * @cpunum: CPU from which to read counters. | 1187 | * @cpunum: CPU from which to read counters. |
| 1188 | * @perf_fb_ctrs: ptr to cppc_perf_fb_ctrs. See cppc_acpi.h | 1188 | * @perf_fb_ctrs: ptr to cppc_perf_fb_ctrs. See cppc_acpi.h |
| 1189 | * | 1189 | * |
| @@ -1210,7 +1210,7 @@ int cppc_get_perf_ctrs(int cpunum, struct cppc_perf_fb_ctrs *perf_fb_ctrs) | |||
| 1210 | ctr_wrap_reg = &cpc_desc->cpc_regs[CTR_WRAP_TIME]; | 1210 | ctr_wrap_reg = &cpc_desc->cpc_regs[CTR_WRAP_TIME]; |
| 1211 | 1211 | ||
| 1212 | /* | 1212 | /* |
| 1213 | * If refernce perf register is not supported then we should | 1213 | * If reference perf register is not supported then we should |
| 1214 | * use the nominal perf value | 1214 | * use the nominal perf value |
| 1215 | */ | 1215 | */ |
| 1216 | if (!CPC_SUPPORTED(ref_perf_reg)) | 1216 | if (!CPC_SUPPORTED(ref_perf_reg)) |
| @@ -1263,7 +1263,7 @@ out_err: | |||
| 1263 | EXPORT_SYMBOL_GPL(cppc_get_perf_ctrs); | 1263 | EXPORT_SYMBOL_GPL(cppc_get_perf_ctrs); |
| 1264 | 1264 | ||
| 1265 | /** | 1265 | /** |
| 1266 | * cppc_set_perf - Set a CPUs performance controls. | 1266 | * cppc_set_perf - Set a CPU's performance controls. |
| 1267 | * @cpu: CPU for which to set performance controls. | 1267 | * @cpu: CPU for which to set performance controls. |
| 1268 | * @perf_ctrls: ptr to cppc_perf_ctrls. See cppc_acpi.h | 1268 | * @perf_ctrls: ptr to cppc_perf_ctrls. See cppc_acpi.h |
| 1269 | * | 1269 | * |
| @@ -1344,7 +1344,7 @@ int cppc_set_perf(int cpu, struct cppc_perf_ctrls *perf_ctrls) | |||
| 1344 | * executing the Phase-II. | 1344 | * executing the Phase-II. |
| 1345 | * 2. Some other CPU has beaten this CPU to successfully execute the | 1345 | * 2. Some other CPU has beaten this CPU to successfully execute the |
| 1346 | * write_trylock and has already acquired the write_lock. We know for a | 1346 | * write_trylock and has already acquired the write_lock. We know for a |
| 1347 | * fact it(other CPU acquiring the write_lock) couldn't have happened | 1347 | * fact it (other CPU acquiring the write_lock) couldn't have happened |
| 1348 | * before this CPU's Phase-I as we held the read_lock. | 1348 | * before this CPU's Phase-I as we held the read_lock. |
| 1349 | * 3. Some other CPU executing pcc CMD_READ has stolen the | 1349 | * 3. Some other CPU executing pcc CMD_READ has stolen the |
| 1350 | * down_write, in which case, send_pcc_cmd will check for pending | 1350 | * down_write, in which case, send_pcc_cmd will check for pending |
diff --git a/drivers/acpi/device_pm.c b/drivers/acpi/device_pm.c index 824ae985ad93..5b50f884712c 100644 --- a/drivers/acpi/device_pm.c +++ b/drivers/acpi/device_pm.c | |||
| @@ -728,6 +728,9 @@ static int __acpi_device_wakeup_enable(struct acpi_device *adev, | |||
| 728 | goto out; | 728 | goto out; |
| 729 | } | 729 | } |
| 730 | 730 | ||
| 731 | acpi_handle_debug(adev->handle, "GPE%2X enabled for wakeup\n", | ||
| 732 | (unsigned int)wakeup->gpe_number); | ||
| 733 | |||
| 731 | inc: | 734 | inc: |
| 732 | wakeup->enable_count++; | 735 | wakeup->enable_count++; |
| 733 | 736 | ||
diff --git a/drivers/acpi/dptf/dptf_power.c b/drivers/acpi/dptf/dptf_power.c index e1c242568341..0c081390930a 100644 --- a/drivers/acpi/dptf/dptf_power.c +++ b/drivers/acpi/dptf/dptf_power.c | |||
| @@ -31,8 +31,7 @@ static ssize_t name##_show(struct device *dev,\ | |||
| 31 | struct device_attribute *attr,\ | 31 | struct device_attribute *attr,\ |
| 32 | char *buf)\ | 32 | char *buf)\ |
| 33 | {\ | 33 | {\ |
| 34 | struct platform_device *pdev = to_platform_device(dev);\ | 34 | struct acpi_device *acpi_dev = dev_get_drvdata(dev);\ |
| 35 | struct acpi_device *acpi_dev = platform_get_drvdata(pdev);\ | ||
| 36 | unsigned long long val;\ | 35 | unsigned long long val;\ |
| 37 | acpi_status status;\ | 36 | acpi_status status;\ |
| 38 | \ | 37 | \ |
diff --git a/drivers/acpi/event.c b/drivers/acpi/event.c index 5a127f3f2d5c..47f21599f2ab 100644 --- a/drivers/acpi/event.c +++ b/drivers/acpi/event.c | |||
| @@ -131,8 +131,8 @@ int acpi_bus_generate_netlink_event(const char *device_class, | |||
| 131 | event = nla_data(attr); | 131 | event = nla_data(attr); |
| 132 | memset(event, 0, sizeof(struct acpi_genl_event)); | 132 | memset(event, 0, sizeof(struct acpi_genl_event)); |
| 133 | 133 | ||
| 134 | strcpy(event->device_class, device_class); | 134 | strscpy(event->device_class, device_class, sizeof(event->device_class)); |
| 135 | strcpy(event->bus_id, bus_id); | 135 | strscpy(event->bus_id, bus_id, sizeof(event->bus_id)); |
| 136 | event->type = type; | 136 | event->type = type; |
| 137 | event->data = data; | 137 | event->data = data; |
| 138 | 138 | ||
diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c index 665e93ca0b40..87db3e124725 100644 --- a/drivers/acpi/power.c +++ b/drivers/acpi/power.c | |||
| @@ -535,12 +535,12 @@ int acpi_device_sleep_wake(struct acpi_device *dev, | |||
| 535 | /* | 535 | /* |
| 536 | * Try to execute _DSW first. | 536 | * Try to execute _DSW first. |
| 537 | * | 537 | * |
| 538 | * Three agruments are needed for the _DSW object: | 538 | * Three arguments are needed for the _DSW object: |
| 539 | * Argument 0: enable/disable the wake capabilities | 539 | * Argument 0: enable/disable the wake capabilities |
| 540 | * Argument 1: target system state | 540 | * Argument 1: target system state |
| 541 | * Argument 2: target device state | 541 | * Argument 2: target device state |
| 542 | * When _DSW object is called to disable the wake capabilities, maybe | 542 | * When _DSW object is called to disable the wake capabilities, maybe |
| 543 | * the first argument is filled. The values of the other two agruments | 543 | * the first argument is filled. The values of the other two arguments |
| 544 | * are meaningless. | 544 | * are meaningless. |
| 545 | */ | 545 | */ |
| 546 | in_arg[0].type = ACPI_TYPE_INTEGER; | 546 | in_arg[0].type = ACPI_TYPE_INTEGER; |
diff --git a/drivers/acpi/pptt.c b/drivers/acpi/pptt.c index 065c4fc245d1..b72e6afaa8fb 100644 --- a/drivers/acpi/pptt.c +++ b/drivers/acpi/pptt.c | |||
| @@ -164,7 +164,7 @@ static struct acpi_pptt_cache *acpi_find_cache_level(struct acpi_table_header *t | |||
| 164 | } | 164 | } |
| 165 | 165 | ||
| 166 | /** | 166 | /** |
| 167 | * acpi_count_levels() - Given a PPTT table, and a cpu node, count the caches | 167 | * acpi_count_levels() - Given a PPTT table, and a CPU node, count the caches |
| 168 | * @table_hdr: Pointer to the head of the PPTT table | 168 | * @table_hdr: Pointer to the head of the PPTT table |
| 169 | * @cpu_node: processor node we wish to count caches for | 169 | * @cpu_node: processor node we wish to count caches for |
| 170 | * | 170 | * |
| @@ -235,7 +235,7 @@ static int acpi_pptt_leaf_node(struct acpi_table_header *table_hdr, | |||
| 235 | /** | 235 | /** |
| 236 | * acpi_find_processor_node() - Given a PPTT table find the requested processor | 236 | * acpi_find_processor_node() - Given a PPTT table find the requested processor |
| 237 | * @table_hdr: Pointer to the head of the PPTT table | 237 | * @table_hdr: Pointer to the head of the PPTT table |
| 238 | * @acpi_cpu_id: cpu we are searching for | 238 | * @acpi_cpu_id: CPU we are searching for |
| 239 | * | 239 | * |
| 240 | * Find the subtable entry describing the provided processor. | 240 | * Find the subtable entry describing the provided processor. |
| 241 | * This is done by iterating the PPTT table looking for processor nodes | 241 | * This is done by iterating the PPTT table looking for processor nodes |
| @@ -456,21 +456,21 @@ static struct acpi_pptt_processor *acpi_find_processor_package_id(struct acpi_ta | |||
| 456 | 456 | ||
| 457 | static void acpi_pptt_warn_missing(void) | 457 | static void acpi_pptt_warn_missing(void) |
| 458 | { | 458 | { |
| 459 | pr_warn_once("No PPTT table found, cpu and cache topology may be inaccurate\n"); | 459 | pr_warn_once("No PPTT table found, CPU and cache topology may be inaccurate\n"); |
| 460 | } | 460 | } |
| 461 | 461 | ||
| 462 | /** | 462 | /** |
| 463 | * topology_get_acpi_cpu_tag() - Find a unique topology value for a feature | 463 | * topology_get_acpi_cpu_tag() - Find a unique topology value for a feature |
| 464 | * @table: Pointer to the head of the PPTT table | 464 | * @table: Pointer to the head of the PPTT table |
| 465 | * @cpu: Kernel logical cpu number | 465 | * @cpu: Kernel logical CPU number |
| 466 | * @level: A level that terminates the search | 466 | * @level: A level that terminates the search |
| 467 | * @flag: A flag which terminates the search | 467 | * @flag: A flag which terminates the search |
| 468 | * | 468 | * |
| 469 | * Get a unique value given a cpu, and a topology level, that can be | 469 | * Get a unique value given a CPU, and a topology level, that can be |
| 470 | * matched to determine which cpus share common topological features | 470 | * matched to determine which cpus share common topological features |
| 471 | * at that level. | 471 | * at that level. |
| 472 | * | 472 | * |
| 473 | * Return: Unique value, or -ENOENT if unable to locate cpu | 473 | * Return: Unique value, or -ENOENT if unable to locate CPU |
| 474 | */ | 474 | */ |
| 475 | static int topology_get_acpi_cpu_tag(struct acpi_table_header *table, | 475 | static int topology_get_acpi_cpu_tag(struct acpi_table_header *table, |
| 476 | unsigned int cpu, int level, int flag) | 476 | unsigned int cpu, int level, int flag) |
| @@ -510,7 +510,7 @@ static int find_acpi_cpu_topology_tag(unsigned int cpu, int level, int flag) | |||
| 510 | return -ENOENT; | 510 | return -ENOENT; |
| 511 | } | 511 | } |
| 512 | retval = topology_get_acpi_cpu_tag(table, cpu, level, flag); | 512 | retval = topology_get_acpi_cpu_tag(table, cpu, level, flag); |
| 513 | pr_debug("Topology Setup ACPI cpu %d, level %d ret = %d\n", | 513 | pr_debug("Topology Setup ACPI CPU %d, level %d ret = %d\n", |
| 514 | cpu, level, retval); | 514 | cpu, level, retval); |
| 515 | acpi_put_table(table); | 515 | acpi_put_table(table); |
| 516 | 516 | ||
| @@ -519,9 +519,9 @@ static int find_acpi_cpu_topology_tag(unsigned int cpu, int level, int flag) | |||
| 519 | 519 | ||
| 520 | /** | 520 | /** |
| 521 | * acpi_find_last_cache_level() - Determines the number of cache levels for a PE | 521 | * acpi_find_last_cache_level() - Determines the number of cache levels for a PE |
| 522 | * @cpu: Kernel logical cpu number | 522 | * @cpu: Kernel logical CPU number |
| 523 | * | 523 | * |
| 524 | * Given a logical cpu number, returns the number of levels of cache represented | 524 | * Given a logical CPU number, returns the number of levels of cache represented |
| 525 | * in the PPTT. Errors caused by lack of a PPTT table, or otherwise, return 0 | 525 | * in the PPTT. Errors caused by lack of a PPTT table, or otherwise, return 0 |
| 526 | * indicating we didn't find any cache levels. | 526 | * indicating we didn't find any cache levels. |
| 527 | * | 527 | * |
| @@ -534,7 +534,7 @@ int acpi_find_last_cache_level(unsigned int cpu) | |||
| 534 | int number_of_levels = 0; | 534 | int number_of_levels = 0; |
| 535 | acpi_status status; | 535 | acpi_status status; |
| 536 | 536 | ||
| 537 | pr_debug("Cache Setup find last level cpu=%d\n", cpu); | 537 | pr_debug("Cache Setup find last level CPU=%d\n", cpu); |
| 538 | 538 | ||
| 539 | acpi_cpu_id = get_acpi_id_for_cpu(cpu); | 539 | acpi_cpu_id = get_acpi_id_for_cpu(cpu); |
| 540 | status = acpi_get_table(ACPI_SIG_PPTT, 0, &table); | 540 | status = acpi_get_table(ACPI_SIG_PPTT, 0, &table); |
| @@ -551,14 +551,14 @@ int acpi_find_last_cache_level(unsigned int cpu) | |||
| 551 | 551 | ||
| 552 | /** | 552 | /** |
| 553 | * cache_setup_acpi() - Override CPU cache topology with data from the PPTT | 553 | * cache_setup_acpi() - Override CPU cache topology with data from the PPTT |
| 554 | * @cpu: Kernel logical cpu number | 554 | * @cpu: Kernel logical CPU number |
| 555 | * | 555 | * |
| 556 | * Updates the global cache info provided by cpu_get_cacheinfo() | 556 | * Updates the global cache info provided by cpu_get_cacheinfo() |
| 557 | * when there are valid properties in the acpi_pptt_cache nodes. A | 557 | * when there are valid properties in the acpi_pptt_cache nodes. A |
| 558 | * successful parse may not result in any updates if none of the | 558 | * successful parse may not result in any updates if none of the |
| 559 | * cache levels have any valid flags set. Futher, a unique value is | 559 | * cache levels have any valid flags set. Further, a unique value is |
| 560 | * associated with each known CPU cache entry. This unique value | 560 | * associated with each known CPU cache entry. This unique value |
| 561 | * can be used to determine whether caches are shared between cpus. | 561 | * can be used to determine whether caches are shared between CPUs. |
| 562 | * | 562 | * |
| 563 | * Return: -ENOENT on failure to find table, or 0 on success | 563 | * Return: -ENOENT on failure to find table, or 0 on success |
| 564 | */ | 564 | */ |
| @@ -567,7 +567,7 @@ int cache_setup_acpi(unsigned int cpu) | |||
| 567 | struct acpi_table_header *table; | 567 | struct acpi_table_header *table; |
| 568 | acpi_status status; | 568 | acpi_status status; |
| 569 | 569 | ||
| 570 | pr_debug("Cache Setup ACPI cpu %d\n", cpu); | 570 | pr_debug("Cache Setup ACPI CPU %d\n", cpu); |
| 571 | 571 | ||
| 572 | status = acpi_get_table(ACPI_SIG_PPTT, 0, &table); | 572 | status = acpi_get_table(ACPI_SIG_PPTT, 0, &table); |
| 573 | if (ACPI_FAILURE(status)) { | 573 | if (ACPI_FAILURE(status)) { |
| @@ -582,8 +582,8 @@ int cache_setup_acpi(unsigned int cpu) | |||
| 582 | } | 582 | } |
| 583 | 583 | ||
| 584 | /** | 584 | /** |
| 585 | * find_acpi_cpu_topology() - Determine a unique topology value for a given cpu | 585 | * find_acpi_cpu_topology() - Determine a unique topology value for a given CPU |
| 586 | * @cpu: Kernel logical cpu number | 586 | * @cpu: Kernel logical CPU number |
| 587 | * @level: The topological level for which we would like a unique ID | 587 | * @level: The topological level for which we would like a unique ID |
| 588 | * | 588 | * |
| 589 | * Determine a topology unique ID for each thread/core/cluster/mc_grouping | 589 | * Determine a topology unique ID for each thread/core/cluster/mc_grouping |
| @@ -596,7 +596,7 @@ int cache_setup_acpi(unsigned int cpu) | |||
| 596 | * other levels beyond this use a generated value to uniquely identify | 596 | * other levels beyond this use a generated value to uniquely identify |
| 597 | * a topological feature. | 597 | * a topological feature. |
| 598 | * | 598 | * |
| 599 | * Return: -ENOENT if the PPTT doesn't exist, or the cpu cannot be found. | 599 | * Return: -ENOENT if the PPTT doesn't exist, or the CPU cannot be found. |
| 600 | * Otherwise returns a value which represents a unique topological feature. | 600 | * Otherwise returns a value which represents a unique topological feature. |
| 601 | */ | 601 | */ |
| 602 | int find_acpi_cpu_topology(unsigned int cpu, int level) | 602 | int find_acpi_cpu_topology(unsigned int cpu, int level) |
| @@ -606,12 +606,12 @@ int find_acpi_cpu_topology(unsigned int cpu, int level) | |||
| 606 | 606 | ||
| 607 | /** | 607 | /** |
| 608 | * find_acpi_cpu_cache_topology() - Determine a unique cache topology value | 608 | * find_acpi_cpu_cache_topology() - Determine a unique cache topology value |
| 609 | * @cpu: Kernel logical cpu number | 609 | * @cpu: Kernel logical CPU number |
| 610 | * @level: The cache level for which we would like a unique ID | 610 | * @level: The cache level for which we would like a unique ID |
| 611 | * | 611 | * |
| 612 | * Determine a unique ID for each unified cache in the system | 612 | * Determine a unique ID for each unified cache in the system |
| 613 | * | 613 | * |
| 614 | * Return: -ENOENT if the PPTT doesn't exist, or the cpu cannot be found. | 614 | * Return: -ENOENT if the PPTT doesn't exist, or the CPU cannot be found. |
| 615 | * Otherwise returns a value which represents a unique topological feature. | 615 | * Otherwise returns a value which represents a unique topological feature. |
| 616 | */ | 616 | */ |
| 617 | int find_acpi_cpu_cache_topology(unsigned int cpu, int level) | 617 | int find_acpi_cpu_cache_topology(unsigned int cpu, int level) |
| @@ -643,17 +643,17 @@ int find_acpi_cpu_cache_topology(unsigned int cpu, int level) | |||
| 643 | 643 | ||
| 644 | 644 | ||
| 645 | /** | 645 | /** |
| 646 | * find_acpi_cpu_topology_package() - Determine a unique cpu package value | 646 | * find_acpi_cpu_topology_package() - Determine a unique CPU package value |
| 647 | * @cpu: Kernel logical cpu number | 647 | * @cpu: Kernel logical CPU number |
| 648 | * | 648 | * |
| 649 | * Determine a topology unique package ID for the given cpu. | 649 | * Determine a topology unique package ID for the given CPU. |
| 650 | * This ID can then be used to group peers, which will have matching ids. | 650 | * This ID can then be used to group peers, which will have matching ids. |
| 651 | * | 651 | * |
| 652 | * The search terminates when either a level is found with the PHYSICAL_PACKAGE | 652 | * The search terminates when either a level is found with the PHYSICAL_PACKAGE |
| 653 | * flag set or we reach a root node. | 653 | * flag set or we reach a root node. |
| 654 | * | 654 | * |
| 655 | * Return: -ENOENT if the PPTT doesn't exist, or the cpu cannot be found. | 655 | * Return: -ENOENT if the PPTT doesn't exist, or the CPU cannot be found. |
| 656 | * Otherwise returns a value which represents the package for this cpu. | 656 | * Otherwise returns a value which represents the package for this CPU. |
| 657 | */ | 657 | */ |
| 658 | int find_acpi_cpu_topology_package(unsigned int cpu) | 658 | int find_acpi_cpu_topology_package(unsigned int cpu) |
| 659 | { | 659 | { |
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 3fb331fb6e82..b845dc3e0ba9 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c | |||
| @@ -763,18 +763,16 @@ acpi_bus_get_ejd(acpi_handle handle, acpi_handle *ejd) | |||
| 763 | } | 763 | } |
| 764 | EXPORT_SYMBOL_GPL(acpi_bus_get_ejd); | 764 | EXPORT_SYMBOL_GPL(acpi_bus_get_ejd); |
| 765 | 765 | ||
| 766 | static int acpi_bus_extract_wakeup_device_power_package(acpi_handle handle, | 766 | static int acpi_bus_extract_wakeup_device_power_package(struct acpi_device *dev) |
| 767 | struct acpi_device_wakeup *wakeup) | ||
| 768 | { | 767 | { |
| 768 | acpi_handle handle = dev->handle; | ||
| 769 | struct acpi_device_wakeup *wakeup = &dev->wakeup; | ||
| 769 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; | 770 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; |
| 770 | union acpi_object *package = NULL; | 771 | union acpi_object *package = NULL; |
| 771 | union acpi_object *element = NULL; | 772 | union acpi_object *element = NULL; |
| 772 | acpi_status status; | 773 | acpi_status status; |
| 773 | int err = -ENODATA; | 774 | int err = -ENODATA; |
| 774 | 775 | ||
| 775 | if (!wakeup) | ||
| 776 | return -EINVAL; | ||
| 777 | |||
| 778 | INIT_LIST_HEAD(&wakeup->resources); | 776 | INIT_LIST_HEAD(&wakeup->resources); |
| 779 | 777 | ||
| 780 | /* _PRW */ | 778 | /* _PRW */ |
| @@ -848,9 +846,9 @@ static int acpi_bus_extract_wakeup_device_power_package(acpi_handle handle, | |||
| 848 | static bool acpi_wakeup_gpe_init(struct acpi_device *device) | 846 | static bool acpi_wakeup_gpe_init(struct acpi_device *device) |
| 849 | { | 847 | { |
| 850 | static const struct acpi_device_id button_device_ids[] = { | 848 | static const struct acpi_device_id button_device_ids[] = { |
| 851 | {"PNP0C0C", 0}, | 849 | {"PNP0C0C", 0}, /* Power button */ |
| 852 | {"PNP0C0D", 0}, | 850 | {"PNP0C0D", 0}, /* Lid */ |
| 853 | {"PNP0C0E", 0}, | 851 | {"PNP0C0E", 0}, /* Sleep button */ |
| 854 | {"", 0}, | 852 | {"", 0}, |
| 855 | }; | 853 | }; |
| 856 | struct acpi_device_wakeup *wakeup = &device->wakeup; | 854 | struct acpi_device_wakeup *wakeup = &device->wakeup; |
| @@ -883,8 +881,7 @@ static void acpi_bus_get_wakeup_device_flags(struct acpi_device *device) | |||
| 883 | if (!acpi_has_method(device->handle, "_PRW")) | 881 | if (!acpi_has_method(device->handle, "_PRW")) |
| 884 | return; | 882 | return; |
| 885 | 883 | ||
| 886 | err = acpi_bus_extract_wakeup_device_power_package(device->handle, | 884 | err = acpi_bus_extract_wakeup_device_power_package(device); |
| 887 | &device->wakeup); | ||
| 888 | if (err) { | 885 | if (err) { |
| 889 | dev_err(&device->dev, "_PRW evaluation error: %d\n", err); | 886 | dev_err(&device->dev, "_PRW evaluation error: %d\n", err); |
| 890 | return; | 887 | return; |
| @@ -895,7 +892,7 @@ static void acpi_bus_get_wakeup_device_flags(struct acpi_device *device) | |||
| 895 | /* | 892 | /* |
| 896 | * Call _PSW/_DSW object to disable its ability to wake the sleeping | 893 | * Call _PSW/_DSW object to disable its ability to wake the sleeping |
| 897 | * system for the ACPI device with the _PRW object. | 894 | * system for the ACPI device with the _PRW object. |
| 898 | * The _PSW object is depreciated in ACPI 3.0 and is replaced by _DSW. | 895 | * The _PSW object is deprecated in ACPI 3.0 and is replaced by _DSW. |
| 899 | * So it is necessary to call _DSW object first. Only when it is not | 896 | * So it is necessary to call _DSW object first. Only when it is not |
| 900 | * present will the _PSW object used. | 897 | * present will the _PSW object used. |
| 901 | */ | 898 | */ |
diff --git a/drivers/acpi/spcr.c b/drivers/acpi/spcr.c index c336784d0bcb..b34d05e365b7 100644 --- a/drivers/acpi/spcr.c +++ b/drivers/acpi/spcr.c | |||
| @@ -28,7 +28,7 @@ EXPORT_SYMBOL(qdf2400_e44_present); | |||
| 28 | 28 | ||
| 29 | /* | 29 | /* |
| 30 | * Some Qualcomm Datacenter Technologies SoCs have a defective UART BUSY bit. | 30 | * Some Qualcomm Datacenter Technologies SoCs have a defective UART BUSY bit. |
| 31 | * Detect them by examining the OEM fields in the SPCR header, similiar to PCI | 31 | * Detect them by examining the OEM fields in the SPCR header, similar to PCI |
| 32 | * quirk detection in pci_mcfg.c. | 32 | * quirk detection in pci_mcfg.c. |
| 33 | */ | 33 | */ |
| 34 | static bool qdf2400_erratum_44_present(struct acpi_table_header *h) | 34 | static bool qdf2400_erratum_44_present(struct acpi_table_header *h) |
diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c index 1ffd7b9eefc5..d7bf936b1646 100644 --- a/drivers/acpi/tables.c +++ b/drivers/acpi/tables.c | |||
| @@ -240,8 +240,7 @@ void acpi_table_print_madt_entry(struct acpi_subtable_header *header) | |||
| 240 | * On success returns sum of all matching entries for all proc handlers. | 240 | * On success returns sum of all matching entries for all proc handlers. |
| 241 | * Otherwise, -ENODEV or -EINVAL is returned. | 241 | * Otherwise, -ENODEV or -EINVAL is returned. |
| 242 | */ | 242 | */ |
| 243 | static int __init | 243 | static int __init acpi_parse_entries_array(char *id, unsigned long table_size, |
| 244 | acpi_parse_entries_array(char *id, unsigned long table_size, | ||
| 245 | struct acpi_table_header *table_header, | 244 | struct acpi_table_header *table_header, |
| 246 | struct acpi_subtable_proc *proc, int proc_num, | 245 | struct acpi_subtable_proc *proc, int proc_num, |
| 247 | unsigned int max_entries) | 246 | unsigned int max_entries) |
| @@ -314,8 +313,7 @@ acpi_parse_entries_array(char *id, unsigned long table_size, | |||
| 314 | return errs ? -EINVAL : count; | 313 | return errs ? -EINVAL : count; |
| 315 | } | 314 | } |
| 316 | 315 | ||
| 317 | int __init | 316 | int __init acpi_table_parse_entries_array(char *id, |
| 318 | acpi_table_parse_entries_array(char *id, | ||
| 319 | unsigned long table_size, | 317 | unsigned long table_size, |
| 320 | struct acpi_subtable_proc *proc, int proc_num, | 318 | struct acpi_subtable_proc *proc, int proc_num, |
| 321 | unsigned int max_entries) | 319 | unsigned int max_entries) |
| @@ -346,8 +344,7 @@ acpi_table_parse_entries_array(char *id, | |||
| 346 | return count; | 344 | return count; |
| 347 | } | 345 | } |
| 348 | 346 | ||
| 349 | int __init | 347 | int __init acpi_table_parse_entries(char *id, |
| 350 | acpi_table_parse_entries(char *id, | ||
| 351 | unsigned long table_size, | 348 | unsigned long table_size, |
| 352 | int entry_id, | 349 | int entry_id, |
| 353 | acpi_tbl_entry_handler handler, | 350 | acpi_tbl_entry_handler handler, |
| @@ -362,8 +359,7 @@ acpi_table_parse_entries(char *id, | |||
| 362 | max_entries); | 359 | max_entries); |
| 363 | } | 360 | } |
| 364 | 361 | ||
| 365 | int __init | 362 | int __init acpi_table_parse_madt(enum acpi_madt_type id, |
| 366 | acpi_table_parse_madt(enum acpi_madt_type id, | ||
| 367 | acpi_tbl_entry_handler handler, unsigned int max_entries) | 363 | acpi_tbl_entry_handler handler, unsigned int max_entries) |
| 368 | { | 364 | { |
| 369 | return acpi_table_parse_entries(ACPI_SIG_MADT, | 365 | return acpi_table_parse_entries(ACPI_SIG_MADT, |
| @@ -725,8 +721,7 @@ static void *amlcode __attribute__ ((weakref("AmlCode"))); | |||
| 725 | static void *dsdt_amlcode __attribute__ ((weakref("dsdt_aml_code"))); | 721 | static void *dsdt_amlcode __attribute__ ((weakref("dsdt_aml_code"))); |
| 726 | #endif | 722 | #endif |
| 727 | 723 | ||
| 728 | acpi_status | 724 | acpi_status acpi_os_table_override(struct acpi_table_header *existing_table, |
| 729 | acpi_os_table_override(struct acpi_table_header *existing_table, | ||
| 730 | struct acpi_table_header **new_table) | 725 | struct acpi_table_header **new_table) |
| 731 | { | 726 | { |
| 732 | if (!existing_table || !new_table) | 727 | if (!existing_table || !new_table) |
| @@ -788,7 +783,6 @@ static int __init acpi_parse_apic_instance(char *str) | |||
| 788 | 783 | ||
| 789 | return 0; | 784 | return 0; |
| 790 | } | 785 | } |
| 791 | |||
| 792 | early_param("acpi_apic_instance", acpi_parse_apic_instance); | 786 | early_param("acpi_apic_instance", acpi_parse_apic_instance); |
| 793 | 787 | ||
| 794 | static int __init acpi_force_table_verification_setup(char *s) | 788 | static int __init acpi_force_table_verification_setup(char *s) |
| @@ -797,7 +791,6 @@ static int __init acpi_force_table_verification_setup(char *s) | |||
| 797 | 791 | ||
| 798 | return 0; | 792 | return 0; |
| 799 | } | 793 | } |
| 800 | |||
| 801 | early_param("acpi_force_table_verification", acpi_force_table_verification_setup); | 794 | early_param("acpi_force_table_verification", acpi_force_table_verification_setup); |
| 802 | 795 | ||
| 803 | static int __init acpi_force_32bit_fadt_addr(char *s) | 796 | static int __init acpi_force_32bit_fadt_addr(char *s) |
| @@ -807,5 +800,4 @@ static int __init acpi_force_32bit_fadt_addr(char *s) | |||
| 807 | 800 | ||
| 808 | return 0; | 801 | return 0; |
| 809 | } | 802 | } |
| 810 | |||
| 811 | early_param("acpi_force_32bit_fadt_addr", acpi_force_32bit_fadt_addr); | 803 | early_param("acpi_force_32bit_fadt_addr", acpi_force_32bit_fadt_addr); |
diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c index 43587ac680e4..cc2888930fe9 100644 --- a/drivers/acpi/video_detect.c +++ b/drivers/acpi/video_detect.c | |||
| @@ -112,7 +112,7 @@ static int video_detect_force_none(const struct dmi_system_id *d) | |||
| 112 | static const struct dmi_system_id video_detect_dmi_table[] = { | 112 | static const struct dmi_system_id video_detect_dmi_table[] = { |
| 113 | /* On Samsung X360, the BIOS will set a flag (VDRV) if generic | 113 | /* On Samsung X360, the BIOS will set a flag (VDRV) if generic |
| 114 | * ACPI backlight device is used. This flag will definitively break | 114 | * ACPI backlight device is used. This flag will definitively break |
| 115 | * the backlight interface (even the vendor interface) untill next | 115 | * the backlight interface (even the vendor interface) until next |
| 116 | * reboot. It's why we should prevent video.ko from being used here | 116 | * reboot. It's why we should prevent video.ko from being used here |
| 117 | * and we can't rely on a later call to acpi_video_unregister(). | 117 | * and we can't rely on a later call to acpi_video_unregister(). |
| 118 | */ | 118 | */ |
