[Skiboot] [PATCH] Revert "platforms/astbmc/slots.c: Allow comparison of bus numbers when matching slots"

Oliver oohall at gmail.com
Fri Mar 23 13:02:28 AEDT 2018


On Fri, Mar 23, 2018 at 12:24 PM, Stewart Smith
<stewart at linux.vnet.ibm.com> wrote:
> This reverts commit bda7cc4d0354eb3f66629d410b2afc08c79f795f.
>
> Ben says:
> It's on purpose that we do NOT compare the bus numbers,
> they are always 0 in the slot table
> we do a hierarchical walk of the tree, matching only the
> devfn's along the way bcs the bus numbering isn't fixed
> this breaks all slot naming etc... stuff on anything using
> the "skiboot" slot tables (P8 opp typically)
>
> Suggested-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
> Signed-off-by: Stewart Smith <stewart at linux.vnet.ibm.com>
> ---
>  platforms/astbmc/slots.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/platforms/astbmc/slots.c b/platforms/astbmc/slots.c
> index a5bd50ee8212..19b82fdd8c61 100644
> --- a/platforms/astbmc/slots.c
> +++ b/platforms/astbmc/slots.c
> @@ -77,7 +77,7 @@ static const struct slot_table_entry *match_slot_dev_entry(struct phb *phb,
>                 if (ent->etype == st_npu_slot)
>                         bdfn = pd->bdfn & 0xf8;
>                 else
> -                       bdfn = pd->bdfn & 0xffff;
> +                       bdfn = pd->bdfn & 0xff;
>
>                 if (ent->location == bdfn)
>                         return ent;
> --

The original commit message says that matching the bus number was
necessary for differentiating the various downstream ports of the
switch. This seems a bit wrong since each switch port has a different
device number on the switch's internal PCI bus. Either way, we removed
the slot tables for witherspoon a while ago so reverting this is fine.

Reviewed-by: Oliver O'Halloran <oohall at gmail.com>

> 2.14.3
>
> _______________________________________________
> Skiboot mailing list
> Skiboot at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/skiboot


More information about the Skiboot mailing list