Skip to content

Commit 7f2ccb2

Browse files
committed
fix core_id computation when coreMaskWidth = 0
Change-Id: I3181be791f517a15e4ca0a937b0ca4675419ea9f
1 parent 824fca3 commit 7f2ccb2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/topologyentry.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ inline void fillEntry(TopologyEntry & entry, const uint32 & smtMaskWidth, const
118118
{
119119
DBG(1, "entry.os_id = ", entry.os_id, " apic_id = ", apic_id);
120120
entry.thread_id = smtMaskWidth ? extract_bits_32(apic_id, 0, smtMaskWidth - 1) : 0;
121-
entry.core_id = (smtMaskWidth + coreMaskWidth) ? extract_bits_32(apic_id, smtMaskWidth, smtMaskWidth + coreMaskWidth - 1) : 0;
121+
entry.core_id = coreMaskWidth ? extract_bits_32(apic_id, smtMaskWidth, smtMaskWidth + coreMaskWidth - 1) : 0;
122122
entry.socket_id = extract_bits_32(apic_id, smtMaskWidth + coreMaskWidth, 31);
123123
entry.tile_id = extract_bits_32(apic_id, l2CacheMaskShift, 31);
124124
entry.socket_unique_core_id = entry.core_id;

0 commit comments

Comments
 (0)