Skip to contentSkip to conversation

cxl/vendor: update niagara to only build on linux, add KConfig options

PATCH Superseded Gregory Price 2 participants 2 messages Sep 20, 2023 – Sep 21, 2023 Arm/Amlogic Meson SoC support

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cxl/vendor: update niagara to only build on linux, add KConfig options

Niagara uses <sys/shm.h> which presently limits its compatibility to linux hosts. Change build to only build it on linux.

Add Kconfig file for skhynix directory, and make niagara depend on CXL_MEM_DEVICE. Add an explicit flag for niagara.

---
 hw/cxl/Kconfig                    | 2 ++
 hw/cxl/vendor/Kconfig             | 1 +
 hw/cxl/vendor/skhynix/Kconfig     | 4 ++++
 hw/cxl/vendor/skhynix/meson.build | 4 +++-
 4 files changed, 10 insertions(+), 1 deletion(-)
 create mode 100644 hw/cxl/vendor/Kconfig
 create mode 100644 hw/cxl/vendor/skhynix/Kconfig
hw/cxl/Kconfig +2 -0
index dd6c54b54d..88022008c7 100644
@@ -1,3 +1,5 @@
+source vendor/Kconfig
+
 config CXL
     bool
     default y if PCI_EXPRESS
hw/cxl/vendor/Kconfig new file +1 -0
new file mode 100644
index 0000000000..aa23bb051b
@@ -0,0 +1 @@
+source skhynix/Kconfig
hw/cxl/vendor/skhynix/Kconfig new file +4 -0
new file mode 100644
index 0000000000..382fa0cd6c
@@ -0,0 +1,4 @@
+config CXL_SKHYNIX_NIAGARA
+    bool
+    depends on CXL_MEM_DEVICE
+    default y if CXL_VENDOR
hw/cxl/vendor/skhynix/meson.build +3 -1
index 4e57db65f1..6f194aa517 100644
@@ -1 +1,3 @@
-system_ss.add(when: 'CONFIG_CXL_VENDOR', if_true: files('skhynix_niagara.c',))
+if targetos == 'linux'
+    system_ss.add(when: 'CONFIG_CXL_SKHYNIX_NIAGARA', if_true: files('skhynix_niagara.c',))
+endif
Signature · 1 line
2.39.1
#1 lore raw

Hi Gregory,

Quoted 23 lines · Gregory Price

Niagara uses <sys/shm.h> which presently limits its compatibility to linux hosts. Change build to only build it on linux.

Add Kconfig file for skhynix directory, and make niagara depend on CXL_MEM_DEVICE. Add an explicit flag for niagara.

---
  hw/cxl/Kconfig                    | 2 ++
  hw/cxl/vendor/Kconfig             | 1 +
  hw/cxl/vendor/skhynix/Kconfig     | 4 ++++
  hw/cxl/vendor/skhynix/meson.build | 4 +++-
  4 files changed, 10 insertions(+), 1 deletion(-)

create mode 100644 hw/cxl/vendor/Kconfig create mode 100644 hw/cxl/vendor/skhynix/Kconfig

hw/cxl/vendor/skhynix/Kconfig new file +0 -0
new file mode 100644
index 0000000000..382fa0cd6c

hw/cxl/vendor/skhynix/Kconfig line 3

Quoted 3 lines
hw/cxl/vendor/skhynix/Kconfig new file +3 -0
@@ -0,0 +1,4 @@
+config CXL_SKHYNIX_NIAGARA
+    bool
+    depends on CXL_MEM_DEVICE

You want:

       depends on CXL_MEM_DEVICE && LINUX

hw/cxl/vendor/skhynix/meson.build line 1

Quoted 8 lines
hw/cxl/vendor/skhynix/Kconfig new file +1 -0
+    default y if CXL_VENDOR
hw/cxl/vendor/skhynix/meson.build +1 -1
index 4e57db65f1..6f194aa517 100644
@@ -1 +1,3 @@
-system_ss.add(when: 'CONFIG_CXL_VENDOR', if_true: files('skhynix_niagara.c',))
+if targetos == 'linux'

(Then this check is not necessary).

Quoted 2 lines
hw/cxl/vendor/skhynix/meson.build +2 -0
+    system_ss.add(when: 'CONFIG_CXL_SKHYNIX_NIAGARA', if_true: files('skhynix_niagara.c',))
+endif