[Skiboot] [PATCH] phb5: Remove obsolete capp-related properties

Andrew Donnellan ajd at linux.ibm.com
Tue Sep 28 15:23:42 AEST 2021


On 23/9/21 12:14 am, Frederic Barrat wrote:
> This patch removes the following properties from PHB entries in the
> device tree on P10, since there's no CAPP any more and the properties
> no longer make sense:
> ibm,phb-indications
> ibm,capp-timebase-sync
> ibm,capi-flags
> 
> It has no effect on linux: some were already ignored and others won't
> even be read since the cxl driver (the only consumer) already fails
> early on P10.
> 
> Signed-off-by: Frederic Barrat <fbarrat at linux.ibm.com>

Makes sense - the cxl driver should fail early on P10 as any attempt to 
set CAPI mode will fail, and there are indeed no consumers in Linux 
outside the cxl driver.

Reviewed-by: Andrew Donnellan <ajd at linux.ibm.com>

> ---
>   hw/phb4.c | 17 ++++++++++-------
>   1 file changed, 10 insertions(+), 7 deletions(-)
> 
> diff --git a/hw/phb4.c b/hw/phb4.c
> index ddaa18f8..8bd3aa5f 100644
> --- a/hw/phb4.c
> +++ b/hw/phb4.c
> @@ -5827,12 +5827,14 @@ static void phb4_add_properties(struct phb4 *p)
>   	dt_add_property_cells(np, "ibm,phb-diag-data-size",
>   			      sizeof(struct OpalIoPhb4ErrorData));
>   
> -	/* Indicate to Linux that CAPP timebase sync is supported */
> -	dt_add_property_string(np, "ibm,capp-timebase-sync", NULL);
> +	if (is_phb4()) {
> +		/* Indicate to Linux that CAPP timebase sync is supported */
> +		dt_add_property_string(np, "ibm,capp-timebase-sync", NULL);
>   
> -	/* Tell Linux Compare/Mask indication values */
> -	dt_add_property_cells(np, "ibm,phb-indications", CAPIIND, ASNIND,
> -			      NBWIND);
> +		/* Tell Linux Compare/Mask indication values */
> +		dt_add_property_cells(np, "ibm,phb-indications", CAPIIND, ASNIND,
> +				      NBWIND);
> +	}
>   }
>   
>   static bool phb4_calculate_windows(struct phb4 *p)
> @@ -6346,8 +6348,9 @@ static void phb4_probe_stack(struct dt_node *stk_node, uint32_t pec_index,
>   		max_link_speed = dt_prop_get_u32(stk_node, "ibm,max-link-speed");
>   		dt_add_property_cells(np, "ibm,max-link-speed", max_link_speed);
>   	}
> -	dt_add_property_cells(np, "ibm,capi-flags",
> -			      OPAL_PHB_CAPI_FLAG_SNOOP_CONTROL);
> +	if (is_phb4())
> +		dt_add_property_cells(np, "ibm,capi-flags",
> +				      OPAL_PHB_CAPI_FLAG_SNOOP_CONTROL);
>   
>   	add_chip_dev_associativity(np);
>   }
> 

-- 
Andrew Donnellan              OzLabs, ADL Canberra
ajd at linux.ibm.com             IBM Australia Limited


More information about the Skiboot mailing list