[PATCH linux 3/4] drivers/fsi: Add link presence detect functionality

Christopher Bostic christopher.lee.bostic at gmail.com
Thu Aug 4 03:26:08 AEST 2016


>> +/*
>> + * Look for CFAMs plugged into any of the available link slots
>> + */
>> +int fsim_staticplug_nl(struct fsimaster *p, u32 *menp, u32 *mlevp)
>
> What's _nl mean?
>

nl stands for 'no lock'   There are lock wrappers around some
functions that add or remove devices.
All are associated with hot plug remove or adds.   Given that to start
off with there will be a single hard
wired link maybe this locking and hot plug precaution isn't necessary.


>> +};
>> +
>> +struct hotplug {                       /* Hot Plug work structure */
>> +       u32 mlevp_last[2];              /* Last known plug state */
>> +       unsigned long building[2];      /* Bit mask of links to build up */
>> +       unsigned long probing[2];       /* Bit mask of links to  probe */
>
> Is there a reason this is an array of longs, and not a u64?
>

This was written when the only host CPU was 32 bit.   Question going
forward is what platforms will we
support.   Is compiler smart enough to allow use of u64 in any case?
This also assumes we have a max
of 64 links, one bit per link,  on the primary master.   Seems
reasonable to keep that size for the
foreseeable future.


More information about the openbmc mailing list