Nico Huber posted comments on this change.
Patch set 1:
(2 comments)
Patch Set #1, Line 9: The "number of masters" (NM) reflects the value that begins at 1.
Seems that this is right for Lewisburg, awesome! more mess
for us to handle.
I've never found a definition if it starts at 0 or 1 and past
practice was to count from 0 (== 1 master)! All descriptors
in the wild that I've encountered were for platforms with 3
masters and always had NM set to 2 ;) Now the SPI guide for
Lewisburg states it should be 6 (and there are only 6 masters
mentioned), hmmm.
I guess the lack of an explicit definition confused Intel's
developers even more than us and now they disagree. No prob-
lem for them, as they make one (binary) program for each
platform anyway (I suppose).
Two solutions come to mind: Take the guessed platform into
account (Lewisburg would need its own constant). Or we could
ignore a too high NM and just return MAX_NUM_MASTERS (and
drop a lot of sanity checks as we could return an unsigned
value).
Patch Set #1, Line 17: even more wrong than it was before.
I don't see any loop doing it wrong, nor any caller adding 1
to the return value.
To view, visit change 20937. To unsubscribe, visit settings.