intel: PAGE_SIZE used in allocators shouldn't be defined on FreeBSD
iris, i965, and anv define the PAGE_SIZE in anv_allocator and bufmgr files. As on FreeBSD the page size is defined in machine/param.h that is indirectly included by those files, we'd rather define it only when the system is not FreeBSD to avoid compile errors. v2: Changed the path in the comment to make clear that machine/params.h is a FreeBSD system file. Signed-off-by: Eleni Maria Stea <elene.mst@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11203>
This commit is contained in:
parent
49e8b77fd9
commit
e094f75bd0
|
@ -87,7 +87,13 @@
|
|||
#define VG_DEFINED(ptr, size) VG(VALGRIND_MAKE_MEM_DEFINED(ptr, size))
|
||||
#define VG_NOACCESS(ptr, size) VG(VALGRIND_MAKE_MEM_NOACCESS(ptr, size))
|
||||
|
||||
/* On FreeBSD PAGE_SIZE is already defined in
|
||||
* /usr/include/machine/param.h that is indirectly
|
||||
* included here.
|
||||
*/
|
||||
#ifndef PAGE_SIZE
|
||||
#define PAGE_SIZE 4096
|
||||
#endif
|
||||
|
||||
#define WARN_ONCE(cond, fmt...) do { \
|
||||
if (unlikely(cond)) { \
|
||||
|
|
|
@ -104,7 +104,13 @@
|
|||
* We use it to indicate the free list is empty. */
|
||||
#define EMPTY UINT32_MAX
|
||||
|
||||
/* On FreeBSD PAGE_SIZE is already defined in
|
||||
* /usr/include/machine/param.h that is indirectly
|
||||
* included here.
|
||||
*/
|
||||
#ifndef PAGE_SIZE
|
||||
#define PAGE_SIZE 4096
|
||||
#endif
|
||||
|
||||
struct anv_mmap_cleanup {
|
||||
void *map;
|
||||
|
|
|
@ -95,7 +95,13 @@
|
|||
#define VG_DEFINED(ptr, size) VG(VALGRIND_MAKE_MEM_DEFINED(ptr, size))
|
||||
#define VG_NOACCESS(ptr, size) VG(VALGRIND_MAKE_MEM_NOACCESS(ptr, size))
|
||||
|
||||
/* On FreeBSD PAGE_SIZE is already defined in
|
||||
* /usr/include/machine/param.h that is indirectly
|
||||
* included here.
|
||||
*/
|
||||
#ifndef PAGE_SIZE
|
||||
#define PAGE_SIZE 4096
|
||||
#endif
|
||||
|
||||
#define FILE_DEBUG_FLAG DEBUG_BUFMGR
|
||||
|
||||
|
|
Loading…
Reference in New Issue