Linux kernel source tree
Go to file
Boris Brezillon 94ac529a99 drm/panthor: Fix the user MMIO offset logic for emulators
Currently, we pick the MMIO offset based on the size of the pgoff_t
type seen by the process that manipulates the FD, such that a 32-bit
process can always map the user MMIO ranges. But this approach doesn't
work well for emulators like FEX, where the emulator is a 64-bit binary
which might be executing 32-bit code. In that case, the kernel thinks
it's the 64-bit process and assumes DRM_PANTHOR_USER_MMIO_OFFSET_64BIT
is in use, but the UMD library expects DRM_PANTHOR_USER_MMIO_OFFSET_32BIT,
because it can't mmap() anything above the pgoff_t size.

In order to solve that, we need a way to explicitly set the user MMIO
offset from the UMD, such that the kernel doesn't have to guess it
from the TIF_32BIT flag set on user thread. We keep the old behavior
if DRM_PANTHOR_SET_USER_MMIO_OFFSET is never called.

Changes in v2:
- Drop the lock/immutable fields and allow SET_USER_MMIO_OFFSET
  requests to race with mmap() requests
- Don't do the is_user_mmio_offset test twice in panthor_mmap()
- Improve the uAPI docs

Changes in v3:
- Bump to version 1.5 instead of 1.4 after rebasing
- Add R-bs
- Fix/rephrase comment as suggested by Liviu

Reviewed-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>
Link: https://lore.kernel.org/r/20250606080932.4140010-3-boris.brezillon@collabora.com
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
2025-06-06 11:36:08 +02:00
arch Merge tag 'drm-msm-next-2025-05-16' of https://gitlab.freedesktop.org/drm/msm into drm-next 2025-05-19 11:05:58 +10:00
block block-6.15-20250424 2025-04-25 11:34:39 -07:00
certs
crypto crypto: scompress - increment scomp_scratch_users when already allocated 2025-04-25 10:33:30 +08:00
Documentation dt-bindings: display: himax-hx8394: Add Huiling hl055fhav028c 2025-06-05 08:53:50 +02:00
drivers drm/panthor: Fix the user MMIO offset logic for emulators 2025-06-06 11:36:08 +02:00
fs cifs and smb3 client fixes 2025-05-02 14:37:16 -07:00
include drm/panthor: Fix the user MMIO offset logic for emulators 2025-06-06 11:36:08 +02:00
init Kconfig: switch CONFIG_SYSFS_SYCALL default to n 2025-04-15 10:28:35 +02:00
io_uring io_uring/fdinfo: annotate racy sq/cq head/tail reads 2025-04-30 07:17:17 -06:00
ipc
kernel tracing updates for v6.15 2025-05-04 10:15:42 -07:00
lib Merge drm/drm-next into drm-misc-next 2025-05-06 09:09:49 +02:00
LICENSES
mm slab fix for 6.15-rc5 2025-05-02 08:50:10 -07:00
net Happy May Day. 2025-05-01 10:37:49 -07:00
rust Nova changes for v6.16 2025-05-21 05:49:31 +10:00
samples Nova changes for v6.16 2025-05-21 05:49:31 +10:00
scripts checkpatch: remove %p4cn 2025-05-06 11:33:49 -04:00
security Landlock fix for v6.15-rc4 2025-04-24 12:59:05 -07:00
sound ASoC: Fixes for v6.15 2025-05-01 10:22:20 +02:00
tools perf tools fixes for v6.15-rc5 2025-05-04 12:57:18 -07:00
usr
virt
.clang-format Linux 6.15-rc5 2025-05-06 16:39:25 +10:00
.clippy.toml
.cocciconfig
.editorconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap sound fixes for 6.15-rc3 2025-04-17 10:14:51 -07:00
.rustfmt.toml
COPYING
CREDITS MAINTAINERS: update SLAB ALLOCATOR maintainers 2025-04-17 20:10:06 -07:00
Kbuild
Kconfig
MAINTAINERS MAINTAINERS: Update my email address for DRM Panel reviews 2025-06-05 08:53:34 +02:00
Makefile Linux 6.15-rc5 2025-05-04 13:55:04 -07:00
README

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 reStructuredText 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.