]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
ar7: update kernel to version 4.14
authorHauke Mehrtens <hauke@hauke-m.de>
Sat, 11 May 2019 11:47:37 +0000 (13:47 +0200)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Wed, 8 Jan 2020 15:45:08 +0000 (16:45 +0100)
This adds support for kernel 4.14 to the target and directly make it the
default kernel version to use.

This patch is build-tested only, but has never been device-tested. It is
only added to preserve the changes in Git history prior to removing this
target. Use it with care.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
[rebased and extended commit message, refreshed patches for 4.14.162]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
14 files changed:
package/kernel/ar7-atm/patches-D7.04.03.00/270-4.14_fixes.patch [new file with mode: 0644]
target/linux/ar7/Makefile
target/linux/ar7/config-4.14 [moved from target/linux/ar7/config-4.9 with 87% similarity]
target/linux/ar7/patches-4.14/100-fix-highmem-offset.patch [moved from target/linux/ar7/patches-4.9/100-fix-highmem-offset.patch with 100% similarity]
target/linux/ar7/patches-4.14/110-flash.patch [moved from target/linux/ar7/patches-4.9/110-flash.patch with 85% similarity]
target/linux/ar7/patches-4.14/160-vlynq_try_remote_first.patch [moved from target/linux/ar7/patches-4.9/160-vlynq_try_remote_first.patch with 100% similarity]
target/linux/ar7/patches-4.14/200-free-mem-below-kernel-offset.patch [moved from target/linux/ar7/patches-4.9/200-free-mem-below-kernel-offset.patch with 89% similarity]
target/linux/ar7/patches-4.14/300-add-ac49x-platform.patch [moved from target/linux/ar7/patches-4.9/300-add-ac49x-platform.patch with 96% similarity]
target/linux/ar7/patches-4.14/310-ac49x-prom-support.patch [moved from target/linux/ar7/patches-4.9/310-ac49x-prom-support.patch with 100% similarity]
target/linux/ar7/patches-4.14/320-ac49x-mtd-partitions.patch [moved from target/linux/ar7/patches-4.9/320-ac49x-mtd-partitions.patch with 90% similarity]
target/linux/ar7/patches-4.14/920-ar7part.patch [moved from target/linux/ar7/patches-4.9/920-ar7part.patch with 100% similarity]
target/linux/ar7/patches-4.14/925-actiontec_leds.patch [moved from target/linux/ar7/patches-4.9/925-actiontec_leds.patch with 90% similarity]
target/linux/ar7/patches-4.14/950-cpmac_titan.patch [moved from target/linux/ar7/patches-4.9/950-cpmac_titan.patch with 86% similarity]
target/linux/ar7/patches-4.9/101-MIPS-AR7-allow-NULL-clock-for-clk_get_rate.patch [deleted file]

