Bug#1084844: nvidia-graphics-drivers - fails autopkgtest

Andreas Beckmann anbe at debian.org
Fri Oct 11 12:55:11 BST 2024


On 10/9/24 19:29, Bastian Blank wrote:
> Package: nvidia-graphics-drivers
> Version: 535.183.06-1

> https://ci.debian.net/packages/n/nvidia-graphics-drivers/testing/arm64/52858087/#S6

https://ci.debian.net/packages/n/nvidia-graphics-drivers/testing/arm64/52858087/#L1941
302s In file included from /usr/src/linux-headers-6.11.2-common/arch/arm64/include/asm/thread_info.h:17,
302s                  from /usr/src/linux-headers-6.11.2-common/include/linux/thread_info.h:60,
302s                  from /usr/src/linux-headers-6.11.2-common/arch/arm64/include/asm/preempt.h:6,
302s                  from /usr/src/linux-headers-6.11.2-common/include/linux/preempt.h:79,
302s                  from /usr/src/linux-headers-6.11.2-common/include/linux/spinlock.h:56,
302s                  from /usr/src/modules/nvidia-kernel/common/inc/nv-lock.h:29,
302s                  from /usr/src/modules/nvidia-kernel/common/inc/nv-linux.h:32:
302s /usr/src/modules/nvidia-kernel/nvidia/nv-vtophys.c: In function ‘nv_get_kern_phys_address’:
302s /usr/src/linux-headers-6.11.2-common/arch/arm64/include/asm/memory.h:425:66: error: passing argument 1 of ‘virt_to_pfn’ makes pointer from integer without a cast [-Wint-conversion]
302s   425 |         __is_lm_address(__addr) && pfn_is_map_memory(virt_to_pfn(__addr));      \
302s       |                                                                  ^~~~~~
302s       |                                                                  |
302s       |                                                                  NvU64 {aka long long unsigned int}
302s /usr/src/modules/nvidia-kernel/common/inc/nv-linux.h:2082:30: note: in expansion of macro ‘virt_addr_valid’
302s  2082 | #  define nv_virt_addr_valid virt_addr_valid
302s       |                              ^~~~~~~~~~~~~~~
302s /usr/src/modules/nvidia-kernel/nvidia/nv-vtophys.c:32:9: note: in expansion of macro ‘nv_virt_addr_valid’
302s    32 |     if (nv_virt_addr_valid(address))
302s       |         ^~~~~~~~~~~~~~~~~~
302s /usr/src/linux-headers-6.11.2-common/arch/arm64/include/asm/memory.h:380:53: note: expected ‘const void *’ but argument is of type ‘NvU64’ {aka ‘long long unsigned int’}
302s   380 | static inline unsigned long virt_to_pfn(const void *kaddr)
302s       |                                         ~~~~~~~~~~~~^~~~~


arch/arm64/include/asm/memory.h
static inline unsigned long virt_to_pfn(const void *kaddr)
{
         return __phys_to_pfn(virt_to_phys(kaddr));
}
#define virt_addr_valid(addr)   ({                                      \
         __typeof__(addr) __addr = __tag_reset(addr);                    \
         __is_lm_address(__addr) && pfn_is_map_memory(virt_to_pfn(__addr));      \
})

arch/powerpc/include/asm/page.h
static inline unsigned long virt_to_pfn(const void *kaddr)
{
         return __pa(kaddr) >> PAGE_SHIFT;
}
#define virt_addr_valid(vaddr)  ({                                      \
         unsigned long _addr = (unsigned long)vaddr;                     \
         _addr >= PAGE_OFFSET && _addr < (unsigned long)high_memory &&   \
         pfn_valid(virt_to_pfn((void *)_addr));                          \
})

arch/x86/include/asm/page.h
extern bool __virt_addr_valid(unsigned long kaddr);
#define virt_addr_valid(kaddr)  __virt_addr_valid((unsigned long) (kaddr))


Looks like the virt_addr_valid() macro wants a 'void*' argument ...
which is only 'enforced' on arm64 by preserving the argument type
(the other architectures explictly cast the argument to 'unsigned long'
and maybe back to 'void*')


Andreas



More information about the pkg-nvidia-devel mailing list