[ipu6-camera-bins] Updated dependency settings
by smallorange
commit fe79aed7f8976f137fcaaa20f432e9c86c97124f
Author: Kate Hsuan <hpa(a)redhat.com>
Date: Tue May 9 13:35:24 2023 +0800
Updated dependency settings
ipu6-camera-bins.spec | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
---
diff --git a/ipu6-camera-bins.spec b/ipu6-camera-bins.spec
index 07703b3..114462b 100644
--- a/ipu6-camera-bins.spec
+++ b/ipu6-camera-bins.spec
@@ -7,7 +7,7 @@
Name: ipu6-camera-bins
Summary: Binary library for Intel IPU6
Version: 0.0
-Release: 5.%{commitdate}git%{shortcommit}%{?dist}
+Release: 6.%{commitdate}git%{shortcommit}%{?dist}
License: Proprietary
Source0: https://github.com/intel/%{name}/archive/%{commit}/%{name}-%{shortcommit}...
@@ -18,6 +18,12 @@ BuildRequires: patchelf
ExclusiveArch: x86_64
+Requires: ipu6-camera-bins-firmware
+Requires: ivsc-firmware
+Requires: gstreamer1-plugins-icamerasrc
+Requires: v4l2-relayd
+Requires: intel-ipu6-kmod
+
# For kmod package
Provides: intel-ipu6-kmod-common = %{version}
@@ -95,6 +101,9 @@ install -p -D -m 0644 ipu6ep/lib/firmware/intel/ipu6ep_fw.bin %{buildroot}/usr/l
%changelog
+* Tue May 09 2023 Kate Hsuan <hpa(a)redhat.com> - 0.0-6.20221112git4694ba7
+- Updated dependency settings
+
* Tue Dec 13 2022 Kate Hsuan <hpa(a)redhat.com> - 0.0-5.20221112git4694ba7
- Fix indentation.
- Remove unnecessary dir macro.
1 year, 6 months
[ppsspp/f36] (6 commits) ...Fix installed files /2
by sagitter
Summary of changes:
397e4f5... Release 1.15 (*)
2b258b9... Release 1.15.2 (*)
1c898bd... Release 1.15.3 (*)
3414f31... Disable/obsolete Qt version (unsupported) (*)
001ede0... Fix installed files (*)
daad228... Fix installed files /2 (*)
(*) This commit already existed in another branch; no separate mail sent
1 year, 6 months
[ppsspp/f37] (5 commits) ...Fix installed files /2
by sagitter
Summary of changes:
2b258b9... Release 1.15.2 (*)
1c898bd... Release 1.15.3 (*)
3414f31... Disable/obsolete Qt version (unsupported) (*)
001ede0... Fix installed files (*)
daad228... Fix installed files /2 (*)
(*) This commit already existed in another branch; no separate mail sent
1 year, 6 months
[ppsspp/f38] (5 commits) ...Fix installed files /2
by sagitter
Summary of changes:
2b258b9... Release 1.15.2 (*)
1c898bd... Release 1.15.3 (*)
3414f31... Disable/obsolete Qt version (unsupported) (*)
001ede0... Fix installed files (*)
daad228... Fix installed files /2 (*)
(*) This commit already existed in another branch; no separate mail sent
1 year, 6 months
[ppsspp] Fix installed files /2
by sagitter
commit daad2281633f0d6d41d5b13d7c3e13f07c51dda9
Author: Antonio Trande <sagitter(a)fedoraproject.org>
Date: Mon May 8 20:39:24 2023 +0200
Fix installed files /2
ppsspp.spec | 2 --
1 file changed, 2 deletions(-)
---
diff --git a/ppsspp.spec b/ppsspp.spec
index 8176189..2149d56 100644
--- a/ppsspp.spec
+++ b/ppsspp.spec
@@ -431,9 +431,7 @@ fi
%license LICENSE.TXT
%{_datadir}/icons/hicolor/scalable/apps/ppsspp.svg
%{_datadir}/mime/packages/ppsspp.xml
-%if %{with qt}
%{_datadir}/%{name}/
-%endif
%{_datadir}/icons/hicolor/*/apps/%{name}.png
%{_datadir}/icons/%{name}/
1 year, 6 months
[ppsspp] Fix installed files
by sagitter
commit 001ede099fe06cf819f84afca2527ebabe872a82
Author: Antonio Trande <sagitter(a)fedoraproject.org>
Date: Mon May 8 20:29:58 2023 +0200
Fix installed files
ppsspp.spec | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/ppsspp.spec b/ppsspp.spec
index 1aabfd5..8176189 100644
--- a/ppsspp.spec
+++ b/ppsspp.spec
@@ -332,7 +332,13 @@ install -pm 755 build/PPSSPPSDL %{buildroot}%{_bindir}/
# Install libraries
mkdir -p %{buildroot}%{_libdir}/%{name}
+%if %{with qt}
cp -a build2/lib/*.so* %{buildroot}%{_libdir}/%{name}/
+# Install data files
+mkdir -p %{buildroot}%{_datadir}/%{name}
+cp -a build2/assets %{buildroot}%{_datadir}/%{name}/
+install -pm 644 Qt/languages/*.ts %{buildroot}%{_datadir}/%{name}/assets/lang/
+%endif
cp -u build/lib/*.so* %{buildroot}%{_libdir}/%{name}/
%if %{with ffmpeg}
@@ -357,11 +363,6 @@ popd
patchelf --set-rpath %{_libdir}/%{name} %{buildroot}%{_bindir}/PPSSPP*
patchelf --set-rpath %{_libdir}/%{name} %{buildroot}%{_libdir}/%{name}/*.so*
-# Install data files
-mkdir -p %{buildroot}%{_datadir}/%{name}
-cp -a build2/assets %{buildroot}%{_datadir}/%{name}/
-install -pm 644 Qt/languages/*.ts %{buildroot}%{_datadir}/%{name}/assets/lang/
-
# Remove unnecessary files
rm -rf %{buildroot}%{_includedir}
@@ -430,7 +431,9 @@ fi
%license LICENSE.TXT
%{_datadir}/icons/hicolor/scalable/apps/ppsspp.svg
%{_datadir}/mime/packages/ppsspp.xml
+%if %{with qt}
%{_datadir}/%{name}/
+%endif
%{_datadir}/icons/hicolor/*/apps/%{name}.png
%{_datadir}/icons/%{name}/
1 year, 6 months
[ppsspp] Disable/obsolete Qt version (unsupported)
by sagitter
commit 3414f31b6402246f187b3f72b230b6dcd145883e
Author: Antonio Trande <sagitter(a)fedoraproject.org>
Date: Mon May 8 20:19:54 2023 +0200
Disable/obsolete Qt version (unsupported)
ppsspp.spec | 21 ++++++++++++++++++---
1 file changed, 18 insertions(+), 3 deletions(-)
---
diff --git a/ppsspp.spec b/ppsspp.spec
index c5b4296..1aabfd5 100644
--- a/ppsspp.spec
+++ b/ppsspp.spec
@@ -1,6 +1,8 @@
# https://github.com/hrydgard/ppsspp/issues/8823
ExcludeArch: %{power64}
+%bcond_with qt
+
# Filter private libraries
%global __provides_exclude ^(%%(find %{buildroot}%{_libdir}/ppsspp -name '*.so' | xargs -n1 basename | sort -u | paste -s -d '|' -))
%global __requires_exclude ^(%%(find %{buildroot}%{_libdir}/ppsspp -name '*.so' | xargs -n1 basename | sort -u | paste -s -d '|' -))
@@ -141,9 +143,11 @@ BuildRequires: gcc gcc-c++
BuildRequires: libzip-devel
BuildRequires: snappy-devel
BuildRequires: zlib-devel
+%if %{with qt}
BuildRequires: qt5-qtbase-devel
BuildRequires: qt5-qttools-devel
BuildRequires: qt5-qtmultimedia-devel
+%endif
BuildRequires: libappstream-glib
BuildRequires: rapidjson-devel
@@ -178,9 +182,11 @@ Requires: %{name}-data = %{version}-%{release}
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
Obsoletes: %{name} < 0:1.10.2
Provides: %{name} = 0:%{version}-%{release}
+Obsoletes: %{name}-qt < 0:1.15.3-2
%description sdl
PPSSPP with SDL frontend.
+%if %{with qt}
%package qt
Summary: PPSSPP with Qt5 frontend wrapper
Requires: %{name}-data = %{version}-%{release}
@@ -188,7 +194,7 @@ Requires: %{name}-libs%{?_isa} = %{version}-%{release}
Obsoletes: %{name} < 0:1.10.2
%description qt
PPSSPP with Qt5 frontend wrapper.
-
+%endif
%prep
%autosetup -n %{name} -N
@@ -288,6 +294,7 @@ export CFLAGS="%{build_cflags} -fPIC -lEGL -lGLESv2"
%{common_build_options}
%make_build -C build
+%if %{with qt}
mkdir -p build2
%if %{with debug}
export CXXFLAGS="-O0 -g -fPIC -lEGL -lGLESv2"
@@ -309,13 +316,18 @@ export CFLAGS="%{build_cflags} -fPIC -lEGL -lGLESv2"
-DLIBRETRO:BOOL=ON \
%{common_build_options}
%make_build -C build2
+%endif
%install
%make_install -C build
# Install PPSSPP executable
mkdir -p %{buildroot}%{_bindir}
+%if %{with qt}
install -pm 755 build2/PPSSPPQt %{buildroot}%{_bindir}/
+desktop-file-install -m 644 %SOURCE3 --dir=%{buildroot}%{_datadir}/applications
+desktop-file-install -m 644 %SOURCE5 --dir=%{buildroot}%{_datadir}/applications
+%endif
install -pm 755 build/PPSSPPSDL %{buildroot}%{_bindir}/
# Install libraries
@@ -361,8 +373,7 @@ install -pm 644 icons/icon-114.png %{buildroot}%{_datadir}/icons/%{name}/%{name}
# Install desktop file
mkdir -p %{buildroot}%{_datadir}/applications
desktop-file-install -m 644 %SOURCE1 --dir=%{buildroot}%{_datadir}/applications
-desktop-file-install -m 644 %SOURCE3 --dir=%{buildroot}%{_datadir}/applications
-desktop-file-install -m 644 %SOURCE5 --dir=%{buildroot}%{_datadir}/applications
+
# Already installed
rm -f %{buildroot}%{_datadir}/applications/PPSSPPSDL.desktop
@@ -370,7 +381,9 @@ rm -f %{buildroot}%{_datadir}/applications/PPSSPPSDL.desktop
# Install appdata file
mkdir -p %{buildroot}%{_metainfodir}
install -pm 644 %SOURCE2 %{buildroot}%{_metainfodir}/
+%if %{with qt}
install -pm 644 %SOURCE4 %{buildroot}%{_metainfodir}/
+%endif
appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.appdata.xml
%if 0%{?rhel}
@@ -394,6 +407,7 @@ fi
%{_datadir}/applications/%{name}.desktop
%{_metainfodir}/%{name}.appdata.xml
+%if %{with qt}
%files qt
%doc README.md
%license LICENSE.TXT
@@ -401,6 +415,7 @@ fi
%{_datadir}/applications/%{name}-qt.desktop
%{_datadir}/applications/%{name}-qt-wayland.desktop
%{_metainfodir}/%{name}-qt.appdata.xml
+%endif
%files libs
%doc README.md
1 year, 6 months
[nvidia-340xx-kmod/f36] Fix build on kernel-6.3.1
by wojnilowicz
commit d8ebaae2d2dc2177120449f2dccbc212e87def7e
Author: Łukasz Wojniłowicz <lukasz.wojnilowicz(a)gmail.com>
Date: Mon May 8 18:56:14 2023 +0200
Fix build on kernel-6.3.1
kernel-6.3.1.patch | 108 +++++++++++++++++++++++++++++++++++++++++++++++++
nvidia-340xx-kmod.spec | 7 +++-
2 files changed, 114 insertions(+), 1 deletion(-)
---
diff --git a/kernel-6.3.1.patch b/kernel-6.3.1.patch
new file mode 100644
index 0000000..e6f75bc
--- /dev/null
+++ b/kernel-6.3.1.patch
@@ -0,0 +1,108 @@
+diff -Naur a/kernel/nv-mmap.c b/kernel/nv-mmap.c
+--- a/kernel/nv-mmap.c 2019-12-11 23:04:24.000000000 +0100
++++ b/kernel/nv-mmap.c 2023-05-08 18:24:23.402897733 +0200
+@@ -312,7 +312,11 @@
+ goto done;
+ }
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
++ vm_flags_set(vma, VM_IO);
++#else
+ vma->vm_flags |= VM_IO;
++#endif
+ }
+ else
+ {
+@@ -363,8 +367,13 @@
+
+ NV_PRINT_AT(NV_DBG_MEMINFO, at);
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
++ vm_flags_set(vma, VM_IO | VM_LOCKED | VM_RESERVED);
++ vm_flags_set(vma, VM_DONTEXPAND | VM_DONTDUMP);
++#else
+ vma->vm_flags |= (VM_IO | VM_LOCKED | VM_RESERVED);
+ vma->vm_flags |= (VM_DONTEXPAND | VM_DONTDUMP);
++#endif
+ }
+
+ if (status == 0)
+@@ -374,8 +383,13 @@
+ if ((prot & NV_PROTECT_WRITEABLE) == 0)
+ {
+ vma->vm_page_prot = NV_PGPROT_READ_ONLY(vma->vm_page_prot);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
++ vm_flags_clear(vma, VM_WRITE);
++ vm_flags_clear(vma, VM_MAYWRITE);
++#else
+ vma->vm_flags &= ~VM_WRITE;
+ vma->vm_flags &= ~VM_MAYWRITE;
++#endif
+ }
+
+ vma->vm_ops = &nv_vm_ops;
+diff -Naur a/kernel/uvm/nvidia_uvm_lite.c b/kernel/uvm/nvidia_uvm_lite.c
+--- a/kernel/uvm/nvidia_uvm_lite.c 2023-03-04 13:09:34.850313572 +0100
++++ b/kernel/uvm/nvidia_uvm_lite.c 2023-05-08 18:26:25.391148890 +0200
+@@ -1524,10 +1524,17 @@
+
+ vma->vm_ops = &uvmlite_vma_ops;
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
++ // Prohibit copying the vma on fork().
++ vm_flags_set(vma, VM_DONTCOPY);
++ // Prohibt mremap() that would expand the vma.
++ vm_flags_set(vma, VM_DONTEXPAND);
++#else
+ // Prohibit copying the vma on fork().
+ vma->vm_flags |= VM_DONTCOPY;
+ // Prohibt mremap() that would expand the vma.
+ vma->vm_flags |= VM_DONTEXPAND;
++#endif
+
+ // Other cases of vma modification are detected in _mmap_open().
+
+@@ -1546,9 +1553,15 @@
+ return -EINVAL;
+
+ vma->vm_ops = &counters_vma_ops;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
++ vm_flags_clear(vma, VM_MAYWRITE);
++ // prevent vm_insert_page from modifying the vma's flags:
++ vm_flags_set(vma, VM_MIXEDMAP);
++#else
+ vma->vm_flags &= ~VM_MAYWRITE;
+ // prevent vm_insert_page from modifying the vma's flags:
+ vma->vm_flags |= VM_MIXEDMAP;
++#endif
+ ret = 0;
+ }
+ UVM_DBG_PRINT_RL("vma 0x%p [0x%p, 0x%p) ret %d pgoff"
+@@ -2527,8 +2540,13 @@
+ // Subsequent access from userspace after the pages are unmapped will cause
+ // a SIGSEGV.
+ //
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
++ vm_flags_clear(vma, VM_READ|VM_MAYREAD);
++ vm_flags_clear(vma, VM_WRITE|VM_MAYWRITE);
++#else
+ vma->vm_flags &= ~(VM_READ|VM_MAYREAD);
+ vma->vm_flags &= ~(VM_WRITE|VM_MAYWRITE);
++#endif
+ }
+
+ //
+@@ -2536,8 +2554,13 @@
+ //
+ static void _set_vma_accessible(struct vm_area_struct * vma)
+ {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
++ vm_flags_set(vma, VM_READ|VM_MAYREAD);
++ vm_flags_set(vma, VM_WRITE|VM_MAYWRITE);
++#else
+ vma->vm_flags |= (VM_READ|VM_MAYREAD);
+ vma->vm_flags |= (VM_WRITE|VM_MAYWRITE);
++#endif
+ }
+
+ //
diff --git a/nvidia-340xx-kmod.spec b/nvidia-340xx-kmod.spec
index 97fcbf7..0e54926 100644
--- a/nvidia-340xx-kmod.spec
+++ b/nvidia-340xx-kmod.spec
@@ -12,7 +12,7 @@ Name: nvidia-340xx-kmod
Epoch: 1
Version: 340.108
# Taken over by kmodtool
-Release: 23%{?dist}
+Release: 24%{?dist}
Summary: NVIDIA display driver kernel module
Group: System Environment/Kernel
License: Redistributable, no modification permitted
@@ -21,6 +21,7 @@ URL: http://www.nvidia.com/
Source11: nvidia-kmodtool-excludekernel-filterfile
Patch0: import-files-from-390.157.patch
Patch1: fix-build-issues.patch
+Patch2: kernel-6.3.1.patch
BuildRequires: elfutils-libelf-devel
BuildRequires: gcc
@@ -49,6 +50,7 @@ tar --use-compress-program xz -xf %{_datadir}/%{name}-%{version}/%{name}-%{versi
# patch loop
%patch0 -p1
%patch1 -p1
+%patch2 -p1
for kernel_version in %{?kernel_versions} ; do
cp -a kernel _kmod_build_${kernel_version%%___*}
@@ -77,6 +79,9 @@ done
%{?akmod_install}
%changelog
+* Mon May 08 2023 Łukasz Wojniłowicz <lukasz.wojnilowicz(a)gmail.com> - 1:340.108-24
+- Fix build on kernel-6.3.1
+
* Sat Mar 04 2023 Łukasz Wojniłowicz <lukasz.wojnilowicz(a)gmail.com> - 1:340.108-23
- Fix build on kernel-6.2.2
1 year, 6 months
[nvidia-340xx-kmod/f37] Fix build on kernel-6.3.1
by wojnilowicz
commit 711bf4f39dfc12f750384031d121ed7d1e019f6a
Author: Łukasz Wojniłowicz <lukasz.wojnilowicz(a)gmail.com>
Date: Mon May 8 18:54:20 2023 +0200
Fix build on kernel-6.3.1
kernel-6.3.1.patch | 108 +++++++++++++++++++++++++++++++++++++++++++++++++
nvidia-340xx-kmod.spec | 7 +++-
2 files changed, 114 insertions(+), 1 deletion(-)
---
diff --git a/kernel-6.3.1.patch b/kernel-6.3.1.patch
new file mode 100644
index 0000000..e6f75bc
--- /dev/null
+++ b/kernel-6.3.1.patch
@@ -0,0 +1,108 @@
+diff -Naur a/kernel/nv-mmap.c b/kernel/nv-mmap.c
+--- a/kernel/nv-mmap.c 2019-12-11 23:04:24.000000000 +0100
++++ b/kernel/nv-mmap.c 2023-05-08 18:24:23.402897733 +0200
+@@ -312,7 +312,11 @@
+ goto done;
+ }
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
++ vm_flags_set(vma, VM_IO);
++#else
+ vma->vm_flags |= VM_IO;
++#endif
+ }
+ else
+ {
+@@ -363,8 +367,13 @@
+
+ NV_PRINT_AT(NV_DBG_MEMINFO, at);
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
++ vm_flags_set(vma, VM_IO | VM_LOCKED | VM_RESERVED);
++ vm_flags_set(vma, VM_DONTEXPAND | VM_DONTDUMP);
++#else
+ vma->vm_flags |= (VM_IO | VM_LOCKED | VM_RESERVED);
+ vma->vm_flags |= (VM_DONTEXPAND | VM_DONTDUMP);
++#endif
+ }
+
+ if (status == 0)
+@@ -374,8 +383,13 @@
+ if ((prot & NV_PROTECT_WRITEABLE) == 0)
+ {
+ vma->vm_page_prot = NV_PGPROT_READ_ONLY(vma->vm_page_prot);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
++ vm_flags_clear(vma, VM_WRITE);
++ vm_flags_clear(vma, VM_MAYWRITE);
++#else
+ vma->vm_flags &= ~VM_WRITE;
+ vma->vm_flags &= ~VM_MAYWRITE;
++#endif
+ }
+
+ vma->vm_ops = &nv_vm_ops;
+diff -Naur a/kernel/uvm/nvidia_uvm_lite.c b/kernel/uvm/nvidia_uvm_lite.c
+--- a/kernel/uvm/nvidia_uvm_lite.c 2023-03-04 13:09:34.850313572 +0100
++++ b/kernel/uvm/nvidia_uvm_lite.c 2023-05-08 18:26:25.391148890 +0200
+@@ -1524,10 +1524,17 @@
+
+ vma->vm_ops = &uvmlite_vma_ops;
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
++ // Prohibit copying the vma on fork().
++ vm_flags_set(vma, VM_DONTCOPY);
++ // Prohibt mremap() that would expand the vma.
++ vm_flags_set(vma, VM_DONTEXPAND);
++#else
+ // Prohibit copying the vma on fork().
+ vma->vm_flags |= VM_DONTCOPY;
+ // Prohibt mremap() that would expand the vma.
+ vma->vm_flags |= VM_DONTEXPAND;
++#endif
+
+ // Other cases of vma modification are detected in _mmap_open().
+
+@@ -1546,9 +1553,15 @@
+ return -EINVAL;
+
+ vma->vm_ops = &counters_vma_ops;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
++ vm_flags_clear(vma, VM_MAYWRITE);
++ // prevent vm_insert_page from modifying the vma's flags:
++ vm_flags_set(vma, VM_MIXEDMAP);
++#else
+ vma->vm_flags &= ~VM_MAYWRITE;
+ // prevent vm_insert_page from modifying the vma's flags:
+ vma->vm_flags |= VM_MIXEDMAP;
++#endif
+ ret = 0;
+ }
+ UVM_DBG_PRINT_RL("vma 0x%p [0x%p, 0x%p) ret %d pgoff"
+@@ -2527,8 +2540,13 @@
+ // Subsequent access from userspace after the pages are unmapped will cause
+ // a SIGSEGV.
+ //
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
++ vm_flags_clear(vma, VM_READ|VM_MAYREAD);
++ vm_flags_clear(vma, VM_WRITE|VM_MAYWRITE);
++#else
+ vma->vm_flags &= ~(VM_READ|VM_MAYREAD);
+ vma->vm_flags &= ~(VM_WRITE|VM_MAYWRITE);
++#endif
+ }
+
+ //
+@@ -2536,8 +2554,13 @@
+ //
+ static void _set_vma_accessible(struct vm_area_struct * vma)
+ {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
++ vm_flags_set(vma, VM_READ|VM_MAYREAD);
++ vm_flags_set(vma, VM_WRITE|VM_MAYWRITE);
++#else
+ vma->vm_flags |= (VM_READ|VM_MAYREAD);
+ vma->vm_flags |= (VM_WRITE|VM_MAYWRITE);
++#endif
+ }
+
+ //
diff --git a/nvidia-340xx-kmod.spec b/nvidia-340xx-kmod.spec
index 5c9121d..92968f8 100644
--- a/nvidia-340xx-kmod.spec
+++ b/nvidia-340xx-kmod.spec
@@ -12,7 +12,7 @@ Name: nvidia-340xx-kmod
Epoch: 1
Version: 340.108
# Taken over by kmodtool
-Release: 24%{?dist}
+Release: 25%{?dist}
Summary: NVIDIA display driver kernel module
Group: System Environment/Kernel
License: Redistributable, no modification permitted
@@ -21,6 +21,7 @@ URL: http://www.nvidia.com/
Source11: nvidia-kmodtool-excludekernel-filterfile
Patch0: import-files-from-390.157.patch
Patch1: fix-build-issues.patch
+Patch2: kernel-6.3.1.patch
BuildRequires: elfutils-libelf-devel
BuildRequires: gcc
@@ -49,6 +50,7 @@ tar --use-compress-program xz -xf %{_datadir}/%{name}-%{version}/%{name}-%{versi
# patch loop
%patch0 -p1
%patch1 -p1
+%patch2 -p1
for kernel_version in %{?kernel_versions} ; do
cp -a kernel _kmod_build_${kernel_version%%___*}
@@ -77,6 +79,9 @@ done
%{?akmod_install}
%changelog
+* Mon May 08 2023 Łukasz Wojniłowicz <lukasz.wojnilowicz(a)gmail.com> - 1:340.108-25
+- Fix build on kernel-6.3.1
+
* Sat Mar 04 2023 Łukasz Wojniłowicz <lukasz.wojnilowicz(a)gmail.com> - 1:340.108-24
- Fix build on kernel-6.2.2
1 year, 6 months
[nvidia-340xx-kmod/f38] Fix build on kernel-6.3.1
by wojnilowicz
commit 80d1e96e2dd12bef4c571a91c3196b3c8dead296
Author: Łukasz Wojniłowicz <lukasz.wojnilowicz(a)gmail.com>
Date: Mon May 8 18:34:02 2023 +0200
Fix build on kernel-6.3.1
kernel-6.3.1.patch | 108 +++++++++++++++++++++++++++++++++++++++++++++++++
nvidia-340xx-kmod.spec | 11 +++--
2 files changed, 116 insertions(+), 3 deletions(-)
---
diff --git a/kernel-6.3.1.patch b/kernel-6.3.1.patch
new file mode 100644
index 0000000..e6f75bc
--- /dev/null
+++ b/kernel-6.3.1.patch
@@ -0,0 +1,108 @@
+diff -Naur a/kernel/nv-mmap.c b/kernel/nv-mmap.c
+--- a/kernel/nv-mmap.c 2019-12-11 23:04:24.000000000 +0100
++++ b/kernel/nv-mmap.c 2023-05-08 18:24:23.402897733 +0200
+@@ -312,7 +312,11 @@
+ goto done;
+ }
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
++ vm_flags_set(vma, VM_IO);
++#else
+ vma->vm_flags |= VM_IO;
++#endif
+ }
+ else
+ {
+@@ -363,8 +367,13 @@
+
+ NV_PRINT_AT(NV_DBG_MEMINFO, at);
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
++ vm_flags_set(vma, VM_IO | VM_LOCKED | VM_RESERVED);
++ vm_flags_set(vma, VM_DONTEXPAND | VM_DONTDUMP);
++#else
+ vma->vm_flags |= (VM_IO | VM_LOCKED | VM_RESERVED);
+ vma->vm_flags |= (VM_DONTEXPAND | VM_DONTDUMP);
++#endif
+ }
+
+ if (status == 0)
+@@ -374,8 +383,13 @@
+ if ((prot & NV_PROTECT_WRITEABLE) == 0)
+ {
+ vma->vm_page_prot = NV_PGPROT_READ_ONLY(vma->vm_page_prot);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
++ vm_flags_clear(vma, VM_WRITE);
++ vm_flags_clear(vma, VM_MAYWRITE);
++#else
+ vma->vm_flags &= ~VM_WRITE;
+ vma->vm_flags &= ~VM_MAYWRITE;
++#endif
+ }
+
+ vma->vm_ops = &nv_vm_ops;
+diff -Naur a/kernel/uvm/nvidia_uvm_lite.c b/kernel/uvm/nvidia_uvm_lite.c
+--- a/kernel/uvm/nvidia_uvm_lite.c 2023-03-04 13:09:34.850313572 +0100
++++ b/kernel/uvm/nvidia_uvm_lite.c 2023-05-08 18:26:25.391148890 +0200
+@@ -1524,10 +1524,17 @@
+
+ vma->vm_ops = &uvmlite_vma_ops;
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
++ // Prohibit copying the vma on fork().
++ vm_flags_set(vma, VM_DONTCOPY);
++ // Prohibt mremap() that would expand the vma.
++ vm_flags_set(vma, VM_DONTEXPAND);
++#else
+ // Prohibit copying the vma on fork().
+ vma->vm_flags |= VM_DONTCOPY;
+ // Prohibt mremap() that would expand the vma.
+ vma->vm_flags |= VM_DONTEXPAND;
++#endif
+
+ // Other cases of vma modification are detected in _mmap_open().
+
+@@ -1546,9 +1553,15 @@
+ return -EINVAL;
+
+ vma->vm_ops = &counters_vma_ops;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
++ vm_flags_clear(vma, VM_MAYWRITE);
++ // prevent vm_insert_page from modifying the vma's flags:
++ vm_flags_set(vma, VM_MIXEDMAP);
++#else
+ vma->vm_flags &= ~VM_MAYWRITE;
+ // prevent vm_insert_page from modifying the vma's flags:
+ vma->vm_flags |= VM_MIXEDMAP;
++#endif
+ ret = 0;
+ }
+ UVM_DBG_PRINT_RL("vma 0x%p [0x%p, 0x%p) ret %d pgoff"
+@@ -2527,8 +2540,13 @@
+ // Subsequent access from userspace after the pages are unmapped will cause
+ // a SIGSEGV.
+ //
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
++ vm_flags_clear(vma, VM_READ|VM_MAYREAD);
++ vm_flags_clear(vma, VM_WRITE|VM_MAYWRITE);
++#else
+ vma->vm_flags &= ~(VM_READ|VM_MAYREAD);
+ vma->vm_flags &= ~(VM_WRITE|VM_MAYWRITE);
++#endif
+ }
+
+ //
+@@ -2536,8 +2554,13 @@
+ //
+ static void _set_vma_accessible(struct vm_area_struct * vma)
+ {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
++ vm_flags_set(vma, VM_READ|VM_MAYREAD);
++ vm_flags_set(vma, VM_WRITE|VM_MAYWRITE);
++#else
+ vma->vm_flags |= (VM_READ|VM_MAYREAD);
+ vma->vm_flags |= (VM_WRITE|VM_MAYWRITE);
++#endif
+ }
+
+ //
diff --git a/nvidia-340xx-kmod.spec b/nvidia-340xx-kmod.spec
index f05051c..ce20db1 100644
--- a/nvidia-340xx-kmod.spec
+++ b/nvidia-340xx-kmod.spec
@@ -12,7 +12,7 @@ Name: nvidia-340xx-kmod
Epoch: 1
Version: 340.108
# Taken over by kmodtool
-Release: 27%{?dist}
+Release: 28%{?dist}
Summary: NVIDIA display driver kernel module
Group: System Environment/Kernel
License: Redistributable, no modification permitted
@@ -21,6 +21,7 @@ URL: http://www.nvidia.com/
Source11: nvidia-kmodtool-excludekernel-filterfile
Patch0: import-files-from-390.157.patch
Patch1: fix-build-issues.patch
+Patch2: kernel-6.3.1.patch
BuildRequires: elfutils-libelf-devel
BuildRequires: gcc
@@ -47,8 +48,9 @@ kmodtool --target %{_target_cpu} --repo rpmfusion --kmodname %{name} --filterf
%setup -T -c
tar --use-compress-program xz -xf %{_datadir}/%{name}-%{version}/%{name}-%{version}-%{_target_cpu}.tar.xz
# patch loop
-%patch0 -p1
-%patch1 -p1
+%patch 0 -p1
+%patch 1 -p1
+%patch 2 -p1
for kernel_version in %{?kernel_versions} ; do
cp -a kernel _kmod_build_${kernel_version%%___*}
@@ -77,6 +79,9 @@ done
%{?akmod_install}
%changelog
+* Mon May 08 2023 Łukasz Wojniłowicz <lukasz.wojnilowicz(a)gmail.com> - 1:340.108-28
+- Fix build on kernel-6.3.1
+
* Sat Mar 04 2023 Łukasz Wojniłowicz <lukasz.wojnilowicz(a)gmail.com> - 1:340.108-27
- Add missing import-files-from-390.157.patch
1 year, 6 months