Use config file value for the number of ordered locks
everywhere.

Signed-off-by: Petri Savolainen <petri.savolai...@linaro.org>
---
 platform/linux-generic/include/odp_config_internal.h | 2 +-
 platform/linux-generic/odp_schedule.c                | 8 +-------
 platform/linux-generic/odp_schedule_iquery.c         | 8 +-------
 3 files changed, 3 insertions(+), 15 deletions(-)

diff --git a/platform/linux-generic/include/odp_config_internal.h 
b/platform/linux-generic/include/odp_config_internal.h
index 3cff0045..469396df 100644
--- a/platform/linux-generic/include/odp_config_internal.h
+++ b/platform/linux-generic/include/odp_config_internal.h
@@ -27,7 +27,7 @@
 /*
  * Maximum number of ordered locks per queue
  */
-#define CONFIG_QUEUE_MAX_ORD_LOCKS 4
+#define CONFIG_QUEUE_MAX_ORD_LOCKS 2
 
 /*
  * Maximum number of packet IO resources
diff --git a/platform/linux-generic/odp_schedule.c 
b/platform/linux-generic/odp_schedule.c
index 69de7ac0..53670a71 100644
--- a/platform/linux-generic/odp_schedule.c
+++ b/platform/linux-generic/odp_schedule.c
@@ -121,12 +121,6 @@ ODP_STATIC_ASSERT((8 * sizeof(pri_mask_t)) >= 
QUEUES_PER_PRIO,
 /* Maximum number of dequeues */
 #define MAX_DEQ CONFIG_BURST_SIZE
 
-/* Maximum number of ordered locks per queue */
-#define MAX_ORDERED_LOCKS_PER_QUEUE 2
-
-ODP_STATIC_ASSERT(MAX_ORDERED_LOCKS_PER_QUEUE <= CONFIG_QUEUE_MAX_ORD_LOCKS,
-                 "Too_many_ordered_locks");
-
 /* Ordered stash size */
 #define MAX_ORDERED_STASH 512
 
@@ -449,7 +443,7 @@ static inline int grp_update_tbl(void)
 
 static unsigned schedule_max_ordered_locks(void)
 {
-       return MAX_ORDERED_LOCKS_PER_QUEUE;
+       return CONFIG_QUEUE_MAX_ORD_LOCKS;
 }
 
 static inline int queue_per_prio(uint32_t queue_index)
diff --git a/platform/linux-generic/odp_schedule_iquery.c 
b/platform/linux-generic/odp_schedule_iquery.c
index 75f56e63..8d8dcc29 100644
--- a/platform/linux-generic/odp_schedule_iquery.c
+++ b/platform/linux-generic/odp_schedule_iquery.c
@@ -148,12 +148,6 @@ typedef struct {
        odp_event_t stash[MAX_DEQ], *top;
 } event_cache_t;
 
-/* Maximum number of ordered locks per queue */
-#define MAX_ORDERED_LOCKS_PER_QUEUE 2
-
-ODP_STATIC_ASSERT(MAX_ORDERED_LOCKS_PER_QUEUE <= CONFIG_QUEUE_MAX_ORD_LOCKS,
-                 "Too_many_ordered_locks");
-
 /* Ordered stash size */
 #define MAX_ORDERED_STASH 512
 
@@ -1266,7 +1260,7 @@ static void schedule_order_unlock(unsigned lock_index)
 
 static unsigned schedule_max_ordered_locks(void)
 {
-       return MAX_ORDERED_LOCKS_PER_QUEUE;
+       return CONFIG_QUEUE_MAX_ORD_LOCKS;
 }
 
 static inline bool is_atomic_queue(unsigned int queue_index)
-- 
2.13.0

Reply via email to