BB: openssl: update to 1.0.2f (fixes CVE-2016-0701, CVE-2015-3197)
[14.07/openwrt.git] / target / linux / cns3xxx / patches-3.10 / 097-l2x0_cmdline_disable.patch
1 --- a/arch/arm/mach-cns3xxx/core.c
2 +++ b/arch/arm/mach-cns3xxx/core.c
3 @@ -273,13 +273,26 @@ void __init cns3xxx_timer_init(void)
4  
5  #ifdef CONFIG_CACHE_L2X0
6  
7 -void __init cns3xxx_l2x0_init(void)
8 +static int cns3xxx_l2x0_enable = 1;
9 +
10 +static int __init cns3xxx_l2x0_disable(char *s)
11 +{
12 +       cns3xxx_l2x0_enable = 0;
13 +       return 1;
14 +}
15 +__setup("nol2x0", cns3xxx_l2x0_disable);
16 +
17 +static int __init cns3xxx_l2x0_init(void)
18  {
19 -       void __iomem *base = ioremap(CNS3XXX_L2C_BASE, SZ_4K);
20 +       void __iomem *base;
21         u32 val;
22  
23 +       if (!cns3xxx_l2x0_enable)
24 +               return 0;
25 +
26 +       base = ioremap(CNS3XXX_L2C_BASE, SZ_4K);
27         if (WARN_ON(!base))
28 -               return;
29 +               return 0;
30  
31         /*
32          * Tag RAM Control register
33 @@ -309,7 +322,10 @@ void __init cns3xxx_l2x0_init(void)
34  
35         /* 32 KiB, 8-way, parity disable */
36         l2x0_init(base, 0x00540000, 0xfe000fff);
37 +
38 +       return 0;
39  }
40 +arch_initcall(cns3xxx_l2x0_init);
41  
42  #endif /* CONFIG_CACHE_L2X0 */
43  
44 --- a/arch/arm/mach-cns3xxx/cns3420vb.c
45 +++ b/arch/arm/mach-cns3xxx/cns3420vb.c
46 @@ -239,8 +239,6 @@ static struct platform_device *cns3420_p
47  
48  static void __init cns3420_init(void)
49  {
50 -       cns3xxx_l2x0_init();
51 -
52         platform_add_devices(cns3420_pdevs, ARRAY_SIZE(cns3420_pdevs));
53  
54         cns3xxx_ahci_init();