[Skiboot] [PATCH] BMC/PCI: Check slot tables against detected devices
Stewart Smith
stewart at linux.vnet.ibm.com
Tue Dec 13 13:14:45 AEDT 2016
Russell Currey <ruscur at russell.cc> writes:
>> + case st_builtin_dev:
>> + if (!phb)
>> + break;
>> + phb_lock(phb);
>> + dev = pci_find_dev_by_location(phb, ent->location);
>> + phb_unlock(phb);
>
> Why does this require a lock?
It may not. By this time during boot we should be all good and no longer
be touching anything. An abundance of caution perhaps?
>
>> + if (!dev) {
>> + prlog(PR_ERR, "PCI: built-in device not
>> found: %s (loc: %x)\n",
>> + ent->name, ent->location);
>> + r++;
>> + }
>> + break;
>> + case st_end:
>> + case st_npu_slot:
>> + break;
>> + }
>> + if (ent->children)
>> + r+= check_slot_table(phb, ent->children);
>
> For style this should be r += ... (I think)
It should. Periodically I relapse into MySQL code style.
--
Stewart Smith
OPAL Architect, IBM.
More information about the Skiboot
mailing list