NVIDIA / NVIDIA/open-gpu-kernel-modules

**NVIDIA Open GPU Kernel Modules Version**: 570.153.02

Open
#890 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

build-problem
Dominant language
C
Stars
17.4k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

NVIDIA Open GPU Kernel Modules Version

570.153.02

Operating System and Version

Pop!_OS 22.04 LTS

Kernel Release

Linux pop-os 6.15.1-surface-2 #2 SMP PREEMPT_DYNAMIC Tue Jun 24 21:02:07 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Please confirm you are running a stable release kernel (e.g. not a -rc). We do not accept bug reports for unreleased kernels.
  • I am running on a stable kernel release.
Build Command

make.log

Terminal output/Build Log

make[2]: Entering directory '/usr/src/linux-headers-6.15.1-surface-2'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: gcc (Ubuntu 9.4.0-1ubuntu120.04.2) 9.4.0
You are using: gcc (Ubuntu 9.5.0-1ubuntu1
22.04) 9.5.0
CC [M] nvidia-uvm/uvm_pmm_gpu.o
nvidia-uvm/uvm_pmm_gpu.c: In function ‘uvm_pmm_gpu_device_p2p_init’:
nvidia-uvm/uvm_linux.h:429:32: error: ‘struct page’ has no member named ‘pgmap’
429 | #define page_pgmap(page) (page)->pgmap
| ^~
nvidia-uvm/uvm_pmm_gpu.c:3332:5: note: in expansion of macro ‘page_pgmap’
3332 | page_pgmap(p2p_page)->ops = &uvm_device_p2p_pgmap_ops;
| ^~~~~~~~~~
nvidia-uvm/uvm_pmm_gpu.c: In function ‘uvm_pmm_gpu_device_p2p_deinit’:
nvidia-uvm/uvm_linux.h:429:32: error: ‘struct page’ has no member named ‘pgmap’
429 | #define page_pgmap(page) (page)->pgmap
| ^~
nvidia-uvm/uvm_pmm_gpu.c:3347:57: note: in expansion of macro ‘page_pgmap’
3347 | devm_memunmap_pages(&gpu->parent->pci_dev->dev, page_pgmap(p2p_page));
| ^~~~~~~~~~
make[2]: *** [scripts/Makefile.build:250: nvidia-uvm/uvm_pmm_gpu.o] Error 1

More Info

Describe the bug:
The NVIDIA open-source driver (version 570.153.02) fails to compile against Linux kernel 6.15.1-surface-2 due to an error in nvidia-uvm/uvm_pmm_gpu.c. The compiler reports that struct page has no member named pgmap, used in the page_pgmap macro. This occurs in the uvm_pmm_gpu_device_p2p_init and uvm_pmm_gpu_device_p2p_deinit functions, specifically at lines 3332 and 3347 of uvm_pmm_gpu.c. The issue appears to be related to changes in the kernel's struct page definition, possibly specific to the surface-2 kernel variant.

Steps to reproduce:

  1. Install Linux kernel 6.15.1-surface-2
  2. Install NVIDIA open-source driver version 570.153.02 via DKMS or package manager.
  3. Attempt to build the driver module using:
    sudo dkms build -m nvidia -v 570.153.02
    
    

Compilation fails with the error:
nvidia-uvm/uvm_linux.h:429:32: error: ‘struct page’ has no member named ‘pgmap’

LOGS:
make[2]: Entering directory '/usr/src/linux-headers-6.15.1-surface-2'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: gcc (Ubuntu 9.4.0-1ubuntu120.04.2) 9.4.0
You are using: gcc (Ubuntu 9.5.0-1ubuntu1
22.04) 9.5.0
CC [M] nvidia-uvm/uvm_pmm_gpu.o
nvidia-uvm/uvm_pmm_gpu.c: In function ‘uvm_pmm_gpu_device_p2p_init’:
nvidia-uvm/uvm_linux.h:429:32: error: ‘struct page’ has no member named ‘pgmap’
429 | #define page_pgmap(page) (page)->pgmap
| ^~
nvidia-uvm/uvm_pmm_gpu.c:3332:5: note: in expansion of macro ‘page_pgmap’
3332 | page_pgmap(p2p_page)->ops = &uvm_device_p2p_pgmap_ops;
| ^~~~~~~~~~
nvidia-uvm/uvm_pmm_gpu.c: In function ‘uvm_pmm_gpu_device_p2p_deinit’:
nvidia-uvm/uvm_linux.h:429:32: error: ‘struct page’ has no member named ‘pgmap’
429 | #define page_pgmap(page) (page)->pgmap
| ^~
nvidia-uvm/uvm_pmm_gpu.c:3347:57: note: in expansion of macro ‘page_pgmap’
3347 | devm_memunmap_pages(&gpu->parent->pci_dev->dev, page_pgmap(p2p_page));
| ^~~~~~~~~~
make[2]: *** [scripts/Makefile.build:250: nvidia-uvm/uvm_pmm_gpu.o] Error 1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with nvidia-uvm/uvm_linux.h around the page_pgmap macro and nvidia-uvm/uvm_pmm_gpu.c at uvm_pmm_gpu_device_p2p_init and uvm_pmm_gpu_device_p2p_deinit. Reproduce the DKMS build against Linux 6.15.1-surface-2 headers and compare the affected struct page usage. Done means the 570.153.02 module builds successfully against the reported kernel.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux
Domain
build-system, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.