[Skiboot] [PATCH] hw/phb4: Tune GPU direct performance on witherspoon in PCI mode

Andrew Donnellan ajd at linux.ibm.com
Tue Mar 24 16:29:26 AEDT 2020


On 12/3/20 2:28 am, Frederic Barrat wrote:
> -static void phb4_check_device_quirks(struct pci_device *dev)
> +static void phb4_pec2_dma_engine_realloc(struct phb *phb)
>   {
> +	struct phb4 *p = phb_to_phb4(phb);
> +	uint64_t reg;
> +
> +	/*
> +	 * Allocate 16 extra dma read engines to stack 0, to boost dma
> +	 * performance for devices on stack 0 of PEC2, i.e PHB3.  It
> +	 * comes at a price of reduced read engine allocation for
> +	 * devices on stack 1 and 2. The engine allocation becomes
> +	 * 48/8/8 instead of the default 32/16/16.
> +	 *
> +	 * The reallocation magic value should be 0xffff0000ff008000,
> +	 * but per the PCI designers, dma engine 32 (bit 0) has a
> +	 * quirk, and 0x7fff80007F008000 has the same effect (engine
> +	 * 32 goes to PHB4).
> +	 */
> +	if (p->index != 3) /* shared slot on PEC2 */
> +		return;
> +
> +	PHBINF(p, "Allocating extra dma read engines on PEC2 stack0\n");
> +	reg = 0x7fff80007F008000ULL;
> +	xscom_write(p->chip_id,
> +		    p->pci_xscom + XPEC_PCI_PRDSTKOVR, reg);
> +	xscom_write(p->chip_id,
> +		    p->pe_xscom  + XPEC_NEST_READ_STACK_OVERRIDE, reg);
> +}

Can we use this function in the CAPI enable path as well so as not to 
duplicate?

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



More information about the Skiboot mailing list