Luka, I'm not finding documentation but it looks to me like the return 1 signifies that you have consumed that param and it shouldn't be sent to other init functions. Like you I looked at other code and found them to all return 1 so did the same.
Personally the right way to disable L2X0 is to just disable the kernel config, but that involves adding an OpenWrt kernel config to make it optional and I was asked to try to avoid that. I feel like I'm jumping through hoops here to get a patch committed that results in a 50% performance boost in our boards in the case that many customers are using it. Tim On Tue, Oct 30, 2012 at 3:23 AM, Luka Perkov <[email protected]> wrote: > 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 <[email protected]> > > --- > > .../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 > [email protected] > https://lists.openwrt.org/mailman/listinfo/openwrt-devel > -- Tim Harvey - Principal Software Engineer Gateworks Corporation 3026 S. Higuera St. San Luis Obispo CA 93401 805-781-2000
_______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/mailman/listinfo/openwrt-devel
