[V1] framework/crb: fix bug of generating core list on freebsd platform

Jun Dong junx.dong at intel.com
Fri Apr 29 11:09:58 CEST 2022


On freebsd platform that supporting Hyper threading, if crb.cfg configured 
support pass core 0, the cores list(Hyper threading) need not only skip thread 0,
but also other threads that on core 0.

Signed-off-by: Jun Dong <junx.dong at intel.com>
---
 framework/crb.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/framework/crb.py b/framework/crb.py
index a15d15e9..0dc82005 100644
--- a/framework/crb.py
+++ b/framework/crb.py
@@ -739,10 +739,11 @@ class Crb(object):
             for core in core_elements:
                 threads = [int(x) for x in core.text.split(",")]
                 for thread in threads:
-                    if thread != 0:
-                        self.cores.append(
-                            {"socket": socket_id, "core": core_id, "thread": thread}
-                        )
+                    if self.crb["bypass core0"] and socket_id == 0 and core_id == 0:
+                        continue
+                    self.cores.append(
+                        {"socket": socket_id, "core": core_id, "thread": thread}
+                    )
                 core_id += 1
             socket_id += 1
         self.number_of_cores = len(self.cores)
-- 
2.33.1.windows.1



More information about the dts mailing list