[PATCH] ARM: l2c: add options to overwrite prefetching behavior

Russell King - ARM Linux linux at arm.linux.org.uk
Thu May 14 02:58:56 PDT 2015


On Thu, May 14, 2015 at 01:42:00AM +0200, Hauke Mehrtens wrote:
> diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
> index e309c8f..f919548 100644
> --- a/arch/arm/mm/cache-l2x0.c
> +++ b/arch/arm/mm/cache-l2x0.c
> @@ -1149,6 +1149,16 @@ static void __init l2c310_of_parse(const struct device_node *np,
>  		}
>  	}
>  
> +	if (of_property_read_bool(np, "arm,prefetch-data")) {
> +		*aux_val |= L310_AUX_CTRL_DATA_PREFETCH;
> +		*aux_mask &= ~L310_AUX_CTRL_DATA_PREFETCH;
> +	}
> +
> +	if (of_property_read_bool(np, "arm,prefetch-instr")) {
> +		*aux_val |= L310_AUX_CTRL_INSTR_PREFETCH;
> +		*aux_mask &= ~L310_AUX_CTRL_INSTR_PREFETCH;
> +	}
> +
>  	prefetch = l2x0_saved_regs.prefetch_ctrl;
>  
>  	ret = of_property_read_u32(np, "arm,double-linefill", &val);

Please move these down along-side the "arm,prefetch-offset" property
parsing, and please update the prefetch value using
L310_PREFETCH_CTRL_DATA_PREFETCH and L310_PREFETCH_CTRL_INSTR_PREFETCH
instead.

These are in fact the same bit, but let's try to keep the prefetch
configuration all in one place and via the same method.

-- 
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.



More information about the linux-arm-kernel mailing list