On Mon, Oct 29, 2012 at 03:03:55PM -0700, Tim Harvey wrote:
> L2 cache via L2X0 cache controller available on some ARM boards can
> provide a performance boost in some situations but decrease performance
> in others.  This adds a kernel cmdline to disable L2X0 for the Laguna
> product family.
> 
> Signed-off-by: Tim Harvey <thar...@gateworks.com>
> ---
>  .../patches-3.3/480-laguna_l2cache_cmdline.patch   |   29 
> ++++++++++++++++++++
>  1 files changed, 29 insertions(+), 0 deletions(-)
>  create mode 100644 
> target/linux/cns3xxx/patches-3.3/480-laguna_l2cache_cmdline.patch
> 
> Re-worked patch upon request to not require an OpenWrt kernel config but
> instead add a kernel cmdline option to allow disabling of l2x0 for Laguna
> 
> diff --git 
> a/target/linux/cns3xxx/patches-3.3/480-laguna_l2cache_cmdline.patch 
> b/target/linux/cns3xxx/patches-3.3/480-laguna_l2cache_cmdline.patch
> new file mode 100644
> index 0000000..c8d9b9d
> --- /dev/null
> +++ b/target/linux/cns3xxx/patches-3.3/480-laguna_l2cache_cmdline.patch
> @@ -0,0 +1,29 @@
> +--- a/arch/arm/mach-cns3xxx/laguna.c
> ++++ b/arch/arm/mach-cns3xxx/laguna.c
> +@@ -104,6 +104,16 @@ struct laguna_board_info {
> + 
> + static struct laguna_board_info laguna_info __initdata;
> + 
> ++static int l2x0_enable = 1;
> ++
> ++static int __init l2x0_disable(char *s)
> ++{
> ++    l2x0_enable = 0;
> ++    return 1;

I'm wondering why here is returned 1 and not 0? I have looked in other
kernel functions and almost everywhere these functions return 1.

Luka
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to