Linux 5.10.178
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.10.178 kernel.
All users of the 5.10 kernel series must upgrade.
The updated 5.10.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.10.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/devicetree/bindings/serial/renesas,scif.yaml | 4 Documentation/networking/ip-sysctl.rst | 2 Documentation/powerpc/associativity.rst | 104 + Documentation/sound/hd-audio/models.rst | 2 Makefile | 10 arch/powerpc/include/asm/firmware.h | 7 arch/powerpc/include/asm/prom.h | 3 arch/powerpc/include/asm/topology.h | 6 arch/powerpc/kernel/prom_init.c | 3 arch/powerpc/mm/numa.c | 433 +++- arch/powerpc/platforms/pseries/firmware.c | 3 arch/powerpc/platforms/pseries/hotplug-cpu.c | 2 arch/powerpc/platforms/pseries/hotplug-memory.c | 2 arch/powerpc/platforms/pseries/lpar.c | 4 arch/powerpc/platforms/pseries/papr_scm.c | 7 arch/riscv/Kconfig | 22 arch/riscv/Makefile | 12 arch/riscv/kernel/signal.c | 9 arch/s390/kvm/intercept.c | 32 arch/x86/kernel/sysfb_efi.c | 8 arch/x86/kernel/x86_init.c | 4 arch/x86/pci/fixup.c | 21 crypto/asymmetric_keys/pkcs7_verify.c | 10 crypto/asymmetric_keys/verify_pefile.c | 32 drivers/clk/sprd/common.c | 9 drivers/gpio/Kconfig | 2 drivers/gpio/gpio-davinci.c | 2 drivers/gpu/drm/armada/armada_drv.c | 1 drivers/gpu/drm/bridge/lontium-lt9611.c | 1 drivers/gpu/drm/drm_panel_orientation_quirks.c | 13 drivers/gpu/drm/nouveau/dispnv50/disp.c | 32 drivers/gpu/drm/nouveau/nouveau_dp.c | 8 drivers/gpu/drm/panfrost/panfrost_mmu.c | 1 drivers/hv/connection.c | 4 drivers/hwtracing/coresight/coresight-etm4x-core.c | 2 drivers/i2c/busses/i2c-imx-lpi2c.c | 2 drivers/i2c/busses/i2c-ocores.c | 35 drivers/iio/adc/ad7791.c | 2 drivers/iio/adc/ti-ads7950.c | 1 drivers/iio/dac/cio-dac.c | 4 drivers/iio/light/cm32181.c | 12 drivers/infiniband/core/cma.c | 60 drivers/infiniband/core/verbs.c | 2 drivers/infiniband/hw/mlx5/main.c | 16 drivers/media/platform/ti-vpe/cal.c | 4 drivers/mtd/mtdblock.c | 12 drivers/mtd/nand/raw/meson_nand.c | 6 drivers/mtd/nand/raw/stm32_fmc2_nand.c | 3 drivers/mtd/ubi/build.c | 21 drivers/mtd/ubi/wl.c | 5 drivers/net/ethernet/cadence/macb_main.c | 4 drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c | 8 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 drivers/net/ethernet/sun/niu.c | 2 drivers/net/ethernet/ti/am65-cpsw-nuss.c | 6 drivers/net/phy/sfp.c | 13 drivers/net/wireless/marvell/mwifiex/pcie.c | 2 drivers/net/wireless/marvell/mwifiex/sdio.c | 2 drivers/pinctrl/pinctrl-amd.c | 36 drivers/power/supply/cros_usbpd-charger.c | 2 drivers/pwm/pwm-cros-ec.c | 1 drivers/pwm/pwm-sprd.c | 1 drivers/scsi/iscsi_tcp.c | 3 drivers/scsi/ses.c | 20 drivers/tty/serial/fsl_lpuart.c | 8 drivers/tty/serial/sh-sci.c | 10 drivers/usb/host/xhci-tegra.c | 6 drivers/usb/host/xhci.c | 6 drivers/usb/serial/cp210x.c | 1 drivers/usb/serial/option.c | 10 drivers/usb/typec/altmodes/displayport.c | 6 drivers/video/fbdev/core/fbmem.c | 2 drivers/watchdog/sbsa_gwdt.c | 1 fs/btrfs/disk-io.c | 17 fs/btrfs/super.c | 2 fs/nfsd/nfs4callback.c | 4 fs/nilfs2/segment.c | 3 fs/nilfs2/super.c | 2 fs/nilfs2/the_nilfs.c | 12 fs/ocfs2/dlmglue.c | 8 fs/ocfs2/super.c | 3 fs/proc/proc_sysctl.c | 6 include/linux/ftrace.h | 2 include/linux/kexec.h | 2 include/linux/sysctl.h | 2 include/net/netns/ipv4.h | 100 init/Kconfig | 12 kernel/cgroup/cpuset.c | 6 kernel/events/core.c | 2 kernel/kexec.c | 41 kernel/kexec_core.c | 28 kernel/kexec_file.c | 4 kernel/kexec_internal.h | 15 kernel/ksysfs.c | 7 kernel/sched/fair.c | 15 kernel/sysctl.c | 65 kernel/trace/ftrace.c | 15 kernel/trace/ring_buffer.c | 13 kernel/trace/trace.c | 1 mm/swapfile.c | 3 net/9p/trans_xen.c | 4 net/bluetooth/hidp/core.c | 2 net/bluetooth/l2cap_core.c | 24 net/can/isotp.c | 17 net/can/j1939/transport.c | 5 net/core/netpoll.c | 19 net/ipv4/icmp.c | 5 net/ipv4/sysctl_net_ipv4.c | 203 +- net/ipv6/ip6_output.c | 7 net/ipv6/udp.c | 8 net/mac80211/sta_info.c | 3 net/qrtr/Makefile | 3 net/qrtr/af_qrtr.c | 1303 +++++++++++++ net/qrtr/ns.c | 15 net/qrtr/qrtr.c | 1288 ------------ net/sctp/socket.c | 4 net/sctp/stream_interleave.c | 3 net/sunrpc/svcauth_unix.c | 17 scripts/Kconfig.include | 6 scripts/as-version.sh | 69 scripts/dummy-tools/gcc | 6 sound/firewire/tascam/tascam-stream.c | 2 sound/i2c/cs8427.c | 7 sound/pci/emu10k1/emupcm.c | 4 sound/pci/hda/patch_realtek.c | 1 sound/pci/hda/patch_sigmatel.c | 10 sound/soc/codecs/hdac_hdmi.c | 17 tools/lib/bpf/btf_dump.c | 11 tools/testing/selftests/intel_pstate/aperf.c | 22 129 files changed, 2779 insertions(+), 1854 deletions(-)
Alexander Stein (1):
i2c: imx-lpi2c: clean rx/tx buffers upon new message
Andrii Nakryiko (1):
libbpf: Fix single-line struct definition output in btf_dump
Aneesh Kumar K.V (6):
powerpc/pseries: rename min_common_depth to primary_domain_index powerpc/pseries: Rename TYPE1_AFFINITY to FORM1_AFFINITY powerpc/pseries: Consolidate different NUMA distance update code paths powerpc/pseries: Add a helper for form1 cpu distance powerpc/pseries: Add support for FORM2 associativity powerpc/papr_scm: Update the NUMA distance table for the target node
Arnd Bergmann (1):
kexec: move locking into do_kexec_load
Arseniy Krasnov (1):
mtd: rawnand: meson: fix bitmask for length in command word
Bang Li (1):
mtdblock: tolerate corrected bit-flips
Basavaraj Natikar (1):
x86/PCI: Add quirk for AMD XHCI controller that loses MSI-X state in D3hot
Biju Das (2):
tty: serial: sh-sci: Fix transmit end interrupt handler
tty: serial: sh-sci: Fix Rx on RZ/G2L SCI
Bjørn Mork (1):
USB: serial: option: add Quectel RM500U-CN modem
Boris Brezillon (1):
drm/panfrost: Fix the panfrost_mmu_map_fault_addr() error path
Christoph Hellwig (1):
btrfs: fix fast csum implementation detection
Christophe JAILLET (1):
drm/armada: Fix a potential double free in an error handling path
Christophe Kerello (2):
mtd: rawnand: stm32_fmc2: remove unsupported EDO mode
mtd: rawnand: stm32_fmc2: use timings.mode instead of checking tRC_min
Chunyan Zhang (1):
clk: sprd: set max_register according to mapping range
Corinna Vinschen (1):
net: stmmac: fix up RX flow hash indirection table when setting channels
D Scott Phillips (1):
xhci: also avoid the XHCI_ZERO_64B_REGS quirk with a passthrough iommu
Dai Ngo (1):
NFSD: callback request does not use correct credential for AUTH_SYS
Daniel Vetter (1):
fbmem: Reject FB_ACTIVATE_KD_TEXT from userspace
David Sterba (1):
btrfs: print checksum type and implementation at mount time
Denis Plotnikov (1):
qlcnic: check pci_reset_function result
Dhruva Gole (1):
gpio: davinci: Add irq chip flag to skip set wake
Eduard Zingerman (1):
bpftool: Print newline before '}' for struct with padding only fields
Enrico Sau (1):
USB: serial: option: add Telit FE990 compositions
Eric Dumazet (5):
icmp: guard against too small mtu
sysctl: add proc_dou8vec_minmax()
ipv4: shrink netns_ipv4 with sysctl conversions
tcp: convert elligible sysctls to u8
udp6: fix potential access to stale information
Felix Fietkau (1):
wifi: mac80211: fix invalid drv_sta_pre_rcu_remove calls for non-uploaded sta
Gaosheng Cui (1):
Revert "media: ti: cal: fix possible memory leak in cal_ctx_create()"
Geert Uytterhoeven (1):
dt-bindings: serial: renesas,scif: Fix 4th IRQ for 4-IRQ SCIFs
George Cherian (1):
watchdog: sbsa_wdog: Make sure the timeout programming is within the limits
Grant Grundler (1):
power: supply: cros_usbpd: reclassify "default case!" as debug
Greg Kroah-Hartman (1):
Linux 5.10.178
Gregor Herburger (1):
i2c: ocores: generate stop condition after timeout in polling mode
Hans de Goede (2):
efi: sysfb_efi: Add quirk for Lenovo Yoga Book X91F/L
drm: panel-orientation-quirks: Add quirk for Lenovo Yoga Book X90F
Harshit Mogalapalli (1):
niu: Fix missing unwind goto in niu_alloc_channels()
Heming Zhao (1):
ocfs2: fix freeing uninitialized resource on ocfs2_dlm_shutdown
Ivan Bornyakov (1):
net: sfp: initialize sfp->i2c_block_size at sfp allocation
Jakub Kicinski (1):
net: don't let netpoll invoke NAPI if in xmit context
Jason Montleon (1):
ASoC: hdac_hdmi: use set_stream() instead of set_tdm_slots()
Jeff Layton (1):
sunrpc: only free unix grouplist after RCU settles
Jeremy Soller (1):
ALSA: hda/realtek: Add quirk for Clevo X370SNW
Jiri Kosina (1):
scsi: ses: Handle enclosure with just a primary component gracefully
John Keeping (1):
ftrace: Mark get_lock_parent_ip() __always_inline
Kai-Heng Feng (1):
iio: light: cm32181: Unregister second I2C client if present
Kan Liang (1):
perf/core: Fix the same task check in perf_event_set_output
Karol Herbst (1):
drm/nouveau/disp: Support more modes by checking with lower bpc
Kees Jan Koster (1):
USB: serial: cp210x: add Silicon Labs IFS-USB-DATACABLE IDs
Kornel Dulęba (1):
Revert "pinctrl: amd: Disable and mask interrupts on resume"
Krzysztof Kozlowski (1):
wifi: mwifiex: mark OF related data as maybe unused
Kuniyuki Iwashima (1):
sysctl: Fix data-races in proc_dou8vec_minmax().
Lars-Peter Clausen (1):
iio: adc: ti-ads7950: Set can_sleep flag for GPIO chip
Lee Jones (1):
mtd: ubi: wl: Fix a couple of kernel-doc issues
Luca Weiss (1):
net: qrtr: combine nameservice into main module
Luiz Augusto von Dentz (1):
Bluetooth: L2CAP: Fix use-after-free in l2cap_disconnect_{req,rsp}Maher Sanalla (1):
IB/mlx5: Add support for 400G_8X lane speed
Mark Zhang (1):
RDMA/cma: Allow UD qp_type to join multicast only
Masahiro Yamada (2):
kbuild: check the minimum assembler version in Kconfig
kbuild: check CONFIG_AS_IS_LLVM instead of LLVM_IAS
Mathis Salmen (1):
riscv: add icache flush for nommu sigreturn trampoline
Matija Glavinic Pecotic (1):
x86/rtc: Remove __init for runtime functions
Meir Lichtinger (1):
IB/mlx5: Add support for NDR link speed
Michal Sojka (1):
can: isotp: isotp_ops: fix poll() to not report false EPOLLOUT events
Min Li (1):
Bluetooth: Fix race condition in hidp_session_thread
Mohammed Gamal (1):
Drivers: vmbus: Check for channel allocation before looking up relids
Nathan Chancellor (2):
kbuild: Switch to 'f' variants of integrated assembler flag
riscv: Handle zicsr/zifencei issues between clang and binutils
Nico Boehr (1):
KVM: s390: pv: fix external interruption loop not always detected
Nuno Sá (1):
iio: adc: ad7791: fix IRQ flags
Oleksij Rempel (1):
can: j1939: j1939_tp_tx_dat_new(): fix out-of-bounds memory access
Oswald Buddenhagen (4):
ALSA: emu10k1: fix capture interrupt handler unlinking
ALSA: hda/sigmatel: add pin overrides for Intel DP45SG motherboard
ALSA: i2c/cs8427: fix iec958 mixer control deactivation
ALSA: hda/sigmatel: fix S/PDIF out on Intel D*45* motherboards
RD Babiera (1):
usb: typec: altmodes/displayport: Fix configure initial pin assignment
Randy Dunlap (1):
gpio: GPIO_REGMAP: select REGMAP instead of depending on it
Robbie Harwood (2):
verify_pefile: relax wrapper length check
asymmetric_keys: log on fatal failures in PE/pkcs7
Robert Foss (1):
drm/bridge: lt9611: Fix PLL being unable to lock
Roman Gushchin (1):
net: macb: fix a memory corruption in extended buffer descriptor mode
Rongwei Wang (1):
mm/swap: fix swap_info_struct race between swapoff and get_swap_pages()
Ryusuke Konishi (2):
nilfs2: fix potential UAF of struct nilfs_sc_info in nilfs_segctor_thread()
nilfs2: fix sysfs interface lifetime
Saravanan Vajravel (1):
RDMA/core: Fix GID entry ref leak when create_ah fails
Sherry Sun (1):
tty: serial: fsl_lpuart: avoid checking for transfer complete when UARTCTRL_SBK is asserted in lpuart32_tx_empty
Siddharth Vadapalli (1):
net: ethernet: ti: am65-cpsw: Fix mdio cleanup in probe
Sricharan Ramabadhran (1):
net: qrtr: Do not do DEL_SERVER broadcast after DEL_CLIENT
Steve Clevenger (1):
coresight-etm4: Fix for() loop drvdata->nr_addr_cmp range bug
Steven Rostedt (Google) (1):
tracing: Free error logs of tracing instances
Tommi Rantala (1):
selftests: intel_pstate: ftime() is deprecated
Uwe Kleine-König (2):
pwm: cros-ec: Explicitly set .polarity in .get_state()
pwm: sprd: Explicitly set .polarity in .get_state()
Valentin Schneider (2):
kexec: turn all kexec_mutex acquisitions into trylocks panic, kexec: make __crash_kexec() NMI safe
Vincent Guittot (1):
sched/fair: Fix imbalance overflow
Waiman Long (1):
cgroup/cpuset: Wake up cpuset_attach_wq tasks in cpuset_cancel_attach()
Wayne Chang (1):
usb: xhci: tegra: fix sleep in atomic call
William Breathitt Gray (1):
iio: dac: cio-dac: Fix max DAC write value check for 12-bit
Xin Long (2):
sctp: check send stream number after wait_for_sndbuf
sctp: fix a potential overflow in sctp_ifwdtsn_skip
Xu Biang (1):
ALSA: firewire-tascam: add missing unwind goto in snd_tscm_stream_start_duplex()
YueHaibing (1):
tcp: restrict net.ipv4.tcp_app_win
ZhaoLong Wang (1):
ubi: Fix deadlock caused by recursively holding work_sem
Zheng Wang (1):
9p/xen : Fix use after free bug in xen_9pfs_front_remove due to race condition
Zheng Yejian (2):
ftrace: Fix issue that 'direct->addr' not restored in modify_ftrace_direct()
ring-buffer: Fix race while reader and writer are on the same page
Zhihao Cheng (1):
ubi: Fix failure attaching when vid_hdr offset equals to (sub)page size
Zhong Jinghua (1):
scsi: iscsi_tcp: Check that sock is valid before iscsi_set_param()
Ziyang Xuan (3):
net: qrtr: Fix a refcount bug in qrtr_recvmsg()
ipv6: Fix an uninit variable access bug in __ip6_make_skb()
net: qrtr: Fix an uninit variable access bug in qrtr_tx_resume()
zgpeng (1):
sched/fair: Move calculate of avg_load to a better location
Greg Kroah-Hartman
maintainerDocumentation/devicetree/bindings/serial/renesas,scif.yaml +2 -2
@@ -74,7 +74,7 @@ properties: - description: Error interrupt - description: Receive buffer full interrupt - description: Transmit buffer empty interrupt - - description: Transmit End interrupt + - description: Break interrupt - items: - description: Error interrupt - description: Receive buffer full interrupt
@@ -89,7 +89,7 @@ properties: - const: eri - const: rxi - const: txi - - const: tei + - const: bri - items: - const: eri - const: rxi
Documentation/networking/ip-sysctl.rst +2 -0
@@ -272,6 +272,8 @@ tcp_app_win - INTEGER Reserve max(window/2^tcp_app_win, mss) of window for application buffer. Value 0 is special, it means that nothing is reserved. + Possible values are [0, 31], inclusive. + Default: 31 tcp_autocorking - BOOLEAN
Documentation/powerpc/associativity.rst new file +104 -0
104 lines not on this page · raw message
Documentation/sound/hd-audio/models.rst +1 -1
@@ -704,7 +704,7 @@ ref no-jd BIOS setup but without jack-detection intel - Intel DG45* mobos + Intel D*45* mobos dell-m6-amic Dell desktops/laptops with analog mics dell-m6-dmic
Makefile +6 -4
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 10 -SUBLEVEL = 177 +SUBLEVEL = 178 EXTRAVERSION = NAME = Dare mighty things
@@ -580,8 +580,10 @@ endif ifneq ($(GCC_TOOLCHAIN),) CLANG_FLAGS += --gcc-toolchain=$(GCC_TOOLCHAIN) endif -ifneq ($(LLVM_IAS),1) -CLANG_FLAGS += -no-integrated-as +ifeq ($(LLVM_IAS),1) +CLANG_FLAGS += -fintegrated-as +else +CLANG_FLAGS += -fno-integrated-as endif CLANG_FLAGS += -Werror=unknown-warning-option KBUILD_CFLAGS += $(CLANG_FLAGS)
@@ -849,7 +851,7 @@ else DEBUG_CFLAGS += -g endif -ifeq ($(LLVM_IAS),1) +ifdef CONFIG_AS_IS_LLVM KBUILD_AFLAGS += -g else KBUILD_AFLAGS += -Wa,-gdwarf-2
arch/powerpc/include/asm/firmware.h +4 -3
@@ -44,7 +44,7 @@#define FW_FEATURE_OPAL ASM_CONST(0x0000000010000000)#define FW_FEATURE_SET_MODE ASM_CONST(0x0000000040000000)#define FW_FEATURE_BEST_ENERGY ASM_CONST(0x0000000080000000) -#define FW_FEATURE_TYPE1_AFFINITY ASM_CONST(0x0000000100000000) +#define FW_FEATURE_FORM1_AFFINITY ASM_CONST(0x0000000100000000)#define FW_FEATURE_PRRN ASM_CONST(0x0000000200000000)#define FW_FEATURE_DRMEM_V2 ASM_CONST(0x0000000400000000)#define FW_FEATURE_DRC_INFO ASM_CONST(0x0000000800000000)
@@ -53,6 +53,7 @@#define FW_FEATURE_ULTRAVISOR ASM_CONST(0x0000004000000000)#define FW_FEATURE_STUFF_TCE ASM_CONST(0x0000008000000000)#define FW_FEATURE_RPT_INVALIDATE ASM_CONST(0x0000010000000000) +#define FW_FEATURE_FORM2_AFFINITY ASM_CONST(0x0000020000000000)#ifndef __ASSEMBLY__
@@ -69,11 +70,11 @@ enum {FW_FEATURE_SPLPAR |FW_FEATURE_LPAR |FW_FEATURE_CMO |FW_FEATURE_VPHN |FW_FEATURE_XCMO |FW_FEATURE_SET_MODE |FW_FEATURE_BEST_ENERGY | -FW_FEATURE_TYPE1_AFFINITY |FW_FEATURE_PRRN | +FW_FEATURE_FORM1_AFFINITY |FW_FEATURE_PRRN |FW_FEATURE_HPT_RESIZE |FW_FEATURE_DRMEM_V2 |FW_FEATURE_DRC_INFO |FW_FEATURE_BLOCK_REMOVE |FW_FEATURE_PAPR_SCM |FW_FEATURE_ULTRAVISOR | -FW_FEATURE_RPT_INVALIDATE , +FW_FEATURE_RPT_INVALIDATE |FW_FEATURE_FORM2_AFFINITY ,FW_FEATURE_PSERIES_ALWAYS =0 ,FW_FEATURE_POWERNV_POSSIBLE =FW_FEATURE_OPAL |FW_FEATURE_ULTRAVISOR , FW_FEATURE_POWERNV_ALWAYS = 0,
arch/powerpc/include/asm/prom.h +2 -1
@@ -147,8 +147,9 @@ extern int of_read_drc_info_cell(struct property **prop,#define OV5_MSI 0x0201/* PCIe/MSI support */ #define OV5_CMO 0x0480/* Cooperative Memory Overcommitment */ #define OV5_XCMO 0x0440/* Page Coalescing */ -#define OV5_TYPE1_AFFINITY 0x0580/* Type 1 NUMA affinity */ +#define OV5_FORM1_AFFINITY 0x0580/* FORM1 NUMA affinity */ #define OV5_PRRN 0x0540/* Platform Resource Reassignment */ +#define OV5_FORM2_AFFINITY 0x0520/* Form2 NUMA affinity */ #define OV5_HP_EVT 0x0604/* Hot Plug Event support */ #define OV5_RESIZE_HPT 0x0601/* Hash Page Table resizing */ #define OV5_PFO_HW_RNG 0x1180/* PFO Random Number Generator */
arch/powerpc/include/asm/topology.h +4 -2
@@ -36,7 +36,7 @@ static inline int pcibus_to_node(struct pci_bus *bus) cpu_all_mask : \ cpumask_of_node(pcibus_to_node(bus))) -extern int cpu_distance (__be32 *cpu1_assoc,__be32 *cpu2_assoc); +int cpu_relative_distance (__be32 *cpu1_assoc,__be32 *cpu2_assoc);extern int __node_distance (int ,int );#define node_distance (a, b) __node_distance(a, b)
@@ -64,6 +64,7 @@ static inline int early_cpu_to_node(int cpu) }int of_drconf_to_nid_single (struct drmem_lmb *lmb); +void update_numa_distance (struct device_node *node);#else
@@ -83,7 +84,7 @@ static inline void sysfs_remove_device_from_node(struct device *dev,static inline void update_numa_cpu_lookup_table (unsigned int cpu,int node) {} -static inline int cpu_distance (__be32 *cpu1_assoc,__be32 *cpu2_assoc) +static inline int cpu_relative_distance (__be32 *cpu1_assoc,__be32 *cpu2_assoc) {return 0 ; }
@@ -93,6 +94,7 @@ static inline int of_drconf_to_nid_single(struct drmem_lmb *lmb) return first_online_node; } +static inline void update_numa_distance (struct device_node *node) {}#endif /* CONFIG_NUMA */ #if defined(CONFIG_NUMA ) && defined(CONFIG_PPC_SPLPAR )
arch/powerpc/kernel/prom_init.c +2 -1
@@ -1069,7 +1069,8 @@ static const struct ibm_arch_vec ibm_architecture_vec_template __initconst = {#else 0, #endif - .associativity = OV5_FEAT(OV5_TYPE1_AFFINITY) | OV5_FEAT(OV5_PRRN), + .associativity =OV5_FEAT (OV5_FORM1_AFFINITY ) |OV5_FEAT (OV5_PRRN ) | + OV5_FEAT(OV5_FORM2_AFFINITY), .bin_opts = OV5_FEAT(OV5_RESIZE_HPT) | OV5_FEAT(OV5_HP_EVT), .micro_checkpoint = 0, .reserved0 = 0,
arch/powerpc/mm/numa.c +332 -101
592 lines not on this page · raw message
arch/powerpc/platforms/pseries/firmware.c +2 -1
@@ -119,10 +119,11 @@ struct vec5_fw_feature {static __initdata struct vec5_fw_feature vec5_fw_features_table[] = { - {FW_FEATURE_TYPE1_AFFINITY ,OV5_TYPE1_AFFINITY }, + {FW_FEATURE_FORM1_AFFINITY ,OV5_FORM1_AFFINITY }, {FW_FEATURE_PRRN ,OV5_PRRN }, {FW_FEATURE_DRMEM_V2 ,OV5_DRMEM_V2 }, {FW_FEATURE_DRC_INFO ,OV5_DRC_INFO }, + {FW_FEATURE_FORM2_AFFINITY ,OV5_FORM2_AFFINITY }, };static void __init fw_vec5_feature_init (const char *vec5,unsigned long len)
arch/powerpc/platforms/pseries/hotplug-cpu.c +2 -0
@@ -484,6 +484,8 @@ static ssize_t dlpar_cpu_add(u32 drc_index)return saved_rc; } +update_numa_distance (dn); + rc =dlpar_online_cpu (dn);if (rc) { saved_rc = rc;
arch/powerpc/platforms/pseries/hotplug-memory.c +2 -0
@@ -180,6 +180,8 @@ static int update_lmb_associativity_index(struct drmem_lmb *lmb)return -ENODEV ; } +update_numa_distance (lmb_node); + dr_node =of_find_node_by_path ("/ibm,dynamic-reconfiguration-memory" );if (!dr_node) {dlpar_free_cc_nodes (lmb_node);
arch/powerpc/platforms/pseries/lpar.c +2 -2
@@ -261,7 +261,7 @@ static int cpu_relative_dispatch_distance(int last_disp_cpu, int cur_disp_cpu)if (!last_disp_cpu_assoc || !cur_disp_cpu_assoc)return -EIO ; -return cpu_distance (last_disp_cpu_assoc, cur_disp_cpu_assoc); +return cpu_relative_distance (last_disp_cpu_assoc, cur_disp_cpu_assoc); }static int cpu_home_node_dispatch_distance (int disp_cpu)
@@ -281,7 +281,7 @@ static int cpu_home_node_dispatch_distance(int disp_cpu)if (!disp_cpu_assoc || !vcpu_assoc)return -EIO ; -return cpu_distance (disp_cpu_assoc, vcpu_assoc); +return cpu_relative_distance (disp_cpu_assoc, vcpu_assoc); }static void update_vcpu_disp_stat (int disp_cpu)
arch/powerpc/platforms/pseries/papr_scm.c +7 -0
@@ -1079,6 +1079,13 @@ static int papr_scm_probe(struct platform_device *pdev)return -ENODEV ; } +/* +* open firmware platform device create won't update the NUMA +* distance table. For PAPR SCM devices we use numa_map_to_online_node() +* to find the nearest online NUMA node and that requires correct +* distance table information. +*/ +update_numa_distance (dn); p =kzalloc (sizeof (*p),GFP_KERNEL );if (!p)
arch/riscv/Kconfig +22 -0
@@ -331,6 +331,28 @@ config RISCV_BASE_PMU endmenu +config TOOLCHAIN_NEEDS_EXPLICIT_ZICSR_ZIFENCEI + def_bool y + # https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=aed44286efa8ae8717a77d94b51ac3614e2ca6dc + depends on AS_IS_GNU && AS_VERSION >= 23800 + help + Newer binutils versions default to ISA spec version 20191213 which + moves some instructions from the I extension to the Zicsr and Zifencei + extensions. + +config TOOLCHAIN_NEEDS_OLD_ISA_SPEC + def_bool y + depends on TOOLCHAIN_NEEDS_EXPLICIT_ZICSR_ZIFENCEI + # https://github.com/llvm/llvm-project/commit/22e199e6afb1263c943c0c0d4498694e15bf8a16 + depends on CC_IS_CLANG && CLANG_VERSION < 170000 + help + Certain versions of clang do not support zicsr and zifencei via -march + but newer versions of binutils require it for the reasons noted in the + help text of CONFIG_TOOLCHAIN_NEEDS_EXPLICIT_ZICSR_ZIFENCEI. This + option causes an older ISA spec compatible with these older versions + of clang to be passed to GAS, which has the same result as passing zicsr + and zifencei to -march. + config FPU bool "FPU support" default y
arch/riscv/Makefile +7 -5
@@ -40,7 +40,7 @@ ifeq ($(CONFIG_LD_IS_LLD),y) ifeq ($(shell test $(CONFIG_LLD_VERSION) -lt 150000; echo $$?),0) KBUILD_CFLAGS += -mno-relax KBUILD_AFLAGS += -mno-relax -ifneq ($(LLVM_IAS),1) +ifndef CONFIG_AS_IS_LLVM KBUILD_CFLAGS += -Wa,-mno-relax KBUILD_AFLAGS += -Wa,-mno-relax endif
@@ -53,10 +53,12 @@ riscv-march-$(CONFIG_ARCH_RV64I) := rv64ima riscv-march-$(CONFIG_FPU) := $(riscv-march-y)fd riscv-march-$(CONFIG_RISCV_ISA_C) := $(riscv-march-y)c -# Newer binutils versions default to ISA spec version 20191213 which moves some -# instructions from the I extension to the Zicsr and Zifencei extensions. -toolchain-need-zicsr-zifencei := $(call cc-option-yn, -march=$(riscv-march-y)_zicsr_zifencei) -riscv-march-$(toolchain-need-zicsr-zifencei) := $(riscv-march-y)_zicsr_zifencei +ifdef CONFIG_TOOLCHAIN_NEEDS_OLD_ISA_SPEC +KBUILD_CFLAGS += -Wa,-misa-spec=2.2 +KBUILD_AFLAGS += -Wa,-misa-spec=2.2 +else +riscv-march-$(CONFIG_TOOLCHAIN_NEEDS_EXPLICIT_ZICSR_ZIFENCEI) := $(riscv-march-y)_zicsr_zifencei +endif KBUILD_CFLAGS += -march=$(subst fd,,$(riscv-march-y)) KBUILD_AFLAGS += -march=$(riscv-march-y)
arch/riscv/kernel/signal.c +8 -1
@@ -16,6 +16,7 @@#include <asm/vdso.h> #include <asm/switch_to.h> #include <asm/csr.h> +#include <asm/cacheflush.h> extern u32 __user_rt_sigreturn[2 ];
@@ -178,6 +179,7 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set, {struct rt_sigframe __user *frame;long err =0 ; +unsigned long __maybe_unused addr; frame =get_sigframe (ksig, regs,sizeof (*frame));if (!access_ok (frame,sizeof (*frame)))
@@ -206,7 +208,12 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,if (copy_to_user (&frame->sigreturn_code, __user_rt_sigreturn,sizeof (frame->sigreturn_code)))return -EFAULT ; - regs->ra = (unsigned long )&frame->sigreturn_code; + + addr = (unsigned long )&frame->sigreturn_code; +/* Make sure the two instructions are pushed to icache. */ +flush_icache_range (addr, addr +sizeof (frame->sigreturn_code)); + + regs->ra = addr;#endif /* CONFIG_MMU */ /*
arch/s390/kvm/intercept.c +24 -8
@@ -270,10 +270,18 @@ static int handle_prog(struct kvm_vcpu *vcpu)/** * handle_external_interrupt - used for external interruption interceptions * -* This interception only occurs if the CPUSTAT_EXT_INT bit was set, or if -* the new PSW does not have external interrupts disabled. In the first case, -* we've got to deliver the interrupt manually, and in the second case, we -* drop to userspace to handle the situation there. +* This interception occurs if: +* - the CPUSTAT_EXT_INT bit was already set when the external interrupt +* occurred. In this case, the interrupt needs to be injected manually to +* preserve interrupt priority. +* - the external new PSW has external interrupts enabled, which will cause an +* interruption loop. We drop to userspace in this case. +* +* The latter case can be detected by inspecting the external mask bit in the +* external new psw. +* +* Under PV, only the latter case can occur, since interrupt priorities are +* handled in the ultravisor. */ static int handle_external_interrupt (struct kvm_vcpu *vcpu) {
@@ -284,10 +292,18 @@ static int handle_external_interrupt(struct kvm_vcpu *vcpu) vcpu->stat.exit_external_interrupt++; - rc =read_guest_lc (vcpu, __LC_EXT_NEW_PSW, &newpsw,sizeof (psw_t)); -if (rc) -return rc; -/* We can not handle clock comparator or timer interrupt with bad PSW */ +if (kvm_s390_pv_cpu_is_protected (vcpu)) { + newpsw = vcpu->arch.sie_block->gpsw; + }else { + rc =read_guest_lc (vcpu, __LC_EXT_NEW_PSW, &newpsw,sizeof (psw_t)); +if (rc) +return rc; + } + +/* +* Clock comparator or timer interrupt with external interrupt enabled +* will cause interrupt loop. Drop to userspace. +*/ if ((eic ==EXT_IRQ_CLK_COMP || eic ==EXT_IRQ_CPU_TIMER ) && (newpsw.mask &PSW_MASK_EXT ))return -EOPNOTSUPP ;
arch/x86/kernel/sysfb_efi.c +8 -0
@@ -272,6 +272,14 @@ static const struct dmi_system_id efifb_dmi_swap_width_height[] __initconst = { "IdeaPad Duet 3 10IGL5"), }, }, + { + /* Lenovo Yoga Book X91F / X91L */ + .matches = { + DMI_EXACT_MATCH(DMI_SYS_VENDOR, "LENOVO"), + /* Non exact match to match F + L versions */ + DMI_MATCH(DMI_PRODUCT_NAME, "Lenovo YB1-X91"), + }, + }, {}, };
arch/x86/kernel/x86_init.c +2 -2
@@ -32,8 +32,8 @@ static int __init iommu_init_noop(void) { return 0; }static void iommu_shutdown_noop (void ) { }bool __init bool_x86_init_noop (void ) {return false; }void x86_op_int_noop (int cpu) { } -static __init int set_rtc_noop (const struct timespec64 *now) {return -EINVAL ; } -static __init void get_rtc_noop (struct timespec64 *now) { } +static int set_rtc_noop (const struct timespec64 *now) {return -EINVAL ; } +static void get_rtc_noop (struct timespec64 *now) { }static __initconst const struct of_device_id of_cmos_match[] = { { .compatible ="motorola,mc146818" },
arch/x86/pci/fixup.c +21 -0
@@ -7,6 +7,7 @@#include <linux/dmi.h> #include <linux/pci.h> #include <linux/vgaarb.h> +#include <asm/amd_nb.h> #include <asm/hpet.h> #include <asm/pci_x86.h>
@@ -824,3 +825,23 @@ static void rs690_fix_64bit_dma(struct pci_dev *pdev)DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_ATI ,0x7910 , rs690_fix_64bit_dma);#endif + +#ifdef CONFIG_AMD_NB + +#define AMD_15B8_RCC_DEV2_EPF0_STRAP2 0x10136008 +#define AMD_15B8_RCC_DEV2_EPF0_STRAP2_NO_SOFT_RESET_DEV2_F0_MASK 0x00000080L + +static void quirk_clear_strap_no_soft_reset_dev2_f0 (struct pci_dev *dev) +{ +u32 data; + +if (!amd_smn_read (0 ,AMD_15B8_RCC_DEV2_EPF0_STRAP2 , &data)) { + data &= ~AMD_15B8_RCC_DEV2_EPF0_STRAP2_NO_SOFT_RESET_DEV2_F0_MASK ; +if (amd_smn_write (0 ,AMD_15B8_RCC_DEV2_EPF0_STRAP2 , data)) +pci_err (dev,"Failed to write data 0x%x\n" , data); + }else { +pci_err (dev,"Failed to read data\n" ); + } +} +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_AMD ,0x15b8 , quirk_clear_strap_no_soft_reset_dev2_f0); +#endif
crypto/asymmetric_keys/pkcs7_verify.c +5 -5
@@ -79,16 +79,16 @@ static int pkcs7_digest(struct pkcs7_message *pkcs7, }if (sinfo->msgdigest_len != sig->digest_size) { -pr_debug ("Sig %u: Invalid digest size (%u)\n" , - sinfo->index, sinfo->msgdigest_len); +pr_warn ("Sig %u: Invalid digest size (%u)\n" , + sinfo->index, sinfo->msgdigest_len); ret = -EBADMSG ; goto error; }if (memcmp (sig->digest, sinfo->msgdigest, sinfo->msgdigest_len) !=0 ) { -pr_debug ("Sig %u: Message digest doesn't match\n" , - sinfo->index); +pr_warn ("Sig %u: Message digest doesn't match\n" , + sinfo->index); ret = -EKEYREJECTED ; goto error; }
@@ -488,7 +488,7 @@ int pkcs7_supply_detached_data(struct pkcs7_message *pkcs7, const void *data, size_t datalen) { if (pkcs7->data) { -pr_debug ("Data already supplied\n" ); +pr_warn ("Data already supplied\n" );return -EINVAL ; } pkcs7->data = data;
crypto/asymmetric_keys/verify_pefile.c +18 -14
@@ -74,7 +74,7 @@ static int pefile_parse_binary(const void *pebuf, unsigned int pelen,break ;default : -pr_debug ("Unknown PEOPT magic = %04hx\n" , pe32->magic); +pr_warn ("Unknown PEOPT magic = %04hx\n" , pe32->magic);return -ELIBBAD ; }
@@ -95,7 +95,7 @@ static int pefile_parse_binary(const void *pebuf, unsigned int pelen, ctx->certs_size = ddir->certs.size;if (!ddir->certs.virtual_address || !ddir->certs.size) { -pr_debug ("Unsigned PE binary\n" ); +pr_warn ("Unsigned PE binary\n" );return -ENODATA ; }
@@ -127,7 +127,7 @@ static int pefile_strip_sig_wrapper(const void *pebuf,unsigned len;if (ctx->sig_len <sizeof (wrapper)) { -pr_debug ("Signature wrapper too short\n" ); +pr_warn ("Signature wrapper too short\n" );return -ELIBBAD ; }
@@ -135,19 +135,23 @@ static int pefile_strip_sig_wrapper(const void *pebuf,pr_debug ("sig wrapper = { %x, %x, %x }\n" , wrapper.length, wrapper.revision, wrapper.cert_type); -/* Both pesign and sbsign round up the length of certificate table -* (in optional header data directories) to 8 byte alignment. +/* sbsign rounds up the length of certificate table (in optional +* header data directories) to 8 byte alignment. However, the PE +* specification states that while entries are 8-byte aligned, this is +* not included in their length, and as a result, pesign has not +* rounded up since 0.110. */ -if (round_up (wrapper.length,8 ) != ctx->sig_len) { -pr_debug ("Signature wrapper len wrong\n" ); +if (wrapper.length > ctx->sig_len) { +pr_warn ("Signature wrapper bigger than sig len (%x > %x)\n" , + ctx->sig_len, wrapper.length);return -ELIBBAD ; }if (wrapper.revision !=WIN_CERT_REVISION_2_0 ) { -pr_debug ("Signature is not revision 2.0\n" ); +pr_warn ("Signature is not revision 2.0\n" );return -ENOTSUPP ; }if (wrapper.cert_type !=WIN_CERT_TYPE_PKCS_SIGNED_DATA ) { -pr_debug ("Signature certificate type is not PKCS\n" ); +pr_warn ("Signature certificate type is not PKCS\n" );return -ENOTSUPP ; }
@@ -160,7 +164,7 @@ static int pefile_strip_sig_wrapper(const void *pebuf, ctx->sig_offset +=sizeof (wrapper); ctx->sig_len -=sizeof (wrapper);if (ctx->sig_len <4 ) { -pr_debug ("Signature data missing\n" ); +pr_warn ("Signature data missing\n" );return -EKEYREJECTED ; }
@@ -194,7 +198,7 @@ static int pefile_strip_sig_wrapper(const void *pebuf,return 0 ; } not_pkcs7: -pr_debug ("Signature data not PKCS#7\n" ); +pr_warn ("Signature data not PKCS#7\n" );return -ELIBBAD ; }
@@ -337,8 +341,8 @@ static int pefile_digest_pe(const void *pebuf, unsigned int pelen, digest_size =crypto_shash_digestsize (tfm);if (digest_size != ctx->digest_len) { -pr_debug ("Digest size mismatch (%zx != %x)\n" , - digest_size, ctx->digest_len); +pr_warn ("Digest size mismatch (%zx != %x)\n" , + digest_size, ctx->digest_len); ret = -EBADMSG ; goto error_no_desc; }
@@ -369,7 +373,7 @@ static int pefile_digest_pe(const void *pebuf, unsigned int pelen,* PKCS#7 certificate. */ if (memcmp (digest, ctx->digest, ctx->digest_len) !=0 ) { -pr_debug ("Digest mismatch\n" ); +pr_warn ("Digest mismatch\n" ); ret = -EKEYREJECTED ; }else {pr_debug ("The digests match!\n" );
drivers/clk/sprd/common.c +6 -3
@@ -17,7 +17,6 @@ static const struct regmap_config sprdclk_regmap_config = { .reg_bits = 32, .reg_stride = 4, .val_bits = 32, - .max_register = 0xffff, .fast_io = true, };
@@ -43,6 +42,8 @@ int sprd_clk_regmap_init(struct platform_device *pdev,struct device *dev = &pdev->dev;struct device_node *node = dev->of_node, *np;struct regmap *regmap; +struct resource *res; +struct regmap_config reg_config = sprdclk_regmap_config;if (of_find_property (node,"sprd,syscon" ,NULL )) { regmap =syscon_regmap_lookup_by_phandle (node,"sprd,syscon" );
@@ -59,12 +60,14 @@ int sprd_clk_regmap_init(struct platform_device *pdev,return PTR_ERR (regmap); } }else { - base =devm_platform_ioremap_resource (pdev,0 ); + base =devm_platform_get_and_ioremap_resource (pdev,0 , &res);if (IS_ERR (base))return PTR_ERR (base); + reg_config.max_register =resource_size (res) - reg_config.reg_stride; + regmap =devm_regmap_init_mmio (&pdev->dev, base, - &sprdclk_regmap_config); + ®_config);if (IS_ERR (regmap)) {pr_err ("failed to init regmap\n" );return PTR_ERR (regmap);
drivers/gpio/Kconfig +1 -1
@@ -99,7 +99,7 @@ config GPIO_GENERIC tristate config GPIO_REGMAP - depends on REGMAP + select REGMAP tristate # put drivers in the right section, in alphabetical order
drivers/gpio/gpio-davinci.c +1 -1
@@ -326,7 +326,7 @@ static struct irq_chip gpio_irqchip = { .irq_enable = gpio_irq_enable, .irq_disable = gpio_irq_disable, .irq_set_type = gpio_irq_type, - .flags = IRQCHIP_SET_TYPE_MASKED, + .flags = IRQCHIP_SET_TYPE_MASKED | IRQCHIP_SKIP_SET_WAKE, };static void gpio_irq_handler (struct irq_desc *desc)
drivers/gpu/drm/armada/armada_drv.c +0 -1
@@ -102,7 +102,6 @@ static int armada_drm_bind(struct device *dev)if (ret) {dev_err (dev,"[" DRM_NAME ":%s] can't kick out simple-fb: %d\n" , __func__, ret); -kfree (priv);return ret; }
drivers/gpu/drm/bridge/lontium-lt9611.c +1 -0
@@ -256,6 +256,7 @@ static int lt9611_pll_setup(struct lt9611 *lt9611, const struct drm_display_mode { 0x8126, 0x55 }, { 0x8127, 0x66 }, { 0x8128, 0x88 }, + { 0x812a, 0x20 }, };regmap_multi_reg_write (lt9611->regmap, reg_cfg,ARRAY_SIZE (reg_cfg));
drivers/gpu/drm/drm_panel_orientation_quirks.c +10 -3
@@ -284,10 +284,17 @@ static const struct dmi_system_id orientation_data[] = { DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "IdeaPad Duet 3 10IGL5"), }, .driver_data = (void *)&lcd1200x1920_rightside_up, - }, { /* Lenovo Yoga Book X90F / X91F / X91L */ + }, { /* Lenovo Yoga Book X90F / X90L */ .matches = { -/* Non exact match to match all versions */ - DMI_MATCH(DMI_PRODUCT_NAME, "Lenovo YB1-X9"), +DMI_EXACT_MATCH (DMI_SYS_VENDOR ,"Intel Corporation" ), +DMI_EXACT_MATCH (DMI_PRODUCT_NAME ,"CHERRYVIEW D1 PLATFORM" ), + DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "YETI-11"), + }, + .driver_data = (void *)&lcd1200x1920_rightside_up, + }, { /* Lenovo Yoga Book X91F / X91L */ + .matches = { +/* Non exact match to match F + L versions */ + DMI_MATCH(DMI_PRODUCT_NAME, "Lenovo YB1-X91"), }, .driver_data = (void *)&lcd1200x1920_rightside_up, }, { /* OneGX1 Pro */
drivers/gpu/drm/nouveau/dispnv50/disp.c +32 -0
@@ -396,6 +396,35 @@ nv50_outp_atomic_check_view(struct drm_encoder *encoder,return 0 ; } +static void +nv50_outp_atomic_fix_depth (struct drm_encoder *encoder,struct drm_crtc_state *crtc_state) +{ +struct nv50_head_atom *asyh =nv50_head_atom (crtc_state); +struct nouveau_encoder *nv_encoder =nouveau_encoder (encoder); +struct drm_display_mode *mode = &asyh->state.adjusted_mode; +unsigned int max_rate, mode_rate; + +switch (nv_encoder->dcb->type) { +case DCB_OUTPUT_DP : + max_rate = nv_encoder->dp.link_nr * nv_encoder->dp.link_bw; + +/* we don't support more than 10 anyway */ + asyh->or.bpc =min_t (u8, asyh->or.bpc,10 ); + +/* reduce the bpc until it works out */ +while (asyh->or.bpc >6 ) { + mode_rate =DIV_ROUND_UP (mode->clock * asyh->or.bpc *3 ,8 ); +if (mode_rate <= max_rate) +break ; + + asyh->or.bpc -=2 ; + } +break ; +default : +break ; + } +} + static int nv50_outp_atomic_check(struct drm_encoder *encoder, struct drm_crtc_state *crtc_state,
@@ -414,6 +443,9 @@ nv50_outp_atomic_check(struct drm_encoder *encoder,if (crtc_state->mode_changed || crtc_state->connectors_changed) asyh->or.bpc = connector->display_info.bpc; +/* We might have to reduce the bpc */ +nv50_outp_atomic_fix_depth (encoder, crtc_state); +return 0 ; }
drivers/gpu/drm/nouveau/nouveau_dp.c +5 -3
@@ -220,8 +220,6 @@ void nouveau_dp_irq(struct nouveau_drm *drm, }/* TODO: -* - Use the minimum possible BPC here, once we add support for the max bpc -* property. * - Validate against the DP caps advertised by the GPU (we don't check these * yet) */
@@ -233,7 +231,11 @@ nv50_dp_mode_valid(struct drm_connector *connector, {const unsigned int min_clock =25000 ;unsigned int max_rate, mode_rate, ds_max_dotclock, clock = mode->clock; -const u8 bpp = connector->display_info.bpc *3 ; +/* Check with the minmum bpc always, so we can advertise better modes. +* In particlar not doing this causes modes to be dropped on HDR +* displays as we might check with a bpc of 16 even. +*/ +const u8 bpp =6 *3 ;if (mode->flags &DRM_MODE_FLAG_INTERLACE && !outp->caps.dp_interlace)return MODE_NO_INTERLACE ;
drivers/gpu/drm/panfrost/panfrost_mmu.c +1 -0
@@ -458,6 +458,7 @@ static int panfrost_mmu_map_fault_addr(struct panfrost_device *pfdev, int as,if (IS_ERR (pages[i])) {mutex_unlock (&bo->base.pages_lock); ret =PTR_ERR (pages[i]); + pages[i] =NULL ; goto err_pages; } }
drivers/hv/connection.c +4 -0
@@ -305,6 +305,10 @@ void vmbus_disconnect(void)*/ struct vmbus_channel *relid2channel (u32 relid) { +if (vmbus_connection.channels ==NULL ) { +pr_warn_once ("relid2channel: relid=%d: No channels mapped!\n" , relid); +return NULL ; + }if (WARN_ON (relid >=MAX_CHANNEL_RELIDS ))return NULL ;return READ_ONCE (vmbus_connection.channels[relid]);
drivers/hwtracing/coresight/coresight-etm4x-core.c +1 -1
@@ -179,7 +179,7 @@ static int etm4_enable_hw(struct etmv4_drvdata *drvdata)writel_relaxed (config->ss_pe_cmp[i], drvdata->base +TRCSSPCICRn (i)); } -for (i =0 ; i < drvdata->nr_addr_cmp; i++) { +for (i =0 ; i < drvdata->nr_addr_cmp *2 ; i++) {writeq_relaxed (config->addr_val[i], drvdata->base +TRCACVRn (i)); writeq_relaxed(config->addr_acc[i],
drivers/i2c/busses/i2c-imx-lpi2c.c +2 -0
@@ -462,6 +462,8 @@ static int lpi2c_imx_xfer(struct i2c_adapter *adapter,if (num ==1 && msgs[0 ].len ==0 ) goto stop; + lpi2c_imx->rx_buf =NULL ; + lpi2c_imx->tx_buf =NULL ; lpi2c_imx->delivered =0 ; lpi2c_imx->msglen = msgs[i].len;init_completion (&lpi2c_imx->complete);
drivers/i2c/busses/i2c-ocores.c +19 -16
@@ -343,18 +343,18 @@ static int ocores_poll_wait(struct ocores_i2c *i2c)* ocores_isr(), we just add our polling code around it. * * It can run in atomic context +* +* Return: 0 on success, -ETIMEDOUT on timeout */ -static void ocores_process_polling (struct ocores_i2c *i2c) +static int ocores_process_polling (struct ocores_i2c *i2c) { -while (1 ) { -irqreturn_t ret; -int err; +irqreturn_t ret; +int err =0 ; +while (1 ) { err =ocores_poll_wait (i2c); -if (err) { - i2c->state =STATE_ERROR ; +if (err)break ;/* timeout */ - } ret =ocores_isr (-1 , i2c);if (ret ==IRQ_NONE )
@@ -365,13 +365,15 @@ static void ocores_process_polling(struct ocores_i2c *i2c)break ; } } + +return err; }static int ocores_xfer_core (struct ocores_i2c *i2c,struct i2c_msg *msgs,int num,bool polling) { -int ret; +int ret =0 ;u8 ctrl; ctrl =oc_getreg (i2c,OCI2C_CONTROL );
@@ -389,15 +391,16 @@ static int ocores_xfer_core(struct ocores_i2c *i2c,oc_setreg (i2c,OCI2C_CMD ,OCI2C_CMD_START );if (polling) { -ocores_process_polling (i2c); + ret =ocores_process_polling (i2c); }else { - ret =wait_event_timeout (i2c->wait, - (i2c->state ==STATE_ERROR ) || - (i2c->state ==STATE_DONE ),HZ ); -if (ret ==0 ) { -ocores_process_timeout (i2c); -return -ETIMEDOUT ; - } +if (wait_event_timeout (i2c->wait, + (i2c->state ==STATE_ERROR ) || + (i2c->state ==STATE_DONE ),HZ ) ==0 ) + ret = -ETIMEDOUT ; + } +if (ret) { +ocores_process_timeout (i2c); +return ret; }return (i2c->state ==STATE_DONE ) ? num : -EIO ;
drivers/iio/adc/ad7791.c +1 -1
@@ -253,7 +253,7 @@ static const struct ad_sigma_delta_info ad7791_sigma_delta_info = { .has_registers = true, .addr_shift = 4, .read_mask = BIT(3), - .irq_flags = IRQF_TRIGGER_LOW, + .irq_flags = IRQF_TRIGGER_FALLING, }; static int ad7791_read_raw(struct iio_dev *indio_dev,
drivers/iio/adc/ti-ads7950.c +1 -0
@@ -634,6 +634,7 @@ static int ti_ads7950_probe(struct spi_device *spi) st->chip.label =dev_name (&st->spi->dev); st->chip.parent = &st->spi->dev; st->chip.owner =THIS_MODULE ; + st->chip.can_sleep = true; st->chip.base =-1 ; st->chip.ngpio =TI_ADS7950_NUM_GPIOS ; st->chip.get_direction = ti_ads7950_get_direction;
drivers/iio/dac/cio-dac.c +2 -2
@@ -66,8 +66,8 @@ static int cio_dac_write_raw(struct iio_dev *indio_dev,if (mask !=IIO_CHAN_INFO_RAW )return -EINVAL ; -/* DAC can only accept up to a 16-bit value */ -if ((unsigned int )val >65535 ) +/* DAC can only accept up to a 12-bit value */ +if ((unsigned int )val >4095 )return -EINVAL ; priv->chan_out_states[chan->channel] = val;
drivers/iio/light/cm32181.c +12 -0
@@ -429,6 +429,14 @@ static const struct iio_info cm32181_info = { .attrs = &cm32181_attribute_group, }; +static void cm32181_unregister_dummy_client (void *data) +{ +struct i2c_client *client = data; + +/* Unregister the dummy client */ +i2c_unregister_device (client); +} +static int cm32181_probe (struct i2c_client *client) {struct device *dev = &client->dev;
@@ -458,6 +466,10 @@ static int cm32181_probe(struct i2c_client *client) client =i2c_acpi_new_device (dev,1 , &board_info);if (IS_ERR (client))return PTR_ERR (client); + + ret =devm_add_action_or_reset (dev, cm32181_unregister_dummy_client, client); +if (ret) +return ret; } cm32181 =iio_priv (indio_dev);
drivers/infiniband/core/cma.c +34 -26
130 lines not on this page · raw message
drivers/infiniband/core/verbs.c +2 -0
@@ -535,6 +535,8 @@ static struct ib_ah *_rdma_create_ah(struct ib_pd *pd, ret = device->ops.create_ah (ah, &init_attr, udata);if (ret) { +if (ah->sgid_attr) +rdma_put_gid_attr (ah->sgid_attr);kfree (ah);return ERR_PTR (ret); }
drivers/infiniband/hw/mlx5/main.c +16 -0
@@ -425,10 +425,26 @@ static int translate_eth_ext_proto_oper(u32 eth_proto_oper, u16 *active_speed, *active_width =IB_WIDTH_2X ; *active_speed =IB_SPEED_HDR ;break ; +case MLX5E_PROT_MASK (MLX5E_100GAUI_1_100GBASE_CR_KR ): + *active_width =IB_WIDTH_1X ; + *active_speed =IB_SPEED_NDR ; +break ;case MLX5E_PROT_MASK (MLX5E_200GAUI_4_200GBASE_CR4_KR4 ): *active_width =IB_WIDTH_4X ; *active_speed =IB_SPEED_HDR ;break ; +case MLX5E_PROT_MASK (MLX5E_200GAUI_2_200GBASE_CR2_KR2 ): + *active_width =IB_WIDTH_2X ; + *active_speed =IB_SPEED_NDR ; +break ; +case MLX5E_PROT_MASK (MLX5E_400GAUI_8 ): + *active_width =IB_WIDTH_8X ; + *active_speed =IB_SPEED_HDR ; +break ; +case MLX5E_PROT_MASK (MLX5E_400GAUI_4_400GBASE_CR4_KR4 ): + *active_width =IB_WIDTH_4X ; + *active_speed =IB_SPEED_NDR ; +break ;default :return -EINVAL ; }
drivers/media/platform/ti-vpe/cal.c +1 -3
@@ -624,10 +624,8 @@ static struct cal_ctx *cal_ctx_create(struct cal_dev *cal, int inst) ctx->cport = inst; ret =cal_ctx_v4l2_init (ctx); -if (ret) { -kfree (ctx); +if (ret)return NULL ; - }return ctx; }
drivers/mtd/mtdblock.c +8 -4
@@ -153,7 +153,7 @@ static int do_cached_write (struct mtdblk_dev *mtdblk, unsigned long pos, mtdblk->cache_state =STATE_EMPTY ; ret =mtd_read (mtd, sect_start, sect_size, &retlen, mtdblk->cache_data); -if (ret) +if (ret && !mtd_is_bitflip (ret))return ret;if (retlen != sect_size)return -EIO ;
@@ -188,8 +188,12 @@ static int do_cached_read (struct mtdblk_dev *mtdblk, unsigned long pos,pr_debug ("mtdblock: read on \"%s\" at 0x%lx, size 0x%x\n" , mtd->name, pos, len); -if (!sect_size) -return mtd_read (mtd, pos, len, &retlen, buf); +if (!sect_size) { + ret =mtd_read (mtd, pos, len, &retlen, buf); +if (ret && !mtd_is_bitflip (ret)) +return ret; +return 0 ; + }while (len >0 ) {unsigned long sect_start = (pos/sect_size)*sect_size;
@@ -209,7 +213,7 @@ static int do_cached_read (struct mtdblk_dev *mtdblk, unsigned long pos,memcpy (buf, mtdblk->cache_data + offset, size); }else { ret =mtd_read (mtd, pos, size, &retlen, buf); -if (ret) +if (ret && !mtd_is_bitflip (ret))return ret;if (retlen != size)return -EIO ;
drivers/mtd/nand/raw/meson_nand.c +3 -3
@@ -276,7 +276,7 @@ static void meson_nfc_cmd_access(struct nand_chip *nand, int raw, bool dir,if (raw) { len = mtd->writesize + mtd->oobsize; - cmd = (len &GENMASK (5 ,0 )) | scrambler |DMA_DIR (dir); + cmd = (len &GENMASK (13 ,0 )) | scrambler |DMA_DIR (dir);writel (cmd, nfc->reg_base +NFC_REG_CMD );return ; }
@@ -540,7 +540,7 @@ static int meson_nfc_read_buf(struct nand_chip *nand, u8 *buf, int len)if (ret) goto out; - cmd =NFC_CMD_N2M | (len &GENMASK (5 ,0 )); + cmd =NFC_CMD_N2M | (len &GENMASK (13 ,0 ));writel (cmd, nfc->reg_base +NFC_REG_CMD );meson_nfc_drain_cmd (nfc);
@@ -564,7 +564,7 @@ static int meson_nfc_write_buf(struct nand_chip *nand, u8 *buf, int len)if (ret)return ret; - cmd =NFC_CMD_M2N | (len &GENMASK (5 ,0 )); + cmd =NFC_CMD_M2N | (len &GENMASK (13 ,0 ));writel (cmd, nfc->reg_base +NFC_REG_CMD );meson_nfc_drain_cmd (nfc);
drivers/mtd/nand/raw/stm32_fmc2_nand.c +3 -0
@@ -1525,6 +1525,9 @@ static int stm32_fmc2_nfc_setup_interface(struct nand_chip *chip, int chipnr,if (IS_ERR (sdrt))return PTR_ERR (sdrt); +if (conf->timings.mode >3 ) +return -EOPNOTSUPP ; +if (chipnr ==NAND_DATA_IFACE_CHECK_ONLY )return 0 ;
drivers/mtd/ubi/build.c +15 -6
@@ -665,12 +665,6 @@ static int io_init(struct ubi_device *ubi, int max_beb_per1024) ubi->ec_hdr_alsize =ALIGN (UBI_EC_HDR_SIZE , ubi->hdrs_min_io_size); ubi->vid_hdr_alsize =ALIGN (UBI_VID_HDR_SIZE , ubi->hdrs_min_io_size); -if (ubi->vid_hdr_offset && ((ubi->vid_hdr_offset +UBI_VID_HDR_SIZE ) > - ubi->vid_hdr_alsize)) { -ubi_err (ubi,"VID header offset %d too large." , ubi->vid_hdr_offset); -return -EINVAL ; - } -dbg_gen ("min_io_size %d" , ubi->min_io_size);dbg_gen ("max_write_size %d" , ubi->max_write_size);dbg_gen ("hdrs_min_io_size %d" , ubi->hdrs_min_io_size);
@@ -688,6 +682,21 @@ static int io_init(struct ubi_device *ubi, int max_beb_per1024) ubi->vid_hdr_aloffset; } +/* +* Memory allocation for VID header is ubi->vid_hdr_alsize +* which is described in comments in io.c. +* Make sure VID header shift + UBI_VID_HDR_SIZE not exceeds +* ubi->vid_hdr_alsize, so that all vid header operations +* won't access memory out of bounds. +*/ +if ((ubi->vid_hdr_shift +UBI_VID_HDR_SIZE ) > ubi->vid_hdr_alsize) { +ubi_err (ubi,"Invalid VID header offset %d, VID header shift(%d)" +" + VID header size(%zu) > VID header aligned size(%d)." , + ubi->vid_hdr_offset, ubi->vid_hdr_shift, +UBI_VID_HDR_SIZE , ubi->vid_hdr_alsize); +return -EINVAL ; + } +/* Similar for the data offset */ ubi->leb_start = ubi->vid_hdr_offset +UBI_VID_HDR_SIZE ; ubi->leb_start =ALIGN (ubi->leb_start, ubi->min_io_size);
drivers/mtd/ubi/wl.c +2 -3
@@ -575,6 +575,7 @@ static int erase_worker(struct ubi_device *ubi, struct ubi_work *wl_wrk,* @vol_id: the volume ID that last used this PEB * @lnum: the last used logical eraseblock number for the PEB * @torture: if the physical eraseblock has to be tortured +* @nested: denotes whether the work_sem is already held * * This function returns zero in case of success and a %-ENOMEM in case of * failure.
@@ -1066,8 +1067,6 @@ static int ensure_wear_leveling(struct ubi_device *ubi, int nested)* __erase_worker - physical eraseblock erase worker function. * @ubi: UBI device description object * @wl_wrk: the work object -* @shutdown: non-zero if the worker has to free memory and exit -* because the WL sub-system is shutting down * * This function erases a physical eraseblock and perform torture testing if * needed. It also takes care about marking the physical eraseblock bad if
@@ -1122,7 +1121,7 @@ static int __erase_worker(struct ubi_device *ubi, struct ubi_work *wl_wrk)int err1;/* Re-schedule the LEB for erasure */ - err1 =schedule_erase (ubi, e, vol_id, lnum,0 , false); + err1 =schedule_erase (ubi, e, vol_id, lnum,0 , true);if (err1) {spin_lock (&ubi->wl_lock);wl_entry_destroy (ubi, e);
drivers/net/ethernet/cadence/macb_main.c +4 -0
@@ -884,6 +884,10 @@ static dma_addr_t macb_get_addr(struct macb *bp, struct macb_dma_desc *desc) }#endif addr |=MACB_BF (RX_WADDR ,MACB_BFEXT (RX_WADDR , desc->addr)); +#ifdef CONFIG_MACB_USE_HWSTAMP +if (bp->hw_dma_cap &HW_DMA_CAP_PTP ) + addr &= ~GEM_BIT (DMA_RXVALID ); +#endif return addr; }
drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c +7 -1
@@ -628,7 +628,13 @@ int qlcnic_fw_create_ctx(struct qlcnic_adapter *dev)int i, err, ring;if (dev->flags &QLCNIC_NEED_FLR ) { -pci_reset_function (dev->pdev); + err =pci_reset_function (dev->pdev); +if (err) { +dev_err (&dev->pdev->dev, +"Adapter reset failed (%d). Please reboot\n" , + err); +return err; + } dev->flags &= ~QLCNIC_NEED_FLR ; }
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +5 -1
@@ -4940,7 +4940,7 @@ static void stmmac_napi_del(struct net_device *dev)int stmmac_reinit_queues (struct net_device *dev,u32 rx_cnt,u32 tx_cnt) {struct stmmac_priv *priv =netdev_priv (dev); -int ret =0 ; +int ret =0 , i;if (netif_running (dev))stmmac_release (dev);
@@ -4949,6 +4949,10 @@ int stmmac_reinit_queues(struct net_device *dev, u32 rx_cnt, u32 tx_cnt) priv->plat->rx_queues_to_use = rx_cnt; priv->plat->tx_queues_to_use = tx_cnt; +if (!netif_is_rxfh_configured (dev)) +for (i =0 ; i <ARRAY_SIZE (priv->rss.table); i++) + priv->rss.table[i] =ethtool_rxfh_indir_default (i, + rx_cnt);stmmac_napi_add (dev);
drivers/net/ethernet/sun/niu.c +1 -1
@@ -4503,7 +4503,7 @@ static int niu_alloc_channels(struct niu *np) err =niu_rbr_fill (np, rp,GFP_KERNEL );if (err) -return err; + goto out_err; } tx_rings = kcalloc(num_tx_rings, sizeof(struct tx_ring_info),
drivers/net/ethernet/ti/am65-cpsw-nuss.c +4 -2
@@ -2153,7 +2153,8 @@ static int am65_cpsw_nuss_probe(struct platform_device *pdev)return 0 ; err_of_clear: -of_platform_device_destroy (common->mdio_dev,NULL ); +if (common->mdio_dev) +of_platform_device_destroy (common->mdio_dev,NULL ); err_pm_clear:pm_runtime_put_sync (dev);pm_runtime_disable (dev);
@@ -2179,7 +2180,8 @@ static int am65_cpsw_nuss_remove(struct platform_device *pdev)*/ am65_cpsw_nuss_cleanup_ndev (common); -of_platform_device_destroy (common->mdio_dev,NULL ); +if (common->mdio_dev) +of_platform_device_destroy (common->mdio_dev,NULL );pm_runtime_put_sync (&pdev->dev);pm_runtime_disable (&pdev->dev);
drivers/net/phy/sfp.c +8 -5
@@ -207,6 +207,12 @@ static const enum gpiod_flags gpio_flags[] = {*/ #define SFP_PHY_ADDR 22 +/* SFP_EEPROM_BLOCK_SIZE is the size of data chunk to read the EEPROM +* at a time. Some SFP modules and also some Linux I2C drivers do not like +* reads longer than 16 bytes. +*/ +#define SFP_EEPROM_BLOCK_SIZE 16 +struct sff_data {unsigned int gpios;bool (*module_supported)(const struct sfp_eeprom_id *id);
@@ -1754,11 +1760,7 @@ static int sfp_sm_mod_probe(struct sfp *sfp, bool report)u8 check;int ret; -/* Some SFP modules and also some Linux I2C drivers do not like reads -* longer than 16 bytes, so read the EEPROM in chunks of 16 bytes at -* a time. -*/ - sfp->i2c_block_size =16 ; + sfp->i2c_block_size =SFP_EEPROM_BLOCK_SIZE ; ret =sfp_read (sfp, false,0 , &id.base,sizeof (id.base));if (ret <0 ) {
@@ -2385,6 +2387,7 @@ static struct sfp *sfp_alloc(struct device *dev)return ERR_PTR (-ENOMEM ); sfp->dev = dev; + sfp->i2c_block_size =SFP_EEPROM_BLOCK_SIZE ;mutex_init (&sfp->sm_mutex);mutex_init (&sfp->st_mutex);
drivers/net/wireless/marvell/mwifiex/pcie.c +1 -1
@@ -183,7 +183,7 @@ static const struct mwifiex_pcie_device mwifiex_pcie8997 = { .can_ext_scan = true, }; -static const struct of_device_id mwifiex_pcie_of_match_table[] = { +static const struct of_device_id mwifiex_pcie_of_match_table[]__maybe_unused = { { .compatible ="pci11ab,2b42" }, { .compatible ="pci1b4b,2b42" }, { }
drivers/net/wireless/marvell/mwifiex/sdio.c +1 -1
@@ -484,7 +484,7 @@ static struct memory_type_mapping mem_type_mapping_tbl[] = { {"EXTLAST", NULL, 0, 0xFE}, }; -static const struct of_device_id mwifiex_sdio_of_match_table[] = { +static const struct of_device_id mwifiex_sdio_of_match_table[]__maybe_unused = { { .compatible ="marvell,sd8787" }, { .compatible ="marvell,sd8897" }, { .compatible = "marvell,sd8997" },
drivers/pinctrl/pinctrl-amd.c +16 -20
@@ -764,34 +764,32 @@ static const struct pinconf_ops amd_pinconf_ops = { .pin_config_group_set = amd_pinconf_group_set, }; -static void amd_gpio_irq_init_pin (struct amd_gpio *gpio_dev,int pin) +static void amd_gpio_irq_init (struct amd_gpio *gpio_dev) { -const struct pin_desc *pd; +struct pinctrl_desc *desc = gpio_dev->pctrl->desc;unsigned long flags;u32 pin_reg, mask; +int i; mask =BIT (WAKE_CNTRL_OFF_S0I3 ) |BIT (WAKE_CNTRL_OFF_S3 ) |BIT (INTERRUPT_MASK_OFF ) |BIT (INTERRUPT_ENABLE_OFF ) |BIT (WAKE_CNTRL_OFF_S4 ); - pd =pin_desc_get (gpio_dev->pctrl, pin); -if (!pd) -return ; +for (i =0 ; i < desc->npins; i++) { +int pin = desc->pins[i].number; +const struct pin_desc *pd =pin_desc_get (gpio_dev->pctrl, pin); -raw_spin_lock_irqsave (&gpio_dev->lock, flags); - pin_reg =readl (gpio_dev->base + pin *4 ); - pin_reg &= ~mask; -writel (pin_reg, gpio_dev->base + pin *4 ); -raw_spin_unlock_irqrestore (&gpio_dev->lock, flags); -} +if (!pd) +continue ; -static void amd_gpio_irq_init (struct amd_gpio *gpio_dev) -{ -struct pinctrl_desc *desc = gpio_dev->pctrl->desc; -int i; +raw_spin_lock_irqsave (&gpio_dev->lock, flags); -for (i =0 ; i < desc->npins; i++) -amd_gpio_irq_init_pin (gpio_dev, i); + pin_reg =readl (gpio_dev->base + i *4 ); + pin_reg &= ~mask; +writel (pin_reg, gpio_dev->base + i *4 ); + +raw_spin_unlock_irqrestore (&gpio_dev->lock, flags); + } }#ifdef CONFIG_PM_SLEEP
@@ -844,10 +842,8 @@ static int amd_gpio_resume(struct device *dev)for (i =0 ; i < desc->npins; i++) {int pin = desc->pins[i].number; -if (!amd_gpio_should_save (gpio_dev, pin)) { -amd_gpio_irq_init_pin (gpio_dev, pin); +if (!amd_gpio_should_save (gpio_dev, pin))continue ; - }raw_spin_lock_irqsave (&gpio_dev->lock, flags); gpio_dev->saved_regs[i] |=readl (gpio_dev->base + pin *4 ) &PIN_IRQ_PENDING ;
drivers/power/supply/cros_usbpd-charger.c +1 -1
@@ -276,7 +276,7 @@ static int cros_usbpd_charger_get_power_info(struct port_data *port) port->psy_current_max =0 ;break ;default : -dev_err (dev,"Port %d: default case!\n" , port->port_number); +dev_dbg (dev,"Port %d: default case!\n" , port->port_number); port->psy_usb_type =POWER_SUPPLY_USB_TYPE_SDP ; }
drivers/pwm/pwm-cros-ec.c +1 -0
@@ -154,6 +154,7 @@ static void cros_ec_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm, state->enabled = (ret >0 ); state->period =EC_PWM_MAX_DUTY ; + state->polarity =PWM_POLARITY_NORMAL ;/* * Note that "disabled" and "duty cycle == 0" are treated the same. If
drivers/pwm/pwm-sprd.c +1 -0
@@ -109,6 +109,7 @@ static void sprd_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm, duty = val &SPRD_PWM_DUTY_MSK ; tmp = (prescale +1 ) *NSEC_PER_SEC * duty; state->duty_cycle =DIV_ROUND_CLOSEST_ULL (tmp, chn->clk_rate); + state->polarity =PWM_POLARITY_NORMAL ;/* Disable PWM clocks if the PWM channel is not in enable state. */ if (!state->enabled)
drivers/scsi/iscsi_tcp.c +1 -2
@@ -721,13 +721,12 @@ static int iscsi_sw_tcp_conn_set_param(struct iscsi_cls_conn *cls_conn,iscsi_set_param (cls_conn, param, buf, buflen);break ;case ISCSI_PARAM_DATADGST_EN : -iscsi_set_param (cls_conn, param, buf, buflen); -mutex_lock (&tcp_sw_conn->sock_lock);if (!tcp_sw_conn->sock) {mutex_unlock (&tcp_sw_conn->sock_lock);return -ENOTCONN ; } +iscsi_set_param (cls_conn, param, buf, buflen); tcp_sw_conn->sendpage = conn->datadgst_en ? sock_no_sendpage : tcp_sw_conn->sock->ops->sendpage;mutex_unlock (&tcp_sw_conn->sock_lock);
drivers/scsi/ses.c +8 -12
@@ -503,9 +503,6 @@ static int ses_enclosure_find_by_addr(struct enclosure_device *edev,int i;struct ses_component *scomp; -if (!edev->component[0 ].scratch) -return 0 ; -for (i =0 ; i < edev->components; i++) { scomp = edev->component[i].scratch;if (scomp->addr != efd->addr)
@@ -596,8 +593,10 @@ static void ses_enclosure_data_process(struct enclosure_device *edev, components++, type_ptr[0 ], name); - else + else if (components < edev->components) ecomp = &edev->component[components++]; + else + ecomp =ERR_PTR (-EINVAL );if (!IS_ERR (ecomp)) {if (addl_desc_ptr) {
@@ -728,11 +727,6 @@ static int ses_intf_add(struct device *cdev, components += type_ptr[1 ]; } -if (components ==0 ) { -sdev_printk (KERN_WARNING , sdev,"enclosure has no enumerated components\n" ); - goto err_free; - } - ses_dev->page1 = buf; ses_dev->page1_len = len; buf =NULL ;
@@ -774,9 +768,11 @@ static int ses_intf_add(struct device *cdev, buf =NULL ; } page2_not_supported: - scomp =kcalloc (components,sizeof (struct ses_component ),GFP_KERNEL ); -if (!scomp) - goto err_free; +if (components >0 ) { + scomp =kcalloc (components,sizeof (struct ses_component ),GFP_KERNEL ); +if (!scomp) + goto err_free; + } edev =enclosure_register (cdev->parent,dev_name (&sdev->sdev_gendev), components, &ses_enclosure_callbacks);
drivers/tty/serial/fsl_lpuart.c +7 -1
@@ -809,11 +809,17 @@ static unsigned int lpuart32_tx_empty(struct uart_port *port) struct lpuart_port, port);unsigned long stat =lpuart32_read (port,UARTSTAT );unsigned long sfifo =lpuart32_read (port,UARTFIFO ); +unsigned long ctrl =lpuart32_read (port,UARTCTRL );if (sport->dma_tx_in_progress)return 0 ; -if (stat &UARTSTAT_TC && sfifo &UARTFIFO_TXEMPT ) +/* +* LPUART Transmission Complete Flag may never be set while queuing a break +* character, so avoid checking for transmission complete when UARTCTRL_SBK +* is asserted. +*/ +if ((stat &UARTSTAT_TC && sfifo &UARTFIFO_TXEMPT ) || ctrl &UARTCTRL_SBK )return TIOCSER_TEMT ;return 0 ;
drivers/tty/serial/sh-sci.c +9 -1
@@ -31,6 +31,7 @@#include <linux/ioport.h> #include <linux/ktime.h> #include <linux/major.h> +#include <linux/minmax.h> #include <linux/module.h> #include <linux/mm.h> #include <linux/of.h>
@@ -2923,6 +2924,13 @@ static int sci_init_single(struct platform_device *dev, sci_port->irqs[i] =platform_get_irq (dev, i); } +/* +* The fourth interrupt on SCI port is transmit end interrupt, so +* shuffle the interrupts. +*/ +if (p->type ==PORT_SCI ) +swap (sci_port->irqs[SCIx_BRI_IRQ], sci_port->irqs[SCIx_TEI_IRQ]); +/* The SCI generates several interrupts. They can be muxed together or * connected to different interrupt lines. In the muxed case only one * interrupt resource is specified as there is only one interrupt ID.
@@ -2988,7 +2996,7 @@ static int sci_init_single(struct platform_device *dev, port->flags =UPF_FIXED_PORT |UPF_BOOT_AUTOCONF | p->flags; port->fifosize = sci_port->params->fifosize; -if (port->type ==PORT_SCI ) { +if (port->type ==PORT_SCI && !dev->dev.of_node) {if (sci_port->reg_size >=0x20 ) port->regshift =2 ;else
drivers/usb/host/xhci-tegra.c +3 -3
@@ -1175,6 +1175,9 @@ static void tegra_xhci_id_work(struct work_struct *work)mutex_unlock (&tegra->lock); + tegra->otg_usb3_port =tegra_xusb_padctl_get_usb3_companion (tegra->padctl, + tegra->otg_usb2_port); +if (tegra->host_mode) {/* switch to host mode */ if (tegra->otg_usb3_port >=0 ) {
@@ -1243,9 +1246,6 @@ static int tegra_xhci_id_notify(struct notifier_block *nb, } tegra->otg_usb2_port =tegra_xusb_get_usb2_port (tegra, usbphy); - tegra->otg_usb3_port =tegra_xusb_padctl_get_usb3_companion ( - tegra->padctl, - tegra->otg_usb2_port); tegra->host_mode = (usbphy->last_event ==USB_EVENT_ID ) ? true : false;
drivers/usb/host/xhci.c +5 -1
@@ -9,6 +9,7 @@*/ #include <linux/pci.h> +#include <linux/iommu.h> #include <linux/iopoll.h> #include <linux/irq.h> #include <linux/log2.h>
@@ -226,6 +227,7 @@ int xhci_reset(struct xhci_hcd *xhci, u64 timeout_us)static void xhci_zero_64b_regs (struct xhci_hcd *xhci) {struct device *dev =xhci_to_hcd (xhci)->self.sysdev; +struct iommu_domain *domain;int err, i;u64 val;u32 intrs;
@@ -244,7 +246,9 @@ static void xhci_zero_64b_regs(struct xhci_hcd *xhci)* an iommu. Doing anything when there is no iommu is definitely * unsafe... */ -if (!(xhci->quirks &XHCI_ZERO_64B_REGS ) || !device_iommu_mapped (dev)) + domain =iommu_get_domain_for_dev (dev); +if (!(xhci->quirks &XHCI_ZERO_64B_REGS ) || !domain || + domain->type ==IOMMU_DOMAIN_IDENTITY )return ;xhci_info (xhci,"Zeroing 64bit base registers, expecting fault\n" );
drivers/usb/serial/cp210x.c +1 -0
@@ -124,6 +124,7 @@ static const struct usb_device_id id_table[] = { { USB_DEVICE(0x10C4, 0x826B) }, /* Cygnal Integrated Products, Inc., Fasttrax GPS demonstration module */ { USB_DEVICE(0x10C4, 0x8281) }, /* Nanotec Plug & Drive */ { USB_DEVICE(0x10C4, 0x8293) }, /* Telegesis ETRX2USB */ + { USB_DEVICE(0x10C4, 0x82AA) }, /* Silicon Labs IFS-USB-DATACABLE used with Quint UPS */ { USB_DEVICE(0x10C4, 0x82EF) }, /* CESINEL FALCO 6105 AC Power Supply */ { USB_DEVICE(0x10C4, 0x82F1) }, /* CESINEL MEDCAL EFD Earth Fault Detector */ { USB_DEVICE(0x10C4, 0x82F2) }, /* CESINEL MEDCAL ST Network Analyzer */
drivers/usb/serial/option.c +10 -0
@@ -1198,6 +1198,8 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM520N, 0xff, 0xff, 0x30) }, { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM520N, 0xff, 0, 0x40) }, { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM520N, 0xff, 0, 0) }, + { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, 0x0900, 0xff, 0, 0), /* RM500U-CN */ + .driver_info = ZLP }, { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200U, 0xff, 0, 0) }, { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200S_CN, 0xff, 0, 0) }, { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200T, 0xff, 0, 0) },
@@ -1300,6 +1302,14 @@ static const struct usb_device_id option_ids[] = { .driver_info = NCTRL(0) | RSVD(1) }, { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1075, 0xff), /* Telit FN990 (PCIe) */ .driver_info = RSVD(0) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1080, 0xff), /* Telit FE990 (rmnet) */ + .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1081, 0xff), /* Telit FE990 (MBIM) */ + .driver_info = NCTRL(0) | RSVD(1) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1082, 0xff), /* Telit FE990 (RNDIS) */ + .driver_info = NCTRL(2) | RSVD(3) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1083, 0xff), /* Telit FE990 (ECM) */ + .driver_info = NCTRL(0) | RSVD(1) }, { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910), .driver_info = NCTRL(0) | RSVD(1) | RSVD(3) }, { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910_DUAL_MODEM),
drivers/usb/typec/altmodes/displayport.c +5 -1
@@ -101,8 +101,12 @@ static int dp_altmode_configure(struct dp_altmode *dp, u8 con)if (dp->data.status &DP_STATUS_PREFER_MULTI_FUNC && pin_assign &DP_PIN_ASSIGN_MULTI_FUNC_MASK ) pin_assign &=DP_PIN_ASSIGN_MULTI_FUNC_MASK ; -else if (pin_assign &DP_PIN_ASSIGN_DP_ONLY_MASK ) +else if (pin_assign &DP_PIN_ASSIGN_DP_ONLY_MASK ) { pin_assign &=DP_PIN_ASSIGN_DP_ONLY_MASK ; +/* Default to pin assign C if available */ +if (pin_assign &BIT (DP_PIN_ASSIGN_C )) + pin_assign =BIT (DP_PIN_ASSIGN_C ); + }if (!pin_assign)return -EINVAL ;
drivers/video/fbdev/core/fbmem.c +2 -0
@@ -1117,6 +1117,8 @@ static long do_fb_ioctl(struct fb_info *info, unsigned int cmd,case FBIOPUT_VSCREENINFO :if (copy_from_user (&var, argp,sizeof (var)))return -EFAULT ; +/* only for kernel-internal use */ + var.activate &= ~FB_ACTIVATE_KD_TEXT ;console_lock ();lock_fb_info (info); ret =fbcon_modechange_possible (info, &var);
drivers/watchdog/sbsa_gwdt.c +1 -0
@@ -121,6 +121,7 @@ static int sbsa_gwdt_set_timeout(struct watchdog_device *wdd,struct sbsa_gwdt *gwdt =watchdog_get_drvdata (wdd); wdd->timeout = timeout; + timeout = clamp_t(unsigned int, timeout, 1, wdd->max_hw_heartbeat_ms / 1000);if (action) writel(gwdt->clk * timeout,
fs/btrfs/disk-io.c +17 -0
@@ -2246,6 +2246,23 @@ static int btrfs_init_csum_hash(struct btrfs_fs_info *fs_info, u16 csum_type) fs_info->csum_shash = csum_shash; +/* +* Check if the checksum implementation is a fast accelerated one. +* As-is this is a bit of a hack and should be replaced once the csum +* implementations provide that information themselves. +*/ +switch (csum_type) { +case BTRFS_CSUM_TYPE_CRC32 : +if (!strstr (crypto_shash_driver_name (csum_shash),"generic" )) +set_bit (BTRFS_FS_CSUM_IMPL_FAST , &fs_info->flags); +break ; +default : +break ; + } + +btrfs_info (fs_info,"using %s (%s) checksum algorithm" , +btrfs_super_csum_name (csum_type), +crypto_shash_driver_name (csum_shash));return 0 ; }
fs/btrfs/super.c +0 -2
@@ -1692,8 +1692,6 @@ static struct dentry *btrfs_mount_root(struct file_system_type *fs_type, }else {snprintf (s->s_id,sizeof (s->s_id),"%pg" , bdev);btrfs_sb (s)->bdev_holder = fs_type; -if (!strstr (crc32c_impl (),"generic" )) -set_bit (BTRFS_FS_CSUM_IMPL_FAST , &fs_info->flags); error =btrfs_fill_super (s, fs_devices, data); }if (!error)
fs/nfsd/nfs4callback.c +2 -2
@@ -875,8 +875,8 @@ static const struct cred *get_backchannel_cred(struct nfs4_client *clp, struct rif (!kcred)return NULL ; - kcred->uid = ses->se_cb_sec.uid; - kcred->gid = ses->se_cb_sec.gid; + kcred->fsuid = ses->se_cb_sec.uid; + kcred->fsgid = ses->se_cb_sec.gid;return kcred; } }
fs/nilfs2/segment.c +1 -2
@@ -2614,11 +2614,10 @@ static int nilfs_segctor_thread(void *arg) goto loop; end_thread: -spin_unlock (&sci->sc_state_lock); -/* end sync. */ sci->sc_task =NULL ;wake_up (&sci->sc_wait_task);/* for nilfs_segctor_kill_thread() */ +spin_unlock (&sci->sc_state_lock);return 0 ; }
fs/nilfs2/super.c +2 -0
@@ -482,6 +482,7 @@ static void nilfs_put_super(struct super_block *sb)up_write (&nilfs->ns_sem); } +nilfs_sysfs_delete_device_group (nilfs);iput (nilfs->ns_sufile);iput (nilfs->ns_cpfile);iput (nilfs->ns_dat);
@@ -1105,6 +1106,7 @@ nilfs_fill_super(struct super_block *sb, void *data, int silent)nilfs_put_root (fsroot); failed_unload: +nilfs_sysfs_delete_device_group (nilfs);iput (nilfs->ns_sufile);iput (nilfs->ns_cpfile);iput (nilfs->ns_dat);
fs/nilfs2/the_nilfs.c +7 -5
@@ -87,7 +87,6 @@ void destroy_nilfs(struct the_nilfs *nilfs) {might_sleep ();if (nilfs_init (nilfs)) { -nilfs_sysfs_delete_device_group (nilfs);brelse (nilfs->ns_sbh[0 ]);brelse (nilfs->ns_sbh[1 ]); }
@@ -305,6 +304,10 @@ int load_nilfs(struct the_nilfs *nilfs, struct super_block *sb) goto failed; } + err =nilfs_sysfs_create_device_group (sb); +if (unlikely (err)) + goto sysfs_error; +if (valid_fs) goto skip_recovery;
@@ -366,6 +369,9 @@ int load_nilfs(struct the_nilfs *nilfs, struct super_block *sb) goto failed; failed_unload: +nilfs_sysfs_delete_device_group (nilfs); + + sysfs_error:iput (nilfs->ns_cpfile);iput (nilfs->ns_sufile);iput (nilfs->ns_dat);
@@ -697,10 +703,6 @@ int init_nilfs(struct the_nilfs *nilfs, struct super_block *sb, char *data)if (err) goto failed_sbh; - err =nilfs_sysfs_create_device_group (sb); -if (err) - goto failed_sbh; -set_nilfs_init (nilfs); err =0 ; out:
fs/ocfs2/dlmglue.c +5 -3
@@ -3396,10 +3396,12 @@ void ocfs2_dlm_shutdown(struct ocfs2_super *osb,ocfs2_lock_res_free (&osb->osb_nfs_sync_lockres);ocfs2_lock_res_free (&osb->osb_orphan_scan.os_lockres); -ocfs2_cluster_disconnect (osb->cconn, hangup_pending); - osb->cconn =NULL ; +if (osb->cconn) { +ocfs2_cluster_disconnect (osb->cconn, hangup_pending); + osb->cconn =NULL ; -ocfs2_dlm_shutdown_debug (osb); +ocfs2_dlm_shutdown_debug (osb); + } } static int ocfs2_drop_lock(struct ocfs2_super *osb,
fs/ocfs2/super.c +1 -2
@@ -1922,8 +1922,7 @@ static void ocfs2_dismount_volume(struct super_block *sb, int mnt_err) !ocfs2_is_hard_readonly(osb)) hangup_needed =1 ; -if (osb->cconn) -ocfs2_dlm_shutdown (osb, hangup_needed); +ocfs2_dlm_shutdown (osb, hangup_needed);ocfs2_blockcheck_stats_debugfs_remove (&osb->osb_ecc_stats);debugfs_remove_recursive (osb->osb_debug_root);
fs/proc/proc_sysctl.c +6 -0
@@ -1106,6 +1106,11 @@ static int sysctl_check_table_array(const char *path, struct ctl_table *table) err |=sysctl_err (path, table,"array not allowed" ); } +if (table->proc_handler == proc_dou8vec_minmax) { +if (table->maxlen !=sizeof (u8)) + err |=sysctl_err (path, table,"array not allowed" ); + } +return err; }
@@ -1121,6 +1126,7 @@ static int sysctl_check_table(const char *path, struct ctl_table *table) (table->proc_handler == proc_douintvec) || (table->proc_handler == proc_douintvec_minmax) || (table->proc_handler == proc_dointvec_minmax) || + (table->proc_handler == proc_dou8vec_minmax) || (table->proc_handler == proc_dointvec_jiffies) || (table->proc_handler == proc_dointvec_userhz_jiffies) || (table->proc_handler == proc_dointvec_ms_jiffies) ||
include/linux/ftrace.h +1 -1
@@ -811,7 +811,7 @@ static inline void __ftrace_enabled_restore(int enabled)#define CALLER_ADDR5 ((unsigned long)ftrace_return_address(5))#define CALLER_ADDR6 ((unsigned long)ftrace_return_address(6)) -static inline unsigned long get_lock_parent_ip (void ) +static __always_inline unsigned long get_lock_parent_ip (void ) {unsigned long addr =CALLER_ADDR0 ;
include/linux/kexec.h +1 -1
@@ -380,8 +380,8 @@ extern note_buf_t __percpu *crash_notes;extern bool kexec_in_progress;int crash_shrink_memory (unsigned long new_size); -size_t crash_get_memory_size (void );void crash_free_reserved_phys_range (unsigned long begin,unsigned long end); +ssize_t crash_get_memory_size (void );void arch_kexec_protect_crashkres (void );void arch_kexec_unprotect_crashkres (void );
include/linux/sysctl.h +2 -0
@@ -53,6 +53,8 @@ int proc_douintvec(struct ctl_table *, int, void *, size_t *, loff_t *);int proc_dointvec_minmax (struct ctl_table *,int ,void *,size_t *,loff_t *);int proc_douintvec_minmax (struct ctl_table *table,int write,void *buffer,size_t *lenp,loff_t *ppos); +int proc_dou8vec_minmax (struct ctl_table *table,int write,void *buffer, +size_t *lenp,loff_t *ppos);int proc_dointvec_jiffies (struct ctl_table *,int ,void *,size_t *,loff_t *);int proc_dointvec_userhz_jiffies (struct ctl_table *,int ,void *,size_t *,loff_t *);
include/net/netns/ipv4.h +50 -50
144 lines not on this page · raw message
init/Kconfig +12 -0
@@ -47,6 +47,18 @@ config CLANG_VERSION int default $(shell,$(srctree)/scripts/clang-version.sh $(CC)) +config AS_IS_GNU + def_bool $(success,test "$(as-name)" = GNU) + +config AS_IS_LLVM + def_bool $(success,test "$(as-name)" = LLVM) + +config AS_VERSION + int + # Use clang version if this is the integrated assembler + default CLANG_VERSION if AS_IS_LLVM + default $(as-version) + config LLD_VERSION int default $(shell,$(srctree)/scripts/lld-version.sh $(LD))
kernel/cgroup/cpuset.c +5 -1
@@ -2188,11 +2188,15 @@ static int cpuset_can_attach(struct cgroup_taskset *tset)static void cpuset_cancel_attach (struct cgroup_taskset *tset) {struct cgroup_subsys_state *css; +struct cpuset *cs;cgroup_taskset_first (tset, &css); + cs =css_cs (css);percpu_down_write (&cpuset_rwsem); -css_cs (css)->attach_in_progress--; + cs->attach_in_progress--; +if (!cs->attach_in_progress) +wake_up (&cpuset_attach_wq);percpu_up_write (&cpuset_rwsem); }
kernel/events/core.c +1 -1
@@ -11622,7 +11622,7 @@ perf_event_set_output(struct perf_event *event, struct perf_event *output_event)/* * If its not a per-cpu rb, it must be the same task. */ -if (output_event->cpu ==-1 && output_event->ctx != event->ctx) +if (output_event->cpu ==-1 && output_event->hw.target != event->hw.target) goto out;/*
kernel/kexec.c +13 -28
81 lines not on this page · raw message
kernel/kexec_core.c +16 -12
@@ -45,7 +45,7 @@#include <crypto/sha.h> #include "kexec_internal.h" -DEFINE_MUTEX (kexec_mutex); +atomic_t __kexec_lock =ATOMIC_INIT (0 );/* Per cpu memory for storing cpu states in case of system crash. */ note_buf_t __percpu *crash_notes;
@@ -943,7 +943,7 @@ int kexec_load_disabled;*/ void __noclone __crash_kexec (struct pt_regs *regs) { -/* Take the kexec_mutex here to prevent sys_kexec_load +/* Take the kexec_lock here to prevent sys_kexec_load * running on one cpu from replacing the crash kernel * we are using after a panic on a different cpu. *
@@ -951,7 +951,7 @@ void __noclone __crash_kexec(struct pt_regs *regs)* of memory the xchg(&kexec_crash_image) would be * sufficient. But since I reuse the memory... */ -if (mutex_trylock (&kexec_mutex)) { +if (kexec_trylock ()) {if (kexec_crash_image) {struct pt_regs fixed_regs;
@@ -960,7 +960,7 @@ void __noclone __crash_kexec(struct pt_regs *regs)machine_crash_shutdown (&fixed_regs);machine_kexec (kexec_crash_image); } -mutex_unlock (&kexec_mutex); +kexec_unlock (); } }STACK_FRAME_NON_STANDARD (__crash_kexec);
@@ -989,14 +989,17 @@ void crash_kexec(struct pt_regs *regs) } } -size_t crash_get_memory_size (void ) +ssize_t crash_get_memory_size (void ) { -size_t size =0 ; +ssize_t size =0 ; + +if (!kexec_trylock ()) +return -EBUSY ; -mutex_lock (&kexec_mutex);if (crashk_res.end != crashk_res.start) size =resource_size (&crashk_res); -mutex_unlock (&kexec_mutex); + +kexec_unlock ();return size; }
@@ -1016,7 +1019,8 @@ int crash_shrink_memory(unsigned long new_size)unsigned long old_size;struct resource *ram_res; -mutex_lock (&kexec_mutex); +if (!kexec_trylock ()) +return -EBUSY ;if (kexec_crash_image) { ret = -ENOENT ;
@@ -1054,7 +1058,7 @@ int crash_shrink_memory(unsigned long new_size)insert_resource (&iomem_resource, ram_res); unlock: -mutex_unlock (&kexec_mutex); +kexec_unlock ();return ret; }
@@ -1126,7 +1130,7 @@ int kernel_kexec(void) {int error =0 ; -if (!mutex_trylock (&kexec_mutex)) +if (!kexec_trylock ())return -EBUSY ;if (!kexec_image) { error = -EINVAL ;
@@ -1201,7 +1205,7 @@ int kernel_kexec(void)#endif Unlock: -mutex_unlock (&kexec_mutex); +kexec_unlock ();return error; }
kernel/kexec_file.c +2 -2
@@ -343,7 +343,7 @@ SYSCALL_DEFINE5(kexec_file_load, int, kernel_fd, int, initrd_fd, image =NULL ; -if (!mutex_trylock (&kexec_mutex)) +if (!kexec_trylock ())return -EBUSY ; dest_image = &kexec_image;
@@ -415,7 +415,7 @@ SYSCALL_DEFINE5(kexec_file_load, int, kernel_fd, int, initrd_fd,if ((flags &KEXEC_FILE_ON_CRASH ) && kexec_crash_image)arch_kexec_protect_crashkres (); -mutex_unlock (&kexec_mutex); +kexec_unlock ();kimage_free (image);return ret; }
kernel/kexec_internal.h +14 -1
@@ -15,7 +15,20 @@ int kimage_is_destination_range(struct kimage *image,int machine_kexec_post_load (struct kimage *image); -extern struct mutex kexec_mutex; +/* +* Whatever is used to serialize accesses to the kexec_crash_image needs to be +* NMI safe, as __crash_kexec() can happen during nmi_panic(), so here we use a +* "simple" atomic variable that is acquired with a cmpxchg(). +*/ +extern atomic_t __kexec_lock; +static inline bool kexec_trylock (void ) +{ +return atomic_cmpxchg_acquire (&__kexec_lock,0 ,1 ) ==0 ; +} +static inline void kexec_unlock (void ) +{ +atomic_set_release (&__kexec_lock,0 ); +}#ifdef CONFIG_KEXEC_FILE #include <linux/purgatory.h>
kernel/ksysfs.c +6 -1
@@ -106,7 +106,12 @@ KERNEL_ATTR_RO(kexec_crash_loaded);static ssize_t kexec_crash_size_show (struct kobject *kobj,struct kobj_attribute *attr,char *buf) { -return sprintf (buf,"%zu\n" ,crash_get_memory_size ()); +ssize_t size =crash_get_memory_size (); + +if (size <0 ) +return size; + +return sprintf (buf,"%zd\n" , size); } static ssize_t kexec_crash_size_store(struct kobject *kobj, struct kobj_attribute *attr,
kernel/sched/fair.c +13 -2
@@ -9342,8 +9342,6 @@ static inline void calculate_imbalance(struct lb_env *env, struct sd_lb_stats *s local->avg_load = (local->group_load *SCHED_CAPACITY_SCALE ) / local->group_capacity; - sds->avg_load = (sds->total_load *SCHED_CAPACITY_SCALE ) / - sds->total_capacity;/* * If the local group is more loaded than the selected * busiest group don't try to pull any tasks.
@@ -9352,6 +9350,19 @@ static inline void calculate_imbalance(struct lb_env *env, struct sd_lb_stats *s env->imbalance =0 ;return ; } + + sds->avg_load = (sds->total_load *SCHED_CAPACITY_SCALE ) / + sds->total_capacity; + +/* +* If the local group is more loaded than the average system +* load, don't try to pull any tasks. +*/ +if (local->avg_load >= sds->avg_load) { + env->imbalance =0 ; +return ; + } + }/*
kernel/sysctl.c +65 -0
77 lines not on this page · raw message
kernel/trace/ftrace.c +9 -6
@@ -5390,12 +5390,15 @@ int modify_ftrace_direct(unsigned long ip, ret =0 ; } -if (unlikely (ret && new_direct)) { - direct->count++; -list_del_rcu (&new_direct->next); -synchronize_rcu_tasks (); -kfree (new_direct); - ftrace_direct_func_count--; +if (ret) { + direct->addr = old_addr; +if (unlikely (new_direct)) { + direct->count++; +list_del_rcu (&new_direct->next); +synchronize_rcu_tasks (); +kfree (new_direct); + ftrace_direct_func_count--; + } } out_unlock:
kernel/trace/ring_buffer.c +12 -1
@@ -2962,6 +2962,10 @@ rb_set_commit_to_write(struct ring_buffer_per_cpu *cpu_buffer)if (RB_WARN_ON (cpu_buffer,rb_is_reader_page (cpu_buffer->tail_page)))return ; +/* +* No need for a memory barrier here, as the update +* of the tail_page did it for this page. +*/ local_set (&cpu_buffer->commit_page->page->commit,rb_page_write (cpu_buffer->commit_page));rb_inc_page (cpu_buffer, &cpu_buffer->commit_page);
@@ -2971,6 +2975,8 @@ rb_set_commit_to_write(struct ring_buffer_per_cpu *cpu_buffer)while (rb_commit_index (cpu_buffer) !=rb_page_write (cpu_buffer->commit_page)) { +/* Make sure the readers see the content of what is committed. */ +smp_wmb ();local_set (&cpu_buffer->commit_page->page->commit,rb_page_write (cpu_buffer->commit_page)); RB_WARN_ON(cpu_buffer,
@@ -4390,7 +4396,12 @@ rb_get_reader_page(struct ring_buffer_per_cpu *cpu_buffer)/* * Make sure we see any padding after the write update -* (see rb_reset_tail()) +* (see rb_reset_tail()). +* +* In addition, a writer may be writing on the reader page +* if the page has not been fully filled, so the read barrier +* is also needed to make sure we see the content of what is +* committed by the writer (see rb_set_commit_to_write()). */ smp_rmb ();
kernel/trace/trace.c +1 -0
@@ -8895,6 +8895,7 @@ static int __remove_instance(struct trace_array *tr)ftrace_destroy_function_files (tr);tracefs_remove (tr->dir);free_trace_buffers (tr); +clear_tracing_err_log (tr);for (i =0 ; i < tr->nr_topts; i++) {kfree (tr->topts[i].topts);
mm/swapfile.c +2 -1
@@ -666,6 +666,7 @@ static void __del_from_avail_list(struct swap_info_struct *p) {int nid; +assert_spin_locked (&p->lock);for_each_node (nid)plist_del (&p->avail_lists[nid], &swap_avail_heads[nid]); }
@@ -2611,8 +2612,8 @@ SYSCALL_DEFINE1(swapoff, const char __user *, specialfile)spin_unlock (&swap_lock); goto out_dput; } -del_from_avail_list (p);spin_lock (&p->lock); +del_from_avail_list (p);if (p->prio <0 ) {struct swap_info_struct *si = p;int nid;
net/9p/trans_xen.c +4 -0
@@ -300,6 +300,10 @@ static void xen_9pfs_front_free(struct xen_9pfs_front_priv *priv)write_unlock (&xen_9pfs_lock);for (i =0 ; i < priv->num_rings; i++) { +struct xen_9pfs_dataring *ring = &priv->rings[i]; + +cancel_work_sync (&ring->work); +if (!priv->rings[i].intf)break ;if (priv->rings[i].irq >0 )
net/bluetooth/hidp/core.c +1 -1
@@ -433,7 +433,7 @@ static void hidp_set_timer(struct hidp_session *session)static void hidp_del_timer (struct hidp_session *session) {if (session->idle_to >0 ) -del_timer (&session->timer); +del_timer_sync (&session->timer); } static void hidp_process_report(struct hidp_session *session, int type,
net/bluetooth/l2cap_core.c +6 -18
@@ -4647,33 +4647,27 @@ static inline int l2cap_disconnect_req(struct l2cap_conn *conn,BT_DBG ("scid 0x%4.4x dcid 0x%4.4x" , scid, dcid); -mutex_lock (&conn->chan_lock); - - chan =__l2cap_get_chan_by_scid (conn, dcid); + chan =l2cap_get_chan_by_scid (conn, dcid);if (!chan) { -mutex_unlock (&conn->chan_lock);cmd_reject_invalid_cid (conn, cmd->ident, dcid, scid);return 0 ; } -l2cap_chan_hold (chan); -l2cap_chan_lock (chan); - rsp.dcid =cpu_to_le16 (chan->scid); rsp.scid =cpu_to_le16 (chan->dcid);l2cap_send_cmd (conn, cmd->ident,L2CAP_DISCONN_RSP ,sizeof (rsp), &rsp); chan->ops->set_shutdown (chan); +mutex_lock (&conn->chan_lock);l2cap_chan_del (chan,ECONNRESET ); +mutex_unlock (&conn->chan_lock); chan->ops->close (chan);l2cap_chan_unlock (chan);l2cap_chan_put (chan); -mutex_unlock (&conn->chan_lock); -return 0 ; }
@@ -4693,33 +4687,27 @@ static inline int l2cap_disconnect_rsp(struct l2cap_conn *conn,BT_DBG ("dcid 0x%4.4x scid 0x%4.4x" , dcid, scid); -mutex_lock (&conn->chan_lock); - - chan =__l2cap_get_chan_by_scid (conn, scid); + chan =l2cap_get_chan_by_scid (conn, scid);if (!chan) {mutex_unlock (&conn->chan_lock);return 0 ; } -l2cap_chan_hold (chan); -l2cap_chan_lock (chan); -if (chan->state !=BT_DISCONN ) {l2cap_chan_unlock (chan);l2cap_chan_put (chan); -mutex_unlock (&conn->chan_lock);return 0 ; } +mutex_lock (&conn->chan_lock);l2cap_chan_del (chan,0 ); +mutex_unlock (&conn->chan_lock);
Lines of this file are not shown. View the raw message.
net/ipv4/sysctl_net_ipv4.c +103 -100
203 lines not on this page · raw message
net/qrtr/af_qrtr.c new file +1303 -0
1,303 lines not on this page · raw message
net/qrtr/qrtr.c deleted +0 -1288
1,288 lines not on this page · raw message
scripts/as-version.sh new file +69 -0
69 lines not on this page · raw message
tools/testing/selftests/intel_pstate/aperf.c +16 -6
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.