From a4e29e4f79b5b74246dca6a524d76e9efe7a3b99 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Fri, 15 Mar 2024 17:18:07 +0100 Subject: [PATCH] (submit/bsd-DEV_MEM) xfree86: os-support: unexport DEV_MEM defines DEV_MEM define isn't used by any drivers, and BSD seems to be the only platform using /dev/pmem instead of /dev/mem - as well as the DEV_MEM define from xf86_OSlib.h (Linux uses the symbol, but defines on its own) Therefore, just define it where actually used and drop it from the global xf86OSlib.h file. Note that /dev/pmem refers to physical memory, not to be mixed up with Linux's persistent memory subsys, which uses /dev/pmem[N] device nodes. Signed-off-by: Enrico Weigelt, metux IT consult --- hw/xfree86/os-support/bsd/alpha_video.c | 2 ++ hw/xfree86/os-support/bsd/arm_video.c | 2 ++ hw/xfree86/os-support/bsd/i386_video.c | 2 ++ hw/xfree86/os-support/xf86_OSlib.h | 4 ---- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/hw/xfree86/os-support/bsd/alpha_video.c b/hw/xfree86/os-support/bsd/alpha_video.c index d37260c20..97e08a5b4 100644 --- a/hw/xfree86/os-support/bsd/alpha_video.c +++ b/hw/xfree86/os-support/bsd/alpha_video.c @@ -42,6 +42,8 @@ #include "xf86_os_support.h" #include "xf86_OSlib.h" +#define DEV_MEM "/dev/pmem" + #if defined(__NetBSD__) && !defined(MAP_FILE) #define MAP_FLAGS MAP_SHARED #else diff --git a/hw/xfree86/os-support/bsd/arm_video.c b/hw/xfree86/os-support/bsd/arm_video.c index ef97c12bc..f4b14e470 100644 --- a/hw/xfree86/os-support/bsd/arm_video.c +++ b/hw/xfree86/os-support/bsd/arm_video.c @@ -70,6 +70,8 @@ #include "xf86_OSlib.h" #include "compiler.h" +#define DEV_MEM "/dev/pmem" + #if defined(__NetBSD__) && !defined(MAP_FILE) #define MAP_FLAGS MAP_SHARED #else diff --git a/hw/xfree86/os-support/bsd/i386_video.c b/hw/xfree86/os-support/bsd/i386_video.c index 5275dbbfe..b146ee44d 100644 --- a/hw/xfree86/os-support/bsd/i386_video.c +++ b/hw/xfree86/os-support/bsd/i386_video.c @@ -40,6 +40,8 @@ #include #endif +#define DEV_MEM "/dev/pmem" + #if defined(__NetBSD__) && !defined(MAP_FILE) #define MAP_FLAGS MAP_SHARED #else diff --git a/hw/xfree86/os-support/xf86_OSlib.h b/hw/xfree86/os-support/xf86_OSlib.h index 2508eaa06..72dcf3df4 100644 --- a/hw/xfree86/os-support/xf86_OSlib.h +++ b/hw/xfree86/os-support/xf86_OSlib.h @@ -226,10 +226,6 @@ struct pcvtid { #include -#ifndef DEV_MEM -#define DEV_MEM "/dev/mem" -#endif - #ifndef MAP_FAILED #define MAP_FAILED ((void *)-1) #endif