linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sherry Sun <sherry.sun@nxp.com>
To: hch@infradead.org, sudeep.dutt@intel.com,
	ashutosh.dixit@intel.com, arnd@arndb.de,
	gregkh@linuxfoundation.org, kishon@ti.com,
	lorenzo.pieralisi@arm.com
Cc: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
	linux-imx@nxp.com
Subject: [PATCH V2 4/4] misc: vop: mapping kernel memory to user space as noncached
Date: Tue, 29 Sep 2020 16:44:25 +0800	[thread overview]
Message-ID: <20200929084425.24052-5-sherry.sun@nxp.com> (raw)
In-Reply-To: <20200929084425.24052-1-sherry.sun@nxp.com>

Mapping kernel space memory to user space as noncached, since user space
need check the updates of avail_idx and device page flags timely.

Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
---
 drivers/misc/mic/vop/vop_vringh.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/misc/mic/vop/vop_vringh.c b/drivers/misc/mic/vop/vop_vringh.c
index 4d5feb39aeb7..6e193bd64ef1 100644
--- a/drivers/misc/mic/vop/vop_vringh.c
+++ b/drivers/misc/mic/vop/vop_vringh.c
@@ -1057,7 +1057,7 @@ static int vop_mmap(struct file *f, struct vm_area_struct *vma)
 		}
 		err = remap_pfn_range(vma, vma->vm_start + offset,
 				      pa >> PAGE_SHIFT, size,
-				      vma->vm_page_prot);
+				      pgprot_noncached(vma->vm_page_prot));
 		if (err)
 			goto ret;
 		size_rem -= size;
-- 
2.17.1


  parent reply	other threads:[~2020-09-29  8:46 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-29  8:44 [PATCH V2 0/4] Change vring space from nomal memory to dma coherent memory Sherry Sun
2020-09-29  8:44 ` [PATCH V2 1/4] misc: vop: change the way of allocating vring Sherry Sun
2020-09-29 10:23   ` Christoph Hellwig
2020-09-29 13:02     ` Sherry Sun
2020-09-29  8:44 ` [PATCH V2 2/4] misc: vop: do not allocate and reassign the used ring Sherry Sun
2020-09-29 10:24   ` Christoph Hellwig
2020-09-29 13:02     ` Sherry Sun
2020-09-29 14:28       ` David Laight
2020-09-29  8:44 ` [PATCH V2 3/4] misc: vop: simply return the saved dma address instead of virt_to_phys Sherry Sun
2020-09-29 10:26   ` Christoph Hellwig
2020-09-29 13:10     ` Sherry Sun
2020-09-29 18:11       ` Christoph Hellwig
2020-09-30  7:30         ` Sherry Sun
2020-10-05 13:42           ` Christoph Hellwig
2020-09-29  8:44 ` Sherry Sun [this message]
2020-09-29 10:28   ` [PATCH V2 4/4] misc: vop: mapping kernel memory to user space as noncached Christoph Hellwig
2020-09-29 13:12     ` Sherry Sun
2020-09-29 15:39     ` David Laight
2020-10-13  2:02       ` Sherry Sun
2020-10-20  1:33         ` Sherry Sun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200929084425.24052-5-sherry.sun@nxp.com \
    --to=sherry.sun@nxp.com \
    --cc=arnd@arndb.de \
    --cc=ashutosh.dixit@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hch@infradead.org \
    --cc=kishon@ti.com \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=sudeep.dutt@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).