From patchwork Mon Apr 18 07:02:09 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: number of core of AMD fam10 Date: Mon, 18 Apr 2011 07:02:09 -0000 From: Bao, Zheng X-Patchwork-Id: 2885 Message-Id: To: The "temp" will be used later. So it has to be calculated correctly.   Signed-off-by: Zheng Bao The "temp" will be used later. So it has to be calculated correctly. Signed-off-by: Zheng Bao Acked-by: Index: src/northbridge/amd/amdht/h3ncmn.c =================================================================== --- src/northbridge/amd/amdht/h3ncmn.c (revision 6512) +++ 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; AmdPCIReadBits (MAKE_SBDFO(makePCISegmentFromNode(node), makePCIBusFromNode(node), makePCIDeviceFromNode(node), Acked-by: Marc Jones Index: src/northbridge/amd/amdht/h3ncmn.c =================================================================== --- src/northbridge/amd/amdht/h3ncmn.c (revision 6512) +++ 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;   AmdPCIReadBits (MAKE_SBDFO(makePCISegmentFromNode(node),       makePCIBusFromNode(node),       makePCIDeviceFromNode(node),