diff options
Diffstat (limited to 'target/linux/generic')
31 files changed, 410 insertions, 322 deletions
diff --git a/target/linux/generic/config-4.4 b/target/linux/generic/config-4.4 index ed7ae3ee15..456a4ab01e 100644 --- a/target/linux/generic/config-4.4 +++ b/target/linux/generic/config-4.4 @@ -1594,6 +1594,7 @@ CONFIG_INPUT_MISC=y # CONFIG_INPUT_MOUSE is not set # CONFIG_INPUT_MOUSEDEV is not set # CONFIG_INPUT_MPU3050 is not set +# CONFIG_INPUT_PALMAS_PWRBUTTON is not set # CONFIG_INPUT_PCF8574 is not set # CONFIG_INPUT_PCSPKR is not set # CONFIG_INPUT_POLLDEV is not set @@ -1604,6 +1605,10 @@ CONFIG_INPUT_MISC=y # CONFIG_INPUT_SPARSEKMAP is not set # CONFIG_INPUT_TABLET is not set # CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_TPS65218_PWRBUTTON is not set +# CONFIG_INPUT_TWL4030_PWRBUTTON is not set +# CONFIG_INPUT_TWL4030_VIBRA is not set +# CONFIG_INPUT_TWL6040_VIBRA is not set # CONFIG_INPUT_UINPUT is not set # CONFIG_INPUT_WISTRON_BTNS is not set # CONFIG_INPUT_YEALINK is not set @@ -1824,6 +1829,7 @@ CONFIG_KERNFS=y # CONFIG_KEYBOARD_SUNKBD is not set # CONFIG_KEYBOARD_TCA6416 is not set # CONFIG_KEYBOARD_TCA8418 is not set +# CONFIG_KEYBOARD_TWL4030 is not set # CONFIG_KEYBOARD_XTKBD is not set # CONFIG_KEYS is not set # CONFIG_KGDB is not set @@ -4192,6 +4198,7 @@ CONFIG_TMPFS_XATTR=y # CONFIG_TRACE_ENUM_MAP_FILE is not set CONFIG_TRACE_IRQFLAGS_SUPPORT=y # CONFIG_TRACE_SINK is not set +# CONFIG_TRACING_EVENTS_GPIO is not set CONFIG_TRACING_SUPPORT=y CONFIG_TRAD_SIGNALS=y # CONFIG_TRANSPARENT_HUGEPAGE is not set @@ -4208,6 +4215,7 @@ CONFIG_TTY=y # CONFIG_TUN is not set # CONFIG_TUN_VNET_CROSS_LE is not set # CONFIG_TWL4030_CORE is not set +# CONFIG_TWL4030_MADC is not set # CONFIG_TWL6030_GPADC is not set # CONFIG_TWL6040_CORE is not set # CONFIG_TYPHOON is not set diff --git a/target/linux/generic/files/include/linux/ath9k_platform.h b/target/linux/generic/files/include/linux/ath9k_platform.h index e543a64060..2c19f3b494 100644 --- a/target/linux/generic/files/include/linux/ath9k_platform.h +++ b/target/linux/generic/files/include/linux/ath9k_platform.h @@ -31,6 +31,10 @@ struct ath9k_platform_data { u32 gpio_mask; u32 gpio_val; + u32 bt_active_pin; + u32 bt_priority_pin; + u32 wlan_active_pin; + bool endian_check; bool is_clk_25mhz; bool tx_gain_buffalo; diff --git a/target/linux/generic/patches-3.18/660-fq_codel_defaults.patch b/target/linux/generic/patches-3.18/660-fq_codel_defaults.patch index 8c99e62cec..e0f73dedb9 100644 --- a/target/linux/generic/patches-3.18/660-fq_codel_defaults.patch +++ b/target/linux/generic/patches-3.18/660-fq_codel_defaults.patch @@ -1,11 +1,13 @@ --- a/net/sched/sch_fq_codel.c +++ b/net/sched/sch_fq_codel.c -@@ -387,7 +387,7 @@ static int fq_codel_init(struct Qdisc *s +@@ -387,8 +387,8 @@ static int fq_codel_init(struct Qdisc *s struct fq_codel_sched_data *q = qdisc_priv(sch); int i; - sch->limit = 10*1024; +- q->flows_cnt = 1024; + sch->limit = 1024; - q->flows_cnt = 1024; ++ q->flows_cnt = 128; q->quantum = psched_mtu(qdisc_dev(sch)); q->perturbation = prandom_u32(); + INIT_LIST_HEAD(&q->new_flows); diff --git a/target/linux/generic/patches-4.1/660-fq_codel_defaults.patch b/target/linux/generic/patches-4.1/660-fq_codel_defaults.patch index 8c99e62cec..e0f73dedb9 100644 --- a/target/linux/generic/patches-4.1/660-fq_codel_defaults.patch +++ b/target/linux/generic/patches-4.1/660-fq_codel_defaults.patch @@ -1,11 +1,13 @@ --- a/net/sched/sch_fq_codel.c +++ b/net/sched/sch_fq_codel.c -@@ -387,7 +387,7 @@ static int fq_codel_init(struct Qdisc *s +@@ -387,8 +387,8 @@ static int fq_codel_init(struct Qdisc *s struct fq_codel_sched_data *q = qdisc_priv(sch); int i; - sch->limit = 10*1024; +- q->flows_cnt = 1024; + sch->limit = 1024; - q->flows_cnt = 1024; ++ q->flows_cnt = 128; q->quantum = psched_mtu(qdisc_dev(sch)); q->perturbation = prandom_u32(); + INIT_LIST_HEAD(&q->new_flows); diff --git a/target/linux/generic/patches-4.4/032-fq_codel-add-batch-ability-to-fq_codel_drop.patch b/target/linux/generic/patches-4.4/032-fq_codel-add-batch-ability-to-fq_codel_drop.patch new file mode 100644 index 0000000000..d1390348cb --- /dev/null +++ b/target/linux/generic/patches-4.4/032-fq_codel-add-batch-ability-to-fq_codel_drop.patch @@ -0,0 +1,189 @@ +From: Eric Dumazet <edumazet@google.com> +Date: Sun, 1 May 2016 16:47:26 -0700 +Subject: [PATCH] fq_codel: add batch ability to fq_codel_drop() + +In presence of inelastic flows and stress, we can call +fq_codel_drop() for every packet entering fq_codel qdisc. + +fq_codel_drop() is quite expensive, as it does a linear scan +of 4 KB of memory to find a fat flow. +Once found, it drops the oldest packet of this flow. + +Instead of dropping a single packet, try to drop 50% of the backlog +of this fat flow, with a configurable limit of 64 packets per round. + +TCA_FQ_CODEL_DROP_BATCH_SIZE is the new attribute to make this +limit configurable. + +With this strategy the 4 KB search is amortized to a single cache line +per drop [1], so fq_codel_drop() no longer appears at the top of kernel +profile in presence of few inelastic flows. + +[1] Assuming a 64byte cache line, and 1024 buckets + +Signed-off-by: Eric Dumazet <edumazet@google.com> +Reported-by: Dave Taht <dave.taht@gmail.com> +Cc: Jonathan Morton <chromatix99@gmail.com> +Acked-by: Jesper Dangaard Brouer <brouer@redhat.com> +Acked-by: Dave Taht +Signed-off-by: David S. Miller <davem@davemloft.net> +--- + +--- a/include/uapi/linux/pkt_sched.h ++++ b/include/uapi/linux/pkt_sched.h +@@ -711,6 +711,7 @@ enum { + TCA_FQ_CODEL_FLOWS, + TCA_FQ_CODEL_QUANTUM, + TCA_FQ_CODEL_CE_THRESHOLD, ++ TCA_FQ_CODEL_DROP_BATCH_SIZE, + __TCA_FQ_CODEL_MAX + }; + +--- a/net/sched/sch_fq_codel.c ++++ b/net/sched/sch_fq_codel.c +@@ -57,6 +57,7 @@ struct fq_codel_sched_data { + u32 flows_cnt; /* number of flows */ + u32 perturbation; /* hash perturbation */ + u32 quantum; /* psched_mtu(qdisc_dev(sch)); */ ++ u32 drop_batch_size; + struct codel_params cparams; + struct codel_stats cstats; + u32 drop_overlimit; +@@ -133,17 +134,20 @@ static inline void flow_queue_add(struct + skb->next = NULL; + } + +-static unsigned int fq_codel_drop(struct Qdisc *sch) ++static unsigned int fq_codel_drop(struct Qdisc *sch, unsigned int max_packets) + { + struct fq_codel_sched_data *q = qdisc_priv(sch); + struct sk_buff *skb; + unsigned int maxbacklog = 0, idx = 0, i, len; + struct fq_codel_flow *flow; ++ unsigned int threshold; + +- /* Queue is full! Find the fat flow and drop packet from it. ++ /* Queue is full! Find the fat flow and drop packet(s) from it. + * This might sound expensive, but with 1024 flows, we scan + * 4KB of memory, and we dont need to handle a complex tree + * in fast path (packet queue/enqueue) with many cache misses. ++ * In stress mode, we'll try to drop 64 packets from the flow, ++ * amortizing this linear lookup to one cache line per drop. + */ + for (i = 0; i < q->flows_cnt; i++) { + if (q->backlogs[i] > maxbacklog) { +@@ -151,15 +155,24 @@ static unsigned int fq_codel_drop(struct + idx = i; + } + } ++ ++ /* Our goal is to drop half of this fat flow backlog */ ++ threshold = maxbacklog >> 1; ++ + flow = &q->flows[idx]; +- skb = dequeue_head(flow); +- len = qdisc_pkt_len(skb); ++ len = 0; ++ i = 0; ++ do { ++ skb = dequeue_head(flow); ++ len += qdisc_pkt_len(skb); ++ kfree_skb(skb); ++ } while (++i < max_packets && len < threshold); ++ ++ flow->dropped += i; + q->backlogs[idx] -= len; +- sch->q.qlen--; +- qdisc_qstats_drop(sch); +- qdisc_qstats_backlog_dec(sch, skb); +- kfree_skb(skb); +- flow->dropped++; ++ sch->qstats.drops += i; ++ sch->qstats.backlog -= len; ++ sch->q.qlen -= i; + return idx; + } + +@@ -168,14 +181,14 @@ static unsigned int fq_codel_qdisc_drop( + unsigned int prev_backlog; + + prev_backlog = sch->qstats.backlog; +- fq_codel_drop(sch); ++ fq_codel_drop(sch, 1U); + return prev_backlog - sch->qstats.backlog; + } + + static int fq_codel_enqueue(struct sk_buff *skb, struct Qdisc *sch) + { + struct fq_codel_sched_data *q = qdisc_priv(sch); +- unsigned int idx, prev_backlog; ++ unsigned int idx, prev_backlog, prev_qlen; + struct fq_codel_flow *flow; + int uninitialized_var(ret); + +@@ -204,16 +217,22 @@ static int fq_codel_enqueue(struct sk_bu + return NET_XMIT_SUCCESS; + + prev_backlog = sch->qstats.backlog; +- q->drop_overlimit++; +- /* Return Congestion Notification only if we dropped a packet +- * from this flow. ++ prev_qlen = sch->q.qlen; ++ ++ /* fq_codel_drop() is quite expensive, as it performs a linear search ++ * in q->backlogs[] to find a fat flow. ++ * So instead of dropping a single packet, drop half of its backlog ++ * with a 64 packets limit to not add a too big cpu spike here. + */ +- if (fq_codel_drop(sch) == idx) +- return NET_XMIT_CN; ++ ret = fq_codel_drop(sch, q->drop_batch_size); ++ ++ q->drop_overlimit += prev_qlen - sch->q.qlen; + +- /* As we dropped a packet, better let upper stack know this */ +- qdisc_tree_reduce_backlog(sch, 1, prev_backlog - sch->qstats.backlog); +- return NET_XMIT_SUCCESS; ++ /* As we dropped packet(s), better let upper stack know this */ ++ qdisc_tree_reduce_backlog(sch, prev_qlen - sch->q.qlen, ++ prev_backlog - sch->qstats.backlog); ++ ++ return ret == idx ? NET_XMIT_CN : NET_XMIT_SUCCESS; + } + + /* This is the specific function called from codel_dequeue() +@@ -323,6 +342,7 @@ static const struct nla_policy fq_codel_ + [TCA_FQ_CODEL_FLOWS] = { .type = NLA_U32 }, + [TCA_FQ_CODEL_QUANTUM] = { .type = NLA_U32 }, + [TCA_FQ_CODEL_CE_THRESHOLD] = { .type = NLA_U32 }, ++ [TCA_FQ_CODEL_DROP_BATCH_SIZE] = { .type = NLA_U32 }, + }; + + static int fq_codel_change(struct Qdisc *sch, struct nlattr *opt) +@@ -374,6 +394,9 @@ static int fq_codel_change(struct Qdisc + if (tb[TCA_FQ_CODEL_QUANTUM]) + q->quantum = max(256U, nla_get_u32(tb[TCA_FQ_CODEL_QUANTUM])); + ++ if (tb[TCA_FQ_CODEL_DROP_BATCH_SIZE]) ++ q->drop_batch_size = min(1U, nla_get_u32(tb[TCA_FQ_CODEL_DROP_BATCH_SIZE])); ++ + while (sch->q.qlen > sch->limit) { + struct sk_buff *skb = fq_codel_dequeue(sch); + +@@ -419,6 +442,7 @@ static int fq_codel_init(struct Qdisc *s + + sch->limit = 10*1024; + q->flows_cnt = 1024; ++ q->drop_batch_size = 64; + q->quantum = psched_mtu(qdisc_dev(sch)); + q->perturbation = prandom_u32(); + INIT_LIST_HEAD(&q->new_flows); +@@ -476,6 +500,8 @@ static int fq_codel_dump(struct Qdisc *s + q->cparams.ecn) || + nla_put_u32(skb, TCA_FQ_CODEL_QUANTUM, + q->quantum) || ++ nla_put_u32(skb, TCA_FQ_CODEL_DROP_BATCH_SIZE, ++ q->drop_batch_size) || + nla_put_u32(skb, TCA_FQ_CODEL_FLOWS, + q->flows_cnt)) + goto nla_put_failure; diff --git a/target/linux/generic/patches-4.4/045-mtd-devices-m25p80-add-support-for-mmap-read-request.patch b/target/linux/generic/patches-4.4/045-mtd-devices-m25p80-add-support-for-mmap-read-request.patch index ee85f448ff..c4c7e6e01d 100644 --- a/target/linux/generic/patches-4.4/045-mtd-devices-m25p80-add-support-for-mmap-read-request.patch +++ b/target/linux/generic/patches-4.4/045-mtd-devices-m25p80-add-support-for-mmap-read-request.patch @@ -15,7 +15,7 @@ Signed-off-by: Brian Norris <computersforpeace@gmail.com> --- a/drivers/mtd/devices/m25p80.c +++ b/drivers/mtd/devices/m25p80.c -@@ -131,6 +131,28 @@ static int m25p80_read(struct spi_nor *nor, loff_t from, size_t len, +@@ -131,6 +131,28 @@ static int m25p80_read(struct spi_nor *n /* convert the dummy cycles to the number of bytes */ dummy /= 8; diff --git a/target/linux/generic/patches-4.4/081-spi-bcm53xx-add-spi_flash_read-callback-for-MMIO-bas.patch b/target/linux/generic/patches-4.4/081-spi-bcm53xx-add-spi_flash_read-callback-for-MMIO-bas.patch index 5f131e76d3..730f41e4a5 100644 --- a/target/linux/generic/patches-4.4/081-spi-bcm53xx-add-spi_flash_read-callback-for-MMIO-bas.patch +++ b/target/linux/generic/patches-4.4/081-spi-bcm53xx-add-spi_flash_read-callback-for-MMIO-bas.patch @@ -34,7 +34,7 @@ Signed-off-by: Mark Brown <broonie@kernel.org> }; static inline u32 bcm53xxspi_read(struct bcm53xxspi *b53spi, u16 offset) -@@ -32,6 +35,50 @@ static inline void bcm53xxspi_write(struct bcm53xxspi *b53spi, u16 offset, +@@ -32,6 +35,50 @@ static inline void bcm53xxspi_write(stru bcma_write32(b53spi->core, offset, value); } @@ -85,7 +85,7 @@ Signed-off-by: Mark Brown <broonie@kernel.org> static inline unsigned int bcm53xxspi_calc_timeout(size_t len) { /* Do some magic calculation based on length and buad. Add 10% and 1. */ -@@ -176,6 +223,8 @@ static int bcm53xxspi_transfer_one(struct spi_master *master, +@@ -176,6 +223,8 @@ static int bcm53xxspi_transfer_one(struc u8 *buf; size_t left; @@ -94,7 +94,7 @@ Signed-off-by: Mark Brown <broonie@kernel.org> if (t->tx_buf) { buf = (u8 *)t->tx_buf; left = t->len; -@@ -206,6 +255,22 @@ static int bcm53xxspi_transfer_one(struct spi_master *master, +@@ -206,6 +255,22 @@ static int bcm53xxspi_transfer_one(struc return 0; } @@ -117,7 +117,7 @@ Signed-off-by: Mark Brown <broonie@kernel.org> /************************************************** * BCMA **************************************************/ -@@ -222,6 +287,7 @@ MODULE_DEVICE_TABLE(bcma, bcm53xxspi_bcma_tbl); +@@ -222,6 +287,7 @@ MODULE_DEVICE_TABLE(bcma, bcm53xxspi_bcm static int bcm53xxspi_bcma_probe(struct bcma_device *core) { @@ -125,7 +125,7 @@ Signed-off-by: Mark Brown <broonie@kernel.org> struct bcm53xxspi *b53spi; struct spi_master *master; int err; -@@ -231,7 +297,7 @@ static int bcm53xxspi_bcma_probe(struct bcma_device *core) +@@ -231,7 +297,7 @@ static int bcm53xxspi_bcma_probe(struct return -ENOTSUPP; } @@ -134,7 +134,7 @@ Signed-off-by: Mark Brown <broonie@kernel.org> if (!master) return -ENOMEM; -@@ -239,11 +305,19 @@ static int bcm53xxspi_bcma_probe(struct bcma_device *core) +@@ -239,11 +305,19 @@ static int bcm53xxspi_bcma_probe(struct b53spi->master = master; b53spi->core = core; diff --git a/target/linux/generic/patches-4.4/101-MIPS-fix-cache-flushing-for-highmem-pages.patch b/target/linux/generic/patches-4.4/101-MIPS-fix-cache-flushing-for-highmem-pages.patch index 237f0e500c..e4ac2cd583 100644 --- a/target/linux/generic/patches-4.4/101-MIPS-fix-cache-flushing-for-highmem-pages.patch +++ b/target/linux/generic/patches-4.4/101-MIPS-fix-cache-flushing-for-highmem-pages.patch @@ -15,87 +15,17 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> --- a/arch/mips/mm/cache.c +++ b/arch/mips/mm/cache.c -@@ -14,6 +14,7 @@ - #include <linux/sched.h> - #include <linux/syscalls.h> - #include <linux/mm.h> -+#include <linux/highmem.h> - - #include <asm/cacheflush.h> - #include <asm/processor.h> -@@ -78,18 +79,29 @@ SYSCALL_DEFINE3(cacheflush, unsigned lon - return 0; - } - -+static void -+flush_highmem_page(struct page *page) -+{ -+ void *addr = kmap_atomic(page); -+ flush_data_cache_page((unsigned long)addr); -+ kunmap_atomic(addr); -+} -+ - void __flush_dcache_page(struct page *page) - { - struct address_space *mapping = page_mapping(page); - unsigned long addr; - -- if (PageHighMem(page)) -- return; - if (mapping && !mapping_mapped(mapping)) { - SetPageDcacheDirty(page); - return; - } - -+ if (PageHighMem(page)) { -+ flush_highmem_page(page); -+ return; -+ } -+ - /* - * We could delay the flush for the !page_mapping case too. But that - * case is for exec env/arg pages and those are %99 certainly going to -@@ -105,6 +117,11 @@ void __flush_anon_page(struct page *page +@@ -111,6 +111,13 @@ void __flush_anon_page(struct page *page { unsigned long addr = (unsigned long) page_address(page); + if (PageHighMem(page)) { -+ flush_highmem_page(page); ++ addr = (unsigned long)kmap_atomic(page); ++ flush_data_cache_page(addr); ++ __kunmap_atomic((void *)addr); + return; + } + if (pages_do_alias(addr, vmaddr)) { if (page_mapped(page) && !Page_dcache_dirty(page)) { void *kaddr; -@@ -123,8 +140,10 @@ void __flush_icache_page(struct vm_area_ - { - unsigned long addr; - -- if (PageHighMem(page)) -+ if (PageHighMem(page)) { -+ flush_highmem_page(page); - return; -+ } - - addr = (unsigned long) page_address(page); - flush_data_cache_page(addr); -@@ -142,12 +161,17 @@ void __update_cache(struct vm_area_struc - if (unlikely(!pfn_valid(pfn))) - return; - page = pfn_to_page(pfn); -- if (page_mapping(page) && Page_dcache_dirty(page)) { -+ if (!Page_dcache_dirty(page) || !page_mapping(page)) -+ return; -+ -+ if (PageHighMem(page)) { -+ flush_highmem_page(page); -+ } else { - addr = (unsigned long) page_address(page); - if (exec || pages_do_alias(addr, address & PAGE_MASK)) - flush_data_cache_page(addr); -- ClearPageDcacheDirty(page); - } -+ ClearPageDcacheDirty(page); - } - - unsigned long _page_cachable_default; diff --git a/target/linux/generic/patches-4.4/206-mips-disable-vdso.patch b/target/linux/generic/patches-4.4/206-mips-disable-vdso.patch index 1abe78f141..51b1d041bf 100644 --- a/target/linux/generic/patches-4.4/206-mips-disable-vdso.patch +++ b/target/linux/generic/patches-4.4/206-mips-disable-vdso.patch @@ -4,7 +4,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> --- a/arch/mips/vdso/Makefile +++ b/arch/mips/vdso/Makefile -@@ -26,11 +26,11 @@ aflags-vdso := $(ccflags-vdso) \ +@@ -28,11 +28,11 @@ aflags-vdso := $(ccflags-vdso) \ # the comments on that file. # ifndef CONFIG_CPU_MIPSR6 diff --git a/target/linux/generic/patches-4.4/207-mips-vdso-dbg-rebuild-after-genvdso.patch b/target/linux/generic/patches-4.4/207-mips-vdso-dbg-rebuild-after-genvdso.patch index 2a36f2a7a0..7dbde1d974 100644 --- a/target/linux/generic/patches-4.4/207-mips-vdso-dbg-rebuild-after-genvdso.patch +++ b/target/linux/generic/patches-4.4/207-mips-vdso-dbg-rebuild-after-genvdso.patch @@ -1,8 +1,6 @@ -Index: linux-4.4.9/arch/mips/vdso/Makefile -=================================================================== ---- linux-4.4.9.orig/arch/mips/vdso/Makefile -+++ linux-4.4.9/arch/mips/vdso/Makefile -@@ -75,7 +75,7 @@ $(obj-vdso): KBUILD_AFLAGS := $(aflags-v +--- a/arch/mips/vdso/Makefile ++++ b/arch/mips/vdso/Makefile +@@ -77,7 +77,7 @@ $(obj-vdso): KBUILD_AFLAGS := $(aflags-v $(obj)/vdso.lds: KBUILD_CPPFLAGS := $(native-abi) @@ -11,12 +9,21 @@ Index: linux-4.4.9/arch/mips/vdso/Makefile $(call if_changed,vdsold) $(obj)/vdso-image.c: $(obj)/vdso.so.dbg $(obj)/genvdso FORCE -@@ -109,7 +109,7 @@ $(obj)/vdso-o32.lds: KBUILD_CPPFLAGS := +@@ -111,7 +111,7 @@ $(obj)/vdso-o32.lds: KBUILD_CPPFLAGS := $(obj)/vdso-o32.lds: $(src)/vdso.lds.S FORCE - $(call if_changed_dep,cpp_lds_S) - + $(call if_changed_dep,cpp_lds_S) + -$(obj)/vdso-o32.so.dbg: $(obj)/vdso-o32.lds $(obj-vdso-o32) FORCE +$(obj)/vdso-o32.so.dbg: $(obj)/vdso-o32.lds $(obj-vdso-o32) $(obj)/genvdso FORCE - $(call if_changed,vdsold) - + $(call if_changed,vdsold) + $(obj)/vdso-o32-image.c: VDSO_NAME := o32 +@@ -147,7 +147,7 @@ $(obj)/vdso-n32.lds: KBUILD_CPPFLAGS := + $(obj)/vdso-n32.lds: $(src)/vdso.lds.S FORCE + $(call if_changed_dep,cpp_lds_S) + +-$(obj)/vdso-n32.so.dbg: $(obj)/vdso-n32.lds $(obj-vdso-n32) FORCE ++$(obj)/vdso-n32.so.dbg: $(obj)/vdso-n32.lds $(obj-vdso-n32) $(obj)/genvdso FORCE + $(call if_changed,vdsold) + + $(obj)/vdso-n32-image.c: VDSO_NAME := n32 diff --git a/target/linux/generic/patches-4.4/271-uapi-libc-compat.h-do-not-rely-on-__GLIBC__.patch b/target/linux/generic/patches-4.4/271-uapi-libc-compat.h-do-not-rely-on-__GLIBC__.patch index 61d3873c01..b8e6a3a882 100644 --- a/target/linux/generic/patches-4.4/271-uapi-libc-compat.h-do-not-rely-on-__GLIBC__.patch +++ b/target/linux/generic/patches-4.4/271-uapi-libc-compat.h-do-not-rely-on-__GLIBC__.patch @@ -26,6 +26,19 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org> +/* We have included libc headers... */ +#if !defined(__KERNEL__) +-/* Coordinate with glibc net/if.h header. */ ++/* Coordinate with libc net/if.h header. */ + #if defined(_NET_IF_H) + +-/* GLIBC headers included first so don't define anything ++/* LIBC headers included first so don't define anything + * that would already be defined. */ + + #define __UAPI_DEF_IF_IFCONF 0 +@@ -85,10 +85,10 @@ + + #endif /* _NET_IF_H */ + -/* Coordinate with glibc netinet/in.h header. */ +/* Coordinate with libc netinet/in.h header. */ #if defined(_NETINET_IN_H) @@ -35,7 +48,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org> * that would already be defined. */ #define __UAPI_DEF_IN_ADDR 0 #define __UAPI_DEF_IN_IPPROTO 0 -@@ -68,7 +68,7 @@ +@@ -102,7 +102,7 @@ * if the glibc code didn't define them. This guard matches * the guard in glibc/inet/netinet/in.h which defines the * additional in6_addr macros e.g. s6_addr16, and s6_addr32. */ @@ -44,7 +57,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org> #define __UAPI_DEF_IN6_ADDR_ALT 0 #else #define __UAPI_DEF_IN6_ADDR_ALT 1 -@@ -83,7 +83,7 @@ +@@ -117,7 +117,7 @@ #else /* Linux headers included first, and we must define everything @@ -53,7 +66,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org> * __UAPI_DEF_* defines and adjust appropriately. */ #define __UAPI_DEF_IN_ADDR 1 #define __UAPI_DEF_IN_IPPROTO 1 -@@ -93,7 +93,7 @@ +@@ -127,7 +127,7 @@ #define __UAPI_DEF_IN_CLASS 1 #define __UAPI_DEF_IN6_ADDR 1 @@ -62,16 +75,16 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org> * coordinate. */ #define __UAPI_DEF_IN6_ADDR_ALT 1 #define __UAPI_DEF_SOCKADDR_IN6 1 -@@ -115,7 +115,7 @@ +@@ -149,7 +149,7 @@ /* If we did not see any headers from any supported C libraries, * or we are being included in the kernel, then define everything * that we need. */ -#else /* !defined(__GLIBC__) */ +#else /* defined(__KERNEL__) */ - /* Definitions for in.h */ - #define __UAPI_DEF_IN_ADDR 1 -@@ -138,6 +138,6 @@ + /* Definitions for if.h */ + #define __UAPI_DEF_IF_IFCONF 1 +@@ -182,6 +182,6 @@ /* Definitions for xattr.h */ #define __UAPI_DEF_XATTR 1 diff --git a/target/linux/generic/patches-4.4/272-uapi-if_ether.h-prevent-redefinition-of-struct-ethhd.patch b/target/linux/generic/patches-4.4/272-uapi-if_ether.h-prevent-redefinition-of-struct-ethhd.patch index ff7677f760..9065369040 100644 --- a/target/linux/generic/patches-4.4/272-uapi-if_ether.h-prevent-redefinition-of-struct-ethhd.patch +++ b/target/linux/generic/patches-4.4/272-uapi-if_ether.h-prevent-redefinition-of-struct-ethhd.patch @@ -40,9 +40,9 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org> #endif /* _UAPI_LINUX_IF_ETHER_H */ --- a/include/uapi/linux/libc-compat.h +++ b/include/uapi/linux/libc-compat.h -@@ -51,6 +51,14 @@ - /* We have included libc headers... */ - #if !defined(__KERNEL__) +@@ -85,6 +85,14 @@ + + #endif /* _NET_IF_H */ +/* musl defines the ethhdr struct itself in its netinet/if_ether.h. + * Glibc just includes the kernel header and uses a different guard. */ @@ -55,9 +55,9 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org> /* Coordinate with libc netinet/in.h header. */ #if defined(_NETINET_IN_H) -@@ -117,6 +125,9 @@ - * that we need. */ - #else /* defined(__KERNEL__) */ +@@ -161,6 +169,9 @@ + /* For the future if glibc adds IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO */ + #define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 1 +/* Definitions for if_ether.h */ +#define __UAPI_DEF_ETHHDR 1 diff --git a/target/linux/generic/patches-4.4/465-m25p80-mx-disable-software-protection.patch b/target/linux/generic/patches-4.4/465-m25p80-mx-disable-software-protection.patch new file mode 100644 index 0000000000..cc2103b2e8 --- /dev/null +++ b/target/linux/generic/patches-4.4/465-m25p80-mx-disable-software-protection.patch @@ -0,0 +1,14 @@ +Disable software protection bits for Macronix flashes. + +Signed-off-by: Felix Fietkau <nbd@openwrt.org> + +--- a/drivers/mtd/spi-nor/spi-nor.c ++++ b/drivers/mtd/spi-nor/spi-nor.c +@@ -1156,6 +1156,7 @@ int spi_nor_scan(struct spi_nor *nor, co + + if (JEDEC_MFR(info) == SNOR_MFR_ATMEL || + JEDEC_MFR(info) == SNOR_MFR_INTEL || ++ JEDEC_MFR(info) == SNOR_MFR_MACRONIX || + JEDEC_MFR(info) == SNOR_MFR_SST) { + write_enable(nor); + write_sr(nor, 0); diff --git a/target/linux/generic/patches-4.4/494-mtd-ubi-add-EOF-marker-support.patch b/target/linux/generic/patches-4.4/494-mtd-ubi-add-EOF-marker-support.patch index 14fae764fe..dd5ee306ef 100644 --- a/target/linux/generic/patches-4.4/494-mtd-ubi-add-EOF-marker-support.patch +++ b/target/linux/generic/patches-4.4/494-mtd-ubi-add-EOF-marker-support.patch @@ -41,7 +41,7 @@ break; --- a/drivers/mtd/ubi/ubi.h +++ b/drivers/mtd/ubi/ubi.h -@@ -739,6 +739,7 @@ struct ubi_attach_info { +@@ -741,6 +741,7 @@ struct ubi_attach_info { int mean_ec; uint64_t ec_sum; int ec_count; diff --git a/target/linux/generic/patches-4.4/506-yaffs2-using-new-follow_link-and-put_link.patch b/target/linux/generic/patches-4.4/506-yaffs2-using-new-follow_link-and-put_link.patch new file mode 100644 index 0000000000..60c4e378e0 --- /dev/null +++ b/target/linux/generic/patches-4.4/506-yaffs2-using-new-follow_link-and-put_link.patch @@ -0,0 +1,47 @@ +From d4eb3ab036f8c37c5bc5f45ad0fa4dc34b7228c8 Mon Sep 17 00:00:00 2001 +From: Kevin Hao <kexin.hao@windriver.com> +Date: Wed, 24 Feb 2016 14:37:13 +0800 +Subject: [PATCH 3/3] yaffs2: using new ->follow_link() and ->put_link() + calling conventions + +As what we did in commit 680baacbca69 ("new ->follow_link() and +->put_link() calling conventions"). + +Signed-off-by: Kevin Hao <kexin.hao@windriver.com> +Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> +--- + fs/yaffs2/yaffs_vfs.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +--- a/fs/yaffs2/yaffs_vfs.c ++++ b/fs/yaffs2/yaffs_vfs.c +@@ -1060,7 +1060,7 @@ static int yaffs_readlink(struct dentry + } + + #if (YAFFS_NEW_FOLLOW_LINK == 1) +-static void *yaffs_follow_link(struct dentry *dentry, struct nameidata *nd) ++static const char *yaffs_follow_link(struct dentry *dentry, void **cookie) + { + void *ret; + #else +@@ -1082,7 +1082,7 @@ static int yaffs_follow_link(struct dent + goto out; + } + #if (YAFFS_NEW_FOLLOW_LINK == 1) +- nd_set_link(nd, alias); ++ *cookie = alias; + ret = alias; + out: + if (ret_int) +@@ -1114,9 +1114,9 @@ static void yaffs_put_inode(struct inode + #endif + + #if (YAFFS_NEW_FOLLOW_LINK == 1) +-void yaffs_put_link(struct dentry *dentry, struct nameidata *nd, void *alias) ++void yaffs_put_link(struct inode *inode, void *cookie) + { +- kfree(alias); ++ kfree(cookie); + } + #endif + diff --git a/target/linux/generic/patches-4.4/630-packet_socket_type.patch b/target/linux/generic/patches-4.4/630-packet_socket_type.patch index d2f6d7bc16..a7ffccc2a6 100644 --- a/target/linux/generic/patches-4.4/630-packet_socket_type.patch +++ b/target/linux/generic/patches-4.4/630-packet_socket_type.patch @@ -51,7 +51,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> goto out; if (!net_eq(dev_net(dev), sock_net(sk))) -@@ -1982,12 +1984,12 @@ static int packet_rcv(struct sk_buff *sk +@@ -1986,12 +1988,12 @@ static int packet_rcv(struct sk_buff *sk int skb_len = skb->len; unsigned int snaplen, res; @@ -67,7 +67,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> if (!net_eq(dev_net(dev), sock_net(sk))) goto drop; -@@ -2107,12 +2109,12 @@ static int tpacket_rcv(struct sk_buff *s +@@ -2111,12 +2113,12 @@ static int tpacket_rcv(struct sk_buff *s BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h2)) != 32); BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h3)) != 48); @@ -83,7 +83,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> if (!net_eq(dev_net(dev), sock_net(sk))) goto drop; -@@ -3097,6 +3099,7 @@ static int packet_create(struct net *net +@@ -3092,6 +3094,7 @@ static int packet_create(struct net *net mutex_init(&po->pg_vec_lock); po->rollover = NULL; po->prot_hook.func = packet_rcv; @@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> if (sock->type == SOCK_PACKET) po->prot_hook.func = packet_rcv_spkt; -@@ -3712,6 +3715,16 @@ packet_setsockopt(struct socket *sock, i +@@ -3708,6 +3711,16 @@ packet_setsockopt(struct socket *sock, i po->xmit = val ? packet_direct_xmit : dev_queue_xmit; return 0; } @@ -108,7 +108,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> default: return -ENOPROTOOPT; } -@@ -3764,6 +3777,13 @@ static int packet_getsockopt(struct sock +@@ -3760,6 +3773,13 @@ static int packet_getsockopt(struct sock case PACKET_VNET_HDR: val = po->has_vnet_hdr; break; diff --git a/target/linux/generic/patches-4.4/642-bridge_port_isolate.patch b/target/linux/generic/patches-4.4/642-bridge_port_isolate.patch index 6656bbe630..3ece047317 100644 --- a/target/linux/generic/patches-4.4/642-bridge_port_isolate.patch +++ b/target/linux/generic/patches-4.4/642-bridge_port_isolate.patch @@ -11,8 +11,8 @@ Isolating individual bridge ports #define BR_PROXYARP_WIFI BIT(10) +#define BR_ISOLATE_MODE BIT(11) - /* values as per ieee8021QBridgeFdbAgingTime */ - #define BR_MIN_AGEING_TIME (10 * HZ) + #define BR_DEFAULT_AGEING_TIME (300 * HZ) + --- a/net/bridge/br_sysfs_if.c +++ b/net/bridge/br_sysfs_if.c @@ -173,6 +173,22 @@ BRPORT_ATTR_FLAG(unicast_flood, BR_FLOOD @@ -24,7 +24,7 @@ Isolating individual bridge ports + int isolate_mode = (p->flags & BR_ISOLATE_MODE) ? 1 : 0; + return sprintf(buf, "%d\n", isolate_mode); +} -+static ssize_t store_isolate_mode(struct net_bridge_port *p, unsigned long v) ++static int store_isolate_mode(struct net_bridge_port *p, unsigned long v) +{ + if (v) + p->flags |= BR_ISOLATE_MODE; diff --git a/target/linux/generic/patches-4.4/645-bridge_multicast_to_unicast.patch b/target/linux/generic/patches-4.4/645-bridge_multicast_to_unicast.patch index 97a46fd334..bab091262c 100644 --- a/target/linux/generic/patches-4.4/645-bridge_multicast_to_unicast.patch +++ b/target/linux/generic/patches-4.4/645-bridge_multicast_to_unicast.patch @@ -11,8 +11,8 @@ Implement optinal multicast->unicast conversion for igmp snooping #define BR_ISOLATE_MODE BIT(11) +#define BR_MULTICAST_TO_UCAST BIT(12) - /* values as per ieee8021QBridgeFdbAgingTime */ - #define BR_MIN_AGEING_TIME (10 * HZ) + #define BR_DEFAULT_AGEING_TIME (300 * HZ) + --- a/net/bridge/br_multicast.c +++ b/net/bridge/br_multicast.c @@ -42,12 +42,13 @@ static void br_multicast_add_router(stru @@ -172,7 +172,7 @@ Implement optinal multicast->unicast conversion for igmp snooping if (!err) break; } -@@ -1422,7 +1448,8 @@ br_multicast_leave_group(struct net_brid +@@ -1424,7 +1450,8 @@ br_multicast_leave_group(struct net_brid struct net_bridge_port *port, struct br_ip *group, struct bridge_mcast_other_query *other_query, @@ -182,7 +182,7 @@ Implement optinal multicast->unicast conversion for igmp snooping { struct net_bridge_mdb_htable *mdb; struct net_bridge_mdb_entry *mp; -@@ -1446,7 +1473,7 @@ br_multicast_leave_group(struct net_brid +@@ -1448,7 +1475,7 @@ br_multicast_leave_group(struct net_brid for (pp = &mp->ports; (p = mlock_dereference(*pp, br)) != NULL; pp = &p->next) { @@ -191,7 +191,7 @@ Implement optinal multicast->unicast conversion for igmp snooping continue; rcu_assign_pointer(*pp, p->next); -@@ -1509,7 +1536,7 @@ br_multicast_leave_group(struct net_brid +@@ -1511,7 +1538,7 @@ br_multicast_leave_group(struct net_brid for (p = mlock_dereference(mp->ports, br); p != NULL; p = mlock_dereference(p->next, br)) { @@ -200,7 +200,7 @@ Implement optinal multicast->unicast conversion for igmp snooping continue; if (!hlist_unhashed(&p->mglist) && -@@ -1527,8 +1554,8 @@ out: +@@ -1529,8 +1556,8 @@ out: static void br_ip4_multicast_leave_group(struct net_bridge *br, struct net_bridge_port *port, @@ -211,7 +211,7 @@ Implement optinal multicast->unicast conversion for igmp snooping { struct br_ip br_group; struct bridge_mcast_own_query *own_query; -@@ -1543,14 +1570,14 @@ static void br_ip4_multicast_leave_group +@@ -1545,14 +1572,14 @@ static void br_ip4_multicast_leave_group br_group.vid = vid; br_multicast_leave_group(br, port, &br_group, &br->ip4_other_query, @@ -228,7 +228,7 @@ Implement optinal multicast->unicast conversion for igmp snooping { struct br_ip br_group; struct bridge_mcast_own_query *own_query; -@@ -1565,7 +1592,7 @@ static void br_ip6_multicast_leave_group +@@ -1567,7 +1594,7 @@ static void br_ip6_multicast_leave_group br_group.vid = vid; br_multicast_leave_group(br, port, &br_group, &br->ip6_other_query, @@ -237,7 +237,7 @@ Implement optinal multicast->unicast conversion for igmp snooping } #endif -@@ -1574,6 +1601,7 @@ static int br_multicast_ipv4_rcv(struct +@@ -1576,6 +1603,7 @@ static int br_multicast_ipv4_rcv(struct struct sk_buff *skb, u16 vid) { @@ -245,7 +245,7 @@ Implement optinal multicast->unicast conversion for igmp snooping struct sk_buff *skb_trimmed = NULL; struct igmphdr *ih; int err; -@@ -1590,12 +1618,13 @@ static int br_multicast_ipv4_rcv(struct +@@ -1592,12 +1620,13 @@ static int br_multicast_ipv4_rcv(struct BR_INPUT_SKB_CB(skb)->igmp = 1; ih = igmp_hdr(skb); @@ -260,7 +260,7 @@ Implement optinal multicast->unicast conversion for igmp snooping break; case IGMPV3_HOST_MEMBERSHIP_REPORT: err = br_ip4_multicast_igmp3_report(br, port, skb_trimmed, vid); -@@ -1604,7 +1633,7 @@ static int br_multicast_ipv4_rcv(struct +@@ -1606,7 +1635,7 @@ static int br_multicast_ipv4_rcv(struct err = br_ip4_multicast_query(br, port, skb_trimmed, vid); break; case IGMP_HOST_LEAVE_MESSAGE: @@ -269,7 +269,7 @@ Implement optinal multicast->unicast conversion for igmp snooping break; } -@@ -1620,6 +1649,7 @@ static int br_multicast_ipv6_rcv(struct +@@ -1622,6 +1651,7 @@ static int br_multicast_ipv6_rcv(struct struct sk_buff *skb, u16 vid) { @@ -277,7 +277,7 @@ Implement optinal multicast->unicast conversion for igmp snooping struct sk_buff *skb_trimmed = NULL; struct mld_msg *mld; int err; -@@ -1639,8 +1669,9 @@ static int br_multicast_ipv6_rcv(struct +@@ -1641,8 +1671,9 @@ static int br_multicast_ipv6_rcv(struct switch (mld->mld_type) { case ICMPV6_MGM_REPORT: @@ -288,7 +288,7 @@ Implement optinal multicast->unicast conversion for igmp snooping break; case ICMPV6_MLD2_REPORT: err = br_ip6_multicast_mld2_report(br, port, skb_trimmed, vid); -@@ -1649,7 +1680,8 @@ static int br_multicast_ipv6_rcv(struct +@@ -1651,7 +1682,8 @@ static int br_multicast_ipv6_rcv(struct err = br_ip6_multicast_query(br, port, skb_trimmed, vid); break; case ICMPV6_MGM_REDUCTION: @@ -300,17 +300,17 @@ Implement optinal multicast->unicast conversion for igmp snooping --- a/net/bridge/br_private.h +++ b/net/bridge/br_private.h -@@ -158,6 +158,9 @@ struct net_bridge_port_group { +@@ -157,7 +157,9 @@ struct net_bridge_port_group { + struct rcu_head rcu; struct timer_list timer; struct br_ip addr; - unsigned char state; -+ + unsigned char eth_addr[ETH_ALEN]; + unsigned char state; + bool unicast; }; struct net_bridge_mdb_entry -@@ -554,7 +557,8 @@ void br_multicast_free_pg(struct rcu_hea +@@ -554,7 +556,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, diff --git a/target/linux/generic/patches-4.4/655-increase_skb_pad.patch b/target/linux/generic/patches-4.4/655-increase_skb_pad.patch index e46e4709c1..ad95d4c67e 100644 --- a/target/linux/generic/patches-4.4/655-increase_skb_pad.patch +++ b/target/linux/generic/patches-4.4/655-increase_skb_pad.patch @@ -1,6 +1,6 @@ --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h -@@ -2155,7 +2155,7 @@ static inline int pskb_network_may_pull( +@@ -2179,7 +2179,7 @@ static inline int pskb_network_may_pull( * NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8) */ #ifndef NET_SKB_PAD diff --git a/target/linux/generic/patches-4.4/656-skb_reduce_truesize-helper.patch b/target/linux/generic/patches-4.4/656-skb_reduce_truesize-helper.patch deleted file mode 100644 index 341a31b137..0000000000 --- a/target/linux/generic/patches-4.4/656-skb_reduce_truesize-helper.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 4593a806e31119c5bd3faa00c7210ad862d515af Mon Sep 17 00:00:00 2001 -From: Dave Taht <dave.taht@bufferbloat.net> -Date: Mon, 31 Dec 2012 10:02:21 -0800 -Subject: [PATCH 3/7] skb_reduce_truesize: helper function for shrinking skbs - whenever needed - -On embedded devices in particular, large queues of small packets from the rx -path with a large truesize can exist. Reducing their size can reduce -memory pressure. skb_reduce_truesize is a helper function for doing this, -when needed. ---- - include/linux/skbuff.h | 18 ++++++++++++++++++ - 1 file changed, 18 insertions(+) - ---- a/include/linux/skbuff.h -+++ b/include/linux/skbuff.h -@@ -2200,6 +2200,24 @@ static inline void pskb_trim_unique(stru - BUG_ON(err); - } - -+/* -+ * Caller wants to reduce memory needs before queueing skb -+ * The (expensive) copy should not be be done in fast path. -+ */ -+static inline struct sk_buff *skb_reduce_truesize(struct sk_buff *skb) -+{ -+ if (skb->truesize > 2 * SKB_TRUESIZE(skb->len)) { -+ struct sk_buff *nskb; -+ nskb = skb_copy_expand(skb, skb_headroom(skb), 0, -+ GFP_ATOMIC | __GFP_NOWARN); -+ if (nskb) { -+ __kfree_skb(skb); -+ skb = nskb; -+ } -+ } -+ return skb; -+} -+ - /** - * skb_orphan - orphan a buffer - * @skb: buffer to orphan diff --git a/target/linux/generic/patches-4.4/657-qdisc_reduce_truesize.patch b/target/linux/generic/patches-4.4/657-qdisc_reduce_truesize.patch deleted file mode 100644 index d9f5b4fb63..0000000000 --- a/target/linux/generic/patches-4.4/657-qdisc_reduce_truesize.patch +++ /dev/null @@ -1,63 +0,0 @@ -From bc9fec2f87d57bdbff30d296605e24504513f65c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Dave=20T=C3=A4ht?= <dave.taht@bufferbloat.net> -Date: Mon, 17 Sep 2012 19:20:22 -0700 -Subject: [PATCH 4/7] net: add skb_reduce_truesize support to common qdiscs - -Reduce skb size under load when queues begin to fill on the -commont qdiscs. ---- - net/sched/sch_codel.c | 2 ++ - net/sched/sch_fifo.c | 12 ++++++++---- - net/sched/sch_fq_codel.c | 2 ++ - 3 files changed, 12 insertions(+), 4 deletions(-) - ---- a/net/sched/sch_codel.c -+++ b/net/sched/sch_codel.c -@@ -96,6 +96,8 @@ static int codel_qdisc_enqueue(struct sk - struct codel_sched_data *q; - - if (likely(qdisc_qlen(sch) < sch->limit)) { -+ if(qdisc_qlen(sch) > 128) -+ skb = skb_reduce_truesize(skb); - codel_set_enqueue_time(skb); - return qdisc_enqueue_tail(skb, sch); - } ---- a/net/sched/sch_fifo.c -+++ b/net/sched/sch_fifo.c -@@ -29,17 +29,21 @@ static int bfifo_enqueue(struct sk_buff - - static int pfifo_enqueue(struct sk_buff *skb, struct Qdisc *sch) - { -- if (likely(skb_queue_len(&sch->q) < sch->limit)) -+ if (likely(skb_queue_len(&sch->q) < sch->limit)) { -+ if (skb_queue_len(&sch->q) > 128) -+ skb = skb_reduce_truesize(skb); - return qdisc_enqueue_tail(skb, sch); -- -+ } - return qdisc_reshape_fail(skb, sch); - } - - static int pfifo_tail_enqueue(struct sk_buff *skb, struct Qdisc *sch) - { -- if (likely(skb_queue_len(&sch->q) < sch->limit)) -+ if (likely(skb_queue_len(&sch->q) < sch->limit)) { -+ if (skb_queue_len(&sch->q) > 128) -+ skb = skb_reduce_truesize(skb); - return qdisc_enqueue_tail(skb, sch); -- -+ } - /* queue full, remove one skb to fulfill the limit */ - __qdisc_queue_drop_head(sch, &sch->q); - qdisc_qstats_drop(sch); ---- a/net/sched/sch_fq_codel.c -+++ b/net/sched/sch_fq_codel.c -@@ -187,6 +187,8 @@ static int fq_codel_enqueue(struct sk_bu - return ret; - } - idx--; -+ if (sch->q.qlen > 128) -+ skb = skb_reduce_truesize(skb); - - codel_set_enqueue_time(skb); - flow = &q->flows[idx]; diff --git a/target/linux/generic/patches-4.4/660-fq_codel_defaults.patch b/target/linux/generic/patches-4.4/660-fq_codel_defaults.patch index cf4ff6fb18..bbf281009d 100644 --- a/target/linux/generic/patches-4.4/660-fq_codel_defaults.patch +++ b/target/linux/generic/patches-4.4/660-fq_codel_defaults.patch @@ -1,11 +1,13 @@ --- a/net/sched/sch_fq_codel.c +++ b/net/sched/sch_fq_codel.c -@@ -412,7 +412,7 @@ static int fq_codel_init(struct Qdisc *s +@@ -440,8 +440,8 @@ static int fq_codel_init(struct Qdisc *s struct fq_codel_sched_data *q = qdisc_priv(sch); int i; - sch->limit = 10*1024; +- q->flows_cnt = 1024; + sch->limit = 1024; - q->flows_cnt = 1024; ++ q->flows_cnt = 128; + q->drop_batch_size = 64; q->quantum = psched_mtu(qdisc_dev(sch)); q->perturbation = prandom_u32(); diff --git a/target/linux/generic/patches-4.4/661-fq_codel_keep_dropped_stats.patch b/target/linux/generic/patches-4.4/661-fq_codel_keep_dropped_stats.patch index 0efc61b1b0..cb3bb2f28d 100644 --- a/target/linux/generic/patches-4.4/661-fq_codel_keep_dropped_stats.patch +++ b/target/linux/generic/patches-4.4/661-fq_codel_keep_dropped_stats.patch @@ -1,6 +1,6 @@ --- a/net/sched/sch_fq_codel.c +++ b/net/sched/sch_fq_codel.c -@@ -200,7 +200,6 @@ static int fq_codel_enqueue(struct sk_bu +@@ -211,7 +211,6 @@ static int fq_codel_enqueue(struct sk_bu list_add_tail(&flow->flowchain, &q->new_flows); q->new_flow_count++; flow->deficit = q->quantum; diff --git a/target/linux/generic/patches-4.4/662-use_fq_codel_by_default.patch b/target/linux/generic/patches-4.4/662-use_fq_codel_by_default.patch index d3aeb9256f..a1ade521b6 100644 --- a/target/linux/generic/patches-4.4/662-use_fq_codel_by_default.patch +++ b/target/linux/generic/patches-4.4/662-use_fq_codel_by_default.patch @@ -13,7 +13,7 @@ device, it has to decide which ones to send first, which ones to --- a/net/sched/sch_fq_codel.c +++ b/net/sched/sch_fq_codel.c -@@ -623,7 +623,7 @@ static const struct Qdisc_class_ops fq_c +@@ -654,7 +654,7 @@ static const struct Qdisc_class_ops fq_c .walk = fq_codel_walk, }; @@ -22,7 +22,7 @@ .cl_ops = &fq_codel_class_ops, .id = "fq_codel", .priv_size = sizeof(struct fq_codel_sched_data), -@@ -639,6 +639,7 @@ static struct Qdisc_ops fq_codel_qdisc_o +@@ -670,6 +670,7 @@ static struct Qdisc_ops fq_codel_qdisc_o .dump_stats = fq_codel_dump_stats, .owner = THIS_MODULE, }; @@ -42,7 +42,16 @@ struct Qdisc_class_common { --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c -@@ -728,7 +728,7 @@ static void attach_one_default_qdisc(str +@@ -31,7 +31,7 @@ + #include <net/dst.h> + + /* Qdisc to use by default */ +-const struct Qdisc_ops *default_qdisc_ops = &pfifo_fast_ops; ++const struct Qdisc_ops *default_qdisc_ops = &fq_codel_qdisc_ops; + EXPORT_SYMBOL(default_qdisc_ops); + + /* Main transmission queue. */ +@@ -731,7 +731,7 @@ static void attach_one_default_qdisc(str void *_unused) { struct Qdisc *qdisc; @@ -73,3 +82,14 @@ TC_H_MAKE(TC_H_MAJ(sch->handle), TC_H_MIN(i + 1))); if (qdisc == NULL) { +--- a/net/sched/sch_api.c ++++ b/net/sched/sch_api.c +@@ -1948,7 +1948,7 @@ static int __init pktsched_init(void) + return err; + } + +- register_qdisc(&pfifo_fast_ops); ++ register_qdisc(&fq_codel_qdisc_ops); + register_qdisc(&pfifo_qdisc_ops); + register_qdisc(&bfifo_qdisc_ops); + register_qdisc(&pfifo_head_drop_qdisc_ops); diff --git a/target/linux/generic/patches-4.4/663-remove_pfifo_fast.patch b/target/linux/generic/patches-4.4/663-remove_pfifo_fast.patch index d28835b9c6..6f72b19358 100644 --- a/target/linux/generic/patches-4.4/663-remove_pfifo_fast.patch +++ b/target/linux/generic/patches-4.4/663-remove_pfifo_fast.patch @@ -1,6 +1,6 @@ --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c -@@ -435,139 +435,6 @@ struct Qdisc_ops noqueue_qdisc_ops __rea +@@ -438,139 +438,6 @@ struct Qdisc_ops noqueue_qdisc_ops __rea .owner = THIS_MODULE, }; diff --git a/target/linux/generic/patches-4.4/664-codel_fix_3_12.patch b/target/linux/generic/patches-4.4/664-codel_fix_3_12.patch deleted file mode 100644 index 4d4ca250f1..0000000000 --- a/target/linux/generic/patches-4.4/664-codel_fix_3_12.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/net/sched/sch_api.c -+++ b/net/sched/sch_api.c -@@ -1946,7 +1946,7 @@ static int __init pktsched_init(void) - return err; - } - -- register_qdisc(&pfifo_fast_ops); -+ register_qdisc(&fq_codel_qdisc_ops); - register_qdisc(&pfifo_qdisc_ops); - register_qdisc(&bfifo_qdisc_ops); - register_qdisc(&pfifo_head_drop_qdisc_ops); ---- a/net/sched/sch_generic.c -+++ b/net/sched/sch_generic.c -@@ -31,7 +31,7 @@ - #include <net/dst.h> - - /* Qdisc to use by default */ --const struct Qdisc_ops *default_qdisc_ops = &pfifo_fast_ops; -+const struct Qdisc_ops *default_qdisc_ops = &fq_codel_qdisc_ops; - EXPORT_SYMBOL(default_qdisc_ops); - - /* Main transmission queue. */ diff --git a/target/linux/generic/patches-4.4/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch b/target/linux/generic/patches-4.4/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch index d511520dea..657804a277 100644 --- a/target/linux/generic/patches-4.4/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch +++ b/target/linux/generic/patches-4.4/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch @@ -295,15 +295,15 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org> __skb_tunnel_rx(skb, t->dev, t->net); -@@ -1179,6 +1316,7 @@ ip4ip6_tnl_xmit(struct sk_buff *skb, str +@@ -1224,6 +1361,7 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str __u32 mtu; u8 tproto; int err; + struct __ip6_tnl_fmr *fmr; tproto = ACCESS_ONCE(t->parms.proto); - if (tproto != IPPROTO_IPIP && tproto != 0) -@@ -1198,6 +1336,18 @@ ip4ip6_tnl_xmit(struct sk_buff *skb, str + if ((tproto != IPPROTO_IPV6 && tproto != 0) || +@@ -1254,6 +1392,18 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str if (t->parms.flags & IP6_TNL_F_USE_ORIG_FWMARK) fl6.flowi6_mark = skb->mark; @@ -321,8 +321,8 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org> + err = ip6_tnl_xmit2(skb, dev, dsfield, &fl6, encap_limit, &mtu); if (err != 0) { - /* XXX: send ICMP error even if DF is not set. */ -@@ -1366,6 +1516,14 @@ ip6_tnl_change(struct ip6_tnl *t, const + if (err == -EMSGSIZE) +@@ -1368,6 +1518,14 @@ ip6_tnl_change(struct ip6_tnl *t, const t->parms.flowinfo = p->flowinfo; t->parms.link = p->link; t->parms.proto = p->proto; @@ -337,7 +337,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org> ip6_tnl_dst_reset(t); ip6_tnl_link_config(t); return 0; -@@ -1404,6 +1562,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_ +@@ -1406,6 +1564,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_ p->flowinfo = u->flowinfo; p->link = u->link; p->proto = u->proto; @@ -345,7 +345,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org> memcpy(p->name, u->name, sizeof(u->name)); } -@@ -1699,6 +1858,15 @@ static int ip6_tnl_validate(struct nlatt +@@ -1701,6 +1860,15 @@ static int ip6_tnl_validate(struct nlatt return 0; } @@ -361,7 +361,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org> static void ip6_tnl_netlink_parms(struct nlattr *data[], struct __ip6_tnl_parm *parms) { -@@ -1730,6 +1898,46 @@ static void ip6_tnl_netlink_parms(struct +@@ -1732,6 +1900,46 @@ static void ip6_tnl_netlink_parms(struct if (data[IFLA_IPTUN_PROTO]) parms->proto = nla_get_u8(data[IFLA_IPTUN_PROTO]); @@ -408,7 +408,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org> } static int ip6_tnl_newlink(struct net *src_net, struct net_device *dev, -@@ -1782,6 +1990,12 @@ static void ip6_tnl_dellink(struct net_d +@@ -1784,6 +1992,12 @@ static void ip6_tnl_dellink(struct net_d static size_t ip6_tnl_get_size(const struct net_device *dev) { @@ -421,7 +421,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org> return /* IFLA_IPTUN_LINK */ nla_total_size(4) + -@@ -1799,6 +2013,24 @@ static size_t ip6_tnl_get_size(const str +@@ -1801,6 +2015,24 @@ static size_t ip6_tnl_get_size(const str nla_total_size(4) + /* IFLA_IPTUN_PROTO */ nla_total_size(1) + @@ -446,7 +446,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org> 0; } -@@ -1806,6 +2038,9 @@ static int ip6_tnl_fill_info(struct sk_b +@@ -1808,6 +2040,9 @@ static int ip6_tnl_fill_info(struct sk_b { struct ip6_tnl *tunnel = netdev_priv(dev); struct __ip6_tnl_parm *parm = &tunnel->parms; @@ -456,7 +456,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org> if (nla_put_u32(skb, IFLA_IPTUN_LINK, parm->link) || nla_put_in6_addr(skb, IFLA_IPTUN_LOCAL, &parm->laddr) || -@@ -1814,8 +2049,27 @@ static int ip6_tnl_fill_info(struct sk_b +@@ -1816,8 +2051,27 @@ static int ip6_tnl_fill_info(struct sk_b nla_put_u8(skb, IFLA_IPTUN_ENCAP_LIMIT, parm->encap_limit) || nla_put_be32(skb, IFLA_IPTUN_FLOWINFO, parm->flowinfo) || nla_put_u32(skb, IFLA_IPTUN_FLAGS, parm->flags) || @@ -485,7 +485,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org> return 0; nla_put_failure: -@@ -1839,6 +2093,7 @@ static const struct nla_policy ip6_tnl_p +@@ -1841,6 +2095,7 @@ static const struct nla_policy ip6_tnl_p [IFLA_IPTUN_FLOWINFO] = { .type = NLA_U32 }, [IFLA_IPTUN_FLAGS] = { .type = NLA_U32 }, [IFLA_IPTUN_PROTO] = { .type = NLA_U8 }, diff --git a/target/linux/generic/patches-4.4/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch b/target/linux/generic/patches-4.4/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch index be5cf505cc..33c0a0f1b6 100644 --- a/target/linux/generic/patches-4.4/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch +++ b/target/linux/generic/patches-4.4/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch @@ -143,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), -@@ -1883,6 +1900,11 @@ static struct rt6_info *ip6_route_info_c +@@ -1885,6 +1902,11 @@ static struct rt6_info *ip6_route_info_c rt->dst.output = ip6_pkt_prohibit_out; rt->dst.input = ip6_pkt_prohibit; break; @@ -155,7 +155,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org> case RTN_THROW: case RTN_UNREACHABLE: default: -@@ -2484,6 +2506,17 @@ static int ip6_pkt_prohibit_out(struct n +@@ -2486,6 +2508,17 @@ static int ip6_pkt_prohibit_out(struct n return ip6_pkt_drop(skb, ICMPV6_ADM_PROHIBITED, IPSTATS_MIB_OUTNOROUTES); } @@ -173,7 +173,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org> /* * Allocate a dst for local (unicast / anycast) address. */ -@@ -2726,7 +2759,8 @@ static int rtm_to_fib6_config(struct sk_ +@@ -2728,7 +2761,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 || @@ -183,7 +183,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org> cfg->fc_flags |= RTF_REJECT; if (rtm->rtm_type == RTN_LOCAL) -@@ -3085,6 +3119,9 @@ static int rt6_fill_node(struct net *net +@@ -3087,6 +3121,9 @@ static int rt6_fill_node(struct net *net case -EACCES: rtm->rtm_type = RTN_PROHIBIT; break; @@ -193,7 +193,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org> case -EAGAIN: rtm->rtm_type = RTN_THROW; break; -@@ -3358,6 +3395,8 @@ static int ip6_route_dev_notify(struct n +@@ -3360,6 +3397,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); @@ -202,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 -@@ -3574,6 +3613,17 @@ static int __net_init ip6_route_net_init +@@ -3576,6 +3615,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); @@ -220,7 +220,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org> #endif net->ipv6.sysctl.flush_delay = 0; -@@ -3592,6 +3642,8 @@ out: +@@ -3594,6 +3644,8 @@ out: return ret; #ifdef CONFIG_IPV6_MULTIPLE_TABLES @@ -229,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: -@@ -3609,6 +3661,7 @@ static void __net_exit ip6_route_net_exi +@@ -3611,6 +3663,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); @@ -237,7 +237,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org> #endif dst_entries_destroy(&net->ipv6.ip6_dst_ops); } -@@ -3706,6 +3759,9 @@ int __init ip6_route_init(void) +@@ -3708,6 +3761,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-4.4/721-phy_packets.patch b/target/linux/generic/patches-4.4/721-phy_packets.patch index 04bafcdfdc..e232c0f563 100644 --- a/target/linux/generic/patches-4.4/721-phy_packets.patch +++ b/target/linux/generic/patches-4.4/721-phy_packets.patch @@ -1,6 +1,6 @@ --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h -@@ -1297,6 +1297,7 @@ enum netdev_priv_flags { +@@ -1298,6 +1298,7 @@ enum netdev_priv_flags { IFF_NO_QUEUE = 1<<21, IFF_OPENVSWITCH = 1<<22, IFF_L3MDEV_SLAVE = 1<<23, @@ -8,7 +8,7 @@ }; #define IFF_802_1Q_VLAN IFF_802_1Q_VLAN -@@ -1323,6 +1324,7 @@ enum netdev_priv_flags { +@@ -1324,6 +1325,7 @@ enum netdev_priv_flags { #define IFF_NO_QUEUE IFF_NO_QUEUE #define IFF_OPENVSWITCH IFF_OPENVSWITCH #define IFF_L3MDEV_SLAVE IFF_L3MDEV_SLAVE @@ -41,7 +41,7 @@ */ --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h -@@ -2186,6 +2186,10 @@ static inline int pskb_trim(struct sk_bu +@@ -2210,6 +2210,10 @@ static inline int pskb_trim(struct sk_bu return (len < skb->len) ? __pskb_trim(skb, len) : 0; } @@ -52,7 +52,7 @@ /** * pskb_trim_unique - remove end from a paged unique (not cloned) buffer * @skb: buffer to alter -@@ -2308,16 +2312,6 @@ static inline struct sk_buff *dev_alloc_ +@@ -2314,16 +2318,6 @@ static inline struct sk_buff *dev_alloc_ } diff --git a/target/linux/generic/patches-4.4/903-debloat_direct_io.patch b/target/linux/generic/patches-4.4/903-debloat_direct_io.patch index ee85c40b62..460da1dbe0 100644 --- a/target/linux/generic/patches-4.4/903-debloat_direct_io.patch +++ b/target/linux/generic/patches-4.4/903-debloat_direct_io.patch @@ -26,7 +26,7 @@ endif --- a/include/linux/fs.h +++ b/include/linux/fs.h -@@ -2681,6 +2681,7 @@ enum { +@@ -2691,6 +2691,7 @@ enum { DIO_SKIP_DIO_COUNT = 0x08, }; @@ -34,7 +34,7 @@ void dio_end_io(struct bio *bio, int error); ssize_t __blockdev_direct_IO(struct kiocb *iocb, struct inode *inode, -@@ -2688,6 +2689,18 @@ ssize_t __blockdev_direct_IO(struct kioc +@@ -2698,6 +2699,18 @@ ssize_t __blockdev_direct_IO(struct kioc loff_t offset, get_block_t get_block, dio_iodone_t end_io, dio_submit_t submit_io, int flags); diff --git a/target/linux/generic/patches-4.4/997-device_tree_cmdline.patch b/target/linux/generic/patches-4.4/997-device_tree_cmdline.patch deleted file mode 100644 index 566648fcc5..0000000000 --- a/target/linux/generic/patches-4.4/997-device_tree_cmdline.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- a/drivers/of/fdt.c -+++ b/drivers/of/fdt.c -@@ -956,6 +956,9 @@ int __init early_init_dt_scan_chosen(uns - p = of_get_flat_dt_prop(node, "bootargs", &l); - if (p != NULL && l > 0) - strlcpy(data, p, min((int)l, COMMAND_LINE_SIZE)); -+ p = of_get_flat_dt_prop(node, "bootargs-append", &l); -+ if (p != NULL && l > 0) -+ strlcat(data, p, min_t(int, strlen(data) + (int)l, COMMAND_LINE_SIZE)); - - /* - * CONFIG_CMDLINE is meant to be a default in case nothing else ---- a/arch/mips/kernel/prom.c -+++ b/arch/mips/kernel/prom.c -@@ -51,6 +51,9 @@ void * __init early_init_dt_alloc_memory - - void __init __dt_setup_arch(void *bph) - { -+ if (boot_command_line[0] == '\0') -+ strcpy(boot_command_line, arcs_cmdline); -+ - if (!early_init_dt_scan(bph)) - return; - |