[coreboot] [patch] number of core of AMD fam10

Peter Stuge peter at stuge.se
Tue Apr 19 01:06:07 CEST 2011


Bao, Zheng wrote:
> The "temp" will be used later. So it has to be calculated correctly.
..
> +++ src/northbridge/amd/amdht/h3ncmn.c	(working copy)
> @@ -565,7 +565,8 @@
>  
>  	/* bits[15,13,12] specify the cores */
>  	/* Support Downcoring */
> -	cores = ((temp & 8) >> 1) + (temp & 3) + 1;
> +	temp = ((temp & 8) >> 1) + (temp & 3);
> +	cores = temp + 1;

The variable name "temp" unfortunately does not explain what the
value is. The commit message also does not have hints.

Hopefully in the future it's possible to also use a brief moment to
improve the clarity of the code, while it is already being fixed for
some other reason. Ie. fixing up variable names, writing particularly
informative commit messages, or of course both at the same time! :)


//Peter




More information about the coreboot mailing list