mirror of
https://github.com/a52xq-dev/kernel.git
synced 2026-10-18 21:58:11 +07:00
This is the 4.19.148 stable release
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAl9vZgoACgkQONu9yGCS aT6CSBAAqsWMXD4MWA35hVDaFmbMOQkZzdDPTIYzRSDIDMqkbtL+4XAPzqfP7yJH CvQwqSi5XxqBFnlZwIMvY9cbhEumYUyWbFT0rK07ZJApT2uDBcfdZiFxDP/I0vQk Fj5uuFFORs39Kv2CUYWHgkyS0KcrSul5kwfxWblJADZNq5eJp6vnOBHMc59uRP14 SaWWXac9ltGecIn2yKkVz28lW0iI8gSnIf5Bj1/kWC8vcRcaWP2biwflwz6PjFi6 dfKWYN4t7wNK/cM0RigRp7suuIcpvcNv5yu+al2Ul0vi4zn5Po8Kt8Bancn/iWR5 5aCtvhT6OyuQfD67HxSMLZLcEH9X/C7pv+0sEIYlOb1j1IiEec4XrEs8ivlFpl0/ weG+fEM6gyd4+IxTBkLAHQah8s4kSM9fWmyrLFqMyw3O1ImvImjrQmWMnZdDWBtO BGe5IuCMaFbCzbTGZRNZ7PG8EF3ayGYl16rE2FsHawDACp97p6Tih5Y6suwp9vYM Ph4IhNWNYTs1DcgOhqKLTnhbbF1IeJ8kJiVU3nOA7xyLwzdAxwHWk8NEN2yxhz5D aM8YS75gAqRp6km9OPKWG+M9THgT4RtI1O/fAA26CRMc505LRi+w4qPtEMJUPocU v6oJwB3T5BJdkdHPGcJi84hjqea2VGzG5x/cTI2a985DaoNtvc8= =uvGG -----END PGP SIGNATURE----- Merge 4.19.148 into android-4.19-stable Changes in 4.19.148 af_key: pfkey_dump needs parameter validation KVM: fix memory leak in kvm_io_bus_unregister_dev() kprobes: fix kill kprobe which has been marked as gone mm/thp: fix __split_huge_pmd_locked() for migration PMD cxgb4: Fix offset when clearing filter byte counters geneve: add transport ports in route lookup for geneve hdlc_ppp: add range checks in ppp_cp_parse_cr() ip: fix tos reflection in ack and reset packets ipv6: avoid lockdep issue in fib6_del() net: DCB: Validate DCB_ATTR_DCB_BUFFER argument net: dsa: rtl8366: Properly clear member config net: ipv6: fix kconfig dependency warning for IPV6_SEG6_HMAC net: sch_generic: aviod concurrent reset and enqueue op for lockless qdisc nfp: use correct define to return NONE fec tipc: Fix memory leak in tipc_group_create_member() tipc: fix shutdown() of connection oriented socket tipc: use skb_unshare() instead in tipc_buf_append() bnxt_en: return proper error codes in bnxt_show_temp bnxt_en: Protect bnxt_set_eee() and bnxt_set_pauseparam() with mutex. net: phy: Avoid NPD upon phy_detach() when driver is unbound net: qrtr: check skb_put_padto() return value net: add __must_check to skb_put_padto() ipv4: Update exception handling for multipath routes via same device MAINTAINERS: add CLANG/LLVM BUILD SUPPORT info kbuild: add OBJSIZE variable for the size tool Documentation/llvm: add documentation on building w/ Clang/LLVM Documentation/llvm: fix the name of llvm-size net: wan: wanxl: use allow to pass CROSS_COMPILE_M68k for rebuilding firmware net: wan: wanxl: use $(M68KCC) instead of $(M68KAS) for rebuilding firmware x86/boot: kbuild: allow readelf executable to be specified kbuild: remove AS variable kbuild: replace AS=clang with LLVM_IAS=1 kbuild: support LLVM=1 to switch the default tools to Clang/LLVM mm: memcg: fix memcg reclaim soft lockup tcp_bbr: refactor bbr_target_cwnd() for general inflight provisioning tcp_bbr: adapt cwnd based on ack aggregation estimation serial: 8250: Avoid error message on reprobe Linux 4.19.148 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I5077093f58ae882547e3b23c5bbd4dfe78116071
This commit is contained in:
commit
5d5e582aab
34 changed files with 550 additions and 161 deletions
87
Documentation/kbuild/llvm.rst
Normal file
87
Documentation/kbuild/llvm.rst
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
==============================
|
||||
Building Linux with Clang/LLVM
|
||||
==============================
|
||||
|
||||
This document covers how to build the Linux kernel with Clang and LLVM
|
||||
utilities.
|
||||
|
||||
About
|
||||
-----
|
||||
|
||||
The Linux kernel has always traditionally been compiled with GNU toolchains
|
||||
such as GCC and binutils. Ongoing work has allowed for `Clang
|
||||
<https://clang.llvm.org/>`_ and `LLVM <https://llvm.org/>`_ utilities to be
|
||||
used as viable substitutes. Distributions such as `Android
|
||||
<https://www.android.com/>`_, `ChromeOS
|
||||
<https://www.chromium.org/chromium-os>`_, and `OpenMandriva
|
||||
<https://www.openmandriva.org/>`_ use Clang built kernels. `LLVM is a
|
||||
collection of toolchain components implemented in terms of C++ objects
|
||||
<https://www.aosabook.org/en/llvm.html>`_. Clang is a front-end to LLVM that
|
||||
supports C and the GNU C extensions required by the kernel, and is pronounced
|
||||
"klang," not "see-lang."
|
||||
|
||||
Clang
|
||||
-----
|
||||
|
||||
The compiler used can be swapped out via `CC=` command line argument to `make`.
|
||||
`CC=` should be set when selecting a config and during a build.
|
||||
|
||||
make CC=clang defconfig
|
||||
|
||||
make CC=clang
|
||||
|
||||
Cross Compiling
|
||||
---------------
|
||||
|
||||
A single Clang compiler binary will typically contain all supported backends,
|
||||
which can help simplify cross compiling.
|
||||
|
||||
ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make CC=clang
|
||||
|
||||
`CROSS_COMPILE` is not used to prefix the Clang compiler binary, instead
|
||||
`CROSS_COMPILE` is used to set a command line flag: `--target <triple>`. For
|
||||
example:
|
||||
|
||||
clang --target aarch64-linux-gnu foo.c
|
||||
|
||||
LLVM Utilities
|
||||
--------------
|
||||
|
||||
LLVM has substitutes for GNU binutils utilities. Kbuild supports `LLVM=1`
|
||||
to enable them.
|
||||
|
||||
make LLVM=1
|
||||
|
||||
They can be enabled individually. The full list of the parameters:
|
||||
|
||||
make CC=clang LD=ld.lld AR=llvm-ar NM=llvm-nm STRIP=llvm-strip \\
|
||||
OBJCOPY=llvm-objcopy OBJDUMP=llvm-objdump OBJSIZE=llvm-size \\
|
||||
READELF=llvm-readelf HOSTCC=clang HOSTCXX=clang++ HOSTAR=llvm-ar \\
|
||||
HOSTLD=ld.lld
|
||||
|
||||
Currently, the integrated assembler is disabled by default. You can pass
|
||||
`LLVM_IAS=1` to enable it.
|
||||
|
||||
Getting Help
|
||||
------------
|
||||
|
||||
- `Website <https://clangbuiltlinux.github.io/>`_
|
||||
- `Mailing List <https://groups.google.com/forum/#!forum/clang-built-linux>`_: <clang-built-linux@googlegroups.com>
|
||||
- `Issue Tracker <https://github.com/ClangBuiltLinux/linux/issues>`_
|
||||
- IRC: #clangbuiltlinux on chat.freenode.net
|
||||
- `Telegram <https://t.me/ClangBuiltLinux>`_: @ClangBuiltLinux
|
||||
- `Wiki <https://github.com/ClangBuiltLinux/linux/wiki>`_
|
||||
- `Beginner Bugs <https://github.com/ClangBuiltLinux/linux/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22>`_
|
||||
|
||||
Getting LLVM
|
||||
-------------
|
||||
|
||||
- http://releases.llvm.org/download.html
|
||||
- https://github.com/llvm/llvm-project
|
||||
- https://llvm.org/docs/GettingStarted.html
|
||||
- https://llvm.org/docs/CMake.html
|
||||
- https://apt.llvm.org/
|
||||
- https://www.archlinux.org/packages/extra/x86_64/llvm/
|
||||
- https://github.com/ClangBuiltLinux/tc-build
|
||||
- https://github.com/ClangBuiltLinux/linux/wiki/Building-Clang-from-source
|
||||
- https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/
|
||||
|
|
@ -3613,6 +3613,15 @@ M: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
|
|||
S: Maintained
|
||||
F: .clang-format
|
||||
|
||||
CLANG/LLVM BUILD SUPPORT
|
||||
L: clang-built-linux@googlegroups.com
|
||||
W: https://clangbuiltlinux.github.io/
|
||||
B: https://github.com/ClangBuiltLinux/linux/issues
|
||||
C: irc://chat.freenode.net/clangbuiltlinux
|
||||
S: Supported
|
||||
K: \b(?i:clang|llvm)\b
|
||||
F: Documentation/kbuild/llvm.rst
|
||||
|
||||
CLEANCACHE API
|
||||
M: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
|
||||
L: linux-kernel@vger.kernel.org
|
||||
|
|
|
|||
38
Makefile
38
Makefile
|
|
@ -1,7 +1,7 @@
|
|||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 19
|
||||
SUBLEVEL = 147
|
||||
SUBLEVEL = 148
|
||||
EXTRAVERSION =
|
||||
NAME = "People's Front"
|
||||
|
||||
|
|
@ -358,8 +358,13 @@ HOST_LFS_CFLAGS := $(shell getconf LFS_CFLAGS 2>/dev/null)
|
|||
HOST_LFS_LDFLAGS := $(shell getconf LFS_LDFLAGS 2>/dev/null)
|
||||
HOST_LFS_LIBS := $(shell getconf LFS_LIBS 2>/dev/null)
|
||||
|
||||
HOSTCC = gcc
|
||||
HOSTCXX = g++
|
||||
ifneq ($(LLVM),)
|
||||
HOSTCC = clang
|
||||
HOSTCXX = clang++
|
||||
else
|
||||
HOSTCC = gcc
|
||||
HOSTCXX = g++
|
||||
endif
|
||||
KBUILD_HOSTCFLAGS := -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 \
|
||||
-fomit-frame-pointer -std=gnu89 $(HOST_LFS_CFLAGS) \
|
||||
$(HOSTCFLAGS)
|
||||
|
|
@ -368,15 +373,28 @@ KBUILD_HOSTLDFLAGS := $(HOST_LFS_LDFLAGS) $(HOSTLDFLAGS)
|
|||
KBUILD_HOSTLDLIBS := $(HOST_LFS_LIBS) $(HOSTLDLIBS)
|
||||
|
||||
# Make variables (CC, etc...)
|
||||
AS = $(CROSS_COMPILE)as
|
||||
LD = $(CROSS_COMPILE)ld
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
CPP = $(CC) -E
|
||||
ifneq ($(LLVM),)
|
||||
CC = clang
|
||||
LD = ld.lld
|
||||
AR = llvm-ar
|
||||
NM = llvm-nm
|
||||
OBJCOPY = llvm-objcopy
|
||||
OBJDUMP = llvm-objdump
|
||||
READELF = llvm-readelf
|
||||
OBJSIZE = llvm-size
|
||||
STRIP = llvm-strip
|
||||
else
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
LD = $(CROSS_COMPILE)ld
|
||||
AR = $(CROSS_COMPILE)ar
|
||||
NM = $(CROSS_COMPILE)nm
|
||||
STRIP = $(CROSS_COMPILE)strip
|
||||
OBJCOPY = $(CROSS_COMPILE)objcopy
|
||||
OBJDUMP = $(CROSS_COMPILE)objdump
|
||||
READELF = $(CROSS_COMPILE)readelf
|
||||
OBJSIZE = $(CROSS_COMPILE)size
|
||||
STRIP = $(CROSS_COMPILE)strip
|
||||
endif
|
||||
LEX = flex
|
||||
YACC = bison
|
||||
AWK = awk
|
||||
|
|
@ -432,8 +450,8 @@ KBUILD_LDFLAGS :=
|
|||
GCC_PLUGINS_CFLAGS :=
|
||||
CLANG_FLAGS :=
|
||||
|
||||
export ARCH SRCARCH CONFIG_SHELL HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE AS LD CC
|
||||
export CPP AR NM STRIP OBJCOPY OBJDUMP KBUILD_HOSTLDFLAGS KBUILD_HOSTLDLIBS
|
||||
export ARCH SRCARCH CONFIG_SHELL HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE LD CC
|
||||
export CPP AR NM STRIP OBJCOPY OBJDUMP OBJSIZE READELF KBUILD_HOSTLDFLAGS KBUILD_HOSTLDLIBS
|
||||
export MAKE LEX YACC AWK GENKSYMS INSTALLKERNEL PERL PYTHON PYTHON2 PYTHON3 UTS_MACHINE
|
||||
export HOSTCXX KBUILD_HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS
|
||||
|
||||
|
|
@ -495,7 +513,9 @@ endif
|
|||
ifneq ($(GCC_TOOLCHAIN),)
|
||||
CLANG_FLAGS += --gcc-toolchain=$(GCC_TOOLCHAIN)
|
||||
endif
|
||||
ifneq ($(LLVM_IAS),1)
|
||||
CLANG_FLAGS += -no-integrated-as
|
||||
endif
|
||||
CLANG_FLAGS += -Werror=unknown-warning-option
|
||||
KBUILD_CFLAGS += $(CLANG_FLAGS)
|
||||
KBUILD_AFLAGS += $(CLANG_FLAGS)
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ vmlinux-objs-$(CONFIG_EFI_MIXED) += $(obj)/efi_thunk_$(BITS).o
|
|||
quiet_cmd_check_data_rel = DATAREL $@
|
||||
define cmd_check_data_rel
|
||||
for obj in $(filter %.o,$^); do \
|
||||
${CROSS_COMPILE}readelf -S $$obj | grep -qF .rel.local && { \
|
||||
$(READELF) -S $$obj | grep -qF .rel.local && { \
|
||||
echo "error: $$obj has data relocations!" >&2; \
|
||||
exit 1; \
|
||||
} || true; \
|
||||
|
|
|
|||
|
|
@ -452,13 +452,19 @@ int rtl8366_vlan_del(struct dsa_switch *ds, int port,
|
|||
return ret;
|
||||
|
||||
if (vid == vlanmc.vid) {
|
||||
/* clear VLAN member configurations */
|
||||
vlanmc.vid = 0;
|
||||
vlanmc.priority = 0;
|
||||
vlanmc.member = 0;
|
||||
vlanmc.untag = 0;
|
||||
vlanmc.fid = 0;
|
||||
|
||||
/* Remove this port from the VLAN */
|
||||
vlanmc.member &= ~BIT(port);
|
||||
vlanmc.untag &= ~BIT(port);
|
||||
/*
|
||||
* If no ports are members of this VLAN
|
||||
* anymore then clear the whole member
|
||||
* config so it can be reused.
|
||||
*/
|
||||
if (!vlanmc.member && vlanmc.untag) {
|
||||
vlanmc.vid = 0;
|
||||
vlanmc.priority = 0;
|
||||
vlanmc.fid = 0;
|
||||
}
|
||||
ret = smi->ops->set_vlan_mc(smi, i, &vlanmc);
|
||||
if (ret) {
|
||||
dev_err(smi->dev,
|
||||
|
|
|
|||
|
|
@ -6837,18 +6837,16 @@ static ssize_t bnxt_show_temp(struct device *dev,
|
|||
struct hwrm_temp_monitor_query_output *resp;
|
||||
struct bnxt *bp = dev_get_drvdata(dev);
|
||||
u32 len = 0;
|
||||
int rc;
|
||||
|
||||
resp = bp->hwrm_cmd_resp_addr;
|
||||
bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_TEMP_MONITOR_QUERY, -1, -1);
|
||||
mutex_lock(&bp->hwrm_cmd_lock);
|
||||
if (!_hwrm_send_message_silent(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT))
|
||||
rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT);
|
||||
if (!rc)
|
||||
len = sprintf(buf, "%u\n", resp->temp * 1000); /* display millidegree */
|
||||
mutex_unlock(&bp->hwrm_cmd_lock);
|
||||
|
||||
if (len)
|
||||
return len;
|
||||
|
||||
return sprintf(buf, "unknown\n");
|
||||
return rc ?: len;
|
||||
}
|
||||
static SENSOR_DEVICE_ATTR(temp1_input, 0444, bnxt_show_temp, NULL, 0);
|
||||
|
||||
|
|
@ -6868,7 +6866,16 @@ static void bnxt_hwmon_close(struct bnxt *bp)
|
|||
|
||||
static void bnxt_hwmon_open(struct bnxt *bp)
|
||||
{
|
||||
struct hwrm_temp_monitor_query_input req = {0};
|
||||
struct pci_dev *pdev = bp->pdev;
|
||||
int rc;
|
||||
|
||||
bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_TEMP_MONITOR_QUERY, -1, -1);
|
||||
rc = hwrm_send_message_silent(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT);
|
||||
if (rc == -EACCES || rc == -EOPNOTSUPP) {
|
||||
bnxt_hwmon_close(bp);
|
||||
return;
|
||||
}
|
||||
|
||||
bp->hwmon_dev = hwmon_device_register_with_groups(&pdev->dev,
|
||||
DRV_MODULE_NAME, bp,
|
||||
|
|
|
|||
|
|
@ -1369,9 +1369,12 @@ static int bnxt_set_pauseparam(struct net_device *dev,
|
|||
if (!BNXT_SINGLE_PF(bp))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
mutex_lock(&bp->link_lock);
|
||||
if (epause->autoneg) {
|
||||
if (!(link_info->autoneg & BNXT_AUTONEG_SPEED))
|
||||
return -EINVAL;
|
||||
if (!(link_info->autoneg & BNXT_AUTONEG_SPEED)) {
|
||||
rc = -EINVAL;
|
||||
goto pause_exit;
|
||||
}
|
||||
|
||||
link_info->autoneg |= BNXT_AUTONEG_FLOW_CTRL;
|
||||
if (bp->hwrm_spec_code >= 0x10201)
|
||||
|
|
@ -1392,11 +1395,11 @@ static int bnxt_set_pauseparam(struct net_device *dev,
|
|||
if (epause->tx_pause)
|
||||
link_info->req_flow_ctrl |= BNXT_LINK_PAUSE_TX;
|
||||
|
||||
if (netif_running(dev)) {
|
||||
mutex_lock(&bp->link_lock);
|
||||
if (netif_running(dev))
|
||||
rc = bnxt_hwrm_set_pause(bp);
|
||||
mutex_unlock(&bp->link_lock);
|
||||
}
|
||||
|
||||
pause_exit:
|
||||
mutex_unlock(&bp->link_lock);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
|
@ -2113,8 +2116,7 @@ static int bnxt_set_eee(struct net_device *dev, struct ethtool_eee *edata)
|
|||
struct bnxt *bp = netdev_priv(dev);
|
||||
struct ethtool_eee *eee = &bp->eee;
|
||||
struct bnxt_link_info *link_info = &bp->link_info;
|
||||
u32 advertising =
|
||||
_bnxt_fw_to_ethtool_adv_spds(link_info->advertising, 0);
|
||||
u32 advertising;
|
||||
int rc = 0;
|
||||
|
||||
if (!BNXT_SINGLE_PF(bp))
|
||||
|
|
@ -2123,19 +2125,23 @@ static int bnxt_set_eee(struct net_device *dev, struct ethtool_eee *edata)
|
|||
if (!(bp->flags & BNXT_FLAG_EEE_CAP))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
mutex_lock(&bp->link_lock);
|
||||
advertising = _bnxt_fw_to_ethtool_adv_spds(link_info->advertising, 0);
|
||||
if (!edata->eee_enabled)
|
||||
goto eee_ok;
|
||||
|
||||
if (!(link_info->autoneg & BNXT_AUTONEG_SPEED)) {
|
||||
netdev_warn(dev, "EEE requires autoneg\n");
|
||||
return -EINVAL;
|
||||
rc = -EINVAL;
|
||||
goto eee_exit;
|
||||
}
|
||||
if (edata->tx_lpi_enabled) {
|
||||
if (bp->lpi_tmr_hi && (edata->tx_lpi_timer > bp->lpi_tmr_hi ||
|
||||
edata->tx_lpi_timer < bp->lpi_tmr_lo)) {
|
||||
netdev_warn(dev, "Valid LPI timer range is %d and %d microsecs\n",
|
||||
bp->lpi_tmr_lo, bp->lpi_tmr_hi);
|
||||
return -EINVAL;
|
||||
rc = -EINVAL;
|
||||
goto eee_exit;
|
||||
} else if (!bp->lpi_tmr_hi) {
|
||||
edata->tx_lpi_timer = eee->tx_lpi_timer;
|
||||
}
|
||||
|
|
@ -2145,7 +2151,8 @@ static int bnxt_set_eee(struct net_device *dev, struct ethtool_eee *edata)
|
|||
} else if (edata->advertised & ~advertising) {
|
||||
netdev_warn(dev, "EEE advertised %x must be a subset of autoneg advertised speeds %x\n",
|
||||
edata->advertised, advertising);
|
||||
return -EINVAL;
|
||||
rc = -EINVAL;
|
||||
goto eee_exit;
|
||||
}
|
||||
|
||||
eee->advertised = edata->advertised;
|
||||
|
|
@ -2157,6 +2164,8 @@ eee_ok:
|
|||
if (netif_running(dev))
|
||||
rc = bnxt_hwrm_set_link_setting(bp, false, true);
|
||||
|
||||
eee_exit:
|
||||
mutex_unlock(&bp->link_lock);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1591,13 +1591,16 @@ out:
|
|||
static int configure_filter_tcb(struct adapter *adap, unsigned int tid,
|
||||
struct filter_entry *f)
|
||||
{
|
||||
if (f->fs.hitcnts)
|
||||
if (f->fs.hitcnts) {
|
||||
set_tcb_field(adap, f, tid, TCB_TIMESTAMP_W,
|
||||
TCB_TIMESTAMP_V(TCB_TIMESTAMP_M) |
|
||||
TCB_TIMESTAMP_V(TCB_TIMESTAMP_M),
|
||||
TCB_TIMESTAMP_V(0ULL),
|
||||
1);
|
||||
set_tcb_field(adap, f, tid, TCB_RTT_TS_RECENT_AGE_W,
|
||||
TCB_RTT_TS_RECENT_AGE_V(TCB_RTT_TS_RECENT_AGE_M),
|
||||
TCB_TIMESTAMP_V(0ULL) |
|
||||
TCB_RTT_TS_RECENT_AGE_V(0ULL),
|
||||
1);
|
||||
}
|
||||
|
||||
if (f->fs.newdmac)
|
||||
set_tcb_tflag(adap, f, tid, TF_CCTRL_ECE_S, 1,
|
||||
|
|
|
|||
|
|
@ -744,8 +744,8 @@ nfp_port_get_fecparam(struct net_device *netdev,
|
|||
struct nfp_eth_table_port *eth_port;
|
||||
struct nfp_port *port;
|
||||
|
||||
param->active_fec = ETHTOOL_FEC_NONE_BIT;
|
||||
param->fec = ETHTOOL_FEC_NONE_BIT;
|
||||
param->active_fec = ETHTOOL_FEC_NONE;
|
||||
param->fec = ETHTOOL_FEC_NONE;
|
||||
|
||||
port = nfp_port_from_netdev(netdev);
|
||||
eth_port = nfp_port_get_eth_port(port);
|
||||
|
|
|
|||
|
|
@ -721,7 +721,8 @@ static struct rtable *geneve_get_v4_rt(struct sk_buff *skb,
|
|||
struct net_device *dev,
|
||||
struct geneve_sock *gs4,
|
||||
struct flowi4 *fl4,
|
||||
const struct ip_tunnel_info *info)
|
||||
const struct ip_tunnel_info *info,
|
||||
__be16 dport, __be16 sport)
|
||||
{
|
||||
bool use_cache = ip_tunnel_dst_cache_usable(skb, info);
|
||||
struct geneve_dev *geneve = netdev_priv(dev);
|
||||
|
|
@ -737,6 +738,8 @@ static struct rtable *geneve_get_v4_rt(struct sk_buff *skb,
|
|||
fl4->flowi4_proto = IPPROTO_UDP;
|
||||
fl4->daddr = info->key.u.ipv4.dst;
|
||||
fl4->saddr = info->key.u.ipv4.src;
|
||||
fl4->fl4_dport = dport;
|
||||
fl4->fl4_sport = sport;
|
||||
|
||||
tos = info->key.tos;
|
||||
if ((tos == 1) && !geneve->collect_md) {
|
||||
|
|
@ -771,7 +774,8 @@ static struct dst_entry *geneve_get_v6_dst(struct sk_buff *skb,
|
|||
struct net_device *dev,
|
||||
struct geneve_sock *gs6,
|
||||
struct flowi6 *fl6,
|
||||
const struct ip_tunnel_info *info)
|
||||
const struct ip_tunnel_info *info,
|
||||
__be16 dport, __be16 sport)
|
||||
{
|
||||
bool use_cache = ip_tunnel_dst_cache_usable(skb, info);
|
||||
struct geneve_dev *geneve = netdev_priv(dev);
|
||||
|
|
@ -787,6 +791,9 @@ static struct dst_entry *geneve_get_v6_dst(struct sk_buff *skb,
|
|||
fl6->flowi6_proto = IPPROTO_UDP;
|
||||
fl6->daddr = info->key.u.ipv6.dst;
|
||||
fl6->saddr = info->key.u.ipv6.src;
|
||||
fl6->fl6_dport = dport;
|
||||
fl6->fl6_sport = sport;
|
||||
|
||||
prio = info->key.tos;
|
||||
if ((prio == 1) && !geneve->collect_md) {
|
||||
prio = ip_tunnel_get_dsfield(ip_hdr(skb), skb);
|
||||
|
|
@ -833,14 +840,15 @@ static int geneve_xmit_skb(struct sk_buff *skb, struct net_device *dev,
|
|||
__be16 df;
|
||||
int err;
|
||||
|
||||
rt = geneve_get_v4_rt(skb, dev, gs4, &fl4, info);
|
||||
sport = udp_flow_src_port(geneve->net, skb, 1, USHRT_MAX, true);
|
||||
rt = geneve_get_v4_rt(skb, dev, gs4, &fl4, info,
|
||||
geneve->info.key.tp_dst, sport);
|
||||
if (IS_ERR(rt))
|
||||
return PTR_ERR(rt);
|
||||
|
||||
skb_tunnel_check_pmtu(skb, &rt->dst,
|
||||
GENEVE_IPV4_HLEN + info->options_len);
|
||||
|
||||
sport = udp_flow_src_port(geneve->net, skb, 1, USHRT_MAX, true);
|
||||
if (geneve->collect_md) {
|
||||
tos = ip_tunnel_ecn_encap(key->tos, ip_hdr(skb), skb);
|
||||
ttl = key->ttl;
|
||||
|
|
@ -875,13 +883,14 @@ static int geneve6_xmit_skb(struct sk_buff *skb, struct net_device *dev,
|
|||
__be16 sport;
|
||||
int err;
|
||||
|
||||
dst = geneve_get_v6_dst(skb, dev, gs6, &fl6, info);
|
||||
sport = udp_flow_src_port(geneve->net, skb, 1, USHRT_MAX, true);
|
||||
dst = geneve_get_v6_dst(skb, dev, gs6, &fl6, info,
|
||||
geneve->info.key.tp_dst, sport);
|
||||
if (IS_ERR(dst))
|
||||
return PTR_ERR(dst);
|
||||
|
||||
skb_tunnel_check_pmtu(skb, dst, GENEVE_IPV6_HLEN + info->options_len);
|
||||
|
||||
sport = udp_flow_src_port(geneve->net, skb, 1, USHRT_MAX, true);
|
||||
if (geneve->collect_md) {
|
||||
prio = ip_tunnel_ecn_encap(key->tos, ip_hdr(skb), skb);
|
||||
ttl = key->ttl;
|
||||
|
|
@ -958,13 +967,18 @@ static int geneve_fill_metadata_dst(struct net_device *dev, struct sk_buff *skb)
|
|||
{
|
||||
struct ip_tunnel_info *info = skb_tunnel_info(skb);
|
||||
struct geneve_dev *geneve = netdev_priv(dev);
|
||||
__be16 sport;
|
||||
|
||||
if (ip_tunnel_info_af(info) == AF_INET) {
|
||||
struct rtable *rt;
|
||||
struct flowi4 fl4;
|
||||
struct geneve_sock *gs4 = rcu_dereference(geneve->sock4);
|
||||
|
||||
rt = geneve_get_v4_rt(skb, dev, gs4, &fl4, info);
|
||||
struct geneve_sock *gs4 = rcu_dereference(geneve->sock4);
|
||||
sport = udp_flow_src_port(geneve->net, skb,
|
||||
1, USHRT_MAX, true);
|
||||
|
||||
rt = geneve_get_v4_rt(skb, dev, gs4, &fl4, info,
|
||||
geneve->info.key.tp_dst, sport);
|
||||
if (IS_ERR(rt))
|
||||
return PTR_ERR(rt);
|
||||
|
||||
|
|
@ -974,9 +988,13 @@ static int geneve_fill_metadata_dst(struct net_device *dev, struct sk_buff *skb)
|
|||
} else if (ip_tunnel_info_af(info) == AF_INET6) {
|
||||
struct dst_entry *dst;
|
||||
struct flowi6 fl6;
|
||||
struct geneve_sock *gs6 = rcu_dereference(geneve->sock6);
|
||||
|
||||
dst = geneve_get_v6_dst(skb, dev, gs6, &fl6, info);
|
||||
struct geneve_sock *gs6 = rcu_dereference(geneve->sock6);
|
||||
sport = udp_flow_src_port(geneve->net, skb,
|
||||
1, USHRT_MAX, true);
|
||||
|
||||
dst = geneve_get_v6_dst(skb, dev, gs6, &fl6, info,
|
||||
geneve->info.key.tp_dst, sport);
|
||||
if (IS_ERR(dst))
|
||||
return PTR_ERR(dst);
|
||||
|
||||
|
|
@ -987,8 +1005,7 @@ static int geneve_fill_metadata_dst(struct net_device *dev, struct sk_buff *skb)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
info->key.tp_src = udp_flow_src_port(geneve->net, skb,
|
||||
1, USHRT_MAX, true);
|
||||
info->key.tp_src = sport;
|
||||
info->key.tp_dst = geneve->info.key.tp_dst;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1154,7 +1154,8 @@ void phy_detach(struct phy_device *phydev)
|
|||
|
||||
phy_led_triggers_unregister(phydev);
|
||||
|
||||
module_put(phydev->mdio.dev.driver->owner);
|
||||
if (phydev->mdio.dev.driver)
|
||||
module_put(phydev->mdio.dev.driver->owner);
|
||||
|
||||
/* If the device had no specific driver before (i.e. - it
|
||||
* was using the generic driver), we unbind the device
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ config WANXL_BUILD_FIRMWARE
|
|||
depends on WANXL && !PREVENT_FIRMWARE_BUILD
|
||||
help
|
||||
Allows you to rebuild firmware run by the QUICC processor.
|
||||
It requires as68k, ld68k and hexdump programs.
|
||||
It requires m68k toolchains and hexdump programs.
|
||||
|
||||
You should never need this option, say N.
|
||||
|
||||
|
|
|
|||
|
|
@ -41,17 +41,17 @@ $(obj)/wanxl.o: $(obj)/wanxlfw.inc
|
|||
|
||||
ifeq ($(CONFIG_WANXL_BUILD_FIRMWARE),y)
|
||||
ifeq ($(ARCH),m68k)
|
||||
AS68K = $(AS)
|
||||
LD68K = $(LD)
|
||||
M68KCC = $(CC)
|
||||
M68KLD = $(LD)
|
||||
else
|
||||
AS68K = as68k
|
||||
LD68K = ld68k
|
||||
M68KCC = $(CROSS_COMPILE_M68K)gcc
|
||||
M68KLD = $(CROSS_COMPILE_M68K)ld
|
||||
endif
|
||||
|
||||
quiet_cmd_build_wanxlfw = BLD FW $@
|
||||
cmd_build_wanxlfw = \
|
||||
$(CPP) -D__ASSEMBLY__ -Wp,-MD,$(depfile) -I$(srctree)/include/uapi $< | $(AS68K) -m68360 -o $(obj)/wanxlfw.o; \
|
||||
$(LD68K) --oformat binary -Ttext 0x1000 $(obj)/wanxlfw.o -o $(obj)/wanxlfw.bin; \
|
||||
$(M68KCC) -D__ASSEMBLY__ -Wp,-MD,$(depfile) -I$(srctree)/include/uapi -c -o $(obj)/wanxlfw.o $<; \
|
||||
$(M68KLD) --oformat binary -Ttext 0x1000 $(obj)/wanxlfw.o -o $(obj)/wanxlfw.bin; \
|
||||
hexdump -ve '"\n" 16/1 "0x%02X,"' $(obj)/wanxlfw.bin | sed 's/0x ,//g;1s/^/static const u8 firmware[]={/;$$s/,$$/\n};\n/' >$(obj)/wanxlfw.inc; \
|
||||
rm -f $(obj)/wanxlfw.bin $(obj)/wanxlfw.o
|
||||
|
||||
|
|
|
|||
|
|
@ -386,11 +386,8 @@ static void ppp_cp_parse_cr(struct net_device *dev, u16 pid, u8 id,
|
|||
}
|
||||
|
||||
for (opt = data; len; len -= opt[1], opt += opt[1]) {
|
||||
if (len < 2 || len < opt[1]) {
|
||||
dev->stats.rx_errors++;
|
||||
kfree(out);
|
||||
return; /* bad packet, drop silently */
|
||||
}
|
||||
if (len < 2 || opt[1] < 2 || len < opt[1])
|
||||
goto err_out;
|
||||
|
||||
if (pid == PID_LCP)
|
||||
switch (opt[0]) {
|
||||
|
|
@ -398,6 +395,8 @@ static void ppp_cp_parse_cr(struct net_device *dev, u16 pid, u8 id,
|
|||
continue; /* MRU always OK and > 1500 bytes? */
|
||||
|
||||
case LCP_OPTION_ACCM: /* async control character map */
|
||||
if (opt[1] < sizeof(valid_accm))
|
||||
goto err_out;
|
||||
if (!memcmp(opt, valid_accm,
|
||||
sizeof(valid_accm)))
|
||||
continue;
|
||||
|
|
@ -409,6 +408,8 @@ static void ppp_cp_parse_cr(struct net_device *dev, u16 pid, u8 id,
|
|||
}
|
||||
break;
|
||||
case LCP_OPTION_MAGIC:
|
||||
if (len < 6)
|
||||
goto err_out;
|
||||
if (opt[1] != 6 || (!opt[2] && !opt[3] &&
|
||||
!opt[4] && !opt[5]))
|
||||
break; /* reject invalid magic number */
|
||||
|
|
@ -427,6 +428,11 @@ static void ppp_cp_parse_cr(struct net_device *dev, u16 pid, u8 id,
|
|||
ppp_cp_event(dev, pid, RCR_GOOD, CP_CONF_ACK, id, req_len, data);
|
||||
|
||||
kfree(out);
|
||||
return;
|
||||
|
||||
err_out:
|
||||
dev->stats.rx_errors++;
|
||||
kfree(out);
|
||||
}
|
||||
|
||||
static int ppp_rx(struct sk_buff *skb)
|
||||
|
|
|
|||
|
|
@ -1062,8 +1062,10 @@ int serial8250_register_8250_port(struct uart_8250_port *up)
|
|||
serial8250_apply_quirks(uart);
|
||||
ret = uart_add_one_port(&serial8250_reg,
|
||||
&uart->port);
|
||||
if (ret == 0)
|
||||
ret = uart->port.line;
|
||||
if (ret)
|
||||
goto err;
|
||||
|
||||
ret = uart->port.line;
|
||||
} else {
|
||||
dev_info(uart->port.dev,
|
||||
"skipping CIR port at 0x%lx / 0x%llx, IRQ %d\n",
|
||||
|
|
@ -1088,6 +1090,11 @@ int serial8250_register_8250_port(struct uart_8250_port *up)
|
|||
mutex_unlock(&serial_mutex);
|
||||
|
||||
return ret;
|
||||
|
||||
err:
|
||||
uart->port.dev = NULL;
|
||||
mutex_unlock(&serial_mutex);
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL(serial8250_register_8250_port);
|
||||
|
||||
|
|
|
|||
|
|
@ -3014,8 +3014,9 @@ static inline int skb_padto(struct sk_buff *skb, unsigned int len)
|
|||
* is untouched. Otherwise it is extended. Returns zero on
|
||||
* success. The skb is freed on error if @free_on_error is true.
|
||||
*/
|
||||
static inline int __skb_put_padto(struct sk_buff *skb, unsigned int len,
|
||||
bool free_on_error)
|
||||
static inline int __must_check __skb_put_padto(struct sk_buff *skb,
|
||||
unsigned int len,
|
||||
bool free_on_error)
|
||||
{
|
||||
unsigned int size = skb->len;
|
||||
|
||||
|
|
@ -3038,7 +3039,7 @@ static inline int __skb_put_padto(struct sk_buff *skb, unsigned int len,
|
|||
* is untouched. Otherwise it is extended. Returns zero on
|
||||
* success. The skb is freed on error.
|
||||
*/
|
||||
static inline int skb_put_padto(struct sk_buff *skb, unsigned int len)
|
||||
static inline int __must_check skb_put_padto(struct sk_buff *skb, unsigned int len)
|
||||
{
|
||||
return __skb_put_padto(skb, len, true);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -139,8 +139,8 @@ struct inet_connection_sock {
|
|||
} icsk_mtup;
|
||||
u32 icsk_user_timeout;
|
||||
|
||||
u64 icsk_ca_priv[88 / sizeof(u64)];
|
||||
#define ICSK_CA_PRIV_SIZE (11 * sizeof(u64))
|
||||
u64 icsk_ca_priv[104 / sizeof(u64)];
|
||||
#define ICSK_CA_PRIV_SIZE (13 * sizeof(u64))
|
||||
};
|
||||
|
||||
#define ICSK_TIME_RETRANS 1 /* Retransmit timer */
|
||||
|
|
|
|||
|
|
@ -2061,6 +2061,9 @@ static void kill_kprobe(struct kprobe *p)
|
|||
{
|
||||
struct kprobe *kp;
|
||||
|
||||
if (WARN_ON_ONCE(kprobe_gone(p)))
|
||||
return;
|
||||
|
||||
p->flags |= KPROBE_FLAG_GONE;
|
||||
if (kprobe_aggrprobe(p)) {
|
||||
/*
|
||||
|
|
@ -2243,7 +2246,10 @@ static int kprobes_module_callback(struct notifier_block *nb,
|
|||
mutex_lock(&kprobe_mutex);
|
||||
for (i = 0; i < KPROBE_TABLE_SIZE; i++) {
|
||||
head = &kprobe_table[i];
|
||||
hlist_for_each_entry_rcu(p, head, hlist)
|
||||
hlist_for_each_entry_rcu(p, head, hlist) {
|
||||
if (kprobe_gone(p))
|
||||
continue;
|
||||
|
||||
if (within_module_init((unsigned long)p->addr, mod) ||
|
||||
(checkcore &&
|
||||
within_module_core((unsigned long)p->addr, mod))) {
|
||||
|
|
@ -2260,6 +2266,7 @@ static int kprobes_module_callback(struct notifier_block *nb,
|
|||
*/
|
||||
kill_kprobe(p);
|
||||
}
|
||||
}
|
||||
}
|
||||
mutex_unlock(&kprobe_mutex);
|
||||
return NOTIFY_DONE;
|
||||
|
|
|
|||
|
|
@ -2145,7 +2145,7 @@ static void __split_huge_pmd_locked(struct vm_area_struct *vma, pmd_t *pmd,
|
|||
put_page(page);
|
||||
add_mm_counter(mm, mm_counter_file(page), -HPAGE_PMD_NR);
|
||||
return;
|
||||
} else if (is_huge_zero_pmd(*pmd)) {
|
||||
} else if (pmd_trans_huge(*pmd) && is_huge_zero_pmd(*pmd)) {
|
||||
/*
|
||||
* FIXME: Do we want to invalidate secondary mmu by calling
|
||||
* mmu_notifier_invalidate_range() see comments below inside
|
||||
|
|
@ -2233,27 +2233,33 @@ static void __split_huge_pmd_locked(struct vm_area_struct *vma, pmd_t *pmd,
|
|||
pte = pte_offset_map(&_pmd, addr);
|
||||
BUG_ON(!pte_none(*pte));
|
||||
set_pte_at(mm, addr, pte, entry);
|
||||
atomic_inc(&page[i]._mapcount);
|
||||
if (!pmd_migration)
|
||||
atomic_inc(&page[i]._mapcount);
|
||||
pte_unmap(pte);
|
||||
}
|
||||
|
||||
/*
|
||||
* Set PG_double_map before dropping compound_mapcount to avoid
|
||||
* false-negative page_mapped().
|
||||
*/
|
||||
if (compound_mapcount(page) > 1 && !TestSetPageDoubleMap(page)) {
|
||||
for (i = 0; i < HPAGE_PMD_NR; i++)
|
||||
atomic_inc(&page[i]._mapcount);
|
||||
}
|
||||
|
||||
if (atomic_add_negative(-1, compound_mapcount_ptr(page))) {
|
||||
/* Last compound_mapcount is gone. */
|
||||
__dec_node_page_state(page, NR_ANON_THPS);
|
||||
if (TestClearPageDoubleMap(page)) {
|
||||
/* No need in mapcount reference anymore */
|
||||
if (!pmd_migration) {
|
||||
/*
|
||||
* Set PG_double_map before dropping compound_mapcount to avoid
|
||||
* false-negative page_mapped().
|
||||
*/
|
||||
if (compound_mapcount(page) > 1 &&
|
||||
!TestSetPageDoubleMap(page)) {
|
||||
for (i = 0; i < HPAGE_PMD_NR; i++)
|
||||
atomic_dec(&page[i]._mapcount);
|
||||
atomic_inc(&page[i]._mapcount);
|
||||
}
|
||||
|
||||
lock_page_memcg(page);
|
||||
if (atomic_add_negative(-1, compound_mapcount_ptr(page))) {
|
||||
/* Last compound_mapcount is gone. */
|
||||
__dec_lruvec_page_state(page, NR_ANON_THPS);
|
||||
if (TestClearPageDoubleMap(page)) {
|
||||
/* No need in mapcount reference anymore */
|
||||
for (i = 0; i < HPAGE_PMD_NR; i++)
|
||||
atomic_dec(&page[i]._mapcount);
|
||||
}
|
||||
}
|
||||
unlock_page_memcg(page);
|
||||
}
|
||||
|
||||
smp_wmb(); /* make pte visible before pmd */
|
||||
|
|
|
|||
|
|
@ -2710,6 +2710,14 @@ static bool shrink_node(pg_data_t *pgdat, struct scan_control *sc)
|
|||
unsigned long reclaimed;
|
||||
unsigned long scanned;
|
||||
|
||||
/*
|
||||
* This loop can become CPU-bound when target memcgs
|
||||
* aren't eligible for reclaim - either because they
|
||||
* don't have any reclaimable pages, or because their
|
||||
* memory is explicitly protected. Avoid soft lockups.
|
||||
*/
|
||||
cond_resched();
|
||||
|
||||
switch (mem_cgroup_protected(root, memcg)) {
|
||||
case MEMCG_PROT_MIN:
|
||||
/*
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue