commit eca613dd94f3f1cfeabef422ff03ba36be7916b5
Author: Henrik Nordström <henrik(a)hno.se>
Date: Sat Jun 18 18:13:01 2022 +0200
Correct kernel-5.18-uvm.patch download, and remove more conflicting patches
kernel-5.18-uvm.patch | 137 ++++++++++++++-----------------------------------
nvidia-390xx-kmod.spec | 8 +--
2 files changed, 42 insertions(+), 103 deletions(-)
---
diff --git a/kernel-5.18-uvm.patch b/kernel-5.18-uvm.patch
index ea86903..cc02ee9 100644
--- a/kernel-5.18-uvm.patch
+++ b/kernel-5.18-uvm.patch
@@ -1,99 +1,38 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html
xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"
lang="en-US">
-<!-- git web interface version 2.35.1, (C) 2005-2006, Kay Sievers
<kay.sievers(a)vrfy.org>, Christian Gierke -->
-<!-- git core binaries version 2.35.1 -->
-<head>
-<meta http-equiv="content-type" content="text/html;
charset=utf-8"/>
-<meta name="generator" content="gitweb/2.35.1 git/2.35.1"/>
-<meta name="robots" content="index, nofollow"/>
-<title>git.pld-linux.org Git -
packages/xorg-driver-video-nvidia-legacy-390xx.git/blob -
kernel-5.18-uvm.patch</title>
-<link rel="stylesheet" type="text/css"
href="static/gitweb-site.css"/>
-<link rel="alternate"
title="packages/xorg-driver-video-nvidia-legacy-390xx.git - history of
kernel-5.18-uvm.patch - RSS feed"
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=rss;f=kernel-5.18-uvm.patch"
type="application/rss+xml" />
-<link rel="alternate"
title="packages/xorg-driver-video-nvidia-legacy-390xx.git - history of
kernel-5.18-uvm.patch - RSS feed (no merges)"
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=rss;f=kernel-5.18-uvm.patch;opt=--no-merges"
type="application/rss+xml" />
-<link rel="alternate"
title="packages/xorg-driver-video-nvidia-legacy-390xx.git - history of
kernel-5.18-uvm.patch - Atom feed"
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=atom;f=kernel-5.18-uvm.patch"
type="application/atom+xml" />
-<link rel="alternate"
title="packages/xorg-driver-video-nvidia-legacy-390xx.git - history of
kernel-5.18-uvm.patch - Atom feed (no merges)"
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=atom;f=kernel-5.18-uvm.patch;opt=--no-merges"
type="application/atom+xml" />
-<link rel="shortcut icon" href="static/pld-favicon.ico"
type="image/png" />
-</head>
-<body>
-<div class="page_header">
-<a href="http://www.pld-linux.org" title="PLD Linux
distribution"><img alt="git" class="logo"
height="27" src="static/pld-logo.png" width="72"
/></a><a href="/gitweb.cgi">projects</a> / <a
href="/gitweb.cgi?a=project_list;pf=packages">packages</a> / <a
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=summary">xorg-driver-video-nvidia-legacy-390xx.git</a>
/ blob
-</div>
-<form method="get" action="/gitweb.cgi"
enctype="multipart/form-data"><div class="search">
-<input name="p" type="hidden"
value="packages/xorg-driver-video-nvidia-legacy-390xx.git" />
-<input name="a" type="hidden" value="search" />
-<input name="h" type="hidden"
value="70ee162314861b60f333d00d2485c2a7ac2fce4a" />
-<select name="st" >
-<option selected="selected"
value="commit">commit</option>
-<option value="grep">grep</option>
-<option value="author">author</option>
-<option value="committer">committer</option>
-<option value="pickaxe">pickaxe</option>
-</select> <a
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=search_help"
title="search help">?</a> search:
-<input type="text" name="s" />
-<span title="Extended regular expression"><label><input
type="checkbox" name="sr" value="1"
/>re</label></span></div>
-</form>
-<div class="page_nav">
-<a
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=summary">summary</a>
| <a
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=shortlog">shortlog</a>
| <a
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=log">log</a>
| <a
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=commit;h=70ee162314861b60f333d00d2485c2a7ac2fce4a">commit</a>
| <a
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=commitdiff;h=70ee162314861b60f333d00d2485c2a7ac2fce4a">commitdiff</a>
| <a
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=tree;h=0080accee796263228ef22a51610904fd5abe487;hb=70ee162314861b60f333d00d2485c2a7ac2fce4a">tree</a><br/>
-<a
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=blame;f=kernel-5.18-uvm.patch;h=cc02ee9a3d63c82418b91299608c4a9bbe04118b;hb=70ee162314861b60f333d00d2485c2a7ac2fce4a">blame</a>
| <a
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=history;f=kernel-5.18-uvm.patch;h=cc02ee9a3d63c82418b91299608c4a9bbe04118b;hb=70ee162314861b60f333d00d2485c2a7ac2fce4a">history</a>
| <a
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=blob_plain;f=kernel-5.18-uvm.patch;h=cc02ee9a3d63c82418b91299608c4a9bbe04118b;hb=70ee162314861b60f333d00d2485c2a7ac2fce4a">raw</a>
| <a
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=blob;f=kernel-5.18-uvm.patch;hb=HEAD">HEAD</a><br/>
-</div>
-<div class="header">
-<a class="title"
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=commit;h=70ee162314861b60f333d00d2485c2a7ac2fce4a">-
fixes for kernel 5.18, rel 2</a>
-</div>
-<div class="page_path"><a
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=tree;hb=70ee162314861b60f333d00d2485c2a7ac2fce4a"
title="tree
root">[packages/xorg-driver-video-nvidia-legacy-390xx.git]</a> / <a
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=blob_plain;f=kernel-5.18-uvm.patch;hb=70ee162314861b60f333d00d2485c2a7ac2fce4a"
title="kernel-5.18-uvm.patch">kernel-5.18-uvm.patch</a><br/></div>
-<div class="page_body">
-<div class="pre"><a id="l1"
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=blob;f=kernel-5.18-uvm.patch;h=cc02ee9a3d63c82418b91299608c4a9bbe04118b;hb=70ee162314861b60f333d00d2485c2a7ac2fce4a#l1"
class="linenr"> 1</a>
--- NVIDIA-Linux-x86_64-390.151-no-compat32/kernel/nvidia-uvm/uvm8_gpu.c~ 2022-04-20 19:57:58.000000000 +0200</div>
-<div class="pre"><a id="l2"
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=blob;f=kernel-5.18-uvm.patch;h=cc02ee9a3d63c82418b91299608c4a9bbe04118b;hb=70ee162314861b60f333d00d2485c2a7ac2fce4a#l2"
class="linenr"> 2</a>
+++ NVIDIA-Linux-x86_64-390.151-no-compat32/kernel/nvidia-uvm/uvm8_gpu.c 2022-05-26 11:20:33.644914149 +0200</div>
-<div class="pre"><a id="l3"
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=blob;f=kernel-5.18-uvm.patch;h=cc02ee9a3d63c82418b91299608c4a9bbe04118b;hb=70ee162314861b60f333d00d2485c2a7ac2fce4a#l3"
class="linenr"> 3</a>
@@ -2214,7 +2214,11 @@</div>
-<div class="pre"><a id="l4"
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=blob;f=kernel-5.18-uvm.patch;h=cc02ee9a3d63c82418b91299608c4a9bbe04118b;hb=70ee162314861b60f333d00d2485c2a7ac2fce4a#l4"
class="linenr"> 4</a> </div>
-<div class="pre"><a id="l5"
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=blob;f=kernel-5.18-uvm.patch;h=cc02ee9a3d63c82418b91299608c4a9bbe04118b;hb=70ee162314861b60f333d00d2485c2a7ac2fce4a#l5"
class="linenr"> 5</a>
NV_STATUS uvm_gpu_map_cpu_pages(uvm_gpu_t *gpu, struct page *page, size_t size, NvU64 *dma_addr_out)</div>
-<div class="pre"><a id="l6"
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=blob;f=kernel-5.18-uvm.patch;h=cc02ee9a3d63c82418b91299608c4a9bbe04118b;hb=70ee162314861b60f333d00d2485c2a7ac2fce4a#l6"
class="linenr"> 6</a> {</div>
-<div class="pre"><a id="l7"
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=blob;f=kernel-5.18-uvm.patch;h=cc02ee9a3d63c82418b91299608c4a9bbe04118b;hb=70ee162314861b60f333d00d2485c2a7ac2fce4a#l7"
class="linenr"> 7</a>
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 18, 0)</div>
-<div class="pre"><a id="l8"
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=blob;f=kernel-5.18-uvm.patch;h=cc02ee9a3d63c82418b91299608c4a9bbe04118b;hb=70ee162314861b60f333d00d2485c2a7ac2fce4a#l8"
class="linenr"> 8</a>
NvU64 dma_addr = pci_map_page(gpu->pci_dev, page, 0, size, PCI_DMA_BIDIRECTIONAL);</div>
-<div class="pre"><a id="l9"
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=blob;f=kernel-5.18-uvm.patch;h=cc02ee9a3d63c82418b91299608c4a9bbe04118b;hb=70ee162314861b60f333d00d2485c2a7ac2fce4a#l9"
class="linenr"> 9</a> +#else</div>
-<div class="pre"><a id="l10"
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=blob;f=kernel-5.18-uvm.patch;h=cc02ee9a3d63c82418b91299608c4a9bbe04118b;hb=70ee162314861b60f333d00d2485c2a7ac2fce4a#l10"
class="linenr"> 10</a>
+ NvU64 dma_addr = dma_map_page(&gpu->pci_dev->dev, page, 0, size, DMA_BIDIRECTIONAL);</div>
-<div class="pre"><a id="l11"
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=blob;f=kernel-5.18-uvm.patch;h=cc02ee9a3d63c82418b91299608c4a9bbe04118b;hb=70ee162314861b60f333d00d2485c2a7ac2fce4a#l11"
class="linenr"> 11</a> +#endif</div>
-<div class="pre"><a id="l12"
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=blob;f=kernel-5.18-uvm.patch;h=cc02ee9a3d63c82418b91299608c4a9bbe04118b;hb=70ee162314861b60f333d00d2485c2a7ac2fce4a#l12"
class="linenr"> 12</a> </div>
-<div class="pre"><a id="l13"
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=blob;f=kernel-5.18-uvm.patch;h=cc02ee9a3d63c82418b91299608c4a9bbe04118b;hb=70ee162314861b60f333d00d2485c2a7ac2fce4a#l13"
class="linenr"> 13</a>
UVM_ASSERT(PAGE_ALIGNED(size));</div>
-<div class="pre"><a id="l14"
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=blob;f=kernel-5.18-uvm.patch;h=cc02ee9a3d63c82418b91299608c4a9bbe04118b;hb=70ee162314861b60f333d00d2485c2a7ac2fce4a#l14"
class="linenr"> 14</a> </div>
-<div class="pre"><a id="l15"
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=blob;f=kernel-5.18-uvm.patch;h=cc02ee9a3d63c82418b91299608c4a9bbe04118b;hb=70ee162314861b60f333d00d2485c2a7ac2fce4a#l15"
class="linenr"> 15</a>
@@ -2222,7 +2226,11 @@</div>
-<div class="pre"><a id="l16"
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=blob;f=kernel-5.18-uvm.patch;h=cc02ee9a3d63c82418b91299608c4a9bbe04118b;hb=70ee162314861b60f333d00d2485c2a7ac2fce4a#l16"
class="linenr"> 16</a>
return NV_ERR_OPERATING_SYSTEM;</div>
-<div class="pre"><a id="l17"
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=blob;f=kernel-5.18-uvm.patch;h=cc02ee9a3d63c82418b91299608c4a9bbe04118b;hb=70ee162314861b60f333d00d2485c2a7ac2fce4a#l17"
class="linenr"> 17</a> </div>
-<div class="pre"><a id="l18"
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=blob;f=kernel-5.18-uvm.patch;h=cc02ee9a3d63c82418b91299608c4a9bbe04118b;hb=70ee162314861b60f333d00d2485c2a7ac2fce4a#l18"
class="linenr"> 18</a>
if (dma_addr < gpu->dma_addressable_start || dma_addr + size - 1 > gpu->dma_addressable_limit) {</div>
-<div class="pre"><a id="l19"
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=blob;f=kernel-5.18-uvm.patch;h=cc02ee9a3d63c82418b91299608c4a9bbe04118b;hb=70ee162314861b60f333d00d2485c2a7ac2fce4a#l19"
class="linenr"> 19</a>
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 18, 0)</div>
-<div class="pre"><a id="l20"
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=blob;f=kernel-5.18-uvm.patch;h=cc02ee9a3d63c82418b91299608c4a9bbe04118b;hb=70ee162314861b60f333d00d2485c2a7ac2fce4a#l20"
class="linenr"> 20</a>
pci_unmap_page(gpu->pci_dev, dma_addr, size, PCI_DMA_BIDIRECTIONAL);</div>
-<div class="pre"><a id="l21"
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=blob;f=kernel-5.18-uvm.patch;h=cc02ee9a3d63c82418b91299608c4a9bbe04118b;hb=70ee162314861b60f333d00d2485c2a7ac2fce4a#l21"
class="linenr"> 21</a> +#else</div>
-<div class="pre"><a id="l22"
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=blob;f=kernel-5.18-uvm.patch;h=cc02ee9a3d63c82418b91299608c4a9bbe04118b;hb=70ee162314861b60f333d00d2485c2a7ac2fce4a#l22"
class="linenr"> 22</a>
+ dma_unmap_page(&gpu->pci_dev->dev, dma_addr, size, DMA_BIDIRECTIONAL);</div>
-<div class="pre"><a id="l23"
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=blob;f=kernel-5.18-uvm.patch;h=cc02ee9a3d63c82418b91299608c4a9bbe04118b;hb=70ee162314861b60f333d00d2485c2a7ac2fce4a#l23"
class="linenr"> 23</a> +#endif</div>
-<div class="pre"><a id="l24"
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=blob;f=kernel-5.18-uvm.patch;h=cc02ee9a3d63c82418b91299608c4a9bbe04118b;hb=70ee162314861b60f333d00d2485c2a7ac2fce4a#l24"
class="linenr"> 24</a>
UVM_ERR_PRINT_RL("PCI mapped range [0x%llx, 0x%llx) not in the addressable range [0x%llx, 0x%llx), GPU %s\n",</div>
-<div class="pre"><a id="l25"
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=blob;f=kernel-5.18-uvm.patch;h=cc02ee9a3d63c82418b91299608c4a9bbe04118b;hb=70ee162314861b60f333d00d2485c2a7ac2fce4a#l25"
class="linenr"> 25</a>
dma_addr,</div>
-<div class="pre"><a id="l26"
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=blob;f=kernel-5.18-uvm.patch;h=cc02ee9a3d63c82418b91299608c4a9bbe04118b;hb=70ee162314861b60f333d00d2485c2a7ac2fce4a#l26"
class="linenr"> 26</a>
dma_addr + (NvU64)size,</div>
-<div class="pre"><a id="l27"
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=blob;f=kernel-5.18-uvm.patch;h=cc02ee9a3d63c82418b91299608c4a9bbe04118b;hb=70ee162314861b60f333d00d2485c2a7ac2fce4a#l27"
class="linenr"> 27</a>
@@ -2256,7 +2264,11 @@</div>
-<div class="pre"><a id="l28"
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=blob;f=kernel-5.18-uvm.patch;h=cc02ee9a3d63c82418b91299608c4a9bbe04118b;hb=70ee162314861b60f333d00d2485c2a7ac2fce4a#l28"
class="linenr"> 28</a>
if (gpu->npu_dev)</div>
-<div class="pre"><a id="l29"
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=blob;f=kernel-5.18-uvm.patch;h=cc02ee9a3d63c82418b91299608c4a9bbe04118b;hb=70ee162314861b60f333d00d2485c2a7ac2fce4a#l29"
class="linenr"> 29</a>
dma_address = nv_expand_nvlink_addr(dma_address);</div>
-<div class="pre"><a id="l30"
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=blob;f=kernel-5.18-uvm.patch;h=cc02ee9a3d63c82418b91299608c4a9bbe04118b;hb=70ee162314861b60f333d00d2485c2a7ac2fce4a#l30"
class="linenr"> 30</a>
dma_address += gpu->dma_addressable_start;</div>
-<div class="pre"><a id="l31"
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=blob;f=kernel-5.18-uvm.patch;h=cc02ee9a3d63c82418b91299608c4a9bbe04118b;hb=70ee162314861b60f333d00d2485c2a7ac2fce4a#l31"
class="linenr"> 31</a>
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 18, 0)</div>
-<div class="pre"><a id="l32"
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=blob;f=kernel-5.18-uvm.patch;h=cc02ee9a3d63c82418b91299608c4a9bbe04118b;hb=70ee162314861b60f333d00d2485c2a7ac2fce4a#l32"
class="linenr"> 32</a>
pci_unmap_page(gpu->pci_dev, dma_address, size, PCI_DMA_BIDIRECTIONAL);</div>
-<div class="pre"><a id="l33"
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=blob;f=kernel-5.18-uvm.patch;h=cc02ee9a3d63c82418b91299608c4a9bbe04118b;hb=70ee162314861b60f333d00d2485c2a7ac2fce4a#l33"
class="linenr"> 33</a> +#else</div>
-<div class="pre"><a id="l34"
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=blob;f=kernel-5.18-uvm.patch;h=cc02ee9a3d63c82418b91299608c4a9bbe04118b;hb=70ee162314861b60f333d00d2485c2a7ac2fce4a#l34"
class="linenr"> 34</a>
+ dma_unmap_page(&gpu->pci_dev->dev, dma_address, size, DMA_BIDIRECTIONAL);</div>
-<div class="pre"><a id="l35"
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=blob;f=kernel-5.18-uvm.patch;h=cc02ee9a3d63c82418b91299608c4a9bbe04118b;hb=70ee162314861b60f333d00d2485c2a7ac2fce4a#l35"
class="linenr"> 35</a> +#endif</div>
-<div class="pre"><a id="l36"
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=blob;f=kernel-5.18-uvm.patch;h=cc02ee9a3d63c82418b91299608c4a9bbe04118b;hb=70ee162314861b60f333d00d2485c2a7ac2fce4a#l36"
class="linenr"> 36</a>
atomic64_sub(size, &gpu->mapped_cpu_pages_size);</div>
-<div class="pre"><a id="l37"
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=blob;f=kernel-5.18-uvm.patch;h=cc02ee9a3d63c82418b91299608c4a9bbe04118b;hb=70ee162314861b60f333d00d2485c2a7ac2fce4a#l37"
class="linenr"> 37</a> }</div>
-<div class="pre"><a id="l38"
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=blob;f=kernel-5.18-uvm.patch;h=cc02ee9a3d63c82418b91299608c4a9bbe04118b;hb=70ee162314861b60f333d00d2485c2a7ac2fce4a#l38"
class="linenr"> 38</a> </div>
-</div><div class="page_footer">
-<div class="page_footer_text">Linux Drivers for nVidia GeForce/Quadro
Chips</div>
-<a class="rss_logo"
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=rss;f=kernel-5.18-uvm.patch"
title="history of kernel-5.18-uvm.patch RSS feed">RSS</a>
-<a class="rss_logo"
href="/gitweb.cgi?p=packages/xorg-driver-video-nvidia-legacy-390xx.git;a=atom;f=kernel-5.18-uvm.patch"
title="history of kernel-5.18-uvm.patch Atom feed">Atom</a>
-</div>
-<div id="generating_info">
-This page took <span id="generating_time"
class="time_span">0.05935 seconds </span> and <span
id="generating_cmd">3</span> git commands to generate.
-</div>
-<script type="text/javascript"
src="static/gitweb.js"></script>
-<script type="text/javascript">
-window.onload = function () {
- var tz_cookie = { name: 'gitweb_tz', expires: 14, path: '/' };
- onloadTZSetup('local', tz_cookie, 'datetime');
-};
-</script>
-</body>
-</html>
\ No newline at end of file
+--- NVIDIA-Linux-x86_64-390.151-no-compat32/kernel/nvidia-uvm/uvm8_gpu.c~ 2022-04-20
19:57:58.000000000 +0200
++++ NVIDIA-Linux-x86_64-390.151-no-compat32/kernel/nvidia-uvm/uvm8_gpu.c 2022-05-26
11:20:33.644914149 +0200
+@@ -2214,7 +2214,11 @@
+
+ NV_STATUS uvm_gpu_map_cpu_pages(uvm_gpu_t *gpu, struct page *page, size_t size, NvU64
*dma_addr_out)
+ {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 18, 0)
+ NvU64 dma_addr = pci_map_page(gpu->pci_dev, page, 0, size,
PCI_DMA_BIDIRECTIONAL);
++#else
++ NvU64 dma_addr = dma_map_page(&gpu->pci_dev->dev, page, 0, size,
DMA_BIDIRECTIONAL);
++#endif
+
+ UVM_ASSERT(PAGE_ALIGNED(size));
+
+@@ -2222,7 +2226,11 @@
+ return NV_ERR_OPERATING_SYSTEM;
+
+ if (dma_addr < gpu->dma_addressable_start || dma_addr + size - 1 >
gpu->dma_addressable_limit) {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 18, 0)
+ pci_unmap_page(gpu->pci_dev, dma_addr, size, PCI_DMA_BIDIRECTIONAL);
++#else
++ dma_unmap_page(&gpu->pci_dev->dev, dma_addr, size,
DMA_BIDIRECTIONAL);
++#endif
+ UVM_ERR_PRINT_RL("PCI mapped range [0x%llx, 0x%llx) not in the addressable
range [0x%llx, 0x%llx), GPU %s\n",
+ dma_addr,
+ dma_addr + (NvU64)size,
+@@ -2256,7 +2264,11 @@
+ if (gpu->npu_dev)
+ dma_address = nv_expand_nvlink_addr(dma_address);
+ dma_address += gpu->dma_addressable_start;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 18, 0)
+ pci_unmap_page(gpu->pci_dev, dma_address, size, PCI_DMA_BIDIRECTIONAL);
++#else
++ dma_unmap_page(&gpu->pci_dev->dev, dma_address, size, DMA_BIDIRECTIONAL);
++#endif
+ atomic64_sub(size, &gpu->mapped_cpu_pages_size);
+ }
+
diff --git a/nvidia-390xx-kmod.spec b/nvidia-390xx-kmod.spec
index 76a7a9e..e95b680 100644
--- a/nvidia-390xx-kmod.spec
+++ b/nvidia-390xx-kmod.spec
@@ -93,12 +93,12 @@ tar --use-compress-program xz -xf
%{_datadir}/%{name}-%{version}/%{name}-%{versi
#patch14 -p2 -b 14 -d kernel
#patch15 -p2 -b 15 -d kernel
#patch16 -p2 -b 15 -d kernel
-%patch17 -p1 -b 17 -d kernel
-%patch18 -p1 -b 18 -d kernel
+%patch17 -p2 -b 17 -d kernel
+%patch18 -p2 -b 18 -d kernel
%patch30 -p1 -b 30 -d kernel
-%patch31 -p1 -b 31 -d kernel
-%patch32 -p1 -b 32 -d kernel
+#patch31 -p1 -b 31 -d kernel
+#patch32 -p1 -b 32 -d kernel
%patch33 -p1 -b 33 -d kernel
%patch34 -p1 -b 34 -d kernel
%patch35 -p1 -b 35 -d kernel