mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-20 20:09:11 +00:00
Fix NVidia drivers correctly after KVA space allocation API changes in
recent -CURRENT (after r254025). Previously it would immediately core dump upon loading of nvidia.ko. PR: ports/181144 (fix suggested in the audit trail) Reviewed by: jhb Timeout from: jeff (no cookie)
This commit is contained in:
parent
bb22680a30
commit
c520e24c87
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=325027
@ -149,6 +149,11 @@ post-patch: .SILENT
|
||||
${REINPLACE_CMD} -E 's/(VM_OBJECT_)(UN)?(LOCK)/\1W\2\3/' \
|
||||
${WRKSRC}/src/nvidia_subr.c
|
||||
.endif
|
||||
# Adjust kmem(9) calls after FreeBSD src SVN r254025
|
||||
.if ${OSVERSION} > 1000040
|
||||
${REINPLACE_CMD} -e '/kmem_/s/kernel_map/kernel_arena/' \
|
||||
${WRKSRC}/src/nvidia_subr.c
|
||||
.endif
|
||||
# Fix stack buffer overflow in nvidia_sysctl_bus_type()
|
||||
.if ${NVVERSION} < 3192300
|
||||
${REINPLACE_CMD} -E '/bus_type\[4\]/d ; \
|
||||
@ -156,11 +161,6 @@ post-patch: .SILENT
|
||||
/return SYSCTL_OUT\(req, bus_type/d' \
|
||||
${WRKSRC}/src/nvidia_sysctl.c
|
||||
.endif
|
||||
# Catch up with KVA space allocation API changes in recent -CURRENT
|
||||
.if ${OSVERSION} > 1000040
|
||||
${REINPLACE_CMD} -e 's/kmem_free(kernel_map,/kva_free(/ ; \
|
||||
/kmem_alloc_contig/s/map/arena/' ${WRKSRC}/src/nvidia_subr.c
|
||||
.endif
|
||||
# Process OPTIONS
|
||||
.if ${PORT_OPTIONS:MFREEBSD_AGP}
|
||||
${REINPLACE_CMD} -E 's/undef (NV_SUPPORT_OS_AGP)/define \1/' \
|
||||
|
Loading…
Reference in New Issue
Block a user