On 10/23/23 4:19 PM, David Christensen wrote:

diff --git a/lib/eal/common/eal_private.h b/lib/eal/common/eal_private.h
index ebd496b537cf..7d84adb5b328 100644
--- a/lib/eal/common/eal_private.h
+++ b/lib/eal/common/eal_private.h
@@ -354,6 +354,13 @@ unsigned eal_cpu_core_id(unsigned lcore_id);
   */
  int eal_cpu_detected(unsigned lcore_id);

+/**
+ * Check for architecture supported MMU.
+ *
+ * This function is private to the EAL.
+ */
+bool eal_mmu_supported_arch(void);
+
...
diff --git a/lib/eal/ppc/rte_mmu.c b/lib/eal/ppc/rte_mmu.c
new file mode 100644
index 000000000000..017a8768bce3
--- /dev/null
+++ b/lib/eal/ppc/rte_mmu.c
@@ -0,0 +1,53 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright (C) IBM Corporation 2023
+ */
+
+#include "rte_log.h"
+#include "eal_private.h"
+
+bool
+eal_mmu_supported_arch(void)
+{
+       static const char proc_cpuinfo[] = "/proc/cpuinfo";

Belatedly recognized that I'd implemented an OS specific detection mechanism for a function in the "common" library. I'll resubmit a v3 under the "linux" subtree shortly.

Dave

Reply via email to