diff --git a/package/kernel/ar7-atm/patches-D7.04.03.00/270-4.14_fixes.patch b/package/kernel/ar7-atm/patches-D7.04.03.00/270-4.14_fixes.patch
new file mode 100644 (file)
index 0000000..32bc535
--- /dev/null
@@ -0,0 +1,51 @@
+--- a/tn7atm.c
++++ b/tn7atm.c
+@@ -1149,7 +1149,7 @@ void tn7atm_close (struct atm_vcc *vcc)
+   Tn7AtmPrivate *priv;
+   int dmachan;
+   spinlock_t closeLock;
+-  unsigned int closeFlag;
++  unsigned long closeFlag;
+   int rc;
+   priv = (Tn7AtmPrivate *) vcc->dev->dev_data;
+--- a/tn7dsl.c
++++ b/tn7dsl.c
+@@ -620,7 +620,7 @@ unsigned int shim_osClockTick(void)
+   return jiffies;
+ }
+-int flags;
++unsigned long flags;
+ spinlock_t shimLock;
+ void shim_osCriticalEnter(void)
+@@ -3433,7 +3433,7 @@ struct ctl_table dslmod_table[] = {
+               .extra2                 = (void *)DEV_DSLMOD,
+       }
+   ,
+-  {0}
++  { }
+   };
+ /* Make sure that /proc/sys/dev is there */
+@@ -3447,7 +3447,7 @@ struct ctl_table dslmod_root_table[] = {
+       }
+   ,
+ #endif /* CONFIG_PROC_FS */
+-  {0}
++  { }
+   };
+ static struct ctl_table_header *dslmod_sysctl_header;
+--- a/tn7sar.c
++++ b/tn7sar.c
+@@ -1208,7 +1208,7 @@ int tn7sar_deactivate_vc(Tn7AtmPrivate *
+   HAL_FUNCTIONS *pHalFunc;
+   HAL_DEVICE    *pHalDev;
+   int rc;
+-  int flags;
++  unsigned long flags;
+   //dgprintf(4, "tn7sar_deactivate_vc\n");
+   //printk("tn7sar_deactivate_vc entered\n");
index ba40e508fcf76a22572787a1b2b3a5bba65177ab..d36340d14398f6de84476650b7e61c158502f46e 100644 (file)
@@ -12,7 +12,7 @@ BOARDNAME:=TI AR7
 FEATURES:=squashfs atm low_mem
 SUBTARGETS:=generic ac49x
 
-KERNEL_PATCHVER:=4.9
+KERNEL_PATCHVER:=4.14
 
 define Target/Description
        Build firmware images for TI AR7 based routers.
similarity index 87%
rename from target/linux/ar7/config-4.9
rename to target/linux/ar7/config-4.14
index 95ee60ac59195427b00ea3be8985b4f0c30022c0..aacdac63dc109b4cf96f8627a629c2a0b43ba6aa 100644 (file)
@@ -10,16 +10,22 @@ CONFIG_ARCH_DISCARD_MEMBLOCK=y
 CONFIG_ARCH_HAS_ELF_RANDOMIZE=y
 # CONFIG_ARCH_HAS_GCOV_PROFILE_ALL is not set
 # CONFIG_ARCH_HAS_SG_CHAIN is not set
+# CONFIG_ARCH_HAS_STRICT_KERNEL_RWX is not set
+# CONFIG_ARCH_HAS_STRICT_MODULE_RWX is not set
 CONFIG_ARCH_HIBERNATION_POSSIBLE=y
 CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
 CONFIG_ARCH_MIGHT_HAVE_PC_SERIO=y
+CONFIG_ARCH_MMAP_RND_BITS_MAX=15
+CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=15
+# CONFIG_ARCH_OPTIONAL_KERNEL_RWX is not set
+# CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT is not set
 CONFIG_ARCH_SUPPORTS_UPROBES=y
 CONFIG_ARCH_SUSPEND_POSSIBLE=y
 CONFIG_ARCH_USE_BUILTIN_BSWAP=y
+CONFIG_ARCH_USE_QUEUED_RWLOCKS=y
+CONFIG_ARCH_USE_QUEUED_SPINLOCKS=y
 CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
 CONFIG_BOOT_ELF32=y
-CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 CONFIG_CEVT_R4K=y
 CONFIG_CLONE_BACKWARDS=y
 CONFIG_CMDLINE="rootfstype=squashfs,jffs2"
@@ -48,14 +54,17 @@ CONFIG_FIXED_PHY=y
 CONFIG_GENERIC_ATOMIC64=y
 CONFIG_GENERIC_CLOCKEVENTS=y
 CONFIG_GENERIC_CMOS_UPDATE=y
+CONFIG_GENERIC_CPU_AUTOPROBE=y
 CONFIG_GENERIC_IO=y
 CONFIG_GENERIC_IRQ_CHIP=y
+CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
 CONFIG_GENERIC_IRQ_SHOW=y
 CONFIG_GENERIC_PCI_IOMAP=y
 CONFIG_GENERIC_SCHED_CLOCK=y
 CONFIG_GENERIC_SMP_IDLE_THREAD=y
 CONFIG_GENERIC_TIME_VSYSCALL=y
 CONFIG_GPIOLIB=y
+# CONFIG_GRO_CELLS is not set
 CONFIG_HANDLE_DOMAIN_IRQ=y
 CONFIG_HARDWARE_WATCHPOINTS=y
 CONFIG_HAS_DMA=y
@@ -63,6 +72,7 @@ CONFIG_HAS_IOMEM=y
 CONFIG_HAS_IOPORT_MAP=y
 # CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set
 # CONFIG_HAVE_ARCH_BITREVERSE is not set
+CONFIG_HAVE_ARCH_COMPILER_H=y
 CONFIG_HAVE_ARCH_JUMP_LABEL=y
 CONFIG_HAVE_ARCH_KGDB=y
 CONFIG_HAVE_ARCH_SECCOMP_FILTER=y
@@ -72,6 +82,7 @@ CONFIG_HAVE_CBPF_JIT=y
 CONFIG_HAVE_CC_STACKPROTECTOR=y
 CONFIG_HAVE_CLK=y
 CONFIG_HAVE_CONTEXT_TRACKING=y
+CONFIG_HAVE_COPY_THREAD_TLS=y
 CONFIG_HAVE_C_RECORDMCOUNT=y
 CONFIG_HAVE_DEBUG_KMEMLEAK=y
 CONFIG_HAVE_DEBUG_STACKOVERFLOW=y
@@ -106,11 +117,13 @@ CONFIG_IRQ_WORK=y
 CONFIG_KALLSYMS=y
 CONFIG_LEDS_GPIO=y
 CONFIG_LEDS_TRIGGER_HEARTBEAT=y
-CONFIG_MDIO_BOARDINFO=y
+CONFIG_MDIO_BUS=y
+CONFIG_MDIO_DEVICE=y
 CONFIG_MIGRATION=y
 CONFIG_MIPS=y
 CONFIG_MIPS_ASID_BITS=8
 CONFIG_MIPS_ASID_SHIFT=0
+CONFIG_MIPS_CBPF_JIT=y
 CONFIG_MIPS_CLOCK_VSYSCALL=y
 # CONFIG_MIPS_CMDLINE_BUILTIN_EXTEND is not set
 CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER=y
@@ -132,6 +145,7 @@ CONFIG_PCI_DRIVERS_LEGACY=y
 CONFIG_PERF_USE_VMALLOC=y
 CONFIG_PGTABLE_LEVELS=2
 CONFIG_PHYLIB=y
+# CONFIG_RCU_NEED_SEGCBLIST is not set
 # CONFIG_RCU_STALL_COMMON is not set
 # CONFIG_SCHED_INFO is not set
 # CONFIG_SCSI_DMA is not set
@@ -150,5 +164,6 @@ CONFIG_SYS_SUPPORTS_MIPS16=y
 CONFIG_SYS_SUPPORTS_ZBOOT=y
 CONFIG_SYS_SUPPORTS_ZBOOT_UART16550=y
 CONFIG_TICK_CPU_ACCOUNTING=y
+CONFIG_TINY_SRCU=y
 CONFIG_VLYNQ=y
 # CONFIG_VLYNQ_DEBUG is not set
similarity index 85%
rename from target/linux/ar7/patches-4.9/110-flash.patch
rename to target/linux/ar7/patches-4.14/110-flash.patch
index f5713bd033b52bb416ca86deb7f13a6b54ffed85..e83eac91811f909328951d55524517338ed0ef55 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/mtd/Makefile
 +++ b/drivers/mtd/Makefile
-@@ -12,7 +12,7 @@ obj-$(CONFIG_MTD_OF_PARTS)   += ofpart.o
+@@ -13,7 +13,7 @@ obj-$(CONFIG_MTD_OF_PARTS)   += ofpart.o
  obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o
  obj-$(CONFIG_MTD_CMDLINE_PARTS) += cmdlinepart.o
  obj-$(CONFIG_MTD_AFS_PARTS)   += afs.o
@@ -11,7 +11,7 @@
  obj-$(CONFIG_MTD_MYLOADER_PARTS) += myloader.o
 --- a/arch/mips/ar7/platform.c
 +++ b/arch/mips/ar7/platform.c
-@@ -198,7 +198,7 @@ static struct resource physmap_flash_res
+@@ -197,7 +197,7 @@ static struct resource physmap_flash_res
        .name   = "mem",
        .flags  = IORESOURCE_MEM,
        .start  = 0x10000000,
similarity index 89%
rename from target/linux/ar7/patches-4.9/200-free-mem-below-kernel-offset.patch
rename to target/linux/ar7/patches-4.14/200-free-mem-below-kernel-offset.patch
index 4011942d793ee5ee4711827c244fc2d3ee0b0e9a..7cc3ada818d0c9180848bcba829ac8bef1470443 100644 (file)
@@ -1,6 +1,6 @@
 --- a/arch/mips/ar7/memory.c
 +++ b/arch/mips/ar7/memory.c
-@@ -66,5 +66,11 @@ void __init prom_meminit(void)
+@@ -65,5 +65,11 @@ void __init prom_meminit(void)
  
  void __init prom_free_prom_memory(void)
  {
similarity index 96%
rename from target/linux/ar7/patches-4.9/300-add-ac49x-platform.patch
rename to target/linux/ar7/patches-4.14/300-add-ac49x-platform.patch
index 49c2cfbe6abc2f9f97d1bc3ce9bc2487b5fd5ef3..71cd471a718d6ae5dce3c9680f7c839ef987683d 100644 (file)
@@ -37,7 +37,7 @@
  #define AR7_IRQ_UART0 15
 --- a/arch/mips/Kconfig
 +++ b/arch/mips/Kconfig
-@@ -162,7 +162,7 @@ config AR7
+@@ -168,7 +168,7 @@ config AR7
        select HAVE_CLK
        help
          Support for the Texas Instruments AR7 System-on-a-Chip
@@ -46,7 +46,7 @@
  
  config ATH25
        bool "Atheros AR231x/AR531x SoC support"
-@@ -1007,6 +1007,7 @@ config MIPS_PARAVIRT
+@@ -1016,6 +1016,7 @@ config MIPS_PARAVIRT
  endchoice
  
  source "arch/mips/alchemy/Kconfig"
similarity index 90%
rename from target/linux/ar7/patches-4.9/320-ac49x-mtd-partitions.patch
rename to target/linux/ar7/patches-4.14/320-ac49x-mtd-partitions.patch
index fafa8c77ebc680eb6724c0bc124a0b2b759b9113..7ae49b07e84904ac56958a8c66ec397b8ec1b3f1 100644 (file)
@@ -14,7 +14,7 @@
        ---help---
 --- a/drivers/mtd/Makefile
 +++ b/drivers/mtd/Makefile
-@@ -11,6 +11,7 @@ obj-$(CONFIG_MTD_SPLIT)              += mtdsplit/
+@@ -12,6 +12,7 @@ obj-$(CONFIG_MTD_SPLIT)              += mtdsplit/
  obj-$(CONFIG_MTD_OF_PARTS)    += ofpart.o
  obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o
  obj-$(CONFIG_MTD_CMDLINE_PARTS) += cmdlinepart.o
@@ -24,7 +24,7 @@
  obj-$(CONFIG_MTD_BCM63XX_PARTS)       += bcm63xxpart.o
 --- a/arch/mips/ar7/platform.c
 +++ b/arch/mips/ar7/platform.c
-@@ -201,7 +201,7 @@ static struct resource physmap_flash_res
+@@ -200,7 +200,7 @@ static struct resource physmap_flash_res
        .end    = 0x11ffffff,
  };
  
similarity index 90%
rename from target/linux/ar7/patches-4.9/925-actiontec_leds.patch
rename to target/linux/ar7/patches-4.14/925-actiontec_leds.patch
index 804dbf5c3cb39df7f0a57a32a0fc2ae6928269db..d37fa70f219f36e049de30f507a9a31cb7f2207e 100644 (file)
@@ -1,6 +1,6 @@
 --- a/arch/mips/ar7/platform.c
 +++ b/arch/mips/ar7/platform.c
-@@ -460,31 +460,22 @@ static struct gpio_led fb_fon_leds[] = {
+@@ -459,31 +459,22 @@ static struct gpio_led fb_fon_leds[] = {
        },
  };
  
@@ -35,7 +35,7 @@
                .default_trigger        = "default-on",
        },
        {
-@@ -492,6 +483,44 @@ static struct gpio_led gt701_leds[] = {
+@@ -491,6 +482,44 @@ static struct gpio_led gt701_leds[] = {
                .gpio                   = 10,
                .active_low             = 1,
        },
@@ -80,7 +80,7 @@
  };
  
  static struct gpio_led_platform_data ar7_led_data;
-@@ -535,9 +564,9 @@ static void __init detect_leds(void)
+@@ -534,9 +563,9 @@ static void __init detect_leds(void)
        } else if (strstr(prid, "CYWM") || strstr(prid, "CYWL")) {
                ar7_led_data.num_leds = ARRAY_SIZE(titan_leds);
                ar7_led_data.leds = titan_leds;
similarity index 86%
rename from target/linux/ar7/patches-4.9/950-cpmac_titan.patch
rename to target/linux/ar7/patches-4.14/950-cpmac_titan.patch
index 158b689c98af48ce4654f256df4a456e4078b650..66ed07970cfee2596bc0e78c5be7a87596ba952b 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/net/ethernet/ti/cpmac.c
 +++ b/drivers/net/ethernet/ti/cpmac.c
-@@ -1124,6 +1124,8 @@ static int cpmac_probe(struct platform_d
+@@ -1123,6 +1123,8 @@ static int cpmac_probe(struct platform_d
                goto fail;
        }
  
@@ -9,7 +9,7 @@
        dev->irq = platform_get_irq_byname(pdev, "irq");
  
        dev->netdev_ops = &cpmac_netdev_ops;
-@@ -1203,7 +1205,7 @@ int cpmac_init(void)
+@@ -1202,7 +1204,7 @@ int cpmac_init(void)
        cpmac_mii->write = cpmac_mdio_write;
        cpmac_mii->reset = cpmac_mdio_reset;
  
@@ -18,7 +18,7 @@
  
        if (!cpmac_mii->priv) {
                pr_err("Can't ioremap mdio registers\n");
-@@ -1214,10 +1216,16 @@ int cpmac_init(void)
+@@ -1213,10 +1215,16 @@ int cpmac_init(void)
        /* FIXME: unhardcode gpio&reset bits */
        ar7_gpio_disable(26);
        ar7_gpio_disable(27);
@@ -37,7 +37,7 @@
        cpmac_mii->reset(cpmac_mii);
  
        for (i = 0; i < 300; i++) {
-@@ -1234,7 +1242,11 @@ int cpmac_init(void)
+@@ -1233,7 +1241,11 @@ int cpmac_init(void)
                mask = 0;
        }
  
diff --git a/target/linux/ar7/patches-4.9/101-MIPS-AR7-allow-NULL-clock-for-clk_get_rate.patch b/target/linux/ar7/patches-4.9/101-MIPS-AR7-allow-NULL-clock-for-clk_get_rate.patch
deleted file mode 100644 (file)
index 74ac0d1..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-From patchwork Tue Jul 18 10:17:26 2017
-Content-Type: text/plain; charset="utf-8"
-MIME-Version: 1.0
-Content-Transfer-Encoding: 7bit
-Subject: [5/9] MIPS: AR7: allow NULL clock for clk_get_rate
-X-Patchwork-Submitter: Jonas Gorski <jonas.gorski@gmail.com>
-X-Patchwork-Id: 16775
-Message-Id: <20170718101730.2541-6-jonas.gorski@gmail.com>
-To: unlisted-recipients:; (no To-header on input)
-Cc: Ralf Baechle <ralf@linux-mips.org>,
- Paul Gortmaker <paul.gortmaker@windriver.com>,
- James Hogan <james.hogan@imgtec.com>,
- linux-mips@linux-mips.org, linux-kernel@vger.kernel.org
-Date: Tue, 18 Jul 2017 12:17:26 +0200
-From: Jonas Gorski <jonas.gorski@gmail.com>
-List-Id: linux-mips <linux-mips.eddie.linux-mips.org>
-
-Make the behaviour of clk_get_rate consistent with common clk's
-clk_get_rate by accepting NULL clocks as parameter. Some device
-drivers rely on this, and will cause an OOPS otherwise.
-
-Fixes: 780019ddf02f ("MIPS: AR7: Implement clock API")
-Cc: Ralf Baechle <ralf@linux-mips.org>
-Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
-Cc: James Hogan <james.hogan@imgtec.com>
-Cc: linux-mips@linux-mips.org
-Cc: linux-kernel@vger.kernel.org
-Reported-by: Mathias Kresin <dev@kresin.me>
-Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
----
- arch/mips/ar7/clock.c | 3 +++
- 1 file changed, 3 insertions(+)
-
---- a/arch/mips/ar7/clock.c
-+++ b/arch/mips/ar7/clock.c
-@@ -430,6 +430,9 @@ EXPORT_SYMBOL(clk_disable);
- unsigned long clk_get_rate(struct clk *clk)
- {
-+      if (!clk)
-+              return 0;
-+
-       return clk->rate;
- }
- EXPORT_SYMBOL(clk_get_rate);