mainlining shenanigans
Go to file
Firas Ashkar e4e050167f uio: uio_pci_generic: add memory resource mappings
import memory resources from underlying pci device, thus allowing
userspace applications to memory map those resources.

without this change, current implementation, does not populate the
memory maps and are not shown under the corresponding sysfs uio entry:

root@apalis-imx8:~# echo "ad00 0122" > \
			/sys/bus/pci/drivers/uio_pci_generic/new_id
[   55.736433] uio_pci_generic 0000:01:00.0: enabling device (0000 -> 0002)
root@apalis-imx8:~# ls -lsrt /sys/class/uio/uio0/
     0 -rw-r--r--    1 root     root          4096 Apr 27 18:52 uevent
     0 -r--r--r--    1 root     root          4096 Apr 27 18:52 version
     0 -r--r--r--    1 root     root          4096 Apr 27 18:52 suppliers
     0 lrwxrwxrwx    1 root     root             0 Apr 27 18:52 subsystem
-> ../../../../../../../../../class/uio
     0 drwxr-xr-x    2 root     root             0 Apr 27 18:52 power
     0 -r--r--r--    1 root     root          4096 Apr 27 18:52 name
     0 -r--r--r--    1 root     root          4096 Apr 27 18:52 event
     0 lrwxrwxrwx    1 root     root             0 Apr 27 18:52 device
-> ../../../0000:01:00.0
     0 -r--r--r--    1 root     root          4096 Apr 27 18:52 dev
     0 -r--r--r--    1 root     root          4096 Apr 27 18:52 consumers
root@apalis-imx8:~#

with the proposed changed, have following instead:
root@apalis-imx8:~# ls -lsrt /sys/class/uio/uio0/
     0 -rw-r--r--    1 root     root          4096 Apr 27 19:06 uevent
     0 -r--r--r--    1 root     root          4096 Apr 27 19:06 version
     0 -r--r--r--    1 root     root          4096 Apr 27 19:06 suppliers
     0 lrwxrwxrwx    1 root     root             0 Apr 27 19:06 subsystem
-> ../../../../../../../../../class/uio
     0 drwxr-xr-x    2 root     root             0 Apr 27 19:06 power
     0 -r--r--r--    1 root     root          4096 Apr 27 19:06 name
     0 drwxr-xr-x    4 root     root             0 Apr 27 19:06 maps
     0 -r--r--r--    1 root     root          4096 Apr 27 19:06 event
     0 lrwxrwxrwx    1 root     root             0 Apr 27 19:06 device
-> ../../../0000:01:00.0
     0 -r--r--r--    1 root     root          4096 Apr 27 19:06 dev
     0 -r--r--r--    1 root     root          4096 Apr 27 19:06 consumers
root@apalis-imx8:~#

root@apalis-imx8:~# ls -lsrt /sys/class/uio/uio0/maps/
     0 drwxr-xr-x    2 root     root             0 Apr 27 19:07 map1
     0 drwxr-xr-x    2 root     root             0 Apr 27 19:07 map0
root@apalis-imx8:~#

root@apalis-imx8:~# cat /sys/class/uio/uio0/maps/map1/addr
0x0000000062000000
root@apalis-imx8:~#

root@apalis-imx8:~# cat /sys/class/uio/uio0/maps/map1/size
0x0000000000200000
root@apalis-imx8:~#

tested on AltaData ARINC 429 MiniPCIE module on imx8qm-apalis-ixora-v1.2

Signed-off-by: Firas Ashkar <firas.ashkar@savoirfairelinux.com>
Link: https://lore.kernel.org/r/20210427201046.4005820-1-firas.ashkar@savoirfairelinux.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-14 13:42:11 +02:00
arch Handle power-gating of AMD IOMMU perf counters properly when they are used. 2021-05-09 13:00:26 -07:00
block block-5.13-2021-05-09 2021-05-09 13:25:14 -07:00
certs Kbuild updates for v5.13 (2nd) 2021-05-08 10:00:11 -07:00
crypto for-5.13/drivers-2021-04-27 2021-04-28 14:39:37 -07:00
Documentation A set of scheduler updates: 2021-05-09 13:14:34 -07:00
drivers uio: uio_pci_generic: add memory resource mappings 2021-05-14 13:42:11 +02:00
fs 3 small SMB3 chmultichannel related changesets (also for stable) 2021-05-09 13:19:29 -07:00
include block-5.13-2021-05-09 2021-05-09 13:25:14 -07:00
init Merge branch 'akpm' (patches from Andrew) 2021-05-07 00:34:51 -07:00
ipc ipc/sem.c: spelling fix 2021-05-07 00:26:34 -07:00
kernel A set of scheduler updates: 2021-05-09 13:14:34 -07:00
lib Kbuild updates for v5.13 (2nd) 2021-05-08 10:00:11 -07:00
LICENSES LICENSES: Add the CC-BY-4.0 license 2020-12-08 10:33:27 -07:00
mm mm: fix typos in comments 2021-05-07 00:26:35 -07:00
net Networking fixes for 5.13-rc1, including fixes from bpf, can 2021-05-08 08:31:46 -07:00
samples Kbuild updates for v5.13 (2nd) 2021-05-08 10:00:11 -07:00
scripts Kbuild updates for v5.13 (2nd) 2021-05-08 10:00:11 -07:00
security Simple code cleanup 2021-05-05 12:08:06 -07:00
sound sound fixes for 5.13-rc1 2021-05-07 11:40:18 -07:00
tools Kbuild updates for v5.13 (2nd) 2021-05-08 10:00:11 -07:00
usr .gitignore: prefix local generated files with a slash 2021-05-02 00:43:35 +09:00
virt KVM: Boost vCPU candidate in user mode which is delivering interrupt 2021-04-21 12:20:03 -04:00
.clang-format cxl for 5.12 2021-02-24 09:38:36 -08:00
.cocciconfig
.get_maintainer.ignore Opt out of scripts/get_maintainer.pl 2019-05-16 10:53:40 -07:00
.gitattributes .gitattributes: use 'dts' diff driver for dts files 2019-12-04 19:44:11 -08:00
.gitignore .gitignore: ignore only top-level modules.builtin 2021-05-02 00:43:35 +09:00
.mailmap It's been a relatively busy cycle in docsland, though more than usually 2021-04-26 13:22:43 -07:00
COPYING COPYING: state that all contributions really are covered by this file 2020-02-10 13:32:20 -08:00
CREDITS MAINTAINERS: move Murali Karicheri to credits 2021-04-29 15:47:30 -07:00
Kbuild kbuild: rename hostprogs-y/always to hostprogs/always-y 2020-02-04 01:53:07 +09:00
Kconfig kbuild: ensure full rebuild when the compiler is updated 2020-05-12 13:28:33 +09:00
MAINTAINERS Networking fixes for 5.13-rc1, including fixes from bpf, can 2021-05-08 08:31:46 -07:00
Makefile Linux 5.13-rc1 2021-05-09 14:17:44 -07:00
README Drop all 00-INDEX files from Documentation/ 2018-09-09 15:08:58 -06:00

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.