mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-18 07:23:59 +00:00
parent
6eba666e73
commit
3089e0e022
@ -42,7 +42,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
|
||||
u64_stats_update_begin(&txq_stats->napi_syncp);
|
||||
u64_stats_add(&txq_stats->napi.tx_packets, tx_packets);
|
||||
@@ -5603,6 +5607,7 @@ static int stmmac_napi_poll_tx(struct na
|
||||
@@ -5605,6 +5609,7 @@ static int stmmac_napi_poll_tx(struct na
|
||||
container_of(napi, struct stmmac_channel, tx_napi);
|
||||
struct stmmac_priv *priv = ch->priv_data;
|
||||
struct stmmac_txq_stats *txq_stats;
|
||||
@ -50,7 +50,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
u32 chan = ch->index;
|
||||
int work_done;
|
||||
|
||||
@@ -5611,7 +5616,7 @@ static int stmmac_napi_poll_tx(struct na
|
||||
@@ -5613,7 +5618,7 @@ static int stmmac_napi_poll_tx(struct na
|
||||
u64_stats_inc(&txq_stats->napi.poll);
|
||||
u64_stats_update_end(&txq_stats->napi_syncp);
|
||||
|
||||
@ -59,7 +59,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
work_done = min(work_done, budget);
|
||||
|
||||
if (work_done < budget && napi_complete_done(napi, work_done)) {
|
||||
@@ -5622,6 +5627,10 @@ static int stmmac_napi_poll_tx(struct na
|
||||
@@ -5624,6 +5629,10 @@ static int stmmac_napi_poll_tx(struct na
|
||||
spin_unlock_irqrestore(&ch->lock, flags);
|
||||
}
|
||||
|
||||
@ -70,7 +70,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
return work_done;
|
||||
}
|
||||
|
||||
@@ -5630,6 +5639,7 @@ static int stmmac_napi_poll_rxtx(struct
|
||||
@@ -5632,6 +5641,7 @@ static int stmmac_napi_poll_rxtx(struct
|
||||
struct stmmac_channel *ch =
|
||||
container_of(napi, struct stmmac_channel, rxtx_napi);
|
||||
struct stmmac_priv *priv = ch->priv_data;
|
||||
@ -78,7 +78,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
int rx_done, tx_done, rxtx_done;
|
||||
struct stmmac_rxq_stats *rxq_stats;
|
||||
struct stmmac_txq_stats *txq_stats;
|
||||
@@ -5645,7 +5655,7 @@ static int stmmac_napi_poll_rxtx(struct
|
||||
@@ -5647,7 +5657,7 @@ static int stmmac_napi_poll_rxtx(struct
|
||||
u64_stats_inc(&txq_stats->napi.poll);
|
||||
u64_stats_update_end(&txq_stats->napi_syncp);
|
||||
|
||||
@ -87,7 +87,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
tx_done = min(tx_done, budget);
|
||||
|
||||
rx_done = stmmac_rx_zc(priv, budget, chan);
|
||||
@@ -5670,6 +5680,10 @@ static int stmmac_napi_poll_rxtx(struct
|
||||
@@ -5672,6 +5682,10 @@ static int stmmac_napi_poll_rxtx(struct
|
||||
spin_unlock_irqrestore(&ch->lock, flags);
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
static inline uint16_t __get_unaligned_le16(const uint8_t *p)
|
||||
--- /dev/null
|
||||
+++ b/tools/include/tools/linux_types.h
|
||||
@@ -0,0 +1,18 @@
|
||||
@@ -0,0 +1,26 @@
|
||||
+#ifndef __LINUX_TYPES_H
|
||||
+#define __LINUX_TYPES_H
|
||||
+
|
||||
@ -47,15 +47,23 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
+
|
||||
+typedef int8_t __s8;
|
||||
+typedef uint8_t __u8;
|
||||
+typedef uint8_t __be8;
|
||||
+typedef uint8_t __le8;
|
||||
+
|
||||
+typedef int16_t __s16;
|
||||
+typedef uint16_t __u16;
|
||||
+typedef uint16_t __be16;
|
||||
+typedef uint16_t __le16;
|
||||
+
|
||||
+typedef int32_t __s32;
|
||||
+typedef uint32_t __u32;
|
||||
+typedef uint32_t __be32;
|
||||
+typedef uint32_t __le32;
|
||||
+
|
||||
+typedef int64_t __s64;
|
||||
+typedef uint64_t __u64;
|
||||
+typedef uint64_t __be64;
|
||||
+typedef uint64_t __le64;
|
||||
+
|
||||
+#endif
|
||||
--- a/tools/include/linux/types.h
|
||||
@ -73,270 +81,3 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
struct page;
|
||||
struct kmem_cache;
|
||||
@@ -56,7 +60,9 @@ typedef __s8 s8;
|
||||
#define __user
|
||||
#endif
|
||||
#define __must_check
|
||||
+#ifndef __cold
|
||||
#define __cold
|
||||
+#endif
|
||||
|
||||
typedef __u16 __bitwise __le16;
|
||||
typedef __u16 __bitwise __be16;
|
||||
--- a/tools/perf/pmu-events/jevents.py
|
||||
+++ b/tools/perf/pmu-events/jevents.py
|
||||
@@ -1197,6 +1197,7 @@ such as "arm/cortex-a34".''',
|
||||
#include "util/header.h"
|
||||
#include "util/pmu.h"
|
||||
#include <string.h>
|
||||
+#include <strings.h>
|
||||
#include <stddef.h>
|
||||
|
||||
struct compact_pmu_event {
|
||||
--- a/tools/arch/x86/include/asm/insn.h
|
||||
+++ b/tools/arch/x86/include/asm/insn.h
|
||||
@@ -7,8 +7,8 @@
|
||||
* Copyright (C) IBM Corporation, 2009
|
||||
*/
|
||||
|
||||
-#include <asm/byteorder.h>
|
||||
/* insn_attr_t is defined in inat.h */
|
||||
+#include <linux/kernel.h>
|
||||
#include "inat.h" /* __ignore_sync_check__ */
|
||||
|
||||
#if defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : defined(__LITTLE_ENDIAN)
|
||||
--- a/tools/arch/x86/include/asm/orc_types.h
|
||||
+++ b/tools/arch/x86/include/asm/orc_types.h
|
||||
@@ -46,7 +46,6 @@
|
||||
#define ORC_TYPE_REGS_PARTIAL 4
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
-#include <asm/byteorder.h>
|
||||
|
||||
/*
|
||||
* This struct is more or less a vastly simplified version of the DWARF Call
|
||||
@@ -59,12 +58,12 @@
|
||||
struct orc_entry {
|
||||
s16 sp_offset;
|
||||
s16 bp_offset;
|
||||
-#if defined(__LITTLE_ENDIAN_BITFIELD)
|
||||
+#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
unsigned sp_reg:4;
|
||||
unsigned bp_reg:4;
|
||||
unsigned type:3;
|
||||
unsigned signal:1;
|
||||
-#elif defined(__BIG_ENDIAN_BITFIELD)
|
||||
+#elif __BYTE_ORDER == __BIG_ENDIAN
|
||||
unsigned bp_reg:4;
|
||||
unsigned sp_reg:4;
|
||||
unsigned unused:4;
|
||||
--- a/tools/arch/x86/lib/insn.c
|
||||
+++ b/tools/arch/x86/lib/insn.c
|
||||
@@ -15,7 +15,11 @@
|
||||
#include "../include/asm/insn.h" /* __ignore_sync_check__ */
|
||||
#include "../include/asm-generic/unaligned.h" /* __ignore_sync_check__ */
|
||||
|
||||
+#ifdef __KERNEL__
|
||||
#include <linux/errno.h>
|
||||
+#else
|
||||
+#include <errno.h>
|
||||
+#endif
|
||||
#include <linux/kconfig.h>
|
||||
|
||||
#include "../include/asm/emulate_prefix.h" /* __ignore_sync_check__ */
|
||||
--- a/tools/include/asm-generic/bitops/fls.h
|
||||
+++ b/tools/include/asm-generic/bitops/fls.h
|
||||
@@ -2,6 +2,8 @@
|
||||
#ifndef _ASM_GENERIC_BITOPS_FLS_H_
|
||||
#define _ASM_GENERIC_BITOPS_FLS_H_
|
||||
|
||||
+#include <string.h>
|
||||
+
|
||||
/**
|
||||
* fls - find last (most-significant) bit set
|
||||
* @x: the word to search
|
||||
@@ -10,7 +12,7 @@
|
||||
* Note fls(0) = 0, fls(1) = 1, fls(0x80000000) = 32.
|
||||
*/
|
||||
|
||||
-static __always_inline int fls(unsigned int x)
|
||||
+static __always_inline int __generic_fls(unsigned int x)
|
||||
{
|
||||
int r = 32;
|
||||
|
||||
@@ -38,5 +40,6 @@ static __always_inline int fls(unsigned
|
||||
}
|
||||
return r;
|
||||
}
|
||||
+#define fls __generic_fls
|
||||
|
||||
#endif /* _ASM_GENERIC_BITOPS_FLS_H_ */
|
||||
--- a/tools/include/asm-generic/bitsperlong.h
|
||||
+++ b/tools/include/asm-generic/bitsperlong.h
|
||||
@@ -4,11 +4,13 @@
|
||||
|
||||
#include <uapi/asm-generic/bitsperlong.h>
|
||||
|
||||
+#ifndef BITS_PER_LONG
|
||||
#ifdef __SIZEOF_LONG__
|
||||
#define BITS_PER_LONG (__CHAR_BIT__ * __SIZEOF_LONG__)
|
||||
#else
|
||||
#define BITS_PER_LONG __WORDSIZE
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
#if BITS_PER_LONG != __BITS_PER_LONG
|
||||
#error Inconsistent word size. Check asm/bitsperlong.h
|
||||
--- a/tools/include/linux/rbtree.h
|
||||
+++ b/tools/include/linux/rbtree.h
|
||||
@@ -18,7 +18,6 @@
|
||||
#define __TOOLS_LINUX_PERF_RBTREE_H
|
||||
|
||||
#include <linux/kernel.h>
|
||||
-#include <linux/stddef.h>
|
||||
|
||||
struct rb_node {
|
||||
unsigned long __rb_parent_color;
|
||||
--- a/tools/objtool/Makefile
|
||||
+++ b/tools/objtool/Makefile
|
||||
@@ -40,7 +40,7 @@ elfshdr := $(shell echo '$(pound)include
|
||||
OBJTOOL_CFLAGS += $(if $(elfshdr),,-DLIBELF_USE_DEPRECATED)
|
||||
|
||||
# Always want host compilation.
|
||||
-HOST_OVERRIDES := CC="$(HOSTCC)" LD="$(HOSTLD)" AR="$(HOSTAR)"
|
||||
+HOST_OVERRIDES := CC="$(HOSTCC) $(HOST_EXTRACFLAGS)" LD="$(HOSTLD)" AR="$(HOSTAR)"
|
||||
|
||||
AWK = awk
|
||||
MKDIR = mkdir
|
||||
@@ -55,6 +55,7 @@ BUILD_ORC := n
|
||||
|
||||
ifeq ($(SRCARCH),x86)
|
||||
BUILD_ORC := y
|
||||
+ CFLAGS += -DBUILD_ORC
|
||||
endif
|
||||
|
||||
export BUILD_ORC
|
||||
--- a/tools/objtool/check.c
|
||||
+++ b/tools/objtool/check.c
|
||||
@@ -1288,11 +1288,12 @@ static int add_ignore_alternatives(struc
|
||||
return 0;
|
||||
}
|
||||
|
||||
+#ifndef BUILD_ORC
|
||||
/*
|
||||
* Symbols that replace INSN_CALL_DYNAMIC, every (tail) call to such a symbol
|
||||
* will be added to the .retpoline_sites section.
|
||||
*/
|
||||
-__weak bool arch_is_retpoline(struct symbol *sym)
|
||||
+bool arch_is_retpoline(struct symbol *sym)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -1301,7 +1302,7 @@ __weak bool arch_is_retpoline(struct sym
|
||||
* Symbols that replace INSN_RETURN, every (tail) call to such a symbol
|
||||
* will be added to the .return_sites section.
|
||||
*/
|
||||
-__weak bool arch_is_rethunk(struct symbol *sym)
|
||||
+bool arch_is_rethunk(struct symbol *sym)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -1310,10 +1311,11 @@ __weak bool arch_is_rethunk(struct symbo
|
||||
* Symbols that are embedded inside other instructions, because sometimes crazy
|
||||
* code exists. These are mostly ignored for validation purposes.
|
||||
*/
|
||||
-__weak bool arch_is_embedded_insn(struct symbol *sym)
|
||||
+bool arch_is_embedded_insn(struct symbol *sym)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
+#endif
|
||||
|
||||
static struct reloc *insn_reloc(struct objtool_file *file, struct instruction *insn)
|
||||
{
|
||||
--- a/tools/objtool/include/objtool/objtool.h
|
||||
+++ b/tools/objtool/include/objtool/objtool.h
|
||||
@@ -12,7 +12,9 @@
|
||||
|
||||
#include <objtool/elf.h>
|
||||
|
||||
+#ifndef __weak
|
||||
#define __weak __attribute__((weak))
|
||||
+#endif
|
||||
|
||||
struct pv_state {
|
||||
bool clean;
|
||||
--- a/tools/objtool/orc_dump.c
|
||||
+++ b/tools/objtool/orc_dump.c
|
||||
@@ -4,10 +4,10 @@
|
||||
*/
|
||||
|
||||
#include <unistd.h>
|
||||
-#include <asm/orc_types.h>
|
||||
#include <objtool/objtool.h>
|
||||
#include <objtool/warn.h>
|
||||
#include <objtool/endianness.h>
|
||||
+#include <asm/orc_types.h>
|
||||
|
||||
static const char *reg_name(unsigned int reg)
|
||||
{
|
||||
--- a/tools/objtool/orc_gen.c
|
||||
+++ b/tools/objtool/orc_gen.c
|
||||
@@ -7,11 +7,11 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <linux/objtool_types.h>
|
||||
-#include <asm/orc_types.h>
|
||||
|
||||
#include <objtool/check.h>
|
||||
#include <objtool/warn.h>
|
||||
#include <objtool/endianness.h>
|
||||
+#include <asm/orc_types.h>
|
||||
|
||||
static int init_orc_entry(struct orc_entry *orc, struct cfi_state *cfi,
|
||||
struct instruction *insn)
|
||||
--- a/tools/objtool/special.c
|
||||
+++ b/tools/objtool/special.c
|
||||
@@ -54,9 +54,11 @@ static const struct special_entry entrie
|
||||
{},
|
||||
};
|
||||
|
||||
-void __weak arch_handle_alternative(unsigned short feature, struct special_alt *alt)
|
||||
+#ifndef BUILD_ORC
|
||||
+void arch_handle_alternative(unsigned short feature, struct special_alt *alt)
|
||||
{
|
||||
}
|
||||
+#endif
|
||||
|
||||
static void reloc_to_sec_off(struct reloc *reloc, struct section **sec,
|
||||
unsigned long *off)
|
||||
--- a/tools/objtool/weak.c
|
||||
+++ b/tools/objtool/weak.c
|
||||
@@ -15,12 +15,14 @@
|
||||
return ENOSYS; \
|
||||
})
|
||||
|
||||
-int __weak orc_dump(const char *_objname)
|
||||
+#ifndef BUILD_ORC
|
||||
+int orc_dump(const char *_objname)
|
||||
{
|
||||
UNSUPPORTED("ORC");
|
||||
}
|
||||
|
||||
-int __weak orc_create(struct objtool_file *file)
|
||||
+int orc_create(struct objtool_file *file)
|
||||
{
|
||||
UNSUPPORTED("ORC");
|
||||
}
|
||||
+#endif
|
||||
--- a/tools/scripts/Makefile.include
|
||||
+++ b/tools/scripts/Makefile.include
|
||||
@@ -92,7 +92,7 @@ LLVM_OBJCOPY ?= llvm-objcopy
|
||||
LLVM_STRIP ?= llvm-strip
|
||||
|
||||
ifeq ($(CC_NO_CLANG), 1)
|
||||
-EXTRA_WARNINGS += -Wstrict-aliasing=3
|
||||
+# EXTRA_WARNINGS += -Wstrict-aliasing=3
|
||||
|
||||
else ifneq ($(CROSS_COMPILE),)
|
||||
# Allow userspace to override CLANG_CROSS_FLAGS to specify their own
|
||||
|
@ -94,7 +94,7 @@ Signed-off-by: Zhi Chen <zhichen@codeaurora.org>
|
||||
#ifdef CONFIG_NF_CONNTRACK_EVENTS
|
||||
--- a/include/net/netns/conntrack.h
|
||||
+++ b/include/net/netns/conntrack.h
|
||||
@@ -105,6 +105,9 @@ struct netns_ct {
|
||||
@@ -104,6 +104,9 @@ struct netns_ct {
|
||||
u8 sysctl_checksum;
|
||||
|
||||
struct ip_conntrack_stat __percpu *stat;
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/include/linux/if_bridge.h
|
||||
+++ b/include/linux/if_bridge.h
|
||||
@@ -71,6 +71,9 @@ void brioctl_set(int (*hook)(struct net
|
||||
@@ -72,6 +72,9 @@ void brioctl_set(int (*hook)(struct net
|
||||
int br_ioctl_call(struct net *net, struct net_bridge *br, unsigned int cmd,
|
||||
struct ifreq *ifr, void __user *uarg);
|
||||
|
||||
@ -49,7 +49,7 @@
|
||||
const struct nf_ct_event_notifier *nb);
|
||||
--- a/net/Kconfig
|
||||
+++ b/net/Kconfig
|
||||
@@ -495,6 +495,9 @@ config FAILOVER
|
||||
@@ -504,6 +504,9 @@ config FAILOVER
|
||||
migration of VMs with direct attached VFs by failing over to the
|
||||
paravirtual datapath when the VF is unplugged.
|
||||
|
||||
@ -109,9 +109,9 @@
|
||||
+ }
|
||||
+#endif
|
||||
|
||||
len = skb->len;
|
||||
trace_net_dev_start_xmit(skb, dev);
|
||||
@@ -5303,6 +5311,11 @@ void netdev_rx_handler_unregister(struct
|
||||
#ifdef CONFIG_ETHERNET_PACKET_MANGLE
|
||||
if (dev->eth_mangle_tx && !(skb = dev->eth_mangle_tx(dev, skb)))
|
||||
@@ -5308,6 +5316,11 @@ void netdev_rx_handler_unregister(struct
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(netdev_rx_handler_unregister);
|
||||
|
||||
@ -123,7 +123,7 @@
|
||||
/*
|
||||
* Limit the use of PFMEMALLOC reserves to those protocols that implement
|
||||
* the special handling of PFMEMALLOC skbs.
|
||||
@@ -5351,6 +5364,10 @@ static int __netif_receive_skb_core(stru
|
||||
@@ -5356,6 +5369,10 @@ static int __netif_receive_skb_core(stru
|
||||
int ret = NET_RX_DROP;
|
||||
__be16 type;
|
||||
|
||||
@ -134,7 +134,7 @@
|
||||
net_timestamp_check(!READ_ONCE(netdev_tstamp_prequeue), skb);
|
||||
|
||||
trace_netif_receive_skb(skb);
|
||||
@@ -5388,6 +5405,15 @@ another_round:
|
||||
@@ -5393,6 +5410,15 @@ another_round:
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user