[coreboot-gerrit] Change in coreboot[master]: soc/amd/stoneyridge: Fix get_cpu_count()

Daniel Kurtz (Code Review) gerrit at coreboot.org
Wed Oct 31 05:52:44 CET 2018


Daniel Kurtz has posted comments on this change. ( https://review.coreboot.org/29367 )

Change subject: soc/amd/stoneyridge: Fix get_cpu_count()
......................................................................


Patch Set 1: Code-Review+2

(1 comment)

https://review.coreboot.org/#/c/29367/1/src/soc/amd/stoneyridge/cpu.c
File src/soc/amd/stoneyridge/cpu.c:

https://review.coreboot.org/#/c/29367/1/src/soc/amd/stoneyridge/cpu.c@58
PS1, Line 58: 	return (pci_read_config16(SOC_HT_DEV, D18F0_CPU_CNT) & CPU_CNT_MASK)
This is pretty ugly.
Perhaps:

  int cpu_count = pci_read_config16(SOC_HT_DEV, D18F0_CPU_CNT);
  return (cpu_count & CPU_CNT_MASK) + 1;



-- 
To view, visit https://review.coreboot.org/29367
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I7b73358a074dd27639aafead7c8b39f0fad5685f
Gerrit-Change-Number: 29367
Gerrit-PatchSet: 1
Gerrit-Owner: Martin Roth <martinroth at google.com>
Gerrit-Reviewer: Daniel Kurtz <djkurtz at google.com>
Gerrit-Reviewer: Raul Rangel <rrangel at chromium.org>
Gerrit-Reviewer: Richard Spiegel <richard.spiegel at silverbackltd.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply at coreboot.org>
Gerrit-Comment-Date: Wed, 31 Oct 2018 04:52:44 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20181031/e99293e4/attachment.html>


More information about the coreboot-gerrit mailing list