All of lore.kernel.org
 help / color / mirror / Atom feed
From: "praneeth" <praneeth@ti.com>
To: Praneeth Bajjuri <praneeth@ti.com>
Cc: Denys Dmytriyenko <denys@konsulko.com>,
	Lokesh Vutla <lokeshvutla@ti.com>, Suman Anna <s-anna@ti.com>,
	Yogesh Siraswar <yogeshs@ti.com>, Nishanth Menon <nm@ti.com>,
	<meta-ti@lists.yoctoproject.org>
Subject: [dunfell/master PATCH 4/4] uio-module-drv: Build fix for linux kernel 5.10
Date: Wed, 21 Apr 2021 15:53:26 -0500	[thread overview]
Message-ID: <20210421205326.22047-5-praneeth@ti.com> (raw)
In-Reply-To: <20210421205326.22047-1-praneeth@ti.com>

From: Praneeth Bajjuri <praneeth@ti.com>

This update contains build fix for linux kernel 5.10
* uio-module-drv: Replace ioremap_nocache with ioremap

Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
---
 recipes-bsp/uio-module-drv/uio-module-drv.inc |  7 +++-
 ...Replace-ioremap_nocache-with-ioremap.patch | 35 +++++++++++++++++++
 2 files changed, 41 insertions(+), 1 deletion(-)
 create mode 100644 recipes-bsp/uio-module-drv/uio-module-drv/0001-uio-module-drv-Replace-ioremap_nocache-with-ioremap.patch

diff --git a/recipes-bsp/uio-module-drv/uio-module-drv.inc b/recipes-bsp/uio-module-drv/uio-module-drv.inc
index f483010e..ab1beb9f 100644
--- a/recipes-bsp/uio-module-drv/uio-module-drv.inc
+++ b/recipes-bsp/uio-module-drv/uio-module-drv.inc
@@ -1,3 +1,5 @@
+FILESEXTRAPATHS_prepend:= "${THISDIR}/${PN}:"
+
 LICENSE = "BSD"
 LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=2b7c96eb2aed7b0f6f922214dbde9016"
 
@@ -9,7 +11,10 @@ PV = "2.2.1.0+git${SRCPV}"
 
 UIO_MODULE_DRV_GIT_URI = "git://git.ti.com/keystone-linux/uio-module-drv.git"
 UIO_MODULE_DRV_GIT_PROTOCOL = "git"
-SRC_URI = "${UIO_MODULE_DRV_GIT_URI};protocol=${UIO_MODULE_DRV_GIT_PROTOCOL};branch=${BRANCH}"
+SRC_URI = " \
+	${UIO_MODULE_DRV_GIT_URI};protocol=${UIO_MODULE_DRV_GIT_PROTOCOL};branch=${BRANCH} \
+	file://0001-uio-module-drv-Replace-ioremap_nocache-with-ioremap.patch \
+"
 
 SRCREV = "${UIO_MODULE_DRV_SRCREV}"
 
diff --git a/recipes-bsp/uio-module-drv/uio-module-drv/0001-uio-module-drv-Replace-ioremap_nocache-with-ioremap.patch b/recipes-bsp/uio-module-drv/uio-module-drv/0001-uio-module-drv-Replace-ioremap_nocache-with-ioremap.patch
new file mode 100644
index 00000000..955ef558
--- /dev/null
+++ b/recipes-bsp/uio-module-drv/uio-module-drv/0001-uio-module-drv-Replace-ioremap_nocache-with-ioremap.patch
@@ -0,0 +1,35 @@
+From b5c4036dac06817bffd0be21c5fa1b7f75f74e4b Mon Sep 17 00:00:00 2001
+From: Suman Anna <s-anna@ti.com>
+Date: Mon, 19 Apr 2021 13:15:51 -0500
+Subject: [PATCH] uio-module-drv: Replace ioremap_nocache with ioremap
+
+The ioremap_nocache is the same as the regular ioremap and its
+definition has been dropped from the Linux kernel v5.6 onwards in
+commit 4bdc0d676a64 ("remove ioremap_nocache and devm_ioremap_nocache")
+[1]. The uio-module-drv module fails to build against these newer
+kernels, so fix it by simply replacing ioremap_nocache with ioremap.
+
+[1]
+https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4bdc0d676a643140bdf17dbf7eafedee3d496a3c
+
+Signed-off-by: Suman Anna <s-anna@ti.com>
+---
+ uio_module_drv.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/uio_module_drv.c b/uio_module_drv.c
+index 5a67dd199e21..7cc6005d1f05 100644
+--- a/uio_module_drv.c
++++ b/uio_module_drv.c
+@@ -240,7 +240,7 @@ static ssize_t  uio_module_drv_transfer(struct file *file, char __user *buf,
+ 		return -EINVAL;
+ 	}
+ 
+-	virt_addr_p = ioremap_nocache(phys_addr, count);
++	virt_addr_p = ioremap(phys_addr, count);
+ 	if (!virt_addr_p) {
+ 		dev_err(uio_module_drv->dev, "Mapping of virtual memory failed\n");
+ 		return(-ENOMEM);
+-- 
+2.30.1
+
-- 
2.17.1


  parent reply	other threads:[~2021-04-21 20:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-21 20:53 [dunfell/master PATCH 0/4] K2/AM3/AM4 Build fixes for 5.10 praneeth
2021-04-21 20:53 ` [dunfell/master PATCH 1/4] cmem: Update to new version 4.20.00.00 praneeth
2021-04-21 20:59   ` Suman Anna
     [not found]   ` <1677FB31053272E2.8702@lists.yoctoproject.org>
2021-04-22 15:00     ` [meta-ti] " Suman Anna
2021-04-22 21:57       ` praneeth
2021-04-21 20:53 ` [dunfell/master PATCH 2/4] gdbc6x: bump SRCREV for kernel 5.10 build fix praneeth
2021-04-21 20:58   ` Suman Anna
2021-04-21 20:53 ` [dunfell/master PATCH 3/4] dsptop: " praneeth
2021-04-21 20:58   ` Suman Anna
2021-04-21 20:53 ` praneeth [this message]
     [not found] ` <1677FADB0573C7FC.32615@lists.yoctoproject.org>
2021-04-22  6:35   ` [meta-ti] [dunfell/master PATCH 4/4] uio-module-drv: Build fix for linux kernel 5.10 praneeth

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=20210421205326.22047-5-praneeth@ti.com \
    --to=praneeth@ti.com \
    --cc=denys@konsulko.com \
    --cc=lokeshvutla@ti.com \
    --cc=meta-ti@lists.yoctoproject.org \
    --cc=nm@ti.com \
    --cc=s-anna@ti.com \
    --cc=yogeshs@ti.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.