drm: Fix Linux/DragonFly PAGE_MASK confusion
commitd653c72734cf5be86d3cd2b4208c1e4ec68ade00
authorFrançois Tigeot <ftigeot@wolfpond.org>
Sun, 17 Feb 2019 08:06:17 +0000 (17 09:06 +0100)
committerFrançois Tigeot <ftigeot@wolfpond.org>
Sun, 17 Feb 2019 08:06:17 +0000 (17 09:06 +0100)
treef2de4a522581d81a5e5d04b22a768e6a9e87aa14
parent19b1d97238fbcd7381cfbebf53ae7eda1e11d15c
drm: Fix Linux/DragonFly PAGE_MASK confusion

* Both Linux and the DragonFly kernel use a PAGE_MASK constant,
  which is unfortunately defined differently in each one

* Define a LINUX_PAGE_MASK macro and use it when applicable in the
  drm code to fix this confusion

* One or two drm/radeon bugs were possibly caught during the process

* This commit based on a patch by tuxillo

Spotted-by: tuxillo
Fixes: https://bugs.dragonflybsd.org/issues/3171
sys/dev/drm/drm_bufs.c
sys/dev/drm/i915/i915_gem.c
sys/dev/drm/i915/i915_gem_execbuffer.c
sys/dev/drm/i915/i915_gem_gtt.c
sys/dev/drm/i915/i915_gem_gtt.h
sys/dev/drm/i915/i915_gpu_error.c
sys/dev/drm/include/asm/page.h
sys/dev/drm/radeon/radeon_ttm.c
sys/dev/drm/radeon/radeon_vm.c