[Skiboot] [PATCH v2 5/5] hw/phb4: Update some comments
Andrew Donnellan
andrew.donnellan at au1.ibm.com
Fri Feb 1 13:06:21 AEDT 2019
On 31/1/19 6:15 pm, Oliver O'Halloran wrote:
> I now know what an IODA cache is and I'm not happy about it. With
> the power of Comments™ you too can share the misery.
>
> Signed-off-by: Oliver O'Halloran <oohall at gmail.com>
Sigh.
Reviewed-by: Andrew Donnellan <andrew.donnellan at au1.ibm.com>
> ---
> hw/phb4.c | 31 ++++++++++++-------------------
> 1 file changed, 12 insertions(+), 19 deletions(-)
>
> diff --git a/hw/phb4.c b/hw/phb4.c
> index 9ece0f05cd41..216915da99b4 100644
> --- a/hw/phb4.c
> +++ b/hw/phb4.c
> @@ -898,30 +898,23 @@ static uint64_t phb4_default_mbt0(struct phb4 *p, unsigned int bar_idx)
> return mbt0;
> }
>
> -/* Clear IODA cache tables */
> +/*
> + * Clear the saved (cached) IODA state.
> + *
> + * The caches here are used to save the configuration of the IODA tables
> + * done by the OS. When the PHB is reset it loses all of its internal state
> + * so we need to keep a copy to restore from.
> + */
> static void phb4_init_ioda_cache(struct phb4 *p)
> {
> uint32_t i;
>
> /*
> - * RTT and PELTV. RTE should be 0xFF's to indicate
> - * invalid PE# for the corresponding RID.
> - *
> - * Note: Instead we set all RTE entries to 0x00 to
> - * work around a problem where PE lookups might be
> - * done before Linux has established valid PE's
> - * (during PCI probing). We can revisit that once/if
> - * Linux has been fixed to always setup valid PEs.
> - *
> - * The value 0x00 corresponds to the default PE# Linux
> - * uses to check for config space freezes before it
> - * has assigned PE# to busses.
> - *
> - * WARNING: Additionally, we need to be careful, there's
> - * a HW issue, if we get an MSI on an RTT entry that is
> - * FF, things will go bad. We need to ensure we don't
> - * ever let a live FF RTT even temporarily when resetting
> - * for EEH etc... (HW278969).
> + * The RTT entries (RTE) are supposed to be initialised to
> + * 0xFF which indicates an invalid PE# for that RTT index
> + * (the bdfn). However, we set them to 0x00 since Linux
> + * needs to find the devices first by scanning config space
> + * and this occurs before PEs have been assigned.
> */
> for (i = 0; i < RTT_TABLE_ENTRIES; i++)
> p->tbl_rtt[i] = PHB4_RESERVED_PE_NUM(p);
>
--
Andrew Donnellan OzLabs, ADL Canberra
andrew.donnellan at au1.ibm.com IBM Australia Limited
More information about the Skiboot
mailing list