Attention is currently required from: Christian Walter, Jincheng Li, Johnny Lin, Jonathan Zhang, Lean Sheng Tan, Patrick Rudolph, Ronak Kanabar, Tim Chu.
Jérémy Compostella has posted comments on this change by Jérémy Compostella. ( https://review.coreboot.org/c/coreboot/+/85576?usp=email )
Change subject: cpu/x86/topology: Simplify CPU topology initialization
......................................................................
Patch Set 4:
(1 comment)
File src/cpu/x86/topology.c:
https://review.coreboot.org/c/coreboot/+/85576/comment/f7c85efc_4b689e92?usp... :
PS4, Line 89: level = CPUID_CPU_TOPOLOGY_LEVEL(cpuid_regs);
There got double MACRO CPUID_CPU_TOPOLOGY_LEVEL call nearly, not sure if it is good to combine them […]
Thank you for your feedback.
I agree that we could just `break` line 89. But I liked the idea of keeping things close to the original code: the loop body is the working case and the `while` test expression is the one breaking the loop. Ideally I could do the assignment in the while test expression but mixing assignment and test is confusing. Re-working the whole thing with a `for` loop would be my favorite an option but the code is satisfying as-is and it has been widely tested, I do not want to risk to break anything at this stage.
In addition, the `CPUID_CPU_TOPOLOGY_LEVEL` macro is trivial and that the compiler is most likely going to optimize the test and assignment.
As the patch has been +2 for a little while already, I am going to submit it.
--
To view, visit
https://review.coreboot.org/c/coreboot/+/85576?usp=email
To unsubscribe, or for help writing mail filters, visit
https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: Ie9424559f895af69e79c36b919e80af803861148
Gerrit-Change-Number: 85576
Gerrit-PatchSet: 4
Gerrit-Owner: Jérémy Compostella
jeremy.compostella@intel.com
Gerrit-Reviewer: Christian Walter
christian.walter@9elements.com
Gerrit-Reviewer: Jincheng Li
jincheng.li@intel.com
Gerrit-Reviewer: Johnny Lin
Johnny_Lin@wiwynn.com
Gerrit-Reviewer: Jonathan Zhang
jon.zhixiong.zhang@gmail.com
Gerrit-Reviewer: Lean Sheng Tan
sheng.tan@9elements.com
Gerrit-Reviewer: Patrick Rudolph
patrick.rudolph@9elements.com
Gerrit-Reviewer: Ronak Kanabar
ronak.kanabar@intel.com
Gerrit-Reviewer: Shuo Liu
shuo.liu@intel.com
Gerrit-Reviewer: Tim Chu
Tim.Chu@quantatw.com
Gerrit-Reviewer: build bot (Jenkins)
no-reply@coreboot.org
Gerrit-Attention: Patrick Rudolph
patrick.rudolph@9elements.com
Gerrit-Attention: Jonathan Zhang
jon.zhixiong.zhang@gmail.com
Gerrit-Attention: Johnny Lin
Johnny_Lin@wiwynn.com
Gerrit-Attention: Christian Walter
christian.walter@9elements.com
Gerrit-Attention: Jincheng Li
jincheng.li@intel.com
Gerrit-Attention: Ronak Kanabar
ronak.kanabar@intel.com
Gerrit-Attention: Lean Sheng Tan
sheng.tan@9elements.com
Gerrit-Attention: Tim Chu
Tim.Chu@quantatw.com
Gerrit-Comment-Date: Tue, 17 Dec 2024 17:24:03 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Jincheng Li
jincheng.li@intel.com