Source: nvidia-graphics-drivers-tesla-450
Version: 450.248.02-15
Severity: serious
Tags: ftbfs
User: [email protected]
Usertags: ppc64el
X-Debbugs-Cc: John Paul Adrian Glaubitz <[email protected]>


Dear Maintainer,

I have reproduced the FTBFS issue for nvidia-graphics-drivers-tesla-450 on ppc64el (sid) in an sbuild chroot with the following build log:

In file included from nvidia-uvm/uvm_linux.h:38,
                 from nvidia-uvm/uvm8_extern_decl.h:27,
                 from nvidia-uvm/uvm8_global.h:28,
                 from nvidia-uvm/uvm8_ampere.c:24:
././common/inc/nv-time.h: In function ‘nv_in_hardirq’:
././common/inc/nv-time.h:45:12: error: implicit declaration of function ‘in_irq’ [-Wimplicit-function-declaration]
   45 |     return in_irq();
      |            ^~~~~~

Build log for reference: https://buildd.debian.org/status/fetch.php?pkg=nvidia-graphics-drivers-tesla-450&arch=ppc64el&ver=450.248.02-15&stamp=1794364703&raw=0

Linux 6.19 removed in_irq(). While patch 0076 added a wrapper in common/inc/nv-time.h checking for in_hardirq, on PowerPC <linux/ktime.h> does not transitively include <linux/hardirq.h>. Because nv-time.h is included before nv-linux.h in nvidia-uvm, in_hardirq is undefined on ppc64el, causing it to fall back to the removed in_irq().

Explicitly including <linux/hardirq.h> in common/inc/nv-time.h resolves the issue.

The attached DEP-3 patch fixes the build and has been verified in a sid-ppc64el sbuild chroot. I will also submit a Merge Request on Salsa.



Thanks and Regards,
Trupti Shirsat
Description: nv-time.h: include <linux/hardirq.h> for in_hardirq()
 In nvidia-uvm/uvm_linux.h, "nv-time.h" is included before "nv-linux.h".
 Since nv-time.h only included <linux/ktime.h>, it relied on transitive
 inclusion of <linux/preempt.h> for in_hardirq().
 .
 On ppc64el with Linux >= 7.3, <linux/ktime.h> no longer pulls in
 <linux/preempt.h>, causing #if defined(in_hardirq) in patch 0076 to
 evaluate to false and fall back to the removed in_irq() macro.
 .
 Include <linux/hardirq.h> explicitly in nv-time.h to fix FTBFS on ppc64el.
Author: Trupti Shirsat <[email protected]>
Index: kernel-source-tree/common/inc/nv-time.h
===================================================================
--- kernel-source-tree.orig/common/inc/nv-time.h
+++ kernel-source-tree/common/inc/nv-time.h
@@ -26,6 +26,7 @@
 #include "conftest.h"
 
 #include <linux/ktime.h>
+#include <linux/hardirq.h>
 
 #if defined (NV_TIMEVAL_PRESENT)
 typedef struct timeval nv_timeval; 

Reply via email to