Attention is currently required from: Arthur Heymans, Cliff Huang, Elyes Haouas, Hung-Te Lin, Jérémy Compostella, Lance Zhao, Tim Wawrzynczak, Yidi Lin, Yu-Ping Wu.
Julius Werner has posted comments on this change by Arthur Heymans. ( https://review.coreboot.org/c/coreboot/+/84208?usp=email )
Change subject: soc/mt6366: Work around GCC LTO build ......................................................................
Patch Set 8:
(1 comment)
File src/soc/mediatek/mt8186/mt6366.c:
https://review.coreboot.org/c/coreboot/+/84208/comment/0aab3012_921fbcf2?usp... : PS8, Line 10: #define NO_BUILDTIME_ASSERT
just because one assert statement in a file had this issue the other statements in that file are s […]
Sorry, I'm still trying to understand why this file is somehow more likely to have this problem than others. So you're saying that it is because `mt6366_set_voltage()` contains a big switch-case over different functions that all check different bounds for their argument, and that that specific pattern is what seems to trigger this bug? Okay, fair enough, I guess it makes sense to guard all those checks in advance then.
I still feel like that's a property of a few specific functions that happen to be grouped in this file (together with other assertions that don't fall into this class, e.g. the one in `pmic_get_efuse_votrim()`) and doesn't really mean that we should generally always treat this as a per-file problem. But maybe that's not worth arguing about as long as this is the only file where we're seeing this.
I think the most important thing is that we report this and will hopefully not have to carry the workaround for too long anyway.