commit c902d3601ca1de4ead018ac668db2287888232f2
Author: Henrik Nordström <henrik(a)hno.se>
Date: Mon Mar 22 02:58:46 2021 +0100
Update patches from Debian
arm-outer-sync.patch | 2 +-
cc_version_check-gcc5.patch | 2 +-
ignore_xen_on_arm.patch | 2 +-
include-swiotlb-header-on-arm.patch | 17 +++++++++++++++++
kernel-5.7.0-set-memory-array.patch | 12 ++++++------
nvidia-390xx-kmod.spec | 7 ++++++-
nvidia-drm-arm-cflags.patch | 2 +-
7 files changed, 33 insertions(+), 11 deletions(-)
---
diff --git a/arm-outer-sync.patch b/arm-outer-sync.patch
index c8c146a..c2cfb88 100644
--- a/arm-outer-sync.patch
+++ b/arm-outer-sync.patch
@@ -5,7 +5,7 @@ Description: Redefine WRITE_COMBINE_FLUSH on ARM on kernel >= 4.3
is defined. Fall back to no memory barrier at all if that is not configured.
--- a/common/inc/nv-linux.h
+++ b/common/inc/nv-linux.h
-@@ -466,7 +466,13 @@ extern int nv_pat_mode;
+@@ -470,7 +470,13 @@ extern int nv_pat_mode;
#if defined(CONFIG_OUTER_CACHE)
#define OUTER_FLUSH_RANGE(start, end) outer_flush_range((start),(end))
#endif
diff --git a/cc_version_check-gcc5.patch b/cc_version_check-gcc5.patch
index d7edbe7..88a5249 100644
--- a/cc_version_check-gcc5.patch
+++ b/cc_version_check-gcc5.patch
@@ -5,7 +5,7 @@ Description: ignore __GNUC_MINOR__ from GCC 5 onwards
--- a/conftest.sh
+++ b/conftest.sh
-@@ -4176,7 +4176,7 @@ case "$6" in
+@@ -4442,7 +4442,7 @@ case "$6" in
kernel_cc_minor=`echo ${kernel_cc_version} | cut -d '.' -f 2`
echo "
diff --git a/ignore_xen_on_arm.patch b/ignore_xen_on_arm.patch
index 48e29fe..fa28dba 100644
--- a/ignore_xen_on_arm.patch
+++ b/ignore_xen_on_arm.patch
@@ -24,7 +24,7 @@ Description: Undef CONFIG_XEN and CONFIG_XEN_DOM0 if building on ARM
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 9)
#error "This driver does not support kernels older than 2.6.9!"
#elif LINUX_VERSION_CODE < KERNEL_VERSION(2, 7, 0)
-@@ -281,7 +286,7 @@ NV_STATUS nvos_forward_error_to_cray(str
+@@ -285,7 +290,7 @@ NV_STATUS nvos_forward_error_to_cray(str
* NVIDIA graphics driver has no way of knowing and is unlikely
* to work correctly.
*/
diff --git a/include-swiotlb-header-on-arm.patch b/include-swiotlb-header-on-arm.patch
new file mode 100644
index 0000000..88357d2
--- /dev/null
+++ b/include-swiotlb-header-on-arm.patch
@@ -0,0 +1,17 @@
+Author: Luca Boccassi <luca.boccassi(a)gmail.com>
+Description: Include linux/swiotlb.h if CONFIG_ARM is defined
+ swiotlb.h is needed by ARM to use dma_ops and family, but nv-linux.h only
+ includes it if CONFIG_ARM64 is set. Patch nv-linux.h to also include it if
+ CONFIG_ARM is set.
+
+--- a/common/inc/nv-linux.h
++++ b/common/inc/nv-linux.h
+@@ -182,7 +182,7 @@ static inline uid_t __kuid_val(kuid_t ui
+ #endif
+ #endif
+
+-#if defined(CONFIG_SWIOTLB) && defined(NVCPU_AARCH64)
++#if defined(CONFIG_SWIOTLB) && (defined(NVCPU_AARCH64) || defined(NVCPU_ARM))
+ #include <linux/swiotlb.h>
+ #endif
+
diff --git a/kernel-5.7.0-set-memory-array.patch b/kernel-5.7.0-set-memory-array.patch
index 28c9869..5c50840 100644
--- a/kernel-5.7.0-set-memory-array.patch
+++ b/kernel-5.7.0-set-memory-array.patch
@@ -27,7 +27,7 @@ Bug-Debian:
https://bugs.debian.org/960735
--- a/conftest.sh
+++ b/conftest.sh
-@@ -405,6 +405,8 @@ compile_test() {
+@@ -428,6 +428,8 @@ compile_test() {
# Determine if the set_memory_uc() function is present.
#
CODE="
@@ -36,7 +36,7 @@ Bug-Debian:
https://bugs.debian.org/960735
#if defined(NV_ASM_SET_MEMORY_H_PRESENT)
#if defined(NV_ASM_PGTABLE_TYPES_H_PRESENT)
#include <asm/pgtable_types.h>
-@@ -425,6 +427,8 @@ compile_test() {
+@@ -448,6 +450,8 @@ compile_test() {
# Determine if the set_memory_array_uc() function is present.
#
CODE="
@@ -45,7 +45,7 @@ Bug-Debian:
https://bugs.debian.org/960735
#if defined(NV_ASM_SET_MEMORY_H_PRESENT)
#if defined(NV_ASM_PGTABLE_TYPES_H_PRESENT)
#include <asm/pgtable_types.h>
-@@ -480,6 +484,8 @@ compile_test() {
+@@ -503,6 +507,8 @@ compile_test() {
# Determine if the set_pages_uc() function is present.
#
CODE="
@@ -54,7 +54,7 @@ Bug-Debian:
https://bugs.debian.org/960735
#if defined(NV_ASM_SET_MEMORY_H_PRESENT)
#if defined(NV_ASM_PGTABLE_TYPES_H_PRESENT)
#include <asm/pgtable_types.h>
-@@ -1858,7 +1864,7 @@ compile_test() {
+@@ -1881,7 +1887,7 @@ compile_test() {
# Determine if atomic_long_t and associated functions are defined
# Added in 2.6.16 2006-01-06 d3cb487149bd706aa6aeb02042332a450978dc1c
CODE="
@@ -63,7 +63,7 @@ Bug-Debian:
https://bugs.debian.org/960735
void conftest_atomic_long(void) {
atomic_long_t data;
atomic_long_read(&data);
-@@ -1872,7 +1878,7 @@ compile_test() {
+@@ -1895,7 +1901,7 @@ compile_test() {
atomic64_type)
# Determine if atomic64_t and associated functions are defined
CODE="
@@ -72,7 +72,7 @@ Bug-Debian:
https://bugs.debian.org/960735
void conftest_atomic64(void) {
atomic64_t data;
atomic64_read(&data);
-@@ -3508,7 +3514,7 @@ compile_test() {
+@@ -3585,7 +3591,7 @@ compile_test() {
# 2008-01-25 9ee85241fdaab358dff1d8647f20a478cfa512a1
#
CODE="
diff --git a/nvidia-390xx-kmod.spec b/nvidia-390xx-kmod.spec
index 5da5580..766a906 100644
--- a/nvidia-390xx-kmod.spec
+++ b/nvidia-390xx-kmod.spec
@@ -12,7 +12,7 @@ Name: nvidia-390xx-kmod
Epoch: 3
Version: 390.141
# Taken over by kmodtool
-Release: 5%{?dist}
+Release: 6%{?dist}
Summary: NVIDIA 390xx display driver kernel module
Group: System Environment/Kernel
License: Redistributable, no modification permitted
@@ -38,6 +38,7 @@ Patch34: cc_version_check-gcc5.patch
#Patch36: nvidia-modeset-use-ARCH.o_binary.patch
# armhf support
+Patch40: include-swiotlb-header-on-arm.patch
Patch41: ignore_xen_on_arm.patch
Patch42: arm-outer-sync.patch
Patch43: nvidia-drm-arm-cflags.patch
@@ -72,6 +73,7 @@ tar --use-compress-program xz -xf
%{_datadir}/%{name}-%{version}/%{name}-%{versi
%patch32 -p1 -d kernel
%patch33 -p1 -d kernel
%patch34 -p1 -d kernel
+%patch40 -p1 -d kernel
%patch41 -p1 -d kernel
%patch42 -p1 -d kernel
%patch43 -p1 -d kernel
@@ -101,6 +103,9 @@ done
%changelog
+* Mon Mar 22 2021 Henrik Nordstrom <henrik(a)henriknordstrom.net> - 390.141-6
+- Update patches from Debian.
+
* Mon Mar 22 2021 Henrik Nordstrom <henrik(a)henriknordstrom.net> - 3:390.141-5
- Patch for kernel 5.11 (Bug #5951)
diff --git a/nvidia-drm-arm-cflags.patch b/nvidia-drm-arm-cflags.patch
index 6b033ad..0c1b59b 100644
--- a/nvidia-drm-arm-cflags.patch
+++ b/nvidia-drm-arm-cflags.patch
@@ -9,7 +9,7 @@ Description: Add -Wa,-mimplicit-it=thumb to CFLAGS if building on ARM
--- a/conftest.sh
+++ b/conftest.sh
-@@ -193,7 +193,7 @@ build_cflags() {
+@@ -194,7 +194,7 @@ build_cflags() {
done
if [ "$ARCH" = "arm" ]; then