Qualcomm ARM Based Driver Updates for v5.2

* Update MAINTAINERS for Andy Gross's new email address
 * Add support for mmap in RMTFS
 * Fixup for QMI to change txn wait to non-interruptible
 * Fixup for error code in probe of cmd-db
 * Fixup for slot number check in RMPH-RSC
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJcuU7sAAoJEFKiBbHx2RXVOvoQANFlaLjbZ0CKN5nqWhLYIxns
 QNJqZulsUceR8hMgCcIE9o8Fe6HPtfHQ0FHdQ1761UKmX7gHY+euhtVFr0D/Y6Kh
 6bxvDj1huytr79kH3+dL+pTR/ZWi1BDdttAbsF+41nvxGhFGTvNSOGbRjXSIih9S
 x0fnQzRyBSbEQzZYF0eYXfs5eqYUbpTpVnsvBruX+wKo7bfMtDzigJ29aszU4HPJ
 eUEd9hKpwCTisL3WSeo89qPlPXFpUL6fWitF99Xar/WP7RXaorUg15r6VK4uQQVz
 onqOMiC93prR5rjDym77weJWKS9vpi+Aa/6Rp68Sb3Cl43HmNSfMl+rL3L2v4i/o
 LY2ntcC9GCjG0T9EsA9UId4dLaePmaX7nI5xjlyCRbIXTqKWkhhQDp6OmR0Ess9X
 ZclVSDTsXX9GNMJ/8gYFA0Uv9IrCL0A+b9LwEFYx+xrcTg2PShhN1sVmnOO38j88
 87mwEvC/btmJCddXkQY5pOrI6ixb3TUDrfyu/uuwfMrN7A1EpF1I5CKXGvlYC8og
 H+7SR5EK3X0OruGjFqgjLr6dNgHAaCkdCT4AXOGxcakn2Po86W2r979SwFzjBEEB
 2fd8gPEeMTAiMdEhqkbBw+EiaGvNiOeBQTXgXocK9dEHXNLaqbQDuNRR3iZJx57W
 eMOQA379l7K41k8p4Hdk
 =nsKB
 -----END PGP SIGNATURE-----

Merge tag 'qcom-drivers-for-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into arm/drivers

Qualcomm ARM Based Driver Updates for v5.2

* Update MAINTAINERS for Andy Gross's new email address
* Add support for mmap in RMTFS
* Fixup for QMI to change txn wait to non-interruptible
* Fixup for error code in probe of cmd-db
* Fixup for slot number check in RMPH-RSC

* tag 'qcom-drivers-for-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux:
  MAINTAINERS: Update email for Qualcomm SoC maintainer
  drivers: soc: qcom: rpmh-rsc: Correct check for slot number
  soc: qcom: cmd-db: Fix an error code in cmd_db_dev_probe()
  soc: qcom: qmi: Change txn wait to non-interruptible
  soc: qcom: rmtfs: Add support for mmap functionality

Signed-off-by: Olof Johansson <olof@lixom.net>
This commit is contained in:
Olof Johansson 2019-04-29 09:40:30 -07:00
commit 782935d12e
5 changed files with 27 additions and 9 deletions

View File

@ -1984,7 +1984,7 @@ W: http://www.armlinux.org.uk/
S: Maintained
ARM/QUALCOMM SUPPORT
M: Andy Gross <andy.gross@linaro.org>
M: Andy Gross <agross@kernel.org>
M: David Brown <david.brown@linaro.org>
L: linux-arm-msm@vger.kernel.org
S: Maintained

View File

@ -248,8 +248,8 @@ static int cmd_db_dev_probe(struct platform_device *pdev)
}
cmd_db_header = memremap(rmem->base, rmem->size, MEMREMAP_WB);
if (IS_ERR_OR_NULL(cmd_db_header)) {
ret = PTR_ERR(cmd_db_header);
if (!cmd_db_header) {
ret = -ENOMEM;
cmd_db_header = NULL;
return ret;
}

View File

@ -345,8 +345,7 @@ int qmi_txn_wait(struct qmi_txn *txn, unsigned long timeout)
struct qmi_handle *qmi = txn->qmi;
int ret;
ret = wait_for_completion_interruptible_timeout(&txn->completion,
timeout);
ret = wait_for_completion_timeout(&txn->completion, timeout);
mutex_lock(&qmi->txn_lock);
mutex_lock(&txn->lock);
@ -354,9 +353,7 @@ int qmi_txn_wait(struct qmi_txn *txn, unsigned long timeout)
mutex_unlock(&txn->lock);
mutex_unlock(&qmi->txn_lock);
if (ret < 0)
return ret;
else if (ret == 0)
if (ret == 0)
return -ETIMEDOUT;
else
return txn->result;

View File

@ -137,6 +137,26 @@ static struct class rmtfs_class = {
.name = "rmtfs",
};
static int qcom_rmtfs_mem_mmap(struct file *filep, struct vm_area_struct *vma)
{
struct qcom_rmtfs_mem *rmtfs_mem = filep->private_data;
if (vma->vm_end - vma->vm_start > rmtfs_mem->size) {
dev_dbg(&rmtfs_mem->dev,
"vm_end[%lu] - vm_start[%lu] [%lu] > mem->size[%pa]\n",
vma->vm_end, vma->vm_start,
(vma->vm_end - vma->vm_start), &rmtfs_mem->size);
return -EINVAL;
}
vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
return remap_pfn_range(vma,
vma->vm_start,
rmtfs_mem->addr >> PAGE_SHIFT,
vma->vm_end - vma->vm_start,
vma->vm_page_prot);
}
static const struct file_operations qcom_rmtfs_mem_fops = {
.owner = THIS_MODULE,
.open = qcom_rmtfs_mem_open,
@ -144,6 +164,7 @@ static const struct file_operations qcom_rmtfs_mem_fops = {
.write = qcom_rmtfs_mem_write,
.release = qcom_rmtfs_mem_release,
.llseek = default_llseek,
.mmap = qcom_rmtfs_mem_mmap,
};
static void qcom_rmtfs_mem_release_device(struct device *dev)

View File

@ -459,7 +459,7 @@ static int find_slots(struct tcs_group *tcs, const struct tcs_request *msg,
do {
slot = bitmap_find_next_zero_area(tcs->slots, MAX_TCS_SLOTS,
i, msg->num_cmds, 0);
if (slot == tcs->num_tcs * tcs->ncpt)
if (slot >= tcs->num_tcs * tcs->ncpt)
return -ENOMEM;
i += tcs->ncpt;
} while (slot + msg->num_cmds - 1 >= i);