diff options
author | 2021-01-13 01:04:49 +0000 | |
---|---|---|
committer | 2021-01-13 01:04:49 +0000 | |
commit | 1673f09a40940493856db8f67271437f4f6e82d2 (patch) | |
tree | 7aaf380d87696a68c3dfd132be2834668ea51fb6 /sys/dev/pci/drm/include/linux/vmalloc.h | |
parent | Add pflog(4) tests for IPv6. (diff) | |
download | wireguard-openbsd-1673f09a40940493856db8f67271437f4f6e82d2.tar.xz wireguard-openbsd-1673f09a40940493856db8f67271437f4f6e82d2.zip |
revert drm vmalloc changes
It is suspected they were to blame for a machine with inteldrm running X
(xterms and chromium) running out of resources after a few days.
ok kettenis@
Diffstat (limited to 'sys/dev/pci/drm/include/linux/vmalloc.h')
-rw-r--r-- | sys/dev/pci/drm/include/linux/vmalloc.h | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/sys/dev/pci/drm/include/linux/vmalloc.h b/sys/dev/pci/drm/include/linux/vmalloc.h index fd6cc54b7db..53ba42e2d18 100644 --- a/sys/dev/pci/drm/include/linux/vmalloc.h +++ b/sys/dev/pci/drm/include/linux/vmalloc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vmalloc.h,v 1.2 2021/01/08 23:02:09 kettenis Exp $ */ +/* $OpenBSD: vmalloc.h,v 1.3 2021/01/13 01:04:49 jsg Exp $ */ /* * Copyright (c) 2013, 2014, 2015 Mark Kettenis * @@ -25,10 +25,25 @@ #include <linux/overflow.h> void *vmap(struct vm_page **, unsigned int, unsigned long, pgprot_t); -void vunmap(void *, size_t); +void vunmap(void *, size_t); + +static inline void * +vmalloc(unsigned long size) +{ + return malloc(size, M_DRM, M_WAITOK | M_CANFAIL); +} + +static inline void * +vzalloc(unsigned long size) +{ + return malloc(size, M_DRM, M_WAITOK | M_CANFAIL | M_ZERO); +} + +static inline void +vfree(void *objp) +{ + free(objp, M_DRM, 0); +} -void *vmalloc(unsigned long); -void *vzalloc(unsigned long); -void vfree(const void *); #endif |