diff options
author | danfe <danfe@FreeBSD.org> | 2013-08-20 11:21:50 +0800 |
---|---|---|
committer | danfe <danfe@FreeBSD.org> | 2013-08-20 11:21:50 +0800 |
commit | 806032e5dd0068e88d188bc7cf3d3c30f9f473d4 (patch) | |
tree | 8eafd2f8f102a05855bd5000535e4df84ab74f72 /x11 | |
parent | f12a78407e2968f9c9ac6c94e9ec98784580f09d (diff) | |
download | freebsd-ports-gnome-806032e5dd0068e88d188bc7cf3d3c30f9f473d4.tar.gz freebsd-ports-gnome-806032e5dd0068e88d188bc7cf3d3c30f9f473d4.tar.zst freebsd-ports-gnome-806032e5dd0068e88d188bc7cf3d3c30f9f473d4.zip |
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)
Diffstat (limited to 'x11')
-rw-r--r-- | x11/nvidia-driver/Makefile | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/x11/nvidia-driver/Makefile b/x11/nvidia-driver/Makefile index 51874ad3f30f..a0c6c0debf9c 100644 --- a/x11/nvidia-driver/Makefile +++ b/x11/nvidia-driver/Makefile @@ -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/' \ |