Commit Graph

2906 Commits (33b81b572148e2de52fbcb986e238c2efbd1939f)

Author SHA1 Message Date
Koen Vandeputte 8eb7cf0cd7 kernel: bump 4.19 to 4.19.44
Refreshed all patches.

Remove upstreamed:
- 103-MIPS-perf-ath79-Fix-perfcount-IRQ-assignment.patch

Compile-tested on: cns3xxx, imx6
Runtime-tested on: cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte f442b306f9 kernel: bump 4.14 to 4.14.120
Refreshed all patches.

Remove upstreamed:
- 103-MIPS-perf-ath79-Fix-perfcount-IRQ-assignment.patch
- 060-fix-oxnas-rps-dt-match.patch

Altered patches:
- 0067-generic-Mangle-bootloader-s-kernel-arguments.patch
- 006-mvebu-Mangle-bootloader-s-kernel-arguments.patch
- 996-generic-Mangle-bootloader-s-kernel-arguments.patch

Compile-tested on: ar71xx, cns3xxx, imx6, mvebu, x86_64
Runtime-tested on: ar71xx, cns3xxx, imx6, x86_64

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Chuanhong Guo 01c0d7f86f generic: ar8216: group MIB counters and use two basic ones only by default
There are too many MIB counters that almost nobody needs since commit
d6366ce366 ("generic: ar8216: mib_work_func: read all port mibs
everytime").

In the worker function to poll MIB data, it deals with all ports instead
of only one port every time, which introduces too many mdio operations
that it becomes a heavy CPU load even on not-emulated MDIO bus.

This commit groups MIB counters and enable only TxBytes and RxGoodBytes
by default (both of which are necessary to get swconfig led working.)
and adds an swconfig attribute to allow enabling all counters if users
need them.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
5 years ago
Chuanhong Guo 107dc4326c generic: ar8216: add mib_poll_interval switch attribute
This allows specifying interval of polling MIB counters from userspace
and allow completely turning off MIB counter support by setting
mib_poll_interval to 0.

Since MIB counter polling is a heavy CPU load for GPIO emulated MDIO
bus, disable this behavior by default. Those who wants to use swconfig
LEDs can enable them with qca,mib-poll-interval dts property or with
swconfig command.

Fixes: FS#2230 ("kworker spikes 100% cpu every 2 second.")
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
5 years ago
Hauke Mehrtens 9ab4d74b5f kernel: Move some DSA config options to generic config
This moves some new configuration options to the generic kernel
configuration instead of configuring them for each target on our own.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Koen Vandeputte 86fd8cb435 kernel: bump 4.19 to 4.19.42
Refreshed all patches.

Remove upstreamed:
- 060-v5.1-serial-ar933x_uart-Fix-build-failure-with-disabled-c.patch
- 400-v5.2-leds-trigger-netdev-fix-refcnt-leak-on-interface-ren.patch

Compile-tested on: cns3xxx, imx6
Runtime-tested on: cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte 09050b6fe2 kernel: bump 4.14 to 4.14.118
Refreshed all patches.

Remove upstreamed:
- 060-v5.1-serial-ar933x_uart-Fix-build-failure-with-disabled-c.patch

Altered:
- 143-gpio-fix-device-tree-gpio-hogs-on-dual-role-gpio-pin.patch

Compile-tested on: ar71xx, cns3xxx, imx6, x86_64
Runtime-tested on: ar71xx, cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte 461ef39345 kernel: bump 4.9 to 4.9.175
Refreshed all patches.

Compile-tested on: ar7
Runtime-tested on: none

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Hauke Mehrtens 655fff1571 kernel: Fix build of omap target
CONFIG_HW_RANDOM_OMAP is not set to any value after kmod-random-omap was
removed, add the configuration option to the generic configuration.

Fixes: cd3b298533 ("omap24xx: Remove unmaintained target")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Jeff Kletsky 3bc8ed91d4 generic-4.19: Backport spi-nand support for GigaDevice A/E
This patch backports verbatim the commits from Linux 5.0 and 5.1
that implemented support for GigaDevice SPI NAND A and E variants.

Supported only in Linux 4.19 and later as based on the upstream
drivers/mtd/nand/spi/ framework.

mtd-spinand-add-support-for-GigaDevice-GD5FxGQ4xA.patch
commit c93c613214ac (5.0)

mtd-spinand-Add-support-for-GigaDevice-GD5F1GQ4UExxG.patch
commit c40c7a990a46 (5.1)

Run-tested-on: GL.iNet AR750S

Signed-off-by: Jeff Kletsky <git-commits@allycomm.com>
5 years ago
Hauke Mehrtens 747587ec61 kernel: Reorder generic configuration
This was done like this:
./scripts/kconfig.pl '+' target/linux/generic/config-4.14 /dev/null > target/linux/generic/config-4.14-new
mv target/linux/generic/config-4.14-new target/linux/generic/config-4.14

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Hauke Mehrtens 46af22de16 kernel: Remove CONFIG_COMPAT
This removes support for executing old 32 bit applications on 64 bit ARM
and MIPS kernels.
On OpenWrt we normally compile all the user space applications on our
own and do not support third party binary only modules especial not 32
bit applications on 64 bit CPUs.

This reduces the attack surface on such systems and should also save
some memory.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Hauke Mehrtens 7099bf0926 kernel: Remove CONFIG_DEBUG_RODATA and CONFIG_DEBUG_SET_MODULE_RONX
These were renamed to CONFIG_STRICT_KERNEL_RWX and CONFIG_STRICT_MODULE_RWX and are
activated in kernel 4.14 and later by default.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Hauke Mehrtens 32eb66881c kernel: Activate CONFIG_ARM64_SW_TTBR0_PAN
This activates "Emulate Privileged Access Never using TTBR0_EL1
switching" on ARM64.

This should prevent the kernel from reading code from user space in
kernel context.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Hauke Mehrtens 9b1239451d Kernel: Activate CONFIG_HARDENED_USERCOPY
This adds additional checks to the copy_from_user() and copy_to_user()
functions. The details are described in this article:
https://lwn.net/Articles/695991/

This should only have a very small performance impact on system calls
and should not affect routing performance.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Koen Vandeputte bc85640cdc kernel: bump 4.19 to 4.19.38
Refreshed all patches.

Compile-tested on: cns3xxx, imx6
Runtime-tested on: cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte fca966d7b7 kernel: bump 4.9 to 4.9.172
Refreshed all patches.

Compile-tested on: ar7
Runtime-tested on: none

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Petr Štetiar 51216b4f83 kernel: Rename UPROBE_EVENT to UPROBE_EVENTS
Upstream has renamed UPROBE_EVENT to UPROBE_EVENTS in the following
commit:

 commit 6b0b7551428e4caae1e2c023a529465a9a9ae2d4
 Author: Anton Blanchard <anton@samba.org>
 Date:   Thu Feb 16 17:00:50 2017 +1100

     perf/core: Rename CONFIG_[UK]PROBE_EVENT to CONFIG_[UK]PROBE_EVENTS

     We have uses of CONFIG_UPROBE_EVENT and CONFIG_KPROBE_EVENT as
     well as CONFIG_UPROBE_EVENTS and CONFIG_KPROBE_EVENTS.

     Consistently use the plurals.

So I'm changing it to this plural option in order to make kconfig happy
and stop asking about it if kernel is compiled with verbose logging:

 Enable uprobes-based dynamic events (UPROBE_EVENTS) [Y/n/?] (NEW)

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Hauke Mehrtens 1325e74e0c kernel: Remove support for kernel 3.18
No target is using kernel 3.18 anymore, remove all the generic
support for kernel 3.18.

The removed packages are depending on kernel 3.18 only and are not used on
any recent kernel.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Koen Vandeputte 08802d93e2 kernel: bump 4.19 to 4.19.37
Refreshed all patches.

Altered patches:
- 150-bridge_allow_receiption_on_disabled_port.patch
- 201-extra_optimization.patch

Compile-tested on: cns3xxx, imx6
Runtime-tested on: cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte b765f4be40 kernel: bump 4.14 to 4.14.114
Refreshed all patches.

Altered patches:
- 150-bridge_allow_receiption_on_disabled_port.patch
- 201-extra_optimization.patch

Remove upstreamed:
- 022-0006-crypto-crypto4xx-properly-set-IV-after-de-and-encryp.patch

Compile-tested on: ar71xx, cns3xxx, imx6, x86_64
Runtime-tested on: ar71xx, cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte 456f486b53 kernel: bump 4.9 to 4.9.171
Refreshed all patches.

Altered patches:
- 150-bridge_allow_receiption_on_disabled_port.patch
- 201-extra_optimization.patch

Compile-tested on: ar7
Runtime-tested on: none

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte fdf1aae77d kernel: add missing symbol in 4.19 config
Intel AtomISP2 dummy / power-management driver (INTEL_ATOMISP2_PM) [N/m/y/?] (NEW)

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Felix Fietkau 9af2735734 kernel: fix regression on 4.19 with 613-netfilter_optional_tcp_window_check.patch (FS#2253)
Since ct->proto.tcp.last_win isn't updated when nf_ct_tcp_no_window_check is
enabled, the retransmission timeout check needs to be bypassed.

Based on patch by Rob Mosher

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years ago
Koen Vandeputte f337cd2ba3 kernel: bump 4.19 to 4.19.36
Refreshed all patches.

Compile-tested on: cns3xxx, imx6
Runtime-tested on: cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte 07aaa7e3d6 kernel: bump 4.14 to 4.14.113
Refreshed all patches.

Compile-tested on: cns3xxx, imx6
Runtime-tested on: cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte d27c245216 kernel: bump 4.9 to 4.9.170
Refreshed all patches.

Compile-tested on: ar7
Runtime-tested on: none

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte 022dfdc41c kernel: bump 4.19 to 4.19.35
Refreshed all patches.

Fixes:
- CVE-2019-3887

New symbol:
- CONFIG_LDISC_AUTOLOAD

Compile-tested on: cns3xxx, imx6
Runtime-tested on: cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte da5bd73d70 kernel: bump 4.14 to 4.14.112
Refreshed all patches.

New symbol:
- CONFIG_LDISC_AUTOLOAD

Compile-tested on: ar71xx, cns3xxx, imx6, x86_64
Runtime-tested on: ar71xx, cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte 6e243c2353 kernel: bump 4.9 to 4.9.169
Refreshed all patches.

New symbols:
- CONFIG_LDISC_AUTOLOAD
- CONFIG_PPC_BARRIER_NOSPEC

Compile-tested on: ar7
Runtime-tested on: none

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Lucian Cristian 16b381179f kernel: add missing drm symbol
dependency introduced with module drm-kms-helper

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
5 years ago
Petr Štetiar 78ee6b1a40 kernel: MIPS: perf: ath79: Fix perfcount IRQ assignment
Currently it's not possible to use perf on ath79 due to genirq flags
mismatch happening on static virtual IRQ 13 which is used for
performance counters hardware IRQ 5.

On TP-Link Archer C7v5:

           CPU0
  2:          0      MIPS   2  ath9k
  4:        318      MIPS   4  19000000.eth
  7:      55034      MIPS   7  timer
  8:       1236      MISC   3  ttyS0
 12:          0      INTC   1  ehci_hcd:usb1
 13:          0  gpio-ath79   2  keys
 14:          0  gpio-ath79   5  keys
 15:         31  AR724X PCI    1  ath10k_pci

 $ perf top
 genirq: Flags mismatch irq 13. 00014c83 (mips_perf_pmu) vs. 00002003 (keys)

On TP-Link Archer C7v4:

         CPU0
  4:          0      MIPS   4  19000000.eth
  5:       7135      MIPS   5  1a000000.eth
  7:      98379      MIPS   7  timer
  8:         30      MISC   3  ttyS0
 12:      90028      INTC   0  ath9k
 13:       5520      INTC   1  ehci_hcd:usb1
 14:       4623      INTC   2  ehci_hcd:usb2
 15:      32844  AR724X PCI    1  ath10k_pci
 16:          0  gpio-ath79  16  keys
 23:          0  gpio-ath79  23  keys

 $ perf top
 genirq: Flags mismatch irq 13. 00014c80 (mips_perf_pmu) vs. 00000080 (ehci_hcd:usb1)

This problem is happening, because currently statically assigned virtual
IRQ 13 for performance counters is not claimed during the initialization
of MIPS PMU during the bootup, so the IRQ subsystem doesn't know, that
this interrupt isn't available for further use.

So this patch fixes the issue by simply booking hardware IRQ 5 for MIPS PMU.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Daniel Golle b6acb7b718 kernel: move and replace accepted patch
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 years ago
Koen Vandeputte 8df12d76c6 kernel: bump 4.19 to 4.19.34
Refreshed all patches.

Removed:
- 030-PCI-dwc-skip-MSI-init-if-MSIs-have-been-explicitly-d.patch

Altered:
- 366-netfilter-nf_flow_table-clean-up-and-fix-dst-handlin.patch
- 650-netfilter-add-xt_OFFLOAD-target.patch
- 662-remove_pfifo_fast.patch
- 332-arc-add-OWRTDTB-section.patch
- 100-clocksource-drivers-arch_timer-Workaround-for-Allwin.patch
- 702-phy_add_aneg_done_function.patch

New symbols:
- ARC_IRQ_NO_AUTOSAVE
- SUN50I_ERRATUM_UNKNOWN1

Compile-tested: cns3xxx, imx6, sunxi
Runtime-tested: cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte 5387bc9cbb kernel: bump 4.14 to 4.14.111
Refreshed all patches.

Compile-tested on: ar71xx, cns3xxx, imx6, x86_64
Runtime-tested on: ar71xx, cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte 1138e0f887 kernel: bump 4.9 to 4.9.168
Refreshed all patches.

Compile-tested on: ar7
Runtime-tested on: none

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte 5eac37624f kernel: bump 4.14 to 4.14.110
Refreshed all patches.

Compile-tested on: ar71xx, cns3xxx, imx6, x86_64
Runtime-tested on: ar71xx, cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Tomasz Maciej Nowak 09fe18f042 tegra: add kernel 4.19 support
Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
5 years ago
Tomasz Maciej Nowak 42f96ed941 tegra: add new target
New target introduces initial support for NVIDIA Tegra SoC based devices.
It focuses on Tegra 2 CPUs, for successors supporting NEON instruction
set the target should be split in two subtargets.
This initial commit doesn't create any device image, it's groundwork
for further additions.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
5 years ago
Rafał Miłecki 8dacd75ea8 kernel: b53: add support for kernels 5.0+
It adjusts b53 code to upstream changes from the commit 3c1bcc8614db
("net: ethernet: Convert phydev advertize and supported from u32 to link
mode").

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years ago
Rafał Miłecki ebed4b6dd0 kernel: backport upstream ubifs default compression selection fix
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years ago
Rafał Miłecki 9a92af4624 kernel: fix rtcache compilation with 4.18+ with IPv6 support
Please note that modified code isn't currently being compiled with
kernels 4.19+ due to the dropped CONFIG_NF_CONNTRACK_IPV6 in upstream
Linux. That requires a separated fix.

This fixes:
net/netfilter/nf_conntrack_rtcache.c: In function 'nf_rtcache_get_cookie':
net/netfilter/nf_conntrack_rtcache.c:82:11: error: 'const struct rt6_info' has no member named 'rt6i_node'; did you mean 'rt6i_idev'?
   if (rt->rt6i_node)
           ^~~~~~~~~
           rt6i_idev

IPv6 structs were reworked in upstream kernel by:
commit a64efe142f5e ("net/ipv6: introduce fib6_info struct and helpers")
commit 77634cc67dc1 ("net/ipv6: Remove unused code and variables for rt6_info")
commit 93c2fb253d17 ("net/ipv6: Rename fib6_info struct elements")

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years ago
Koen Vandeputte 4bc0224149 kernel: bump 4.9 to 4.9.165
Refreshed all patches.

Compile-tested on: ar7
Runtime-tested on: none

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Chuanhong Guo 47eef3a5ce generic: ar8216: introduce qca,mib-poll-interval property
This allows users to specify a shorter mib poll interval so that the
swconfig leds could behave normal with current get_port_stats()
implementation.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
5 years ago
Chuanhong Guo c8c2ef1d49 generic: ar8216: do a software reset for switch during hw_init
This applies to ar8216 and ar8236. QCA's newer U-boot will enable
the switch mdio master for FE switches which makes phy inaccessible
from CPU mdio. (e.g. on TP-Link TL-WR941N v7 Chinese version which
uses QCA9558+AR8236.) For these devices PHY probing is broken and
mdio device probing is a must. We also need to disable switch mdio
master in driver for later PHY initialization.

Do a soft reset during hw_init so that mdio master can be disabled
and expose PHYs to CPU mdio for later PHY accessing.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
5 years ago
Chuanhong Guo d6366ce366 generic: ar8216: mib_work_func: read all port mibs everytime
ar8xxx_mib_capture will update mib counters for all ports. Current
code only update one port at a time and the data for other ports
are lost.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
5 years ago
Chuanhong Guo 9fc506e9b2 generic: ar8216: add support for get_port_stats()
Partially reverts commit eff3549c58.

AR7240 and AR9341 have buggy hardware switch LED trigger. The AR7240
one doesn't blink and the blinking of port0/port5 is reversed on
AR9341 if we swap PHY0 and PHY4. (Only blinking is reversed, which
means LED for PHY0 will lit when PHY0 is link up and will blink when
PHY4 has active link and vice versa.) On these two chips a software
swconfig LED trigger is required.

This commit adds swconfig port stats back but:
 1. move checking of mib_t/rxb_id into ar8xxx_chip since we can't
    distinguish ar7240sw and ar8216 using only chip id.
 2. don't update mib counter in get_port_stat. This function is called
    every 0.01s and this capturing procedure will take up a lot of CPU.
    We already have a mib_work_func updating mib counters every 2s so
    return the saved counter instead of fetching new data. The blinking
    rate will be weird but it should solve the previously mentioned CPU
    time problem.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
5 years ago
Chuanhong Guo 0598ec0abc generic: ar8216: add support for ar724x/ar933x builtin switch
This builtin switch is a bugless ar8216 with different mib counters
and gigabit cpu port.
Atheros uses the same device ID and it's impossible to distinguish
the standalone one and the builtin one. So we add support to mdio
device probe only.

This switch doesn't have buggy vlan tag so it's not needed to enable
atheros header. This commit changed ar8216_setup_port so that it can
be reused for this switch.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
5 years ago
Chuanhong Guo ad8db1fa2e generic: ar8216: mdiodev: add qca,phy4-mii-enable option
This option allows setting phy4 as a phy connected directly to CPU.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
5 years ago
Chuanhong Guo cf9900978a generic: ar8216: ar8229: add phy_read/phy_write
the added function also works for ar8216 and will be used in the
following ar7240 support.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
5 years ago