HAOUAS Elyes has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33006
Change subject: cpu/amd/family_10h-family_15h: Remove variable set but not used ......................................................................
cpu/amd/family_10h-family_15h: Remove variable set but not used
Change-Id: Ifc63ec5b588f8edcec5eda343ec9694332845045 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M src/cpu/amd/family_10h-family_15h/init_cpus.c 1 file changed, 8 insertions(+), 14 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/06/33006/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 719d62f..fb732c6 100644 --- a/src/cpu/amd/family_10h-family_15h/init_cpus.c +++ b/src/cpu/amd/family_10h-family_15h/init_cpus.c @@ -984,7 +984,6 @@ uint8_t nvram; u32 platform; uint64_t revision; - uint8_t enable_c_states; uint8_t enable_cpb;
printk(BIOS_DEBUG, "cpuSetAMDMSR "); @@ -1060,21 +1059,16 @@ }
if (revision & (AMD_DR_Ex | AMD_FAM15_ALL)) { - enable_c_states = 0; if (CONFIG(HAVE_ACPI_TABLES)) - if (get_option(&nvram, "cpu_c_states") == CB_SUCCESS) - enable_c_states = !!nvram; - - if (enable_c_states) { - /* Set up the C-state base address */ - msr_t c_state_addr_msr; - c_state_addr_msr = rdmsr(MSR_CSTATE_ADDRESS); - c_state_addr_msr.lo = ACPI_CPU_P_LVL2; /* CstateAddr = ACPI_CPU_P_LVL2 */ - wrmsr(MSR_CSTATE_ADDRESS, c_state_addr_msr); - } + if ((get_option(&nvram, "cpu_c_states") == CB_SUCCESS) && + (nvram)) { + /* Set up the C-state base address */ + msr_t c_state_addr_msr; + c_state_addr_msr = rdmsr(MSR_CSTATE_ADDRESS); + c_state_addr_msr.lo = ACPI_CPU_P_LVL2; + wrmsr(MSR_CSTATE_ADDRESS, c_state_addr_msr); + } } -#else - enable_c_states = 0; #endif
if (revision & AMD_FAM15_ALL) {
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33006 )
Change subject: cpu/amd/family_10h-family_15h: Remove variable set but not used ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/#/c/33006/1/src/cpu/amd/family_10h-family_15h/in... File src/cpu/amd/family_10h-family_15h/init_cpus.c:
https://review.coreboot.org/#/c/33006/1/src/cpu/amd/family_10h-family_15h/in... PS1, Line 1063: if ((get_option(&nvram, "cpu_c_states") == CB_SUCCESS) && line over 80 characters
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33006 )
Change subject: cpu/amd/family_10h-family_15h: Remove variable set but not used ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/#/c/33006/2/src/cpu/amd/family_10h-family_15h/in... File src/cpu/amd/family_10h-family_15h/init_cpus.c:
https://review.coreboot.org/#/c/33006/2/src/cpu/amd/family_10h-family_15h/in... PS2, Line 1063: if ((get_option(&nvram, "cpu_c_states") == CB_SUCCESS) && line over 80 characters
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33006 )
Change subject: cpu/amd/family_10h-family_15h: Remove variable set but not used ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/#/c/33006/3/src/cpu/amd/family_10h-family_15h/in... File src/cpu/amd/family_10h-family_15h/init_cpus.c:
https://review.coreboot.org/#/c/33006/3/src/cpu/amd/family_10h-family_15h/in... PS3, Line 1063: if ((get_option(&nvram, "cpu_c_states") == CB_SUCCESS) && line over 80 characters
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33006 )
Change subject: cpu/amd/family_10h-family_15h: Remove variable set but not used ......................................................................
Patch Set 3: Code-Review+2
Marshall Dawson has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33006 )
Change subject: cpu/amd/family_10h-family_15h: Remove variable set but not used ......................................................................
Patch Set 3: Code-Review+2
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33006 )
Change subject: cpu/amd/family_10h-family_15h: Remove variable set but not used ......................................................................
Patch Set 4:
(1 comment)
https://review.coreboot.org/#/c/33006/4/src/cpu/amd/family_10h-family_15h/in... File src/cpu/amd/family_10h-family_15h/init_cpus.c:
https://review.coreboot.org/#/c/33006/4/src/cpu/amd/family_10h-family_15h/in... PS4, Line 1063: if ((get_option(&nvram, "cpu_c_states") == CB_SUCCESS) && line over 80 characters
Patrick Georgi has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/33006 )
Change subject: cpu/amd/family_10h-family_15h: Remove variable set but not used ......................................................................
cpu/amd/family_10h-family_15h: Remove variable set but not used
Change-Id: Ifc63ec5b588f8edcec5eda343ec9694332845045 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr Reviewed-on: https://review.coreboot.org/c/coreboot/+/33006 Reviewed-by: Angel Pons th3fanbus@gmail.com Reviewed-by: Marshall Dawson marshalldawson3rd@gmail.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/cpu/amd/family_10h-family_15h/init_cpus.c 1 file changed, 8 insertions(+), 14 deletions(-)
Approvals: build bot (Jenkins): Verified Marshall Dawson: Looks good to me, approved Angel Pons: 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 310706b..d6a4725 100644 --- a/src/cpu/amd/family_10h-family_15h/init_cpus.c +++ b/src/cpu/amd/family_10h-family_15h/init_cpus.c @@ -986,7 +986,6 @@ uint8_t nvram; u32 platform; uint64_t revision; - uint8_t enable_c_states; uint8_t enable_cpb;
printk(BIOS_DEBUG, "cpuSetAMDMSR "); @@ -1062,21 +1061,16 @@ }
if (revision & (AMD_DR_Ex | AMD_FAM15_ALL)) { - enable_c_states = 0; if (CONFIG(HAVE_ACPI_TABLES)) - if (get_option(&nvram, "cpu_c_states") == CB_SUCCESS) - enable_c_states = !!nvram; - - if (enable_c_states) { - /* Set up the C-state base address */ - msr_t c_state_addr_msr; - c_state_addr_msr = rdmsr(MSR_CSTATE_ADDRESS); - c_state_addr_msr.lo = ACPI_CPU_P_LVL2; /* CstateAddr = ACPI_CPU_P_LVL2 */ - wrmsr(MSR_CSTATE_ADDRESS, c_state_addr_msr); - } + if ((get_option(&nvram, "cpu_c_states") == CB_SUCCESS) && + (nvram)) { + /* Set up the C-state base address */ + msr_t c_state_addr_msr; + c_state_addr_msr = rdmsr(MSR_CSTATE_ADDRESS); + c_state_addr_msr.lo = ACPI_CPU_P_LVL2; + wrmsr(MSR_CSTATE_ADDRESS, c_state_addr_msr); + } } -#else - enable_c_states = 0; #endif
if (revision & AMD_FAM15_ALL) {