diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2014-10-27 22:55:39 +0000 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2014-10-27 22:55:39 +0000 |
commit | a76ee3b1d5dee92a13ba357e9baf2ad155976604 (patch) | |
tree | 38745103e28135d9d7fc5fbfbc64a5eb7f6f49d3 /target/linux | |
parent | cea2b5299b13fcfef7de2f194e833e545e9e0f2f (diff) | |
download | upstream-a76ee3b1d5dee92a13ba357e9baf2ad155976604.tar.gz upstream-a76ee3b1d5dee92a13ba357e9baf2ad155976604.tar.bz2 upstream-a76ee3b1d5dee92a13ba357e9baf2ad155976604.zip |
kernel: make the kernel 3.18 patches apply and boot on arm.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
SVN-Revision: 43095
Diffstat (limited to 'target/linux')
38 files changed, 381 insertions, 618 deletions
diff --git a/target/linux/generic/patches-3.18/102-ehci_hcd_ignore_oc.patch b/target/linux/generic/patches-3.18/102-ehci_hcd_ignore_oc.patch index de087d551c..f498d4eac6 100644 --- a/target/linux/generic/patches-3.18/102-ehci_hcd_ignore_oc.patch +++ b/target/linux/generic/patches-3.18/102-ehci_hcd_ignore_oc.patch @@ -51,14 +51,15 @@ Signed-off-by: Florian Fainelli <florian@openwrt.org> /* --- a/drivers/usb/host/ehci-platform.c +++ b/drivers/usb/host/ehci-platform.c -@@ -57,6 +57,7 @@ static int ehci_platform_reset(struct us +@@ -226,6 +226,8 @@ static int ehci_platform_probe(struct pl + ehci->big_endian_desc = 1; + if (pdata->big_endian_mmio) + ehci->big_endian_mmio = 1; ++ if (pdata->ignore_oc) ++ ehci->ignore_oc = 1; - hcd->has_tt = pdata->has_tt; - ehci->has_synopsys_hc_bug = pdata->has_synopsys_hc_bug; -+ ehci->ignore_oc = pdata->ignore_oc; - - if (pdata->pre_setup) { - retval = pdata->pre_setup(hcd); + #ifndef CONFIG_USB_EHCI_BIG_ENDIAN_MMIO + if (ehci->big_endian_mmio) { --- a/drivers/usb/host/ehci.h +++ b/drivers/usb/host/ehci.h @@ -226,6 +226,7 @@ struct ehci_hcd { /* one per controlle diff --git a/target/linux/generic/patches-3.18/203-kallsyms_uncompressed.patch b/target/linux/generic/patches-3.18/203-kallsyms_uncompressed.patch index 53229f071a..b9d82207a0 100644 --- a/target/linux/generic/patches-3.18/203-kallsyms_uncompressed.patch +++ b/target/linux/generic/patches-3.18/203-kallsyms_uncompressed.patch @@ -1,13 +1,13 @@ --- a/scripts/kallsyms.c +++ b/scripts/kallsyms.c -@@ -59,6 +59,7 @@ static struct sym_entry *table; +@@ -58,6 +58,7 @@ static struct addr_range percpu_range = + static struct sym_entry *table; static unsigned int table_size, table_cnt; static int all_symbols = 0; - static int absolute_percpu = 0; +static int uncompressed = 0; + static int absolute_percpu = 0; static char symbol_prefix_char = '\0'; static unsigned long long kernel_start_addr = 0; - @@ -392,6 +393,9 @@ static void write_src(void) free(markers); diff --git a/target/linux/generic/patches-3.18/220-gc_sections.patch b/target/linux/generic/patches-3.18/220-gc_sections.patch index c105c40b80..86727f1661 100644 --- a/target/linux/generic/patches-3.18/220-gc_sections.patch +++ b/target/linux/generic/patches-3.18/220-gc_sections.patch @@ -50,7 +50,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org> --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h -@@ -87,7 +87,7 @@ +@@ -89,7 +89,7 @@ #ifdef CONFIG_FTRACE_MCOUNT_RECORD #define MCOUNT_REC() . = ALIGN(8); \ VMLINUX_SYMBOL(__start_mcount_loc) = .; \ @@ -59,7 +59,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org> VMLINUX_SYMBOL(__stop_mcount_loc) = .; #else #define MCOUNT_REC() -@@ -95,7 +95,7 @@ +@@ -97,7 +97,7 @@ #ifdef CONFIG_TRACE_BRANCH_PROFILING #define LIKELY_PROFILE() VMLINUX_SYMBOL(__start_annotated_branch_profile) = .; \ @@ -68,7 +68,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org> VMLINUX_SYMBOL(__stop_annotated_branch_profile) = .; #else #define LIKELY_PROFILE() -@@ -103,7 +103,7 @@ +@@ -105,7 +105,7 @@ #ifdef CONFIG_PROFILE_ALL_BRANCHES #define BRANCH_PROFILE() VMLINUX_SYMBOL(__start_branch_profile) = .; \ @@ -77,7 +77,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org> VMLINUX_SYMBOL(__stop_branch_profile) = .; #else #define BRANCH_PROFILE() -@@ -112,7 +112,7 @@ +@@ -123,7 +123,7 @@ #ifdef CONFIG_EVENT_TRACING #define FTRACE_EVENTS() . = ALIGN(8); \ VMLINUX_SYMBOL(__start_ftrace_events) = .; \ @@ -86,7 +86,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org> VMLINUX_SYMBOL(__stop_ftrace_events) = .; #else #define FTRACE_EVENTS() -@@ -120,7 +120,7 @@ +@@ -131,7 +131,7 @@ #ifdef CONFIG_TRACING #define TRACE_PRINTKS() VMLINUX_SYMBOL(__start___trace_bprintk_fmt) = .; \ @@ -95,7 +95,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org> VMLINUX_SYMBOL(__stop___trace_bprintk_fmt) = .; #define TRACEPOINT_STR() VMLINUX_SYMBOL(__start___tracepoint_str) = .; \ *(__tracepoint_str) /* Trace_printk fmt' pointer */ \ -@@ -133,7 +133,7 @@ +@@ -144,7 +144,7 @@ #ifdef CONFIG_FTRACE_SYSCALLS #define TRACE_SYSCALLS() . = ALIGN(8); \ VMLINUX_SYMBOL(__start_syscalls_metadata) = .; \ @@ -104,40 +104,18 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org> VMLINUX_SYMBOL(__stop_syscalls_metadata) = .; #else #define TRACE_SYSCALLS() -@@ -142,8 +142,8 @@ - #ifdef CONFIG_CLKSRC_OF - #define CLKSRC_OF_TABLES() . = ALIGN(8); \ - VMLINUX_SYMBOL(__clksrc_of_table) = .; \ -- *(__clksrc_of_table) \ -- *(__clksrc_of_table_end) -+ KEEP(*(__clksrc_of_table)) \ -+ KEEP(*(__clksrc_of_table_end)) - #else - #define CLKSRC_OF_TABLES() - #endif -@@ -152,8 +152,8 @@ - #define IRQCHIP_OF_MATCH_TABLE() \ +@@ -158,8 +158,8 @@ + #define _OF_TABLE_1(name) \ . = ALIGN(8); \ - VMLINUX_SYMBOL(__irqchip_begin) = .; \ -- *(__irqchip_of_table) \ -- *(__irqchip_of_end) -+ KEEP(*(__irqchip_of_table)) \ -+ KEEP(*(__irqchip_of_end)) - #else - #define IRQCHIP_OF_MATCH_TABLE() - #endif -@@ -161,8 +161,8 @@ - #ifdef CONFIG_COMMON_CLK - #define CLK_OF_TABLES() . = ALIGN(8); \ - VMLINUX_SYMBOL(__clk_of_table) = .; \ -- *(__clk_of_table) \ -- *(__clk_of_table_end) -+ KEEP(*(__clk_of_table)) \ -+ KEEP(*(__clk_of_table_end)) - #else - #define CLK_OF_TABLES() - #endif -@@ -170,7 +170,7 @@ + VMLINUX_SYMBOL(__##name##_of_table) = .; \ +- *(__##name##_of_table) \ +- *(__##name##_of_table_end) ++ KEEP(*(__##name##_of_table)) \ ++ KEEP(*(__##name##_of_table_end)) + + #define CLKSRC_OF_TABLES() OF_TABLE(CONFIG_CLKSRC_OF, clksrc) + #define IRQCHIP_OF_MATCH_TABLE() OF_TABLE(CONFIG_IRQCHIP, irqchip) +@@ -171,7 +171,7 @@ #define KERNEL_DTB() \ STRUCT_ALIGN(); \ VMLINUX_SYMBOL(__dtb_start) = .; \ @@ -146,7 +124,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org> VMLINUX_SYMBOL(__dtb_end) = .; /* .data section */ -@@ -186,16 +186,17 @@ +@@ -187,16 +187,17 @@ /* implement dynamic printk debug */ \ . = ALIGN(8); \ VMLINUX_SYMBOL(__start___jump_table) = .; \ @@ -167,7 +145,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org> /* * Data section helpers -@@ -249,32 +250,32 @@ +@@ -250,35 +251,35 @@ /* PCI quirks */ \ .pci_fixup : AT(ADDR(.pci_fixup) - LOAD_OFFSET) { \ VMLINUX_SYMBOL(__start_pci_fixups_early) = .; \ @@ -198,6 +176,10 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org> - *(.pci_fixup_suspend) \ + KEEP(*(.pci_fixup_suspend)) \ VMLINUX_SYMBOL(__end_pci_fixups_suspend) = .; \ + VMLINUX_SYMBOL(__start_pci_fixups_suspend_late) = .; \ +- *(.pci_fixup_suspend_late) \ ++ KEEP(*(.pci_fixup_suspend_late)) \ + VMLINUX_SYMBOL(__end_pci_fixups_suspend_late) = .; \ } \ \ /* Built-in firmware blobs */ \ @@ -208,7 +190,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org> VMLINUX_SYMBOL(__end_builtin_fw) = .; \ } \ \ -@@ -283,49 +284,49 @@ +@@ -287,49 +288,49 @@ /* Kernel symbol table: Normal symbols */ \ __ksymtab : AT(ADDR(__ksymtab) - LOAD_OFFSET) { \ VMLINUX_SYMBOL(__start___ksymtab) = .; \ @@ -265,7 +247,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org> VMLINUX_SYMBOL(__stop___kcrctab_gpl) = .; \ } \ \ -@@ -339,14 +340,14 @@ +@@ -343,14 +344,14 @@ /* Kernel symbol table: GPL-only unused symbols */ \ __kcrctab_unused_gpl : AT(ADDR(__kcrctab_unused_gpl) - LOAD_OFFSET) { \ VMLINUX_SYMBOL(__start___kcrctab_unused_gpl) = .; \ @@ -282,7 +264,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org> VMLINUX_SYMBOL(__stop___kcrctab_gpl_future) = .; \ } \ \ -@@ -365,14 +366,14 @@ +@@ -369,14 +370,14 @@ /* Built-in module parameters. */ \ __param : AT(ADDR(__param) - LOAD_OFFSET) { \ VMLINUX_SYMBOL(__start___param) = .; \ @@ -299,7 +281,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org> VMLINUX_SYMBOL(__stop___modver) = .; \ . = ALIGN((align)); \ VMLINUX_SYMBOL(__end_rodata) = .; \ -@@ -428,7 +429,7 @@ +@@ -432,7 +433,7 @@ #define ENTRY_TEXT \ ALIGN_FUNCTION(); \ VMLINUX_SYMBOL(__entry_text_start) = .; \ @@ -308,7 +290,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org> VMLINUX_SYMBOL(__entry_text_end) = .; #ifdef CONFIG_FUNCTION_GRAPH_TRACER -@@ -456,7 +457,7 @@ +@@ -460,7 +461,7 @@ . = ALIGN(align); \ __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) { \ VMLINUX_SYMBOL(__start___ex_table) = .; \ @@ -317,7 +299,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org> VMLINUX_SYMBOL(__stop___ex_table) = .; \ } -@@ -472,8 +473,8 @@ +@@ -476,8 +477,8 @@ #ifdef CONFIG_CONSTRUCTORS #define KERNEL_CTORS() . = ALIGN(8); \ VMLINUX_SYMBOL(__ctors_start) = .; \ @@ -328,7 +310,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org> VMLINUX_SYMBOL(__ctors_end) = .; #else #define KERNEL_CTORS() -@@ -517,7 +518,7 @@ +@@ -525,7 +526,7 @@ #define SBSS(sbss_align) \ . = ALIGN(sbss_align); \ .sbss : AT(ADDR(.sbss) - LOAD_OFFSET) { \ @@ -337,7 +319,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org> *(.scommon) \ } -@@ -535,7 +536,7 @@ +@@ -543,7 +544,7 @@ BSS_FIRST_SECTIONS \ *(.bss..page_aligned) \ *(.dynbss) \ @@ -346,7 +328,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org> *(COMMON) \ } -@@ -596,7 +597,7 @@ +@@ -604,7 +605,7 @@ . = ALIGN(4); \ .tracedata : AT(ADDR(.tracedata) - LOAD_OFFSET) { \ VMLINUX_SYMBOL(__tracedata_start) = .; \ @@ -355,7 +337,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org> VMLINUX_SYMBOL(__tracedata_end) = .; \ } #else -@@ -613,17 +614,17 @@ +@@ -621,17 +622,17 @@ #define INIT_SETUP(initsetup_align) \ . = ALIGN(initsetup_align); \ VMLINUX_SYMBOL(__setup_start) = .; \ @@ -377,7 +359,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org> INIT_CALLS_LEVEL(0) \ INIT_CALLS_LEVEL(1) \ INIT_CALLS_LEVEL(2) \ -@@ -637,21 +638,21 @@ +@@ -645,21 +646,21 @@ #define CON_INITCALL \ VMLINUX_SYMBOL(__con_initcall_start) = .; \ @@ -521,7 +503,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org> .init.data : { --- a/arch/arm/boot/compressed/Makefile +++ b/arch/arm/boot/compressed/Makefile -@@ -120,6 +120,7 @@ ifeq ($(CONFIG_FUNCTION_TRACER),y) +@@ -122,6 +122,7 @@ ifeq ($(CONFIG_FUNCTION_TRACER),y) ORIG_CFLAGS := $(KBUILD_CFLAGS) KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS)) endif diff --git a/target/linux/generic/patches-3.18/221-module_exports.patch b/target/linux/generic/patches-3.18/221-module_exports.patch index b5380030af..f2cad7a028 100644 --- a/target/linux/generic/patches-3.18/221-module_exports.patch +++ b/target/linux/generic/patches-3.18/221-module_exports.patch @@ -1,6 +1,6 @@ --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h -@@ -52,6 +52,16 @@ +@@ -54,6 +54,16 @@ #define LOAD_OFFSET 0 #endif @@ -17,7 +17,7 @@ #include <linux/export.h> /* Align . to a 8 byte boundary equals to maximum function alignment. */ -@@ -284,14 +294,14 @@ +@@ -288,14 +298,14 @@ /* Kernel symbol table: Normal symbols */ \ __ksymtab : AT(ADDR(__ksymtab) - LOAD_OFFSET) { \ VMLINUX_SYMBOL(__start___ksymtab) = .; \ @@ -34,7 +34,7 @@ VMLINUX_SYMBOL(__stop___ksymtab_gpl) = .; \ } \ \ -@@ -353,7 +363,7 @@ +@@ -357,7 +367,7 @@ \ /* Kernel symbol table: strings */ \ __ksymtab_strings : AT(ADDR(__ksymtab_strings) - LOAD_OFFSET) { \ @@ -43,7 +43,7 @@ } \ \ /* __*init sections */ \ -@@ -671,6 +681,8 @@ +@@ -679,6 +689,8 @@ EXIT_TEXT \ EXIT_DATA \ EXIT_CALL \ @@ -54,7 +54,7 @@ } --- a/scripts/Makefile.build +++ b/scripts/Makefile.build -@@ -349,7 +349,7 @@ targets += $(extra-y) $(MAKECMDGOALS) $( +@@ -298,7 +298,7 @@ targets += $(extra-y) $(MAKECMDGOALS) $( # Linker scripts preprocessor (.lds.S -> .lds) # --------------------------------------------------------------------------- quiet_cmd_cpp_lds_S = LDS $@ diff --git a/target/linux/generic/patches-3.18/259-regmap_dynamic.patch b/target/linux/generic/patches-3.18/259-regmap_dynamic.patch index e7f5bcee97..55e639cb85 100644 --- a/target/linux/generic/patches-3.18/259-regmap_dynamic.patch +++ b/target/linux/generic/patches-3.18/259-regmap_dynamic.patch @@ -1,6 +1,6 @@ --- a/drivers/base/regmap/Kconfig +++ b/drivers/base/regmap/Kconfig -@@ -3,23 +3,28 @@ +@@ -3,26 +3,31 @@ # subsystems should select the appropriate symbols. config REGMAP @@ -13,18 +13,21 @@ config REGMAP_I2C - tristate -+ select REGMAP + tristate "Regmap I2C ++ select REGMAP + depends on I2C config REGMAP_SPI - tristate ++ tristate "Regmap SPI" + select REGMAP + depends on SPI_MASTER -+ tristate "Regmap SPI" + depends on SPI config REGMAP_SPMI + select REGMAP tristate + depends on SPMI config REGMAP_MMIO + select REGMAP @@ -67,8 +70,8 @@ +#include <linux/module.h> #include <linux/mutex.h> #include <linux/err.h> - #include <linux/rbtree.h> -@@ -2247,3 +2248,5 @@ static int __init regmap_initcall(void) + #include <linux/of.h> +@@ -2635,3 +2636,5 @@ static int __init regmap_initcall(void) return 0; } postcore_initcall(regmap_initcall); diff --git a/target/linux/generic/patches-3.18/302-mips_no_branch_likely.patch b/target/linux/generic/patches-3.18/302-mips_no_branch_likely.patch index 1da9540050..19adcb800b 100644 --- a/target/linux/generic/patches-3.18/302-mips_no_branch_likely.patch +++ b/target/linux/generic/patches-3.18/302-mips_no_branch_likely.patch @@ -7,5 +7,5 @@ -cflags-y += -G 0 -mno-abicalls -fno-pic -pipe +cflags-y += -G 0 -mno-abicalls -fno-pic -pipe -mno-branch-likely cflags-y += -msoft-float - LDFLAGS_vmlinux += -G 0 -static -n -nostdlib + LDFLAGS_vmlinux += -G 0 -static -n -nostdlib --gc-sections --sort-section=name KBUILD_AFLAGS_MODULE += -mlong-calls diff --git a/target/linux/generic/patches-3.18/304-mips_disable_fpu.patch b/target/linux/generic/patches-3.18/304-mips_disable_fpu.patch index 4536ce6dae..980eaf0b7e 100644 --- a/target/linux/generic/patches-3.18/304-mips_disable_fpu.patch +++ b/target/linux/generic/patches-3.18/304-mips_disable_fpu.patch @@ -1,160 +1,105 @@ -MIPS: allow disabling the kernel FPU emulator +From: Manuel Lauss <manuel.lauss@gmail.com> +Subject: [RFC PATCH v4 2/2] MIPS: make FPU emulator optional +Date: Mon, 7 Apr 2014 12:57:04 +0200 +Message-Id: <1396868224-252888-2-git-send-email-manuel.lauss@gmail.com> -This patch allows turning off the in-kernel Algorithmics -FPU emulator support, which allows one to save a couple of -precious blocks on an embedded system. +This small patch makes the MIPS FPU emulator optional. The kernel +kills float-users on systems without a hardware FPU by sending a SIGILL. + +Disabling the emulator shrinks vmlinux by about 54kBytes (32bit, +optimizing for size). + +Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com> +--- +v4: rediffed because of patch 1/2, should now work with micromips as well +v3: updated patch description with size savings. +v2: incorporated changes suggested by Jonas Gorski + force the fpu emulator on for micromips: relocating the parts + of the mmips code in the emulator to other areas would be a + much larger change; I went the cheap route instead with this. + + arch/mips/Kbuild | 2 +- + arch/mips/Kconfig | 14 ++++++++++++++ + arch/mips/include/asm/fpu.h | 5 +++-- + arch/mips/include/asm/fpu_emulator.h | 15 +++++++++++++++ + 4 files changed, 33 insertions(+), 3 deletions(-) -Signed-off-by: Florian Fainelli <florian@openwrt.org> --- --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig -@@ -934,6 +934,17 @@ config I8259 - config MIPS_BONITO64 - bool +@@ -2484,6 +2484,20 @@ config MIPS_O32_FP64_SUPPORT + + If unsure, say N. -+config MIPS_FPU_EMU -+ bool "Enable FPU emulation" ++config MIPS_FPU_EMULATOR ++ bool "MIPS FPU Emulator" + default y + help -+ This option allows building a kernel with or without the Algorithmics -+ FPU emulator enabled. Turning off this option results in a kernel which -+ does not catch floating operations exceptions. Make sure that your toolchain -+ is configured to enable software floating point emulation in that case. ++ This option lets you disable the built-in MIPS FPU (Coprocessor 1) ++ emulator, which handles floating-point instructions on processors ++ without a hardware FPU. It is generally a good idea to keep the ++ emulator built-in, unless you are perfectly sure you have a ++ complete soft-float environment. With the emulator disabled, all ++ users of float operations will be killed with an illegal instr- ++ uction exception. + -+ If unsure say Y here. ++ Say Y, please. + - config MIPS_MSC + config USE_OF bool + select OF +--- a/arch/mips/Makefile ++++ b/arch/mips/Makefile +@@ -266,7 +266,7 @@ OBJCOPYFLAGS += --remove-section=.regin + head-y := arch/mips/kernel/head.o ---- a/arch/mips/math-emu/Makefile -+++ b/arch/mips/math-emu/Makefile -@@ -2,10 +2,12 @@ - # Makefile for the Linux/MIPS kernel FPU emulation. - # + libs-y += arch/mips/lib/ +-libs-y += arch/mips/math-emu/ ++libs-$(CONFIG_MIPS_FPU_EMULATOR) += arch/mips/math-emu/ --obj-y := cp1emu.o ieee754m.o ieee754d.o ieee754dp.o ieee754sp.o ieee754.o \ -+obj-y := kernel_linkage.o -+ -+obj-$(CONFIG_MIPS_FPU_EMU) += ieee754m.o ieee754d.o ieee754dp.o ieee754sp.o ieee754.o \ - ieee754xcpt.o dp_frexp.o dp_modf.o dp_div.o dp_mul.o dp_sub.o \ - dp_add.o dp_fsp.o dp_cmp.o dp_logb.o dp_scalb.o dp_simple.o \ - dp_tint.o dp_fint.o dp_tlong.o dp_flong.o sp_frexp.o sp_modf.o \ - sp_div.o sp_mul.o sp_sub.o sp_add.o sp_fdp.o sp_cmp.o sp_logb.o \ - sp_scalb.o sp_simple.o sp_tint.o sp_fint.o sp_tlong.o sp_flong.o \ -- dp_sqrt.o sp_sqrt.o kernel_linkage.o dsemul.o -+ dp_sqrt.o sp_sqrt.o dsemul.o cp1emu.o ---- a/arch/mips/math-emu/kernel_linkage.c -+++ b/arch/mips/math-emu/kernel_linkage.c -@@ -29,6 +29,7 @@ + # See arch/mips/Kbuild for content of core part of the kernel + core-y += arch/mips/ +--- a/arch/mips/include/asm/fpu.h ++++ b/arch/mips/include/asm/fpu.h +@@ -168,8 +168,10 @@ static inline int init_fpu(void) + ret = __own_fpu(); + if (!ret) + _init_fpu(); +- } else ++ } else if (IS_ENABLED(CONFIG_MIPS_FPU_EMULATOR)) + fpu_emulator_init_fpu(); ++ else ++ ret = SIGILL; - #define SIGNALLING_NAN 0x7ff800007ff80000LL - -+#ifdef CONFIG_MIPS_FPU_EMU - void fpu_emulator_init_fpu(void) - { - static int first = 1; -@@ -115,3 +116,36 @@ int fpu_emulator_restore_context32(struc - return err; + return ret; } - #endif -+ -+#else -+ -+void fpu_emulator_init_fpu(void) -+{ -+ printk(KERN_INFO "FPU emulator disabled, make sure your toolchain" -+ "was compiled with software floating point support (soft-float)\n"); -+ return; -+} -+ -+int fpu_emulator_save_context(struct sigcontext __user *sc) -+{ -+ return 0; -+} -+ -+int fpu_emulator_restore_context(struct sigcontext __user *sc) -+{ -+ return 0; -+} -+ -+#ifdef CONFIG_64BIT -+int fpu_emulator_save_context32(struct sigcontext32 __user *sc) -+{ -+ return 0; -+} -+ -+int fpu_emulator_restore_context32(struct sigcontext32 __user *sc) -+{ -+ return 0; -+} -+#endif /* CONFIG_64BIT */ -+ -+#endif /* CONFIG_MIPS_FPU_EMU */ --- a/arch/mips/include/asm/fpu_emulator.h +++ b/arch/mips/include/asm/fpu_emulator.h -@@ -27,6 +27,8 @@ - #include <asm/inst.h> +@@ -30,6 +30,7 @@ #include <asm/local.h> + #include <asm/processor.h> -+#ifdef CONFIG_MIPS_FPU_EMU -+ ++#ifdef CONFIG_MIPS_FPU_EMULATOR #ifdef CONFIG_DEBUG_FS struct mips_fpu_emulator_stats { -@@ -60,6 +62,38 @@ extern int fpu_emulator_cop1Handler(stru - int process_fpemu_return(int sig, void __user *fault_addr); - int mm_isBranchInstr(struct pt_regs *regs, struct mm_decoded_insn dec_insn, - unsigned long *contpc); -+#else -+static inline int mips_dsemul(struct pt_regs *regs, mips_instruction ir, -+ unsigned long cpc) -+{ -+ return 0; -+} -+ +@@ -65,6 +66,20 @@ extern int do_dsemulret(struct pt_regs * + extern int fpu_emulator_cop1Handler(struct pt_regs *xcp, + struct mips_fpu_struct *ctx, int has_fpu, + void *__user *fault_addr); ++#else /* no CONFIG_MIPS_FPU_EMULATOR */ +static inline int do_dsemulret(struct pt_regs *xcp) +{ -+ return 0; ++ return 0; /* 0 means error, should never get here anyway */ +} + +static inline int fpu_emulator_cop1Handler(struct pt_regs *xcp, -+ struct mips_fpu_struct *ctx, -+ int has_fpu, -+ void *__user *fault_addr) -+{ -+ return 0; -+} -+ -+static inline int process_fpemu_return(int sig, void __user *fault_addr) ++ struct mips_fpu_struct *ctx, int has_fpu, ++ void *__user *fault_addr) +{ -+ return -EINVAL; ++ return SIGILL; /* we don't speak MIPS FPU */ +} ++#endif /* CONFIG_MIPS_FPU_EMULATOR */ + -+static inline int mm_isBranchInstr(struct pt_regs *regs, -+ struct mm_decoded_insn dec_insn, -+ unsigned long *contpc) -+{ -+ return 0; -+} -+#endif /* CONFIG_MIPS_FPU_EMU */ - - /* - * Instruction inserted following the badinst to further tag the sequence ---- a/arch/mips/kernel/traps.c -+++ b/arch/mips/kernel/traps.c -@@ -701,6 +701,7 @@ asmlinkage void do_ov(struct pt_regs *re - exception_exit(prev_state); - } - -+#ifdef CONFIG_MIPS_FPU_EMU - int process_fpemu_return(int sig, void __user *fault_addr) - { - if (sig == SIGSEGV || sig == SIGBUS) { -@@ -724,6 +725,7 @@ int process_fpemu_return(int sig, void _ - return 0; - } - } -+#endif /* CONFIG_MIPS_FPU_EMU */ - - /* - * XXX Delayed fp exceptions when doing a lazy ctx switch XXX + int process_fpemu_return(int sig, void __user *fault_addr); + int mm_isBranchInstr(struct pt_regs *regs, struct mm_decoded_insn dec_insn, + unsigned long *contpc); diff --git a/target/linux/generic/patches-3.18/305-mips_module_reloc.patch b/target/linux/generic/patches-3.18/305-mips_module_reloc.patch index 8818675a0f..2e92916f97 100644 --- a/target/linux/generic/patches-3.18/305-mips_module_reloc.patch +++ b/target/linux/generic/patches-3.18/305-mips_module_reloc.patch @@ -3,7 +3,7 @@ @@ -90,8 +90,13 @@ all-$(CONFIG_SYS_SUPPORTS_ZBOOT)+= vmlin cflags-y += -G 0 -mno-abicalls -fno-pic -pipe -mno-branch-likely cflags-y += -msoft-float - LDFLAGS_vmlinux += -G 0 -static -n -nostdlib + LDFLAGS_vmlinux += -G 0 -static -n -nostdlib --gc-sections --sort-section=name +ifdef CONFIG_64BIT KBUILD_AFLAGS_MODULE += -mlong-calls KBUILD_CFLAGS_MODULE += -mlong-calls @@ -12,8 +12,8 @@ +KBUILD_CFLAGS_MODULE += -mno-long-calls +endif - cflags-y += -ffreestanding - + ifndef CONFIG_FUNCTION_TRACER + KBUILD_CFLAGS_KERNEL += -ffunction-sections -fdata-sections --- a/arch/mips/include/asm/module.h +++ b/arch/mips/include/asm/module.h @@ -11,6 +11,11 @@ struct mod_arch_specific { diff --git a/target/linux/generic/patches-3.18/440-block2mtd_init.patch b/target/linux/generic/patches-3.18/440-block2mtd_init.patch index a5819984bf..5ab60265a3 100644 --- a/target/linux/generic/patches-3.18/440-block2mtd_init.patch +++ b/target/linux/generic/patches-3.18/440-block2mtd_init.patch @@ -8,10 +8,10 @@ #include <linux/mutex.h> #include <linux/mount.h> #include <linux/slab.h> -@@ -210,11 +211,12 @@ static void block2mtd_free_device(struct +@@ -209,11 +210,12 @@ static void block2mtd_free_device(struct + } - /* FIXME: ensure that mtd->size % erase_size == 0 */ -static struct block2mtd_dev *add_device(char *devname, int erase_size) +static struct block2mtd_dev *add_device(char *devname, int erase_size, const char *mtdname) { @@ -22,7 +22,7 @@ char *name; if (!devname) -@@ -253,13 +255,16 @@ static struct block2mtd_dev *add_device( +@@ -257,13 +259,16 @@ static struct block2mtd_dev *add_device( /* Setup the MTD structure */ /* make the name contain the block device in */ @@ -31,7 +31,7 @@ + mtdname = devname; + name = kmalloc(strlen(mtdname) + 1, GFP_KERNEL); if (!name) - goto devinit_err; + goto err_destroy_mutex; + strcpy(name, mtdname); dev->mtd.name = name; @@ -41,7 +41,7 @@ dev->mtd.erasesize = erase_size; dev->mtd.writesize = 1; dev->mtd.writebufsize = PAGE_SIZE; -@@ -272,15 +277,18 @@ static struct block2mtd_dev *add_device( +@@ -276,15 +281,18 @@ static struct block2mtd_dev *add_device( dev->mtd.priv = dev; dev->mtd.owner = THIS_MODULE; @@ -52,7 +52,7 @@ + part->size = dev->mtd.size; + if (mtd_device_register(&dev->mtd, part, 1)) { /* Device didn't get added, so free the entry */ - goto devinit_err; + goto err_destroy_mutex; } list_add(&dev->list, &blkmtd_device_list); pr_info("mtd%d: [%s] erase_size = %dKiB [%d]\n", @@ -62,8 +62,8 @@ + mtdname, dev->mtd.erasesize >> 10, dev->mtd.erasesize); return dev; - devinit_err: -@@ -347,9 +355,9 @@ static char block2mtd_paramline[80 + 12] + err_destroy_mutex: +@@ -353,9 +361,9 @@ static char block2mtd_paramline[80 + 12] static int block2mtd_setup2(const char *val) { @@ -75,7 +75,7 @@ char *name; size_t erase_size = PAGE_SIZE; int i, ret; -@@ -362,7 +370,7 @@ static int block2mtd_setup2(const char * +@@ -368,7 +376,7 @@ static int block2mtd_setup2(const char * strcpy(str, val); kill_final_newline(str); @@ -84,7 +84,7 @@ token[i] = strsep(&str, ","); if (str) { -@@ -388,8 +396,10 @@ static int block2mtd_setup2(const char * +@@ -394,8 +402,10 @@ static int block2mtd_setup2(const char * return 0; } } @@ -96,7 +96,7 @@ return 0; } -@@ -423,7 +433,7 @@ static int block2mtd_setup(const char *v +@@ -429,7 +439,7 @@ static int block2mtd_setup(const char *v module_param_call(block2mtd, block2mtd_setup, NULL, NULL, 0200); diff --git a/target/linux/generic/patches-3.18/441-block2mtd_probe.patch b/target/linux/generic/patches-3.18/441-block2mtd_probe.patch index 3ab9d1a3fc..6836a48e39 100644 --- a/target/linux/generic/patches-3.18/441-block2mtd_probe.patch +++ b/target/linux/generic/patches-3.18/441-block2mtd_probe.patch @@ -8,10 +8,10 @@ #include <linux/fs.h> #include <linux/blkdev.h> #include <linux/bio.h> -@@ -211,13 +212,14 @@ static void block2mtd_free_device(struct +@@ -210,13 +211,16 @@ static void block2mtd_free_device(struct + } - /* FIXME: ensure that mtd->size % erase_size == 0 */ -static struct block2mtd_dev *add_device(char *devname, int erase_size, const char *mtdname) +static struct block2mtd_dev *add_device(char *devname, int erase_size, const char *mtdname, int timeout) { @@ -21,11 +21,13 @@ struct block2mtd_dev *dev; struct mtd_partition *part; char *name; ++#ifndef MODULE + int i; ++#endif if (!devname) return NULL; -@@ -228,15 +230,20 @@ static struct block2mtd_dev *add_device( +@@ -227,15 +231,20 @@ static struct block2mtd_dev *add_device( /* Get a handle on the device */ bdev = blkdev_get_by_path(devname, mode, dev); @@ -52,7 +54,7 @@ } #endif -@@ -355,11 +362,12 @@ static char block2mtd_paramline[80 + 12] +@@ -361,11 +370,12 @@ static char block2mtd_paramline[80 + 12] static int block2mtd_setup2(const char *val) { @@ -67,7 +69,7 @@ int i, ret; if (strnlen(val, sizeof(buf)) >= sizeof(buf)) { -@@ -370,7 +378,7 @@ static int block2mtd_setup2(const char * +@@ -376,7 +386,7 @@ static int block2mtd_setup2(const char * strcpy(str, val); kill_final_newline(str); @@ -76,7 +78,7 @@ token[i] = strsep(&str, ","); if (str) { -@@ -399,7 +407,10 @@ static int block2mtd_setup2(const char * +@@ -405,7 +415,10 @@ static int block2mtd_setup2(const char * if (token[2] && (strlen(token[2]) + 1 > 80)) pr_err("mtd device name too long\n"); @@ -88,7 +90,7 @@ return 0; } -@@ -433,7 +444,7 @@ static int block2mtd_setup(const char *v +@@ -439,7 +452,7 @@ static int block2mtd_setup(const char *v module_param_call(block2mtd, block2mtd_setup, NULL, NULL, 0200); @@ -97,7 +99,7 @@ static int __init block2mtd_init(void) { -@@ -467,7 +478,7 @@ static void block2mtd_exit(void) +@@ -474,7 +487,7 @@ static void block2mtd_exit(void) } diff --git a/target/linux/generic/patches-3.18/550-ubifs-symlink-xattr-support.patch b/target/linux/generic/patches-3.18/550-ubifs-symlink-xattr-support.patch index 0235340aa8..d3f2ccca36 100644 --- a/target/linux/generic/patches-3.18/550-ubifs-symlink-xattr-support.patch +++ b/target/linux/generic/patches-3.18/550-ubifs-symlink-xattr-support.patch @@ -1,6 +1,6 @@ --- a/fs/ubifs/file.c +++ b/fs/ubifs/file.c -@@ -1576,6 +1576,10 @@ const struct inode_operations ubifs_syml +@@ -1573,6 +1573,10 @@ const struct inode_operations ubifs_syml .follow_link = ubifs_follow_link, .setattr = ubifs_setattr, .getattr = ubifs_getattr, @@ -13,37 +13,27 @@ const struct file_operations ubifs_file_operations = { --- a/fs/ubifs/journal.c +++ b/fs/ubifs/journal.c -@@ -553,7 +553,8 @@ int ubifs_jnl_update(struct ubifs_info * - - dbg_jnl("ino %lu, dent '%.*s', data len %d in dir ino %lu", - inode->i_ino, nm->len, nm->name, ui->data_len, dir->i_ino); -- ubifs_assert(dir_ui->data_len == 0); -+ if (!xent) -+ ubifs_assert(dir_ui->data_len == 0); - ubifs_assert(mutex_is_locked(&dir_ui->ui_mutex)); - - dlen = UBIFS_DENT_NODE_SZ + nm->len + 1; -@@ -573,6 +574,13 @@ int ubifs_jnl_update(struct ubifs_info * +@@ -572,6 +572,13 @@ int ubifs_jnl_update(struct ubifs_info * aligned_dlen = ALIGN(dlen, 8); aligned_ilen = ALIGN(ilen, 8); len = aligned_dlen + aligned_ilen + UBIFS_INO_NODE_SZ; + if (xent) { + /* -+ * Make sure to account for dir_ui->data_len in ++ * Make sure to account for host_ui->data_len in + * length calculation in case there is extended attribute. + */ -+ len += dir_ui->data_len; ++ len += host_ui->data_len; + } dent = kmalloc(len, GFP_NOFS); if (!dent) return -ENOMEM; -@@ -649,7 +657,8 @@ int ubifs_jnl_update(struct ubifs_info * +@@ -648,7 +655,8 @@ int ubifs_jnl_update(struct ubifs_info * ino_key_init(c, &ino_key, dir->i_ino); ino_offs += aligned_ilen; - err = ubifs_tnc_add(c, &ino_key, lnum, ino_offs, UBIFS_INO_NODE_SZ); + err = ubifs_tnc_add(c, &ino_key, lnum, ino_offs, -+ UBIFS_INO_NODE_SZ + dir_ui->data_len); ++ UBIFS_INO_NODE_SZ + host_ui->data_len); if (err) goto out_ro; diff --git a/target/linux/generic/patches-3.18/552-ubifs-respect-silent-mount-flag.patch b/target/linux/generic/patches-3.18/552-ubifs-respect-silent-mount-flag.patch deleted file mode 100644 index 2e43d251dc..0000000000 --- a/target/linux/generic/patches-3.18/552-ubifs-respect-silent-mount-flag.patch +++ /dev/null @@ -1,122 +0,0 @@ -From 90bea5a3f0bf680b87b90516f3c231997f4b8f3b Mon Sep 17 00:00:00 2001 -From: Daniel Golle <daniel@makrotopia.org> -Date: Mon, 2 Jun 2014 15:51:10 +0200 -X-Git-Url: http://git.infradead.org/linux-ubifs.git/commitdiff_plain/90bea5a3f0bf680b87b90516f3c231997f4b8f3b -X-Git-Url: https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/commit/?id=90bea5a3f0bf680b87b90516f3c231997f4b8f3b -Subject: UBIFS: respect MS_SILENT mount flag - -When attempting to mount a non-ubifs formatted volume, lots of error -messages (including a stack dump) are thrown to the kernel log even if -the MS_SILENT mount flag is set. -Fix this by introducing adding an additional state-variable in -struct ubifs_info and suppress error messages in ubifs_read_node if -MS_SILENT is set. - -Signed-off-by: Daniel Golle <daniel@makrotopia.org> -Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> ---- - fs/ubifs/io.c | 18 ++++++++++-------- - fs/ubifs/super.c | 5 +++++ - fs/ubifs/ubifs.h | 11 +++++++++++ - 3 files changed, 26 insertions(+), 8 deletions(-) - ---- - ---- a/fs/ubifs/io.c -+++ b/fs/ubifs/io.c -@@ -988,30 +988,32 @@ int ubifs_read_node(const struct ubifs_i - return err; - - if (type != ch->node_type) { -- ubifs_err("bad node type (%d but expected %d)", -- ch->node_type, type); -+ ubifs_errc(c, "bad node type (%d but expected %d)", -+ ch->node_type, type); - goto out; - } - - err = ubifs_check_node(c, buf, lnum, offs, 0, 0); - if (err) { -- ubifs_err("expected node type %d", type); -+ ubifs_errc(c, "expected node type %d", type); - return err; - } - - l = le32_to_cpu(ch->len); - if (l != len) { -- ubifs_err("bad node length %d, expected %d", l, len); -+ ubifs_errc(c, "bad node length %d, expected %d", l, len); - goto out; - } - - return 0; - - out: -- ubifs_err("bad node at LEB %d:%d, LEB mapping status %d", lnum, offs, -- ubi_is_mapped(c->ubi, lnum)); -- ubifs_dump_node(c, buf); -- dump_stack(); -+ ubifs_errc(c, "bad node at LEB %d:%d, LEB mapping status %d", lnum, -+ offs, ubi_is_mapped(c->ubi, lnum)); -+ if (!c->probing) { -+ ubifs_dump_node(c, buf); -+ dump_stack(); -+ } - return -EINVAL; - } - ---- a/fs/ubifs/super.c -+++ b/fs/ubifs/super.c -@@ -1149,6 +1149,9 @@ static int mount_ubifs(struct ubifs_info - size_t sz; - - c->ro_mount = !!(c->vfs_sb->s_flags & MS_RDONLY); -+ /* Suppress error messages while probing if MS_SILENT is set */ -+ c->probing = !!(c->vfs_sb->s_flags & MS_SILENT); -+ - err = init_constants_early(c); - if (err) - return err; -@@ -1214,6 +1217,8 @@ static int mount_ubifs(struct ubifs_info - if (err) - goto out_free; - -+ c->probing = 0; -+ - /* - * Make sure the compressor which is set as default in the superblock - * or overridden by mount options is actually compiled in. ---- a/fs/ubifs/ubifs.h -+++ b/fs/ubifs/ubifs.h -@@ -51,6 +51,15 @@ - #define ubifs_warn(fmt, ...) \ - pr_warn("UBIFS warning (pid %d): %s: " fmt "\n", \ - current->pid, __func__, ##__VA_ARGS__) -+/* -+ * A variant of 'ubifs_err()' which takes the UBIFS file-sytem description -+ * object as an argument. -+ */ -+#define ubifs_errc(c, fmt, ...) \ -+ do { \ -+ if (!(c)->probing) \ -+ ubifs_err(fmt, ##__VA_ARGS__); \ -+ } while (0) - - /* UBIFS file system VFS magic number */ - #define UBIFS_SUPER_MAGIC 0x24051905 -@@ -1209,6 +1218,7 @@ struct ubifs_debug_info; - * @need_recovery: %1 if the file-system needs recovery - * @replaying: %1 during journal replay - * @mounting: %1 while mounting -+ * @probing: %1 while attempting to mount if MS_SILENT mount flag is set - * @remounting_rw: %1 while re-mounting from R/O mode to R/W mode - * @replay_list: temporary list used during journal replay - * @replay_buds: list of buds to replay -@@ -1441,6 +1451,7 @@ struct ubifs_info { - unsigned int replaying:1; - unsigned int mounting:1; - unsigned int remounting_rw:1; -+ unsigned int probing:1; - struct list_head replay_list; - struct list_head replay_buds; - unsigned long long cs_sqnum; diff --git a/target/linux/generic/patches-3.18/621-sched_act_connmark.patch b/target/linux/generic/patches-3.18/621-sched_act_connmark.patch index d8ca6666b8..945974981a 100644 --- a/target/linux/generic/patches-3.18/621-sched_act_connmark.patch +++ b/target/linux/generic/patches-3.18/621-sched_act_connmark.patch @@ -1,6 +1,6 @@ --- /dev/null +++ b/net/sched/act_connmark.c -@@ -0,0 +1,144 @@ +@@ -0,0 +1,126 @@ +/* + * Copyright (c) 2011 Felix Fietkau <nbd@openwrt.org> + * @@ -37,8 +37,6 @@ + +#define CONNMARK_TAB_MASK 3 + -+static struct tcf_hashinfo connmark_hash_info; -+ +static int tcf_connmark(struct sk_buff *skb, const struct tc_action *a, + struct tcf_result *res) +{ @@ -78,20 +76,18 @@ + struct nlattr *est, struct tc_action *a, + int ovr, int bind) +{ -+ struct tcf_common *pc; + int ret = 0; + -+ pc = tcf_hash_check(0, a, bind); -+ if (!pc) { -+ pc = tcf_hash_create(0, est, a, sizeof(*pc), bind); -+ if (IS_ERR(pc)) -+ return PTR_ERR(pc); ++ if (!tcf_hash_check(0, a, bind)) { ++ ret = tcf_hash_create(0, est, a, sizeof(struct tcf_common), bind); ++ if (ret) ++ return ret; + -+ tcf_hash_insert(pc, &connmark_hash_info); ++ tcf_hash_insert(a); + ret = ACT_P_CREATED; + } else { + if (!ovr) { -+ tcf_hash_release(pc, bind, &connmark_hash_info); ++ tcf_hash_release(a, bind); + return -EEXIST; + } + } @@ -99,13 +95,6 @@ + return ret; +} + -+static inline int tcf_connmark_cleanup(struct tc_action *a, int bind) -+{ -+ if (a->priv) -+ return tcf_hash_release(a->priv, bind, &connmark_hash_info); -+ return 0; -+} -+ +static inline int tcf_connmark_dump(struct sk_buff *skb, struct tc_action *a, + int bind, int ref) +{ @@ -114,12 +103,10 @@ + +static struct tc_action_ops act_connmark_ops = { + .kind = "connmark", -+ .hinfo = &connmark_hash_info, + .type = TCA_ACT_CONNMARK, + .owner = THIS_MODULE, + .act = tcf_connmark, + .dump = tcf_connmark_dump, -+ .cleanup = tcf_connmark_cleanup, + .init = tcf_connmark_init, +}; + @@ -129,13 +116,8 @@ + +static int __init connmark_init_module(void) +{ -+ int ret; -+ -+ ret = tcf_hashinfo_init(&connmark_hash_info, CONNMARK_TAB_MASK); -+ if (ret) -+ return ret; + -+ return tcf_register_action(&act_connmark_ops); ++ return tcf_register_action(&act_connmark_ops, CONNMARK_TAB_MASK); +} + +static void __exit connmark_cleanup_module(void) diff --git a/target/linux/generic/patches-3.18/642-bridge_port_isolate.patch b/target/linux/generic/patches-3.18/642-bridge_port_isolate.patch index f387435867..a927827e79 100644 --- a/target/linux/generic/patches-3.18/642-bridge_port_isolate.patch +++ b/target/linux/generic/patches-3.18/642-bridge_port_isolate.patch @@ -1,16 +1,16 @@ --- a/net/bridge/br_private.h +++ b/net/bridge/br_private.h -@@ -174,6 +174,7 @@ struct net_bridge_port - #define BR_ADMIN_COST 0x00000010 - #define BR_LEARNING 0x00000020 +@@ -172,6 +172,7 @@ struct net_bridge_port #define BR_FLOOD 0x00000040 -+#define BR_ISOLATE_MODE 0x00000080 + #define BR_AUTO_MASK (BR_FLOOD | BR_LEARNING) + #define BR_PROMISC 0x00000080 ++#define BR_ISOLATE_MODE 0x00000100 #ifdef CONFIG_BRIDGE_IGMP_SNOOPING - struct bridge_mcast_query ip4_query; + struct bridge_mcast_own_query ip4_own_query; --- a/net/bridge/br_sysfs_if.c +++ b/net/bridge/br_sysfs_if.c -@@ -161,6 +161,22 @@ BRPORT_ATTR_FLAG(root_block, BR_ROOT_BLO +@@ -171,6 +171,22 @@ BRPORT_ATTR_FLAG(root_block, BR_ROOT_BLO BRPORT_ATTR_FLAG(learning, BR_LEARNING); BRPORT_ATTR_FLAG(unicast_flood, BR_FLOOD); @@ -33,7 +33,7 @@ #ifdef CONFIG_BRIDGE_IGMP_SNOOPING static ssize_t show_multicast_router(struct net_bridge_port *p, char *buf) { -@@ -203,6 +219,7 @@ static const struct brport_attribute *br +@@ -213,6 +229,7 @@ static const struct brport_attribute *br &brport_attr_multicast_router, &brport_attr_multicast_fast_leave, #endif @@ -56,7 +56,7 @@ skb = NULL; --- a/net/bridge/br_forward.c +++ b/net/bridge/br_forward.c -@@ -119,7 +119,7 @@ void br_deliver(const struct net_bridge_ +@@ -116,7 +116,7 @@ void br_deliver(const struct net_bridge_ /* called with rcu_read_lock */ void br_forward(const struct net_bridge_port *to, struct sk_buff *skb, struct sk_buff *skb0) { @@ -65,7 +65,7 @@ if (skb0) deliver_clone(to, skb, __br_forward); else -@@ -175,7 +175,7 @@ static void br_flood(struct net_bridge * +@@ -172,7 +172,7 @@ static void br_flood(struct net_bridge * struct sk_buff *skb0, void (*__packet_hook)(const struct net_bridge_port *p, struct sk_buff *skb), @@ -74,7 +74,7 @@ { struct net_bridge_port *p; struct net_bridge_port *prev; -@@ -183,6 +183,8 @@ static void br_flood(struct net_bridge * +@@ -180,6 +180,8 @@ static void br_flood(struct net_bridge * prev = NULL; list_for_each_entry_rcu(p, &br->port_list, list) { @@ -83,7 +83,7 @@ /* Do not flood unicast traffic to ports that turn it off */ if (unicast && !(p->flags & BR_FLOOD)) continue; -@@ -209,14 +211,14 @@ out: +@@ -206,14 +208,14 @@ out: /* called with rcu_read_lock */ void br_flood_deliver(struct net_bridge *br, struct sk_buff *skb, bool unicast) { diff --git a/target/linux/generic/patches-3.18/644-bridge_optimize_netfilter_hooks.patch b/target/linux/generic/patches-3.18/644-bridge_optimize_netfilter_hooks.patch index 9b223fba97..bbfcaa402d 100644 --- a/target/linux/generic/patches-3.18/644-bridge_optimize_netfilter_hooks.patch +++ b/target/linux/generic/patches-3.18/644-bridge_optimize_netfilter_hooks.patch @@ -1,6 +1,6 @@ --- a/net/bridge/br_forward.c +++ b/net/bridge/br_forward.c -@@ -57,7 +57,7 @@ int br_dev_queue_push_xmit(struct sk_buf +@@ -53,7 +53,7 @@ EXPORT_SYMBOL_GPL(br_dev_queue_push_xmit int br_forward_finish(struct sk_buff *skb) { @@ -9,7 +9,7 @@ br_dev_queue_push_xmit); } -@@ -80,7 +80,7 @@ static void __br_deliver(const struct ne +@@ -77,7 +77,7 @@ static void __br_deliver(const struct ne return; } @@ -18,7 +18,7 @@ br_forward_finish); } -@@ -101,7 +101,7 @@ static void __br_forward(const struct ne +@@ -98,7 +98,7 @@ static void __br_forward(const struct ne skb->dev = to->dev; skb_forward_csum(skb); @@ -38,7 +38,7 @@ netif_receive_skb); } -@@ -214,7 +214,7 @@ rx_handler_result_t br_handle_frame(stru +@@ -219,7 +219,7 @@ rx_handler_result_t br_handle_frame(stru } /* Deliver packet to local host only */ @@ -47,7 +47,7 @@ NULL, br_handle_local_finish)) { return RX_HANDLER_CONSUMED; /* consumed by filter */ } else { -@@ -229,7 +229,7 @@ forward: +@@ -234,7 +234,7 @@ forward: if (ether_addr_equal(p->br->dev->dev_addr, dest)) skb->pkt_type = PACKET_HOST; @@ -56,7 +56,7 @@ br_handle_local_finish)) break; -@@ -251,7 +251,7 @@ forward: +@@ -256,7 +256,7 @@ forward: if (ether_addr_equal(p->br->dev->dev_addr, dest)) skb->pkt_type = PACKET_HOST; @@ -67,15 +67,15 @@ default: --- a/net/bridge/br_multicast.c +++ b/net/bridge/br_multicast.c -@@ -802,7 +802,7 @@ static void __br_multicast_send_query(st +@@ -815,7 +815,7 @@ static void __br_multicast_send_query(st if (port) { __skb_push(skb, sizeof(struct ethhdr)); skb->dev = port->dev; - NF_HOOK(NFPROTO_BRIDGE, NF_BR_LOCAL_OUT, skb, NULL, skb->dev, + BR_HOOK(NFPROTO_BRIDGE, NF_BR_LOCAL_OUT, skb, NULL, skb->dev, dev_queue_xmit); - } else - netif_rx(skb); + } else { + br_multicast_select_own_querier(br, ip, skb); --- a/net/bridge/br_netfilter.c +++ b/net/bridge/br_netfilter.c @@ -73,6 +73,15 @@ static int brnf_pass_vlan_indev __read_m @@ -96,18 +96,18 @@ if (vlan_tx_tag_present(skb)) --- a/net/bridge/br_private.h +++ b/net/bridge/br_private.h -@@ -724,15 +724,29 @@ static inline u16 br_get_pvid(const stru +@@ -769,15 +769,29 @@ static inline int br_vlan_enabled(struct /* br_netfilter.c */ - #ifdef CONFIG_BRIDGE_NETFILTER + #if IS_ENABLED(CONFIG_BRIDGE_NETFILTER) +extern int brnf_call_ebtables; - int br_netfilter_init(void); - void br_netfilter_fini(void); + int br_nf_core_init(void); + void br_nf_core_fini(void); void br_netfilter_rtable_init(struct net_bridge *); +bool br_netfilter_run_hooks(void); #else - #define br_netfilter_init() (0) - #define br_netfilter_fini() do { } while (0) + static inline int br_nf_core_init(void) { return 0; } + static inline void br_nf_core_fini(void) {} #define br_netfilter_rtable_init(x) +#define br_netfilter_run_hooks() false #endif @@ -125,7 +125,7 @@ + /* br_stp.c */ void br_log_state(const struct net_bridge_port *p); - struct net_bridge_port *br_get_port(struct net_bridge *br, u16 port_no); + void br_set_state(struct net_bridge_port *p, unsigned int state); --- a/net/bridge/br_stp_bpdu.c +++ b/net/bridge/br_stp_bpdu.c @@ -54,7 +54,7 @@ static void br_send_bpdu(struct net_brid @@ -139,7 +139,7 @@ --- a/net/bridge/netfilter/ebtables.c +++ b/net/bridge/netfilter/ebtables.c -@@ -2405,11 +2405,13 @@ static int __init ebtables_init(void) +@@ -2414,11 +2414,13 @@ static int __init ebtables_init(void) } printk(KERN_INFO "Ebtables v2.0 registered\n"); diff --git a/target/linux/generic/patches-3.18/645-bridge_multicast_to_unicast.patch b/target/linux/generic/patches-3.18/645-bridge_multicast_to_unicast.patch index a9612f0559..97a7f7f8de 100644 --- a/target/linux/generic/patches-3.18/645-bridge_multicast_to_unicast.patch +++ b/target/linux/generic/patches-3.18/645-bridge_multicast_to_unicast.patch @@ -1,6 +1,6 @@ --- a/net/bridge/br_multicast.c +++ b/net/bridge/br_multicast.c -@@ -634,7 +634,8 @@ struct net_bridge_port_group *br_multica +@@ -635,7 +635,8 @@ struct net_bridge_port_group *br_multica struct net_bridge_port *port, struct br_ip *group, struct net_bridge_port_group __rcu *next, @@ -10,7 +10,7 @@ { struct net_bridge_port_group *p; -@@ -649,12 +650,33 @@ struct net_bridge_port_group *br_multica +@@ -650,12 +651,33 @@ struct net_bridge_port_group *br_multica hlist_add_head(&p->mglist, &port->mglist); setup_timer(&p->timer, br_multicast_port_group_expired, (unsigned long)p); @@ -45,7 +45,7 @@ { struct net_bridge_mdb_entry *mp; struct net_bridge_port_group *p; -@@ -681,13 +703,13 @@ static int br_multicast_add_group(struct +@@ -682,13 +704,13 @@ static int br_multicast_add_group(struct for (pp = &mp->ports; (p = mlock_dereference(*pp, br)) != NULL; pp = &p->next) { @@ -61,7 +61,7 @@ if (unlikely(!p)) goto err; rcu_assign_pointer(*pp, p); -@@ -706,7 +728,7 @@ err: +@@ -707,7 +729,7 @@ err: static int br_ip4_multicast_add_group(struct net_bridge *br, struct net_bridge_port *port, __be32 group, @@ -70,7 +70,7 @@ { struct br_ip br_group; -@@ -717,14 +739,14 @@ static int br_ip4_multicast_add_group(st +@@ -718,14 +740,14 @@ static int br_ip4_multicast_add_group(st br_group.proto = htons(ETH_P_IP); br_group.vid = vid; @@ -87,7 +87,7 @@ { struct br_ip br_group; -@@ -735,7 +757,7 @@ static int br_ip6_multicast_add_group(st +@@ -736,7 +758,7 @@ static int br_ip6_multicast_add_group(st br_group.proto = htons(ETH_P_IPV6); br_group.vid = vid; @@ -96,7 +96,7 @@ } #endif -@@ -950,6 +972,7 @@ static int br_ip4_multicast_igmp3_report +@@ -966,6 +988,7 @@ static int br_ip4_multicast_igmp3_report struct sk_buff *skb, u16 vid) { @@ -104,7 +104,7 @@ struct igmpv3_report *ih; struct igmpv3_grec *grec; int i; -@@ -993,7 +1016,7 @@ static int br_ip4_multicast_igmp3_report +@@ -1009,7 +1032,7 @@ static int br_ip4_multicast_igmp3_report continue; } @@ -113,7 +113,7 @@ if (err) break; } -@@ -1007,6 +1030,7 @@ static int br_ip6_multicast_mld2_report( +@@ -1023,6 +1046,7 @@ static int br_ip6_multicast_mld2_report( struct sk_buff *skb, u16 vid) { @@ -121,7 +121,7 @@ struct icmp6hdr *icmp6h; struct mld2_grec *grec; int i; -@@ -1055,7 +1079,7 @@ static int br_ip6_multicast_mld2_report( +@@ -1071,7 +1095,7 @@ static int br_ip6_multicast_mld2_report( } err = br_ip6_multicast_add_group(br, port, &grec->grec_mca, @@ -130,17 +130,17 @@ if (!err) break; } -@@ -1319,7 +1343,8 @@ static void br_multicast_leave_group(str - struct net_bridge_port *port, - struct br_ip *group, - struct bridge_mcast_querier *querier, -- struct bridge_mcast_query *query) -+ struct bridge_mcast_query *query, -+ const unsigned char *src) +@@ -1408,7 +1432,8 @@ br_multicast_leave_group(struct net_brid + struct net_bridge_port *port, + struct br_ip *group, + struct bridge_mcast_other_query *other_query, +- struct bridge_mcast_own_query *own_query) ++ struct bridge_mcast_own_query *own_query, ++ const unsigned char *src) { struct net_bridge_mdb_htable *mdb; struct net_bridge_mdb_entry *mp; -@@ -1369,7 +1394,7 @@ static void br_multicast_leave_group(str +@@ -1458,7 +1483,7 @@ br_multicast_leave_group(struct net_brid for (pp = &mp->ports; (p = mlock_dereference(*pp, br)) != NULL; pp = &p->next) { @@ -149,7 +149,7 @@ continue; rcu_assign_pointer(*pp, p->next); -@@ -1403,7 +1428,7 @@ static void br_multicast_leave_group(str +@@ -1492,7 +1517,7 @@ br_multicast_leave_group(struct net_brid for (p = mlock_dereference(mp->ports, br); p != NULL; p = mlock_dereference(p->next, br)) { @@ -158,7 +158,7 @@ continue; if (!hlist_unhashed(&p->mglist) && -@@ -1421,8 +1446,8 @@ out: +@@ -1510,8 +1535,8 @@ out: static void br_ip4_multicast_leave_group(struct net_bridge *br, struct net_bridge_port *port, @@ -168,14 +168,13 @@ + const unsigned char *src) { struct br_ip br_group; - struct bridge_mcast_query *query = port ? &port->ip4_query : -@@ -1435,14 +1460,15 @@ static void br_ip4_multicast_leave_group - br_group.proto = htons(ETH_P_IP); + struct bridge_mcast_own_query *own_query; +@@ -1526,14 +1551,14 @@ static void br_ip4_multicast_leave_group br_group.vid = vid; -- br_multicast_leave_group(br, port, &br_group, &br->ip4_querier, query); -+ br_multicast_leave_group(br, port, &br_group, &br->ip4_querier, query, -+ src); + br_multicast_leave_group(br, port, &br_group, &br->ip4_other_query, +- own_query); ++ own_query, src); } #if IS_ENABLED(CONFIG_IPV6) @@ -186,18 +185,17 @@ + __u16 vid, const unsigned char *src) { struct br_ip br_group; - struct bridge_mcast_query *query = port ? &port->ip6_query : -@@ -1456,7 +1482,8 @@ static void br_ip6_multicast_leave_group - br_group.proto = htons(ETH_P_IPV6); + struct bridge_mcast_own_query *own_query; +@@ -1548,7 +1573,7 @@ static void br_ip6_multicast_leave_group br_group.vid = vid; -- br_multicast_leave_group(br, port, &br_group, &br->ip6_querier, query); -+ br_multicast_leave_group(br, port, &br_group, &br->ip6_querier, query, -+ src); + br_multicast_leave_group(br, port, &br_group, &br->ip6_other_query, +- own_query); ++ own_query, src); } #endif -@@ -1465,6 +1492,7 @@ static int br_multicast_ipv4_rcv(struct +@@ -1557,6 +1582,7 @@ static int br_multicast_ipv4_rcv(struct struct sk_buff *skb, u16 vid) { @@ -205,7 +203,7 @@ struct sk_buff *skb2 = skb; const struct iphdr *iph; struct igmphdr *ih; -@@ -1538,7 +1566,7 @@ static int br_multicast_ipv4_rcv(struct +@@ -1630,7 +1656,7 @@ static int br_multicast_ipv4_rcv(struct case IGMP_HOST_MEMBERSHIP_REPORT: case IGMPV2_HOST_MEMBERSHIP_REPORT: BR_INPUT_SKB_CB(skb)->mrouters_only = 1; @@ -214,7 +212,7 @@ break; case IGMPV3_HOST_MEMBERSHIP_REPORT: err = br_ip4_multicast_igmp3_report(br, port, skb2, vid); -@@ -1547,7 +1575,7 @@ static int br_multicast_ipv4_rcv(struct +@@ -1639,7 +1665,7 @@ static int br_multicast_ipv4_rcv(struct err = br_ip4_multicast_query(br, port, skb2, vid); break; case IGMP_HOST_LEAVE_MESSAGE: @@ -223,7 +221,7 @@ break; } -@@ -1565,6 +1593,7 @@ static int br_multicast_ipv6_rcv(struct +@@ -1657,6 +1683,7 @@ static int br_multicast_ipv6_rcv(struct struct sk_buff *skb, u16 vid) { @@ -231,7 +229,7 @@ struct sk_buff *skb2; const struct ipv6hdr *ip6h; u8 icmp6_type; -@@ -1674,7 +1703,8 @@ static int br_multicast_ipv6_rcv(struct +@@ -1766,7 +1793,8 @@ static int br_multicast_ipv6_rcv(struct } mld = (struct mld_msg *)skb_transport_header(skb2); BR_INPUT_SKB_CB(skb)->mrouters_only = 1; @@ -241,7 +239,7 @@ break; } case ICMPV6_MLD2_REPORT: -@@ -1691,7 +1721,7 @@ static int br_multicast_ipv6_rcv(struct +@@ -1783,7 +1811,7 @@ static int br_multicast_ipv6_rcv(struct goto out; } mld = (struct mld_msg *)skb_transport_header(skb2); @@ -252,7 +250,7 @@ --- a/net/bridge/br_private.h +++ b/net/bridge/br_private.h -@@ -116,6 +116,9 @@ struct net_bridge_port_group { +@@ -112,6 +112,9 @@ struct net_bridge_port_group { struct timer_list timer; struct br_ip addr; unsigned char state; @@ -262,15 +260,15 @@ }; struct net_bridge_mdb_entry -@@ -175,6 +178,7 @@ struct net_bridge_port - #define BR_LEARNING 0x00000020 - #define BR_FLOOD 0x00000040 - #define BR_ISOLATE_MODE 0x00000080 -+#define BR_MULTICAST_TO_UCAST 0x00000100 +@@ -173,6 +176,7 @@ struct net_bridge_port + #define BR_AUTO_MASK (BR_FLOOD | BR_LEARNING) + #define BR_PROMISC 0x00000080 + #define BR_ISOLATE_MODE 0x00000100 ++#define BR_MULTICAST_TO_UCAST 0x00000200 #ifdef CONFIG_BRIDGE_IGMP_SNOOPING - struct bridge_mcast_query ip4_query; -@@ -468,7 +472,8 @@ void br_multicast_free_pg(struct rcu_hea + struct bridge_mcast_own_query ip4_own_query; +@@ -485,7 +489,8 @@ void br_multicast_free_pg(struct rcu_hea struct net_bridge_port_group * br_multicast_new_port_group(struct net_bridge_port *port, struct br_ip *group, struct net_bridge_port_group __rcu *next, @@ -293,7 +291,7 @@ rcu_assign_pointer(*pp, p); --- a/net/bridge/br_forward.c +++ b/net/bridge/br_forward.c -@@ -170,6 +170,29 @@ out: +@@ -167,6 +167,29 @@ out: return p; } @@ -323,7 +321,7 @@ /* called under bridge lock */ static void br_flood(struct net_bridge *br, struct sk_buff *skb, struct sk_buff *skb0, -@@ -234,6 +257,7 @@ static void br_multicast_flood(struct ne +@@ -231,6 +254,7 @@ static void br_multicast_flood(struct ne struct net_bridge_port *prev = NULL; struct net_bridge_port_group *p; struct hlist_node *rp; @@ -331,7 +329,7 @@ rp = rcu_dereference(hlist_first_rcu(&br->router_list)); p = mdst ? rcu_dereference(mdst->ports) : NULL; -@@ -244,10 +268,19 @@ static void br_multicast_flood(struct ne +@@ -241,10 +265,19 @@ static void br_multicast_flood(struct ne rport = rp ? hlist_entry(rp, struct net_bridge_port, rlist) : NULL; @@ -357,7 +355,7 @@ --- a/net/bridge/br_sysfs_if.c +++ b/net/bridge/br_sysfs_if.c -@@ -192,6 +192,7 @@ static BRPORT_ATTR(multicast_router, S_I +@@ -202,6 +202,7 @@ static BRPORT_ATTR(multicast_router, S_I store_multicast_router); BRPORT_ATTR_FLAG(multicast_fast_leave, BR_MULTICAST_FAST_LEAVE); @@ -365,7 +363,7 @@ #endif static const struct brport_attribute *brport_attrs[] = { -@@ -218,6 +219,7 @@ static const struct brport_attribute *br +@@ -228,6 +229,7 @@ static const struct brport_attribute *br #ifdef CONFIG_BRIDGE_IGMP_SNOOPING &brport_attr_multicast_router, &brport_attr_multicast_fast_leave, diff --git a/target/linux/generic/patches-3.18/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch b/target/linux/generic/patches-3.18/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch index 70e96cec3e..7e4e1e16cb 100644 --- a/target/linux/generic/patches-3.18/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch +++ b/target/linux/generic/patches-3.18/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch @@ -43,6 +43,32 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org> __be16 i_flags; __be16 o_flags; +--- a/include/uapi/linux/if_tunnel.h ++++ b/include/uapi/linux/if_tunnel.h +@@ -57,10 +57,23 @@ enum { + IFLA_IPTUN_ENCAP_FLAGS, + IFLA_IPTUN_ENCAP_SPORT, + IFLA_IPTUN_ENCAP_DPORT, ++ IFLA_IPTUN_FMRS, + __IFLA_IPTUN_MAX, + }; + #define IFLA_IPTUN_MAX (__IFLA_IPTUN_MAX - 1) + ++enum { ++ IFLA_IPTUN_FMR_UNSPEC, ++ IFLA_IPTUN_FMR_IP6_PREFIX, ++ IFLA_IPTUN_FMR_IP4_PREFIX, ++ IFLA_IPTUN_FMR_IP6_PREFIX_LEN, ++ IFLA_IPTUN_FMR_IP4_PREFIX_LEN, ++ IFLA_IPTUN_FMR_EA_LEN, ++ IFLA_IPTUN_FMR_OFFSET, ++ __IFLA_IPTUN_FMR_MAX, ++}; ++#define IFLA_IPTUN_FMR_MAX (__IFLA_IPTUN_FMR_MAX - 1) ++ + enum tunnel_encap_types { + TUNNEL_ENCAP_NONE, + TUNNEL_ENCAP_FOU, --- a/net/ipv6/ip6_tunnel.c +++ b/net/ipv6/ip6_tunnel.c @@ -16,6 +16,8 @@ diff --git a/target/linux/generic/patches-3.18/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch b/target/linux/generic/patches-3.18/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch index 2cc90eab0d..d76375efa6 100644 --- a/target/linux/generic/patches-3.18/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch +++ b/target/linux/generic/patches-3.18/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch @@ -112,7 +112,16 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org> return -EINVAL; --- a/net/ipv6/route.c +++ b/net/ipv6/route.c -@@ -283,6 +283,21 @@ static const struct rt6_info ip6_prohibi +@@ -87,6 +87,8 @@ static int ip6_pkt_discard(struct sk_bu + static int ip6_pkt_discard_out(struct sock *sk, struct sk_buff *skb); + static int ip6_pkt_prohibit(struct sk_buff *skb); + static int ip6_pkt_prohibit_out(struct sock *sk, struct sk_buff *skb); ++static int ip6_pkt_policy_failed(struct sk_buff *skb); ++static int ip6_pkt_policy_failed_out(struct sock *sk, struct sk_buff *skb); + static void ip6_link_failure(struct sk_buff *skb); + static void ip6_rt_update_pmtu(struct dst_entry *dst, struct sock *sk, + struct sk_buff *skb, u32 mtu); +@@ -283,6 +285,21 @@ static const struct rt6_info ip6_prohibi .rt6i_ref = ATOMIC_INIT(1), }; @@ -134,7 +143,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org> static const struct rt6_info ip6_blk_hole_entry_template = { .dst = { .__refcnt = ATOMIC_INIT(1), -@@ -1581,6 +1596,11 @@ int ip6_route_add(struct fib6_config *cf +@@ -1581,6 +1598,11 @@ int ip6_route_add(struct fib6_config *cf rt->dst.output = ip6_pkt_prohibit_out; rt->dst.input = ip6_pkt_prohibit; break; @@ -146,7 +155,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org> case RTN_THROW: default: rt->dst.error = (cfg->fc_type == RTN_THROW) ? -EAGAIN -@@ -2142,6 +2162,17 @@ static int ip6_pkt_prohibit_out(struct s +@@ -2142,6 +2164,17 @@ static int ip6_pkt_prohibit_out(struct s return ip6_pkt_drop(skb, ICMPV6_ADM_PROHIBITED, IPSTATS_MIB_OUTNOROUTES); } @@ -155,7 +164,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org> + return ip6_pkt_drop(skb, ICMPV6_POLICY_FAIL, IPSTATS_MIB_INNOROUTES); +} + -+static int ip6_pkt_policy_failed_out(struct sk_buff *skb) ++static int ip6_pkt_policy_failed_out(struct sock *sk, struct sk_buff *skb) +{ + skb->dev = skb_dst(skb)->dev; + return ip6_pkt_drop(skb, ICMPV6_POLICY_FAIL, IPSTATS_MIB_OUTNOROUTES); @@ -164,7 +173,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org> /* * Allocate a dst for local (unicast / anycast) address. */ -@@ -2365,7 +2396,8 @@ static int rtm_to_fib6_config(struct sk_ +@@ -2365,7 +2398,8 @@ static int rtm_to_fib6_config(struct sk_ if (rtm->rtm_type == RTN_UNREACHABLE || rtm->rtm_type == RTN_BLACKHOLE || rtm->rtm_type == RTN_PROHIBIT || @@ -174,7 +183,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org> cfg->fc_flags |= RTF_REJECT; if (rtm->rtm_type == RTN_LOCAL) -@@ -2567,6 +2599,9 @@ static int rt6_fill_node(struct net *net +@@ -2567,6 +2601,9 @@ static int rt6_fill_node(struct net *net case -EACCES: rtm->rtm_type = RTN_PROHIBIT; break; @@ -184,7 +193,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org> case -EAGAIN: rtm->rtm_type = RTN_THROW; break; -@@ -2820,6 +2855,8 @@ static int ip6_route_dev_notify(struct n +@@ -2820,6 +2857,8 @@ static int ip6_route_dev_notify(struct n #ifdef CONFIG_IPV6_MULTIPLE_TABLES net->ipv6.ip6_prohibit_entry->dst.dev = dev; net->ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(dev); @@ -193,7 +202,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org> net->ipv6.ip6_blk_hole_entry->dst.dev = dev; net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev); #endif -@@ -3036,6 +3073,17 @@ static int __net_init ip6_route_net_init +@@ -3036,6 +3075,17 @@ static int __net_init ip6_route_net_init net->ipv6.ip6_blk_hole_entry->dst.ops = &net->ipv6.ip6_dst_ops; dst_init_metrics(&net->ipv6.ip6_blk_hole_entry->dst, ip6_template_metrics, true); @@ -211,7 +220,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org> #endif net->ipv6.sysctl.flush_delay = 0; -@@ -3054,6 +3102,8 @@ out: +@@ -3054,6 +3104,8 @@ out: return ret; #ifdef CONFIG_IPV6_MULTIPLE_TABLES @@ -220,7 +229,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org> out_ip6_prohibit_entry: kfree(net->ipv6.ip6_prohibit_entry); out_ip6_null_entry: -@@ -3071,6 +3121,7 @@ static void __net_exit ip6_route_net_exi +@@ -3071,6 +3123,7 @@ static void __net_exit ip6_route_net_exi #ifdef CONFIG_IPV6_MULTIPLE_TABLES kfree(net->ipv6.ip6_prohibit_entry); kfree(net->ipv6.ip6_blk_hole_entry); @@ -228,7 +237,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org> #endif dst_entries_destroy(&net->ipv6.ip6_dst_ops); } -@@ -3167,6 +3218,9 @@ int __init ip6_route_init(void) +@@ -3167,6 +3220,9 @@ int __init ip6_route_init(void) init_net.ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev); init_net.ipv6.ip6_blk_hole_entry->dst.dev = init_net.loopback_dev; init_net.ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev); diff --git a/target/linux/generic/patches-3.18/702-phy_add_aneg_done_function.patch b/target/linux/generic/patches-3.18/702-phy_add_aneg_done_function.patch index d634647ddb..42bddfee35 100644 --- a/target/linux/generic/patches-3.18/702-phy_add_aneg_done_function.patch +++ b/target/linux/generic/patches-3.18/702-phy_add_aneg_done_function.patch @@ -1,12 +1,6 @@ --- a/include/linux/phy.h +++ b/include/linux/phy.h -@@ -417,9 +417,18 @@ struct phy_driver { - */ - int (*config_aneg)(struct phy_device *phydev); - -+ /* Determine if autonegotiation is done */ -+ int (*aneg_done)(struct phy_device *phydev); -+ +@@ -484,6 +484,12 @@ struct phy_driver { /* Determines the negotiated speed and duplex */ int (*read_status)(struct phy_device *phydev); @@ -21,7 +15,7 @@ --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c -@@ -881,6 +881,9 @@ int genphy_update_link(struct phy_device +@@ -914,6 +914,9 @@ int genphy_update_link(struct phy_device { int status; @@ -31,19 +25,3 @@ /* Do a fake read */ status = phy_read(phydev, MII_BMSR); if (status < 0) ---- a/drivers/net/phy/phy.c -+++ b/drivers/net/phy/phy.c -@@ -99,7 +99,12 @@ static int phy_config_interrupt(struct p - */ - static inline int phy_aneg_done(struct phy_device *phydev) - { -- int retval = phy_read(phydev, MII_BMSR); -+ int retval; -+ -+ if (phydev->drv->aneg_done) -+ return phydev->drv->aneg_done(phydev); -+ -+ retval = phy_read(phydev, MII_BMSR); - - return (retval < 0) ? retval : (retval & BMSR_ANEGCOMPLETE); - } diff --git a/target/linux/generic/patches-3.18/703-phy-add-detach-callback-to-struct-phy_driver.patch b/target/linux/generic/patches-3.18/703-phy-add-detach-callback-to-struct-phy_driver.patch index f4750bd56e..061e40fb49 100644 --- a/target/linux/generic/patches-3.18/703-phy-add-detach-callback-to-struct-phy_driver.patch +++ b/target/linux/generic/patches-3.18/703-phy-add-detach-callback-to-struct-phy_driver.patch @@ -1,18 +1,18 @@ --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c -@@ -662,6 +662,9 @@ EXPORT_SYMBOL(phy_attach); - void phy_detach(struct phy_device *phydev) +@@ -674,6 +674,9 @@ void phy_detach(struct phy_device *phyde { int i; + + if (phydev->drv && phydev->drv->detach) + phydev->drv->detach(phydev); + - phydev->attached_dev->phydev = NULL; - phydev->attached_dev = NULL; - phy_suspend(phydev); + if (phydev->bus->dev.driver) + module_put(phydev->bus->dev.driver->owner); + --- a/include/linux/phy.h +++ b/include/linux/phy.h -@@ -441,6 +441,12 @@ struct phy_driver { +@@ -502,6 +502,12 @@ struct phy_driver { */ int (*did_interrupt)(struct phy_device *phydev); diff --git a/target/linux/generic/patches-3.18/710-phy-add-mdio_register_board_info.patch b/target/linux/generic/patches-3.18/710-phy-add-mdio_register_board_info.patch index 91ae12630a..cc3cb2445d 100644 --- a/target/linux/generic/patches-3.18/710-phy-add-mdio_register_board_info.patch +++ b/target/linux/generic/patches-3.18/710-phy-add-mdio_register_board_info.patch @@ -9,7 +9,7 @@ /** * mdiobus_alloc_size - allocate a mii_bus structure * @size: extra amount of memory to allocate for private storage. -@@ -224,15 +226,33 @@ void mdiobus_free(struct mii_bus *bus) +@@ -335,9 +337,21 @@ void mdiobus_free(struct mii_bus *bus) } EXPORT_SYMBOL(mdiobus_free); @@ -31,8 +31,9 @@ int err; phydev = get_phy_device(bus, addr, false); - if (IS_ERR(phydev) || phydev == NULL) - return phydev; +@@ -350,6 +364,12 @@ struct phy_device *mdiobus_scan(struct m + */ + of_mdiobus_link_phydev(bus, phydev); + mutex_lock(&__mdio_board_lock); + list_for_each_entry(be, &__mdio_board_list, list) @@ -45,7 +46,7 @@ phy_device_free(phydev); --- a/include/linux/phy.h +++ b/include/linux/phy.h -@@ -667,4 +667,22 @@ int __init mdio_bus_init(void); +@@ -785,4 +785,22 @@ int __init mdio_bus_init(void); void mdio_bus_exit(void); extern struct bus_type mdio_bus_type; diff --git a/target/linux/generic/patches-3.18/720-phy_adm6996.patch b/target/linux/generic/patches-3.18/720-phy_adm6996.patch index e0bdab78da..b0b8db4e5d 100644 --- a/target/linux/generic/patches-3.18/720-phy_adm6996.patch +++ b/target/linux/generic/patches-3.18/720-phy_adm6996.patch @@ -1,6 +1,6 @@ --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig -@@ -128,6 +128,13 @@ config MICREL_PHY +@@ -132,6 +132,13 @@ config MICREL_PHY ---help--- Supports the KSZ9021, VSC8201, KS8001 PHYs. @@ -16,7 +16,7 @@ depends on PHYLIB=y --- a/drivers/net/phy/Makefile +++ b/drivers/net/phy/Makefile -@@ -16,6 +16,7 @@ obj-$(CONFIG_BCM63XX_PHY) += bcm63xx.o +@@ -18,6 +18,7 @@ obj-$(CONFIG_BCM63XX_PHY) += bcm63xx.o obj-$(CONFIG_BCM7XXX_PHY) += bcm7xxx.o obj-$(CONFIG_BCM87XX_PHY) += bcm87xx.o obj-$(CONFIG_ICPLUS_PHY) += icplus.o diff --git a/target/linux/generic/patches-3.18/721-phy_packets.patch b/target/linux/generic/patches-3.18/721-phy_packets.patch index d90462eec1..3aa019f41c 100644 --- a/target/linux/generic/patches-3.18/721-phy_packets.patch +++ b/target/linux/generic/patches-3.18/721-phy_packets.patch @@ -1,40 +1,16 @@ --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h -@@ -1245,6 +1245,11 @@ struct net_device { - const struct ethtool_ops *ethtool_ops; - const struct forwarding_accel_ops *fwd_ops; +@@ -1216,6 +1216,7 @@ enum netdev_priv_flags { + IFF_LIVE_ADDR_CHANGE = 1<<20, + IFF_MACVLAN = 1<<21, + IFF_XMIT_DST_RELEASE_PERM = 1<<22, ++ IFF_NO_IP_ALIGN = 1<<23, + }; -+#ifdef CONFIG_ETHERNET_PACKET_MANGLE -+ void (*eth_mangle_rx)(struct net_device *dev, struct sk_buff *skb); -+ struct sk_buff *(*eth_mangle_tx)(struct net_device *dev, struct sk_buff *skb); -+#endif -+ - /* Hardware header description */ - const struct header_ops *header_ops; - -@@ -1313,6 +1318,9 @@ struct net_device { - void *ax25_ptr; /* AX.25 specific data */ - struct wireless_dev *ieee80211_ptr; /* IEEE 802.11 specific data, - assign before registering */ -+#ifdef CONFIG_ETHERNET_PACKET_MANGLE -+ void *phy_ptr; /* PHY device specific data */ -+#endif - - /* - * Cache lines mostly used on receive path (including eth_type_trans()) ---- a/include/uapi/linux/if.h -+++ b/include/uapi/linux/if.h -@@ -84,6 +84,7 @@ - #define IFF_LIVE_ADDR_CHANGE 0x100000 /* device supports hardware address - * change when it's running */ - #define IFF_MACVLAN 0x200000 /* Macvlan device */ -+#define IFF_NO_IP_ALIGN 0x400000 /* do not ip-align allocated rx pkts */ - - - #define IF_GET_IFACE 0x0001 /* for querying only */ + #define IFF_802_1Q_VLAN IFF_802_1Q_VLAN --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h -@@ -1858,6 +1858,10 @@ static inline int pskb_trim(struct sk_bu +@@ -2044,6 +2044,10 @@ static inline int pskb_trim(struct sk_bu return (len < skb->len) ? __pskb_trim(skb, len) : 0; } @@ -45,7 +21,7 @@ /** * pskb_trim_unique - remove end from a paged unique (not cloned) buffer * @skb: buffer to alter -@@ -1984,16 +1988,6 @@ static inline struct sk_buff *dev_alloc_ +@@ -2170,16 +2174,6 @@ static inline struct sk_buff *dev_alloc_ } @@ -64,7 +40,7 @@ { --- a/net/Kconfig +++ b/net/Kconfig -@@ -24,6 +24,12 @@ menuconfig NET +@@ -25,6 +25,12 @@ menuconfig NET if NET @@ -79,42 +55,42 @@ help --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -2614,10 +2614,20 @@ int dev_hard_start_xmit(struct sk_buff * - if (!list_empty(&ptype_all)) - dev_queue_xmit_nit(skb, dev); +@@ -2607,10 +2607,20 @@ static int xmit_one(struct sk_buff *skb, + if (!list_empty(&ptype_all)) + dev_queue_xmit_nit(skb, dev); -- skb_len = skb->len; -- trace_net_dev_start_xmit(skb, dev); -- rc = ops->ndo_start_xmit(skb, dev); -- trace_net_dev_xmit(skb, rc, dev, skb_len); +- len = skb->len; +- trace_net_dev_start_xmit(skb, dev); +- rc = netdev_start_xmit(skb, dev, txq, more); +- trace_net_dev_xmit(skb, rc, dev, len); +#ifdef CONFIG_ETHERNET_PACKET_MANGLE -+ if (!dev->eth_mangle_tx || -+ (skb = dev->eth_mangle_tx(dev, skb)) != NULL) ++ if (!dev->eth_mangle_tx || ++ (skb = dev->eth_mangle_tx(dev, skb)) != NULL) +#else -+ if (1) ++ if (1) +#endif -+ { -+ skb_len = skb->len; -+ trace_net_dev_start_xmit(skb, dev); -+ rc = ops->ndo_start_xmit(skb, dev); -+ trace_net_dev_xmit(skb, rc, dev, skb_len); -+ } else { -+ rc = NETDEV_TX_OK; -+ } - if (rc == NETDEV_TX_OK) - txq_trans_update(txq); - return rc; ++ { ++ len = skb->len; ++ trace_net_dev_start_xmit(skb, dev); ++ rc = netdev_start_xmit(skb, dev, txq, more); ++ trace_net_dev_xmit(skb, rc, dev, len); ++ } else { ++ rc = NETDEV_TX_OK; ++ } + + return rc; + } --- a/net/core/skbuff.c +++ b/net/core/skbuff.c -@@ -62,6 +62,7 @@ - #include <linux/scatterlist.h> +@@ -63,6 +63,7 @@ #include <linux/errqueue.h> #include <linux/prefetch.h> + #include <linux/if_vlan.h> +#include <linux/if.h> #include <net/protocol.h> #include <net/dst.h> -@@ -439,6 +440,22 @@ struct sk_buff *__netdev_alloc_skb(struc +@@ -451,6 +452,22 @@ struct sk_buff *__netdev_alloc_skb(struc } EXPORT_SYMBOL(__netdev_alloc_skb); @@ -139,7 +115,7 @@ { --- a/net/ethernet/eth.c +++ b/net/ethernet/eth.c -@@ -161,6 +161,12 @@ __be16 eth_type_trans(struct sk_buff *sk +@@ -188,6 +188,12 @@ __be16 eth_type_trans(struct sk_buff *sk const struct ethhdr *eth; skb->dev = dev; diff --git a/target/linux/generic/patches-3.18/722-phy_mvswitch.patch b/target/linux/generic/patches-3.18/722-phy_mvswitch.patch index 67e56de351..f577a9f684 100644 --- a/target/linux/generic/patches-3.18/722-phy_mvswitch.patch +++ b/target/linux/generic/patches-3.18/722-phy_mvswitch.patch @@ -1,6 +1,6 @@ --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig -@@ -135,6 +135,10 @@ config ADM6996_PHY +@@ -139,6 +139,10 @@ config ADM6996_PHY Currently supports the ADM6996FC and ADM6996M switches. Support for FC is very limited. @@ -13,7 +13,7 @@ depends on PHYLIB=y --- a/drivers/net/phy/Makefile +++ b/drivers/net/phy/Makefile -@@ -17,6 +17,7 @@ obj-$(CONFIG_BCM7XXX_PHY) += bcm7xxx.o +@@ -19,6 +19,7 @@ obj-$(CONFIG_BCM7XXX_PHY) += bcm7xxx.o obj-$(CONFIG_BCM87XX_PHY) += bcm87xx.o obj-$(CONFIG_ICPLUS_PHY) += icplus.o obj-$(CONFIG_ADM6996_PHY) += adm6996.o diff --git a/target/linux/generic/patches-3.18/723-phy_ip175c.patch b/target/linux/generic/patches-3.18/723-phy_ip175c.patch index 077d061616..c7c4f99eec 100644 --- a/target/linux/generic/patches-3.18/723-phy_ip175c.patch +++ b/target/linux/generic/patches-3.18/723-phy_ip175c.patch @@ -1,6 +1,6 @@ --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig -@@ -139,6 +139,10 @@ config MVSWITCH_PHY +@@ -143,6 +143,10 @@ config MVSWITCH_PHY tristate "Driver for Marvell 88E6060 switches" select ETHERNET_PACKET_MANGLE @@ -13,7 +13,7 @@ depends on PHYLIB=y --- a/drivers/net/phy/Makefile +++ b/drivers/net/phy/Makefile -@@ -18,6 +18,7 @@ obj-$(CONFIG_BCM87XX_PHY) += bcm87xx.o +@@ -20,6 +20,7 @@ obj-$(CONFIG_BCM87XX_PHY) += bcm87xx.o obj-$(CONFIG_ICPLUS_PHY) += icplus.o obj-$(CONFIG_ADM6996_PHY) += adm6996.o obj-$(CONFIG_MVSWITCH_PHY) += mvswitch.o diff --git a/target/linux/generic/patches-3.18/724-phy_ar8216.patch b/target/linux/generic/patches-3.18/724-phy_ar8216.patch index 301f2c80ee..869081e883 100644 --- a/target/linux/generic/patches-3.18/724-phy_ar8216.patch +++ b/target/linux/generic/patches-3.18/724-phy_ar8216.patch @@ -1,6 +1,6 @@ --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig -@@ -143,6 +143,11 @@ config IP17XX_PHY +@@ -147,6 +147,11 @@ config IP17XX_PHY tristate "Driver for IC+ IP17xx switches" select SWCONFIG @@ -14,7 +14,7 @@ depends on PHYLIB=y --- a/drivers/net/phy/Makefile +++ b/drivers/net/phy/Makefile -@@ -20,6 +20,7 @@ obj-$(CONFIG_ADM6996_PHY) += adm6996.o +@@ -22,6 +22,7 @@ obj-$(CONFIG_ADM6996_PHY) += adm6996.o obj-$(CONFIG_MVSWITCH_PHY) += mvswitch.o obj-$(CONFIG_IP17XX_PHY) += ip17xx.o obj-$(CONFIG_REALTEK_PHY) += realtek.o diff --git a/target/linux/generic/patches-3.18/725-phy_rtl8306.patch b/target/linux/generic/patches-3.18/725-phy_rtl8306.patch index 5f69f12432..6629700d78 100644 --- a/target/linux/generic/patches-3.18/725-phy_rtl8306.patch +++ b/target/linux/generic/patches-3.18/725-phy_rtl8306.patch @@ -1,6 +1,6 @@ --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig -@@ -148,6 +148,10 @@ config AR8216_PHY +@@ -152,6 +152,10 @@ config AR8216_PHY select ETHERNET_PACKET_MANGLE select SWCONFIG @@ -13,7 +13,7 @@ depends on PHYLIB=y --- a/drivers/net/phy/Makefile +++ b/drivers/net/phy/Makefile -@@ -21,6 +21,7 @@ obj-$(CONFIG_MVSWITCH_PHY) += mvswitch.o +@@ -23,6 +23,7 @@ obj-$(CONFIG_MVSWITCH_PHY) += mvswitch.o obj-$(CONFIG_IP17XX_PHY) += ip17xx.o obj-$(CONFIG_REALTEK_PHY) += realtek.o obj-$(CONFIG_AR8216_PHY) += ar8216.o diff --git a/target/linux/generic/patches-3.18/726-phy_rtl8366.patch b/target/linux/generic/patches-3.18/726-phy_rtl8366.patch index 6635f2df9d..833bb22ab8 100644 --- a/target/linux/generic/patches-3.18/726-phy_rtl8366.patch +++ b/target/linux/generic/patches-3.18/726-phy_rtl8366.patch @@ -1,6 +1,6 @@ --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig -@@ -246,6 +246,30 @@ config MDIO_BCM_UNIMAC +@@ -250,6 +250,30 @@ config MDIO_BCM_UNIMAC controllers as well as some Broadcom Ethernet switches such as the Starfighter 2 switches. @@ -33,7 +33,7 @@ config MICREL_KS8995MA --- a/drivers/net/phy/Makefile +++ b/drivers/net/phy/Makefile -@@ -22,6 +22,9 @@ obj-$(CONFIG_IP17XX_PHY) += ip17xx.o +@@ -24,6 +24,9 @@ obj-$(CONFIG_IP17XX_PHY) += ip17xx.o obj-$(CONFIG_REALTEK_PHY) += realtek.o obj-$(CONFIG_AR8216_PHY) += ar8216.o obj-$(CONFIG_RTL8306_PHY) += rtl8306.o diff --git a/target/linux/generic/patches-3.18/727-phy-rtl8367.patch b/target/linux/generic/patches-3.18/727-phy-rtl8367.patch index c1b654a208..8481b589d9 100644 --- a/target/linux/generic/patches-3.18/727-phy-rtl8367.patch +++ b/target/linux/generic/patches-3.18/727-phy-rtl8367.patch @@ -1,6 +1,6 @@ --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig -@@ -268,6 +268,10 @@ config RTL8366RB_PHY +@@ -272,6 +272,10 @@ config RTL8366RB_PHY tristate "Driver for the Realtek RTL8366RB switch" select SWCONFIG @@ -13,7 +13,7 @@ endif # PHYLIB --- a/drivers/net/phy/Makefile +++ b/drivers/net/phy/Makefile -@@ -25,6 +25,7 @@ obj-$(CONFIG_RTL8306_PHY) += rtl8306.o +@@ -27,6 +27,7 @@ obj-$(CONFIG_RTL8306_PHY) += rtl8306.o obj-$(CONFIG_RTL8366_SMI) += rtl8366_smi.o obj-$(CONFIG_RTL8366S_PHY) += rtl8366s.o obj-$(CONFIG_RTL8366RB_PHY) += rtl8366rb.o diff --git a/target/linux/generic/patches-3.18/728-phy-micrel.patch b/target/linux/generic/patches-3.18/728-phy-micrel.patch index 55e1689217..95199a4348 100644 --- a/target/linux/generic/patches-3.18/728-phy-micrel.patch +++ b/target/linux/generic/patches-3.18/728-phy-micrel.patch @@ -1,6 +1,6 @@ --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig -@@ -152,6 +152,11 @@ config RTL8306_PHY +@@ -156,6 +156,11 @@ config RTL8306_PHY tristate "Driver for Realtek RTL8306S switches" select SWCONFIG @@ -14,7 +14,7 @@ depends on PHYLIB=y --- a/drivers/net/phy/Makefile +++ b/drivers/net/phy/Makefile -@@ -27,6 +27,7 @@ obj-$(CONFIG_RTL8366S_PHY) += rtl8366s.o +@@ -29,6 +29,7 @@ obj-$(CONFIG_RTL8366S_PHY) += rtl8366s.o obj-$(CONFIG_RTL8366RB_PHY) += rtl8366rb.o obj-$(CONFIG_RTL8367_PHY) += rtl8367.o obj-$(CONFIG_LSI_ET1011C_PHY) += et1011c.o diff --git a/target/linux/generic/patches-3.18/729-phy-rtl8367b.patch b/target/linux/generic/patches-3.18/729-phy-rtl8367b.patch index f2ee302e27..cc4f7940d2 100644 --- a/target/linux/generic/patches-3.18/729-phy-rtl8367b.patch +++ b/target/linux/generic/patches-3.18/729-phy-rtl8367b.patch @@ -1,6 +1,6 @@ --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig -@@ -277,6 +277,10 @@ config RTL8367_PHY +@@ -281,6 +281,10 @@ config RTL8367_PHY tristate "Driver for the Realtek RTL8367R/M switches" select SWCONFIG @@ -13,7 +13,7 @@ endif # PHYLIB --- a/drivers/net/phy/Makefile +++ b/drivers/net/phy/Makefile -@@ -26,6 +26,7 @@ obj-$(CONFIG_RTL8366_SMI) += rtl8366_smi +@@ -28,6 +28,7 @@ obj-$(CONFIG_RTL8366_SMI) += rtl8366_smi obj-$(CONFIG_RTL8366S_PHY) += rtl8366s.o obj-$(CONFIG_RTL8366RB_PHY) += rtl8366rb.o obj-$(CONFIG_RTL8367_PHY) += rtl8367.o diff --git a/target/linux/generic/patches-3.18/729-phy-tantos.patch b/target/linux/generic/patches-3.18/729-phy-tantos.patch index 4fab9b80a9..6262ef9803 100644 --- a/target/linux/generic/patches-3.18/729-phy-tantos.patch +++ b/target/linux/generic/patches-3.18/729-phy-tantos.patch @@ -1,6 +1,6 @@ --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig -@@ -288,3 +288,8 @@ endif # PHYLIB +@@ -292,3 +292,8 @@ endif # PHYLIB config MICREL_KS8995MA tristate "Micrel KS8995MA 5-ports 10/100 managed Ethernet switch" depends on SPI @@ -11,7 +11,7 @@ + select ETHERNET_PACKET_MANGLE --- a/drivers/net/phy/Makefile +++ b/drivers/net/phy/Makefile -@@ -29,6 +29,7 @@ obj-$(CONFIG_RTL8367_PHY) += rtl8367.o +@@ -31,6 +31,7 @@ obj-$(CONFIG_RTL8367_PHY) += rtl8367.o obj-$(CONFIG_RTL8367B_PHY) += rtl8367b.o obj-$(CONFIG_LSI_ET1011C_PHY) += et1011c.o obj-$(CONFIG_MICREL_PHY) += micrel.o diff --git a/target/linux/generic/patches-3.18/730-phy_b53.patch b/target/linux/generic/patches-3.18/730-phy_b53.patch index 86fccd34ea..5e13797630 100644 --- a/target/linux/generic/patches-3.18/730-phy_b53.patch +++ b/target/linux/generic/patches-3.18/730-phy_b53.patch @@ -1,6 +1,6 @@ --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig -@@ -283,6 +283,8 @@ config RTL8367B_PHY +@@ -287,6 +287,8 @@ config RTL8367B_PHY endif # RTL8366_SMI @@ -11,7 +11,7 @@ config MICREL_KS8995MA --- a/drivers/net/phy/Makefile +++ b/drivers/net/phy/Makefile -@@ -30,6 +30,7 @@ obj-$(CONFIG_RTL8367B_PHY) += rtl8367b.o +@@ -32,6 +32,7 @@ obj-$(CONFIG_RTL8367B_PHY) += rtl8367b.o obj-$(CONFIG_LSI_ET1011C_PHY) += et1011c.o obj-$(CONFIG_MICREL_PHY) += micrel.o obj-$(CONFIG_PSB6970_PHY) += psb6970.o diff --git a/target/linux/generic/patches-3.18/890-8250_optional_sysrq.patch b/target/linux/generic/patches-3.18/890-8250_optional_sysrq.patch index 8e8c7abcba..8815e4c644 100644 --- a/target/linux/generic/patches-3.18/890-8250_optional_sysrq.patch +++ b/target/linux/generic/patches-3.18/890-8250_optional_sysrq.patch @@ -11,7 +11,7 @@ --- a/drivers/tty/serial/8250/Kconfig +++ b/drivers/tty/serial/8250/Kconfig -@@ -90,6 +90,10 @@ config SERIAL_8250_CONSOLE +@@ -91,6 +91,10 @@ config SERIAL_8250_CONSOLE If unsure, say N. @@ -19,6 +19,6 @@ + bool "Magic sysrq support on 8250/16550 devices" + depends on SERIAL_8250_CONSOLE + - config FIX_EARLYCON_MEM - bool - depends on X86 + config SERIAL_8250_GSC + tristate + depends on SERIAL_8250 && GSC diff --git a/target/linux/generic/patches-3.18/901-debloat_sock_diag.patch b/target/linux/generic/patches-3.18/901-debloat_sock_diag.patch index af41da7032..d172d1b8c2 100644 --- a/target/linux/generic/patches-3.18/901-debloat_sock_diag.patch +++ b/target/linux/generic/patches-3.18/901-debloat_sock_diag.patch @@ -1,6 +1,6 @@ --- a/net/Kconfig +++ b/net/Kconfig -@@ -83,6 +83,9 @@ source "net/netlabel/Kconfig" +@@ -89,6 +89,9 @@ source "net/netlabel/Kconfig" endif # if INET diff --git a/target/linux/generic/patches-3.18/903-debloat_direct_io.patch b/target/linux/generic/patches-3.18/903-debloat_direct_io.patch index f28c85eeed..4bceec96cf 100644 --- a/target/linux/generic/patches-3.18/903-debloat_direct_io.patch +++ b/target/linux/generic/patches-3.18/903-debloat_direct_io.patch @@ -42,8 +42,8 @@ +{ +} +static inline ssize_t __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode, -+ struct block_device *bdev, const struct iovec *iov, loff_t offset, -+ unsigned long nr_segs, get_block_t get_block, dio_iodone_t end_io, ++ struct block_device *bdev, struct iov_iter *iter, loff_t offset, ++ get_block_t get_block, dio_iodone_t end_io, + dio_submit_t submit_io, int flags) +{ + return -EOPNOTSUPP; diff --git a/target/linux/generic/patches-3.18/941-ocf_20120127.patch b/target/linux/generic/patches-3.18/941-ocf_20120127.patch index e67cb04221..cc512f8359 100644 --- a/target/linux/generic/patches-3.18/941-ocf_20120127.patch +++ b/target/linux/generic/patches-3.18/941-ocf_20120127.patch @@ -40,7 +40,7 @@ + */ +void random_input_words(__u32 *buf, size_t wordcount, int ent_count) +{ -+ mix_pool_bytes(&input_pool, buf, wordcount*4, NULL); ++ mix_pool_bytes(&input_pool, buf, wordcount*4); + + credit_entropy_bits(&input_pool, ent_count); + @@ -50,7 +50,7 @@ + * Wake up waiting processes if we have enough + * entropy. + */ -+ if (input_pool.entropy_count >= random_read_wakeup_thresh) ++ if (input_pool.entropy_count >= random_read_wakeup_bits) + wake_up_interruptible(&random_read_wait); +} +EXPORT_SYMBOL(random_input_words); @@ -67,16 +67,16 @@ + int count; + + wait_event_interruptible(random_write_wait, -+ input_pool.entropy_count < random_write_wakeup_thresh); ++ input_pool.entropy_count < random_write_wakeup_bits); + -+ count = random_write_wakeup_thresh - input_pool.entropy_count; ++ count = random_write_wakeup_bits - input_pool.entropy_count; + + /* likely we got woken up due to a signal */ -+ if (count <= 0) count = random_read_wakeup_thresh; ++ if (count <= 0) count = random_read_wakeup_bits; + + pr_notice("requesting %d bits from input_wait()er %d<%d\n", + count, -+ input_pool.entropy_count, random_write_wakeup_thresh); ++ input_pool.entropy_count, random_write_wakeup_bits); + + return count; +} diff --git a/target/linux/generic/patches-3.18/950-vm_exports.patch b/target/linux/generic/patches-3.18/950-vm_exports.patch index 0b99a3328a..d8dc186fb0 100644 --- a/target/linux/generic/patches-3.18/950-vm_exports.patch +++ b/target/linux/generic/patches-3.18/950-vm_exports.patch @@ -72,15 +72,7 @@ * zap_page_range_single - remove user pages in a given range --- a/mm/vmalloc.c +++ b/mm/vmalloc.c -@@ -1231,6 +1231,7 @@ int map_kernel_range_noflush(unsigned lo - { - return vmap_page_range_noflush(addr, addr + size, prot, pages); - } -+EXPORT_SYMBOL_GPL(unmap_kernel_range); - - /** - * unmap_kernel_range_noflush - unmap kernel VM area -@@ -1372,6 +1373,7 @@ struct vm_struct *get_vm_area(unsigned l +@@ -1372,6 +1372,7 @@ struct vm_struct *get_vm_area(unsigned l NUMA_NO_NODE, GFP_KERNEL, __builtin_return_address(0)); } |