HAOUAS Elyes has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33257
Change subject: cpu/amd/family_10h-family_15h: Fix 'if' condition identical branches ......................................................................
cpu/amd/family_10h-family_15h: Fix 'if' condition identical branches
Change-Id: I1c937a62388c38090ee2cc3228973cfb8361bac7 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M src/cpu/amd/family_10h-family_15h/init_cpus.c 1 file changed, 2 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/57/33257/1
diff --git a/src/cpu/amd/family_10h-family_15h/init_cpus.c b/src/cpu/amd/family_10h-family_15h/init_cpus.c index d6a4725..f416d9c 100644 --- a/src/cpu/amd/family_10h-family_15h/init_cpus.c +++ b/src/cpu/amd/family_10h-family_15h/init_cpus.c @@ -504,10 +504,9 @@ if (is_fam15h()) { /* core 1 on node 0 is special; to avoid corrupting the * BSP do not alter MTRRs on that core */ + fam15_bsp_core1_apicid = 1; if (CONFIG(ENABLE_APIC_EXT_ID) && (CONFIG_APIC_ID_OFFSET > 0)) - fam15_bsp_core1_apicid = CONFIG_APIC_ID_OFFSET + 1; - else - fam15_bsp_core1_apicid = 1; + fam15_bsp_core1_apicid += CONFIG_APIC_ID_OFFSET;
if (apicid == fam15_bsp_core1_apicid) set_mtrrs = 0;
Marshall Dawson has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33257 )
Change subject: cpu/amd/family_10h-family_15h: Fix 'if' condition identical branches ......................................................................
Patch Set 1: Code-Review+2
I don't know that I would call them identical. But meh.
HAOUAS Elyes has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33257 )
Change subject: cpu/amd/family_10h-family_15h: Fix 'if' condition identical branches ......................................................................
Patch Set 1:
Patch Set 1: Code-Review+2
I don't know that I would call them identical. But meh.
You are right, the compiler called them identical branches : https://qa.coreboot.org/job/coreboot-gerrit/95744/consoleFull
Marshall Dawson has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33257 )
Change subject: cpu/amd/family_10h-family_15h: Fix 'if' condition identical branches ......................................................................
Patch Set 1:
Oh, thanks for the clarification. I'd bet that's simply because CONFIG_APIC_ID_OFFSET=0 and the compiler therefore sees the same assignment to apic_id. For any board w/o CONFIG__OFFSET=0, and there probably are none, you wouldn't see that message.
Patrick Georgi has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/33257 )
Change subject: cpu/amd/family_10h-family_15h: Fix 'if' condition identical branches ......................................................................
cpu/amd/family_10h-family_15h: Fix 'if' condition identical branches
Change-Id: I1c937a62388c38090ee2cc3228973cfb8361bac7 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr Reviewed-on: https://review.coreboot.org/c/coreboot/+/33257 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Marshall Dawson marshalldawson3rd@gmail.com --- M src/cpu/amd/family_10h-family_15h/init_cpus.c 1 file changed, 2 insertions(+), 3 deletions(-)
Approvals: build bot (Jenkins): Verified Marshall Dawson: Looks good to me, approved
diff --git a/src/cpu/amd/family_10h-family_15h/init_cpus.c b/src/cpu/amd/family_10h-family_15h/init_cpus.c index d6a4725..f416d9c 100644 --- a/src/cpu/amd/family_10h-family_15h/init_cpus.c +++ b/src/cpu/amd/family_10h-family_15h/init_cpus.c @@ -504,10 +504,9 @@ if (is_fam15h()) { /* core 1 on node 0 is special; to avoid corrupting the * BSP do not alter MTRRs on that core */ + fam15_bsp_core1_apicid = 1; if (CONFIG(ENABLE_APIC_EXT_ID) && (CONFIG_APIC_ID_OFFSET > 0)) - fam15_bsp_core1_apicid = CONFIG_APIC_ID_OFFSET + 1; - else - fam15_bsp_core1_apicid = 1; + fam15_bsp_core1_apicid += CONFIG_APIC_ID_OFFSET;
if (apicid == fam15_bsp_core1_apicid) set_mtrrs = 0;