Char/Misc driver fixes for 5.14-rc5
Here are some small char/misc driver fixes for 5.14-rc5. They resolve a few regressions that people reported: - acrn driver fix - fpga driver fix - interconnect tiny driver fixes All have been in linux-next for a while with no reported issues. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -----BEGIN PGP SIGNATURE----- iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCYQ+oWw8cZ3JlZ0Brcm9h aC5jb20ACgkQMUfUDdst+ymihQCglZZdlg1HFVLx6zBvIR5cOAODRwkAoJgOMVnl ngKziJBQqPHbT1KE49Uz =jFHY -----END PGP SIGNATURE----- Merge tag 'char-misc-5.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes from Greg KH: "Here are some small char/misc driver fixes for 5.14-rc5. They resolve a few regressions that people reported: - acrn driver fix - fpga driver fix - interconnect tiny driver fixes All have been in linux-next for a while with no reported issues" * tag 'char-misc-5.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: interconnect: Fix undersized devress_alloc allocation interconnect: qcom: icc-rpmh: Add BCMs to commit list in pre_aggregate interconnect: qcom: icc-rpmh: Ensure floor BW is enforced for all nodes fpga: dfl: fme: Fix cpu hotplug issue in performance reporting virt: acrn: Do hcall_destroy_vm() before resource release interconnect: Always call pre_aggregate before aggregate interconnect: Zero initial BW after sync-state
This commit is contained in:
commit
66745863ec
|
@ -953,6 +953,8 @@ static int fme_perf_offline_cpu(unsigned int cpu, struct hlist_node *node)
|
|||
return 0;
|
||||
|
||||
priv->cpu = target;
|
||||
perf_pmu_migrate_context(&priv->pmu, cpu, target);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -403,7 +403,7 @@ struct icc_path *devm_of_icc_get(struct device *dev, const char *name)
|
|||
{
|
||||
struct icc_path **ptr, *path;
|
||||
|
||||
ptr = devres_alloc(devm_icc_release, sizeof(**ptr), GFP_KERNEL);
|
||||
ptr = devres_alloc(devm_icc_release, sizeof(*ptr), GFP_KERNEL);
|
||||
if (!ptr)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
|
@ -973,9 +973,14 @@ void icc_node_add(struct icc_node *node, struct icc_provider *provider)
|
|||
}
|
||||
node->avg_bw = node->init_avg;
|
||||
node->peak_bw = node->init_peak;
|
||||
|
||||
if (provider->pre_aggregate)
|
||||
provider->pre_aggregate(node);
|
||||
|
||||
if (provider->aggregate)
|
||||
provider->aggregate(node, 0, node->init_avg, node->init_peak,
|
||||
&node->avg_bw, &node->peak_bw);
|
||||
|
||||
provider->set(node, node);
|
||||
node->avg_bw = 0;
|
||||
node->peak_bw = 0;
|
||||
|
@ -1106,6 +1111,8 @@ void icc_sync_state(struct device *dev)
|
|||
dev_dbg(p->dev, "interconnect provider is in synced state\n");
|
||||
list_for_each_entry(n, &p->nodes, node_list) {
|
||||
if (n->init_avg || n->init_peak) {
|
||||
n->init_avg = 0;
|
||||
n->init_peak = 0;
|
||||
aggregate_requests(n);
|
||||
p->set(n, n);
|
||||
}
|
||||
|
|
|
@ -20,13 +20,18 @@ void qcom_icc_pre_aggregate(struct icc_node *node)
|
|||
{
|
||||
size_t i;
|
||||
struct qcom_icc_node *qn;
|
||||
struct qcom_icc_provider *qp;
|
||||
|
||||
qn = node->data;
|
||||
qp = to_qcom_provider(node->provider);
|
||||
|
||||
for (i = 0; i < QCOM_ICC_NUM_BUCKETS; i++) {
|
||||
qn->sum_avg[i] = 0;
|
||||
qn->max_peak[i] = 0;
|
||||
}
|
||||
|
||||
for (i = 0; i < qn->num_bcms; i++)
|
||||
qcom_icc_bcm_voter_add(qp->voter, qn->bcms[i]);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(qcom_icc_pre_aggregate);
|
||||
|
||||
|
@ -44,10 +49,8 @@ int qcom_icc_aggregate(struct icc_node *node, u32 tag, u32 avg_bw,
|
|||
{
|
||||
size_t i;
|
||||
struct qcom_icc_node *qn;
|
||||
struct qcom_icc_provider *qp;
|
||||
|
||||
qn = node->data;
|
||||
qp = to_qcom_provider(node->provider);
|
||||
|
||||
if (!tag)
|
||||
tag = QCOM_ICC_TAG_ALWAYS;
|
||||
|
@ -57,14 +60,16 @@ int qcom_icc_aggregate(struct icc_node *node, u32 tag, u32 avg_bw,
|
|||
qn->sum_avg[i] += avg_bw;
|
||||
qn->max_peak[i] = max_t(u32, qn->max_peak[i], peak_bw);
|
||||
}
|
||||
|
||||
if (node->init_avg || node->init_peak) {
|
||||
qn->sum_avg[i] = max_t(u64, qn->sum_avg[i], node->init_avg);
|
||||
qn->max_peak[i] = max_t(u64, qn->max_peak[i], node->init_peak);
|
||||
}
|
||||
}
|
||||
|
||||
*agg_avg += avg_bw;
|
||||
*agg_peak = max_t(u32, *agg_peak, peak_bw);
|
||||
|
||||
for (i = 0; i < qn->num_bcms; i++)
|
||||
qcom_icc_bcm_voter_add(qp->voter, qn->bcms[i]);
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(qcom_icc_aggregate);
|
||||
|
@ -79,7 +84,6 @@ EXPORT_SYMBOL_GPL(qcom_icc_aggregate);
|
|||
int qcom_icc_set(struct icc_node *src, struct icc_node *dst)
|
||||
{
|
||||
struct qcom_icc_provider *qp;
|
||||
struct qcom_icc_node *qn;
|
||||
struct icc_node *node;
|
||||
|
||||
if (!src)
|
||||
|
@ -88,12 +92,6 @@ int qcom_icc_set(struct icc_node *src, struct icc_node *dst)
|
|||
node = src;
|
||||
|
||||
qp = to_qcom_provider(node->provider);
|
||||
qn = node->data;
|
||||
|
||||
qn->sum_avg[QCOM_ICC_BUCKET_AMC] = max_t(u64, qn->sum_avg[QCOM_ICC_BUCKET_AMC],
|
||||
node->avg_bw);
|
||||
qn->max_peak[QCOM_ICC_BUCKET_AMC] = max_t(u64, qn->max_peak[QCOM_ICC_BUCKET_AMC],
|
||||
node->peak_bw);
|
||||
|
||||
qcom_icc_bcm_voter_commit(qp->voter);
|
||||
|
||||
|
|
|
@ -64,6 +64,14 @@ int acrn_vm_destroy(struct acrn_vm *vm)
|
|||
test_and_set_bit(ACRN_VM_FLAG_DESTROYED, &vm->flags))
|
||||
return 0;
|
||||
|
||||
ret = hcall_destroy_vm(vm->vmid);
|
||||
if (ret < 0) {
|
||||
dev_err(acrn_dev.this_device,
|
||||
"Failed to destroy VM %u\n", vm->vmid);
|
||||
clear_bit(ACRN_VM_FLAG_DESTROYED, &vm->flags);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Remove from global VM list */
|
||||
write_lock_bh(&acrn_vm_list_lock);
|
||||
list_del_init(&vm->list);
|
||||
|
@ -78,14 +86,6 @@ int acrn_vm_destroy(struct acrn_vm *vm)
|
|||
vm->monitor_page = NULL;
|
||||
}
|
||||
|
||||
ret = hcall_destroy_vm(vm->vmid);
|
||||
if (ret < 0) {
|
||||
dev_err(acrn_dev.this_device,
|
||||
"Failed to destroy VM %u\n", vm->vmid);
|
||||
clear_bit(ACRN_VM_FLAG_DESTROYED, &vm->flags);
|
||||
return ret;
|
||||
}
|
||||
|
||||
acrn_vm_all_ram_unmap(vm);
|
||||
|
||||
dev_dbg(acrn_dev.this_device, "VM %u destroyed.\n", vm->vmid);
|
||||
|
|
Loading…
Reference in New Issue