Commit Graph

12 Commits (cf7154db07c0b8746be290c9e11dcab3c91d237e)

Author SHA1 Message Date
Mathias Kresin cf7154db07 kernel: only optimized for size if small_flash
Add a new config option to allow to select the default compile
optimization level for the kernel.

Select the optimization for size by default if the small_flash feature is
set. Otherwise "Optimize for performance" is set.

Add the small_flash feature flag to all (sub)targets which had the
optimization for size in their default kernel config.

Remove CC_OPTIMIZE_FOR_* symbols from all kernel configs to apply the new
setting.

Exceptions to the above are:

  - lantiq, where the optimization for size is only required for the
    xway_legacy subtarget but was set for the whole target
  - mediatek, ramips/mt7620 & ramips/mt76x8 where boards should have
    plenty of space and an optimization for size doesn't make much sense
  - rb532, which has 128MByte flash

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Luis Araneda 8f60c3d571 kernel: remove DEVMEM and DEVKMEM from target's config
These options are handled by generic configuration

Targets that need these options should select KERNEL_DEVMEM
and/or KERNEL_DEVKMEM options on OpenWRT's config

Signed-off-by: Luis Araneda <luaraneda@gmail.com>
6 years ago
Yangbo Lu 6e9a5f4db4 layerscape: remove USB and TI specific configs for 32-bit
This patch is to remove USB configs for 32-bit device since
they're already in kmod package. Also removed TI platform
specific configs.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
6 years ago
Jo-Philipp Wich 7e99a6ba69 target: disable CONFIG_PROC_PAGE_MONITOR on most targets
Disable CONFIG_PROC_PAGE_MONITOR in most places and only keep it enabled
for virtual targets such as malta or potent ones like x86.

This saves up to 4KB of uncompressed kernel size and significantly
decreases CPU load under certain workloads.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years ago
Yangbo Lu 769e1bac7b layerscape: enable CONFIG_CRYPTO_ARC4 in kernel 4.9
This patch is to enable CONFIG_CRYPTO_ARC4 in kernel 4.9
which is a dependency for mac80211 package.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
7 years ago
Yangbo Lu 669c02d46d layerscape: fix ls1046ardb 32-bit call trace
Enabled CONFIG_ARCH_DMA_ADDR_T_64BIT in kernel to
resolve below call trace when ls1046ardb 32-bit
started up kernel.

[    0.142141] Bman ver:0a02,02,01
[    0.145326] ------------[ cut here ]------------
[    0.149969] WARNING: CPU: 0 PID: 1 at arch/arm/mm/ioremap.c:303 __arm_ioremap_pfn_caller+0x1ac/0x1d8
[    0.159152] Modules linked in:
[    0.162216] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.9.51-g9c76e024 #2
[    0.169036] Hardware name: Generic DT based system
[    0.173853] [<c02236a4>] (unwind_backtrace) from [<c021ed94>] (show_stack+0x10/0x14)
[    0.181638] [<c021ed94>] (show_stack) from [<c04d2d38>] (dump_stack+0x98/0xac)
[    0.188899] [<c04d2d38>] (dump_stack) from [<c0245bcc>] (__warn+0xe4/0x100)
[    0.195896] [<c0245bcc>] (__warn) from [<c0245c98>] (warn_slowpath_null+0x20/0x28)
[    0.203504] [<c0245c98>] (warn_slowpath_null) from [<c0229e24>] (__arm_ioremap_pfn_caller+0x1ac/0x1d8)
[    0.212861] [<c0229e24>] (__arm_ioremap_pfn_caller) from [<c0229f0c>] (ioremap_cache+0x20/0x28)
[    0.221608] [<c0229f0c>] (ioremap_cache) from [<c105e390>] (parse_mem_property.part.3+0x18/0x50)
[    0.230441] [<c105e390>] (parse_mem_property.part.3) from [<c105e6dc>] (qman_init_early+0x314/0x334)
[    0.239623] [<c105e6dc>] (qman_init_early) from [<c0201a24>] (do_one_initcall+0xb4/0x168)
[    0.247844] [<c0201a24>] (do_one_initcall) from [<c1000e84>] (kernel_init_freeable+0x1d8/0x280)
[    0.256590] [<c1000e84>] (kernel_init_freeable) from [<c0adbcfc>] (kernel_init+0x8/0x114)
[    0.264812] [<c0adbcfc>] (kernel_init) from [<c021bb28>] (ret_from_fork+0x14/0x2c)
[    0.272423] ---[ end trace 39aaeef329e2a0a2 ]---
[    0.277058] qman-fqd addr 0xfb000000 size 0x800000

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
7 years ago
Yangbo Lu 110c9e9034 layerscape: update config-4.9
Some new options were introduced by kernel patches.
And some options should be removed/added.
The config-4.9 should be updated accordingly.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
7 years ago
Felix Fietkau c08293893a kernel: add support for limiting 4K erase sector support based on flash chip size
Some targets need 4K sectors for small flash chips (e.g. some
routerboards, where the entire chip is just one "erase block"), whereas
on other devices 4K sectors lead to horrible flash erase/write
performance.

Set the default limit in the generic kernel configuration to 4 MiB to
ensure that all new platforms don't use 4K sectors for bigger flash
chips. On all existing targets use 16 MiB for now to avoid regressions.
They will be changed individually in follow-up commits.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Mathew McBride 6a457749a4 layerscape: Remove netfilter and LZ4 config symbols
These conflict with the kmod packages (such as nf-netlink)

Signed-off-by: Mathew McBride <matt@traverse.com.au>
[Add same changes for arm8_32b subtarget and refresh config]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Hauke Mehrtens cf17e034bc kernel: Add some more generic config options
These options are deactivating some kernel modules for IP blocks not
uses on this SoC. I saw the same when working with the ARM64 Marvell
board so it is better to move them to generic.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Hauke Mehrtens 2135125182 layerscape: remove wifi config
This is provided by the mac80211 package

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Yangbo Lu 8fdda1cc10 layerscape: add linux 4.9 support
This patch is to add linux 4.9 support for layerscape.
All these kernel patches are from NXP LSDK 1709 release.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
7 years ago