Linux 5.10.15
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.10.15 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/filesystems/overlayfs.rst | 8 + Makefile | 12 - arch/arm/boot/dts/omap3-gta04.dtsi | 3 arch/arm/boot/dts/stm32mp15xx-dhcom-drc02.dtsi | 12 + arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi | 3 arch/arm/boot/dts/sun7i-a20-bananapro.dts | 2 arch/arm/include/debug/tegra.S | 54 +++---- arch/arm/mach-footbridge/dc21285.c | 12 - arch/arm/mach-omap1/board-osk.c | 2 arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 2 arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts | 2 arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi | 2 arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts | 10 - arch/arm64/boot/dts/rockchip/px30.dtsi | 2 arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts | 1 arch/riscv/Kconfig | 2 arch/um/drivers/virtio_uml.c | 3 arch/x86/Makefile | 3 arch/x86/include/asm/apic.h | 10 - arch/x86/include/asm/barrier.h | 18 ++ arch/x86/kernel/apic/apic.c | 4 arch/x86/kernel/apic/x2apic_cluster.c | 6 arch/x86/kernel/apic/x2apic_phys.c | 9 - arch/x86/kernel/hw_breakpoint.c | 61 +++++--- arch/x86/kvm/cpuid.c | 2 arch/x86/kvm/emulate.c | 2 arch/x86/kvm/mmu/tdp_mmu.c | 6 arch/x86/kvm/svm/sev.c | 17 +- arch/x86/kvm/svm/svm.c | 5 arch/x86/kvm/vmx/vmx.c | 17 +- arch/x86/kvm/x86.c | 27 ++- arch/x86/mm/mem_encrypt.c | 1 drivers/gpio/gpiolib.c | 10 + drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 drivers/gpu/drm/drm_dp_mst_topology.c | 24 ++- drivers/gpu/drm/i915/display/intel_ddi.c | 37 +++-- drivers/gpu/drm/i915/display/intel_display.c | 9 - drivers/gpu/drm/i915/display/intel_dp_mst.c | 4 drivers/gpu/drm/i915/display/intel_overlay.c | 4 drivers/gpu/drm/i915/display/intel_sprite.c | 65 +-------- drivers/gpu/drm/i915/gem/i915_gem_domain.c | 45 ------ drivers/gpu/drm/i915/gem/i915_gem_object.h | 1 drivers/gpu/drm/i915/gt/intel_breadcrumbs.c | 6 drivers/input/joystick/xpad.c | 17 ++ drivers/input/serio/i8042-x86ia64io.h | 2 drivers/input/touchscreen/goodix.c | 2 drivers/input/touchscreen/ili210x.c | 26 ++- drivers/md/md.c | 2 drivers/mmc/core/sdio_cis.c | 6 drivers/mmc/host/sdhci-pltfm.h | 7 - drivers/net/dsa/mv88e6xxx/chip.c | 6 drivers/net/ethernet/ibm/ibmvnic.c | 5 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 13 - drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h | 1 drivers/net/ethernet/intel/igc/igc_ethtool.c | 3 drivers/net/ethernet/intel/igc/igc_i225.c | 3 drivers/net/ethernet/intel/igc/igc_mac.c | 2 drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c | 10 - drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 6 drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 16 +- drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 5 drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c | 2 drivers/net/ethernet/realtek/r8169_main.c | 75 +++++++++- drivers/net/ipa/gsi.c | 2 drivers/nvdimm/dimm_devs.c | 18 ++ drivers/nvdimm/namespace_devs.c | 10 - drivers/nvme/host/pci.c | 2 drivers/nvme/target/tcp.c | 3 drivers/thunderbolt/acpi.c | 2 drivers/usb/class/usblp.c | 19 +- drivers/usb/dwc2/gadget.c | 8 - drivers/usb/dwc3/core.c | 2 drivers/usb/gadget/legacy/ether.c | 4 drivers/usb/gadget/udc/aspeed-vhub/hub.c | 4 drivers/usb/host/xhci-mtk-sch.c | 130 +++++++++++++------ drivers/usb/host/xhci-mtk.c | 2 drivers/usb/host/xhci-mtk.h | 15 ++ drivers/usb/host/xhci-mvebu.c | 42 ++++++ drivers/usb/host/xhci-mvebu.h | 6 drivers/usb/host/xhci-plat.c | 20 ++ drivers/usb/host/xhci-plat.h | 1 drivers/usb/host/xhci-ring.c | 31 ++-- drivers/usb/host/xhci.c | 8 - drivers/usb/host/xhci.h | 4 drivers/usb/renesas_usbhs/fifo.c | 1 drivers/usb/serial/cp210x.c | 2 drivers/usb/serial/option.c | 6 drivers/vdpa/mlx5/core/mlx5_vdpa.h | 1 drivers/vdpa/mlx5/core/mr.c | 28 +--- drivers/vdpa/mlx5/net/mlx5_vnet.c | 18 ++ fs/afs/main.c | 6 fs/cifs/dir.c | 22 ++- fs/cifs/smb2pdu.h | 2 fs/cifs/transport.c | 18 ++ fs/hugetlbfs/inode.c | 3 fs/io_uring.c | 6 fs/overlayfs/dir.c | 2 fs/overlayfs/file.c | 5 fs/overlayfs/overlayfs.h | 1 fs/overlayfs/ovl_entry.h | 2 fs/overlayfs/readdir.c | 28 +--- fs/overlayfs/super.c | 34 +++- fs/overlayfs/util.c | 27 +++ include/drm/drm_dp_mst_helper.h | 1 include/linux/hugetlb.h | 2 include/linux/iommu.h | 5 include/linux/irq.h | 4 include/linux/kprobes.h | 2 include/linux/msi.h | 6 include/linux/tracepoint.h | 12 + include/linux/vmalloc.h | 9 - include/net/sch_generic.h | 2 include/net/udp.h | 2 init/init_task.c | 3 kernel/bpf/bpf_inode_storage.c | 6 kernel/bpf/cgroup.c | 7 - kernel/bpf/preload/Makefile | 5 kernel/irq/msi.c | 44 ++---- kernel/kprobes.c | 36 ++++- kernel/trace/fgraph.c | 2 kernel/trace/trace_irqsoff.c | 4 kernel/trace/trace_kprobe.c | 10 - mm/compaction.c | 3 mm/filemap.c | 4 mm/huge_memory.c | 37 +++-- mm/hugetlb.c | 48 ++++++- mm/memblock.c | 49 ------- net/core/neighbour.c | 7 - net/ipv4/ip_tunnel.c | 16 +- net/ipv4/udp_offload.c | 69 +++++++++- net/ipv6/udp_offload.c | 2 net/lapb/lapb_out.c | 3 net/mac80211/driver-ops.c | 5 net/mac80211/rate.c | 3 net/rxrpc/af_rxrpc.c | 6 net/sunrpc/svcsock.c | 7 - scripts/Makefile | 8 - 137 files changed, 1105 insertions(+), 605 deletions(-)
Aleksandr Loktionov (1):
i40e: Revert "i40e: don't report link up for a VF who hasn't enabled queues"
Alexander Ovechkin (1):
net: sched: replaced invalid qdisc tree flush helper in qdisc_replace
Alexey Dobriyan (1):
Input: i8042 - unbreak Pegatron C15B
Alexey Kardashevskiy (1):
tracepoint: Fix race between tracing and removing tracepoint
Andres Calderon Jaramillo (1):
drm/i915/display: Prevent double YUV range correction on HDR planes
AngeloGioacchino Del Regno (1):
Input: goodix - add support for Goodix GT9286 chip
Atish Patra (1):
RISC-V: Define MAXPHYSMEM_1GB only for RV32
Aurelien Aptel (1):
cifs: report error instead of invalid when revalidating a dentry fails
Ben Gardon (1):
KVM: x86/mmu: Fix TDP MMU zap collapsible SPTEs
Benjamin Valentin (1):
Input: xpad - sync supported devices with fork on GitHub
Chenxin Jin (1):
USB: serial: cp210x: add new VID/PID for supporting Teraoka AD2000
Chinmay Agarwal (1):
neighbour: Prevent a dead entry from updating gc_list
Chris Wilson (2):
drm/i915/gem: Drop lru bumping on display unpinning drm/i915/gt: Close race between enable_breadcrumbs and cancel_breadcrumbs
Christoph Schemmel (1):
USB: serial: option: Adding support for Cinterion MV31
Chuck Lever (1):
SUNRPC: Fix NFS READs that start at non-page-aligned offsets
Chunfeng Yun (2):
usb: xhci-mtk: skip dropping bandwidth of unchecked endpoints
usb: xhci-mtk: break loop when find the endpoint to drop
DENG Qingfang (1):
net: dsa: mv88e6xxx: override existent unicast portvec in port_fdb_add
Dan Carpenter (2):
USB: gadget: legacy: fix an error code in eth_bind()
net: ipa: pass correct dma_handle to dma_free_coherent()
Dan Williams (2):
libnvdimm/namespace: Fix visibility of namespace resource attribute libnvdimm/dimm: Avoid race between probe and available_slots_show()
Daniel Jurgens (1):
net/mlx5: Fix function calculation for page trees
Dave Hansen (1):
x86/apic: Add extra serialization for non-serializing MSRs
David Howells (1):
rxrpc: Fix deadlock around release of dst cached on udp tunnel
Dmitry Osipenko (1):
ARM: 9043/1: tegra: Fix misplaced tegra_uart_config in decompressor
Dongseok Yi (1):
udp: ipv4: manipulate network header of NATed UDP GRO fraglist
Eli Cohen (2):
vdpa/mlx5: Fix memory key MTT population vdpa/mlx5: Restore the hardware used index after change map
Felix Fietkau (1):
mac80211: fix station rate table updates on assoc
Fengnan Chang (1):
mmc: core: Limit retries when analyse of SDIO tuples fails
Gary Bisson (1):
usb: dwc3: fix clock issue during resume in OTG mode
Greg Kroah-Hartman (1):
Linux 5.10.15
Gustavo A. R. Silva (1):
smb3: Fix out-of-bounds bug in SMB2_negotiate()
H. Nikolaus Schaller (2):
DTS: ARM: gta04: remove legacy spi-cs-high to make display work again
ARM: dts; gta04: SPI panel chip select is active low
Hans de Goede (1):
genirq: Prevent [devm_]irq_alloc_desc from returning irq 0
Heiko Stuebner (1):
usb: dwc2: Fix endpoint direction check in ep_from_windex
Heiner Kallweit (2):
r8169: work around RTL8125 UDP hw bug
r8169: fix WoL on shutdown if CONFIG_DEBUG_SHIRQ is set
Hermann Lauer (1):
ARM: dts: sun7i: a20: bananapro: Fix ethernet phy-mode
Hugh Dickins (1):
mm: thp: fix MADV_REMOVE deadlock on shmem THP
Ikjoon Jang (1):
usb: xhci-mtk: fix unreleased bandwidth data
Imre Deak (2):
drm/dp/mst: Export drm_dp_get_vc_payload_bw() drm/i915: Fix the MST PBN divider calculation
Jeremy Figgins (1):
USB: usblp: don't call usb_set_interface if there's a single alt
Joerg Roedel (1):
iommu: Check dev->iommu in dev_iommu_priv_get() before dereferencing it
Johannes Berg (1):
um: virtio: free vu_dev only with the contained struct device
Josh Poimboeuf (1):
x86/build: Disable CET instrumentation in the kernel
Kai-Heng Feng (1):
igc: Report speed and duplex as unknown when device is runtime suspended
Kevin Lo (2):
igc: set the default return value to -IGC_ERR_NVM in igc_write_nvm_srwr
igc: check return value of ret_val in igc_config_fc_after_link_up
Lai Jiangshan (2):
x86/debug: Prevent data breakpoints on __per_cpu_offset x86/debug: Prevent data breakpoints on cpu_dr7
Liangyan (1):
ovl: fix dentry leak in ovl_get_redirect
Lijun Pan (1):
ibmvnic: device remove has higher precedence over reset
Linus Walleij (1):
ARM: OMAP1: OSK: fix ohci-omap breakage
Loris Reiff (2):
bpf, cgroup: Fix optlen WARN_ON_ONCE toctou
bpf, cgroup: Fix problematic bounds check
Maor Dickman (1):
net/mlx5e: Release skb in case of failure in tc update skb
Maor Gottlieb (1):
net/mlx5: Fix leak upon failure of rule creation
Marc Zyngier (1):
genirq/msi: Activate Multi-MSI early when MSI_FLAG_ACTIVATE_EARLY is set
Marek Szyprowski (1):
arm64: dts: meson: switch TFLASH_VDD_EN pin to open drain on Odroid-C4
Marek Vasut (6):
ARM: dts: stm32: Fix polarity of the DH DRC02 uSD card detect
ARM: dts: stm32: Connect card-detect signal on DHCOM
ARM: dts: stm32: Disable WP on DHCOM uSD slot
ARM: dts: stm32: Disable optional TSC2004 on DRC02 board
ARM: dts: stm32: Fix GPIO hog flags on DHCOM DRC02
Input: ili210x - implement pressure reporting for ILI251x
Mario Limonciello (1):
thunderbolt: Fix possible NULL pointer dereference in tb_acpi_add_link()
Masahiro Yamada (1):
kbuild: fix duplicated flags in DEBUG_CFLAGS
Masami Hiramatsu (1):
tracing/kprobe: Fix to support kretprobe events on unloaded modules
Mathias Nyman (1):
xhci: fix bounce buffer usage for non-sg list case
Maxim Mikityanskiy (1):
net/mlx5e: Update max_opened_tc also when channels are closed
Michael Roth (1):
KVM: x86: fix CPUID entries returned by KVM_GET_CPUID2 ioctl
Miklos Szeredi (1):
ovl: avoid deadlock on directory ioctl
Muchun Song (4):
mm: hugetlbfs: fix cannot migrate the fallocated HugeTLB page
mm: hugetlb: fix a race between freeing and dissolving the page
mm: hugetlb: fix a race between isolating and freeing page
mm: hugetlb: remove VM_BUG_ON_PAGE from page_huge_active
Pali Rohár (1):
usb: host: xhci: mvebu: make USB 3.0 PHY optional for Armada 3720
Pan Bian (1):
bpf, inode_storage: Put file handler if no storage was found
Paolo Bonzini (1):
KVM: x86: Allow guests to see MSR_IA32_TSX_CTRL even if tsx=off
Pavel Shilovsky (1):
smb3: fix crediting for compounding when only one request in flight
Peter Gonda (1):
Fix unsynchronized access to sev members through svm_register_enc_region
Peter Zijlstra (1):
x86/debug: Fix DR6 handling
Pho Tran (1):
USB: serial: cp210x: add pid/vid for WSDA-200-USB
Quanyang Wang (1):
gpiolib: free device name on error path to fix kmemleak
Quentin Monnet (1):
bpf, preload: Fix build when $(O) points to a relative path
Rick Edgecombe (1):
mm/vmalloc: separate put pages and flush VM flags
Rokudo Yan (1):
mm, compaction: move high_pfn to the for loop scope
Rolf Eike Beer (1):
scripts: use pkg-config to locate libcrypto
Roman Gushchin (1):
memblock: do not start bottom-up allocations with kernel_end
Russell King (1):
ARM: footbridge: fix dc21285 PCI configuration accessors
Sagi Grimberg (1):
nvmet-tcp: fix out-of-bounds access when receiving multiple h2cdata PDUs
Sandy Huang (1):
arm64: dts: rockchip: fix vopl iommu irq on px30
Sargun Dhillon (1):
ovl: implement volatile-specific fsync error behaviour
Sean Christopherson (3):
KVM: SVM: Treat SVM as unsupported when running as an SEV guest
KVM: x86: Update emulator context mode if SYSENTER xfers to 64-bit mode
KVM: x86: Set so called 'reserved CR3 bits in LM mask' at vCPU reset
Serge Semin (1):
arm64: dts: amlogic: meson-g12: Set FL-adj property value
Shawn Guo (1):
arm64: dts: qcom: c630: keep both touchpad devices enabled
Simon South (1):
arm64: dts: rockchip: Use only supported PCIe link speed on Pinebook Pro
Stefan Chulski (1):
net: mvpp2: TCAM entry enable should be written after SRAM data
Steven Rostedt (VMware) (1):
fgraph: Initialize tracing_graph_pause at task creation
Stylon Wang (1):
drm/amd/display: Revert "Fix EDID parsing after resume from suspend"
Thorsten Leemhuis (1):
nvme-pci: avoid the deepest sleep state on Kingston A2000 SSDs
Ulf Hansson (1):
mmc: sdhci-pltfm: Fix linking err for sdhci-brcmstb
Vadim Fedorenko (1):
net: ip_tunnel: fix mtu calculation
Viktor Rosendahl (1):
tracing: Use pause-on-trace with the latency tracers
Ville Syrjälä (2):
drm/i915: Extract intel_ddi_power_up_lanes() drm/i915: Power up combo PHY lanes for for HDMI as well
Waiman Long (1):
mm/filemap: add missing mem_cgroup_uncharge() to __add_to_page_cache_locked()
Wang ShaoBo (1):
kretprobe: Avoid re-registration of the same kretprobe earlier
Xiao Ni (1):
md: Set prev_flush_start and flush_bio in an atomic way
Xiaoguang Wang (1):
io_uring: don't modify identity's files uncess identity is cowed
Xie He (1):
net: lapb: Copy the skb before sending a packet
Yoshihiro Shimoda (1):
usb: renesas_usbhs: Clear pipe running flag in usbhs_pkt_pop()
Zyta Szpak (1):
arm64: dts: ls1046a: fix dcfg address range
kernel test robot (1):
usb: gadget: aspeed: add missing of_node_put
Greg Kroah-Hartman
maintainerDocumentation/filesystems/overlayfs.rst +8 -0
@@ -575,6 +575,14 @@ without significant effort. The advantage of mounting with the "volatile" option is that all forms of sync calls to the upper filesystem are omitted. +In order to avoid a giving a false sense of safety, the syncfs (and fsync) +semantics of volatile mounts are slightly different than that of the rest of +VFS. If any writeback error occurs on the upperdir's filesystem after a +volatile mount takes place, all sync functions will return an error. Once this +condition is reached, the filesystem will not recover, and every subsequent sync +call will return an error, even if the upperdir has not experience a new error +since the last sync call. + When overlay is mounted with "volatile" option, the directory "$workdir/work/incompat/volatile" is created. During next mount, overlay checks for this directory and refuses to mount if present. This is a strong
Makefile +4 -8
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 10 -SUBLEVEL = 14 +SUBLEVEL = 15 EXTRAVERSION = NAME = Kleptomaniac Octopus
@@ -812,10 +812,12 @@ KBUILD_CFLAGS += -ftrivial-auto-var-init=zero KBUILD_CFLAGS += -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang endif +DEBUG_CFLAGS := + # Workaround for GCC versions < 5.0 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61801 ifdef CONFIG_CC_IS_GCC -DEBUG_CFLAGS := $(call cc-ifversion, -lt, 0500, $(call cc-option, -fno-var-tracking-assignments)) +DEBUG_CFLAGS += $(call cc-ifversion, -lt, 0500, $(call cc-option, -fno-var-tracking-assignments)) endif ifdef CONFIG_DEBUG_INFO
@@ -948,12 +950,6 @@ KBUILD_CFLAGS += $(call cc-option,-Werror=designated-init) # change __FILE__ to the relative path from the srctree KBUILD_CPPFLAGS += $(call cc-option,-fmacro-prefix-map=$(srctree)/=) -# ensure -fcf-protection is disabled when using retpoline as it is -# incompatible with -mindirect-branch=thunk-extern -ifdef CONFIG_RETPOLINE -KBUILD_CFLAGS += $(call cc-option,-fcf-protection=none) -endif - # include additional Makefiles when needed include-y := scripts/Makefile.extrawarn include-$(CONFIG_KASAN) += scripts/Makefile.kasan
arch/arm/boot/dts/omap3-gta04.dtsi +1 -2
@@ -114,7 +114,7 @@ spi_lcd: spi_lcd { gpio-sck = <&gpio1 12 GPIO_ACTIVE_HIGH>; gpio-miso = <&gpio1 18 GPIO_ACTIVE_HIGH>; gpio-mosi = <&gpio1 20 GPIO_ACTIVE_HIGH>; - cs-gpios = <&gpio1 19 GPIO_ACTIVE_HIGH>; + cs-gpios = <&gpio1 19 GPIO_ACTIVE_LOW>; num-chipselects = <1>; /* lcd panel */
@@ -124,7 +124,6 @@ lcd: td028ttec1@0 { spi-max-frequency = <100000>; spi-cpol; spi-cpha; - spi-cs-high; backlight= <&backlight>; label = "lcd";
arch/arm/boot/dts/stm32mp15xx-dhcom-drc02.dtsi +9 -3
@@ -35,7 +35,7 @@ &gpiob { */ rs485-rx-en { gpio-hog; - gpios = <8 GPIO_ACTIVE_HIGH>; + gpios = <8 0>; output-low; line-name = "rs485-rx-en"; };
@@ -63,7 +63,7 @@ &gpioi { */ usb-hub { gpio-hog; - gpios = <2 GPIO_ACTIVE_HIGH>; + gpios = <2 0>; output-high; line-name = "usb-hub-reset"; };
@@ -87,6 +87,12 @@ eeprom@50 { }; }; +&i2c4 { + touchscreen@49 { + status = "disabled"; + }; +}; + &i2c5 { /* TP7/TP8 */ pinctrl-names = "default"; pinctrl-0 = <&i2c5_pins_a>;
@@ -104,7 +110,7 @@ &sdmmc3 { * are used for on-board microSD slot instead. */ /delete-property/broken-cd; - cd-gpios = <&gpioi 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + cd-gpios = <&gpioi 10 GPIO_ACTIVE_HIGH>; disable-wp; };
arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi +2 -1
@@ -353,7 +353,8 @@ &sdmmc1 { pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_a>; pinctrl-1 = <&sdmmc1_b4_od_pins_a &sdmmc1_dir_pins_a>; pinctrl-2 = <&sdmmc1_b4_sleep_pins_a &sdmmc1_dir_sleep_pins_a>; - broken-cd; + cd-gpios = <&gpiog 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + disable-wp; st,sig-dir; st,neg-edge; st,use-ckin;
arch/arm/boot/dts/sun7i-a20-bananapro.dts +1 -1
@@ -110,7 +110,7 @@ &gmac { pinctrl-names = "default"; pinctrl-0 = <&gmac_rgmii_pins>; phy-handle = <&phy1>; - phy-mode = "rgmii"; + phy-mode = "rgmii-id"; phy-supply = <®_gmac_3v3>; status = "okay"; };
arch/arm/include/debug/tegra.S +27 -27
64 lines not on this page · raw message
arch/arm/mach-footbridge/dc21285.c +6 -6
@@ -65,15 +65,15 @@ dc21285_read_config(struct pci_bus *bus, unsigned int devfn, int where,if (addr)switch (size) {case 1 : - asm("ldrb %0, [%1, %2]" + asmvolatile ("ldrb %0, [%1, %2]" :"=r" (v) :"r" (addr),"r" (where) :"cc" );break ;case 2 : - asm("ldrh %0, [%1, %2]" + asmvolatile ("ldrh %0, [%1, %2]" :"=r" (v) :"r" (addr),"r" (where) :"cc" );break ;case 4 : - asm("ldr %0, [%1, %2]" + asmvolatile ("ldr %0, [%1, %2]" :"=r" (v) :"r" (addr),"r" (where) :"cc" );break ; }
@@ -99,17 +99,17 @@ dc21285_write_config(struct pci_bus *bus, unsigned int devfn, int where,if (addr)switch (size) {case 1 : - asm("strb %0, [%1, %2]" + asmvolatile ("strb %0, [%1, %2]" : :"r" (value),"r" (addr),"r" (where) :"cc" );break ;case 2 : - asm("strh %0, [%1, %2]" + asmvolatile ("strh %0, [%1, %2]" : :"r" (value),"r" (addr),"r" (where) :"cc" );break ;case 4 : - asm("str %0, [%1, %2]" + asmvolatile ("str %0, [%1, %2]" : :"r" (value),"r" (addr),"r" (where) :"cc" );break ;
arch/arm/mach-omap1/board-osk.c +2 -0
@@ -203,6 +203,8 @@ static int osk_tps_setup(struct i2c_client *client, void *context)*/ gpio_request (OSK_TPS_GPIO_USB_PWR_EN ,"n_vbus_en" );gpio_direction_output (OSK_TPS_GPIO_USB_PWR_EN ,1 ); +/* Free the GPIO again as the driver will request it */ +gpio_free (OSK_TPS_GPIO_USB_PWR_EN );/* Set GPIO 2 high so LED D3 is off by default */ tps65010_set_gpio_out_value (GPIO2 ,HIGH );
arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi +1 -1
@@ -2384,7 +2384,7 @@ dwc3: usb@ff500000 { interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>; dr_mode = "host"; snps,dis_u2_susphy_quirk; - snps,quirk-frame-length-adjustment; + snps,quirk-frame-length-adjustment = <0x20>; snps,parkmode-disable-ss-quirk; }; };
arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts +1 -1
@@ -52,7 +52,7 @@ tflash_vdd: regulator-tflash_vdd { regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; - gpio = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>; + gpio = <&gpio_ao GPIOAO_3 GPIO_OPEN_DRAIN>; enable-active-high; regulator-always-on; };
arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi +1 -1
@@ -385,7 +385,7 @@ bportals: bman-portals@508000000 { dcfg: dcfg@1ee0000 { compatible = "fsl,ls1046a-dcfg", "syscon"; - reg = <0x0 0x1ee0000 0x0 0x10000>; + reg = <0x0 0x1ee0000 0x0 0x1000>; big-endian; };
arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts +2 -8
@@ -263,6 +263,8 @@ &i2c1 { &i2c3 { status = "okay"; clock-frequency = <400000>; + /* Overwrite pinctrl-0 from sdm845.dtsi */ + pinctrl-0 = <&qup_i2c3_default &i2c3_hid_active>; tsel: hid@15 { compatible = "hid-over-i2c";
@@ -270,9 +272,6 @@ tsel: hid@15 { hid-descr-addr = <0x1>; interrupts-extended = <&tlmm 37 IRQ_TYPE_LEVEL_HIGH>; - - pinctrl-names = "default"; - pinctrl-0 = <&i2c3_hid_active>; }; tsc2: hid@2c {
@@ -281,11 +280,6 @@ tsc2: hid@2c { hid-descr-addr = <0x20>; interrupts-extended = <&tlmm 37 IRQ_TYPE_LEVEL_HIGH>; - - pinctrl-names = "default"; - pinctrl-0 = <&i2c3_hid_active>; - - status = "disabled"; }; };
arch/arm64/boot/dts/rockchip/px30.dtsi +1 -1
@@ -1097,7 +1097,7 @@ vopl_out_lvds: endpoint@1 { vopl_mmu: iommu@ff470f00 { compatible = "rockchip,iommu"; reg = <0x0 0xff470f00 0x0 0x100>; - interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>; + interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>; interrupt-names = "vopl_mmu"; clocks = <&cru ACLK_VOPL>, <&cru HCLK_VOPL>; clock-names = "aclk", "iface";
arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts +0 -1
@@ -790,7 +790,6 @@ &pcie_phy { &pcie0 { bus-scan-delay-ms = <1000>; ep-gpios = <&gpio2 RK_PD4 GPIO_ACTIVE_HIGH>; - max-link-speed = <2>; num-lanes = <4>; pinctrl-names = "default"; pinctrl-0 = <&pcie_clkreqn_cpm>;
arch/riscv/Kconfig +2 -0
@@ -252,8 +252,10 @@ choice default MAXPHYSMEM_128GB if 64BIT && CMODEL_MEDANY config MAXPHYSMEM_1GB + depends on 32BIT bool "1GiB" config MAXPHYSMEM_2GB + depends on 64BIT && CMODEL_MEDLOW bool "2GiB" config MAXPHYSMEM_128GB depends on 64BIT && CMODEL_MEDANY
arch/um/drivers/virtio_uml.c +2 -1
@@ -1083,6 +1083,7 @@ static void virtio_uml_release_dev(struct device *d) }os_close_file (vu_dev->sock); +kfree (vu_dev); }/* Platform device */
@@ -1096,7 +1097,7 @@ static int virtio_uml_probe(struct platform_device *pdev)if (!pdata)return -EINVAL ; - vu_dev =devm_kzalloc (&pdev->dev,sizeof (*vu_dev),GFP_KERNEL ); + vu_dev =kzalloc (sizeof (*vu_dev),GFP_KERNEL );if (!vu_dev)return -ENOMEM ;
arch/x86/Makefile +3 -0
@@ -127,6 +127,9 @@ else KBUILD_CFLAGS += -mno-red-zone KBUILD_CFLAGS += -mcmodel=kernel + + # Intel CET isn't enabled in the kernel + KBUILD_CFLAGS += $(call cc-option,-fcf-protection=none) endif ifdef CONFIG_X86_X32
arch/x86/include/asm/apic.h +0 -10
@@ -197,16 +197,6 @@ static inline bool apic_needs_pit(void) { return true; }#endif /* !CONFIG_X86_LOCAL_APIC */ #ifdef CONFIG_X86_X2APIC -/* -* Make previous memory operations globally visible before -* sending the IPI through x2apic wrmsr. We need a serializing instruction or -* mfence for this. -*/ -static inline void x2apic_wrmsr_fence (void ) -{ - asmvolatile ("mfence" : : :"memory" ); -} -static inline void native_apic_msr_write (u32 reg,u32 v) { if (reg == APIC_DFR || reg == APIC_ID || reg == APIC_LDR ||
arch/x86/include/asm/barrier.h +18 -0
@@ -84,4 +84,22 @@ do { \#include <asm-generic/barrier.h> +/* +* Make previous memory operations globally visible before +* a WRMSR. +* +* MFENCE makes writes visible, but only affects load/store +* instructions. WRMSR is unfortunately not a load/store +* instruction and is unaffected by MFENCE. The LFENCE ensures +* that the WRMSR is not reordered. +* +* Most WRMSRs are full serializing instructions themselves and +* do not require this barrier. This is only required for the +* IA32_TSC_DEADLINE and X2APIC MSRs. +*/ +static inline void weak_wrmsr_fence (void ) +{ + asmvolatile ("mfence; lfence" : : :"memory" ); +} +#endif /* _ASM_X86_BARRIER_H */
arch/x86/kernel/apic/apic.c +4 -0
@@ -41,6 +41,7 @@#include <asm/perf_event.h> #include <asm/x86_init.h> #include <linux/atomic.h> +#include <asm/barrier.h> #include <asm/mpspec.h> #include <asm/i8259.h> #include <asm/proto.h>
@@ -472,6 +473,9 @@ static int lapic_next_deadline(unsigned long delta, {u64 tsc; +/* This MSR is special and need a special fence: */ +weak_wrmsr_fence (); + tsc =rdtsc ();wrmsrl (MSR_IA32_TSC_DEADLINE , tsc + (((u64 ) delta) *TSC_DIVISOR ));return 0 ;
arch/x86/kernel/apic/x2apic_cluster.c +4 -2
@@ -29,7 +29,8 @@ static void x2apic_send_IPI(int cpu, int vector) {u32 dest =per_cpu (x86_cpu_to_logical_apicid, cpu); -x2apic_wrmsr_fence (); +/* x2apic MSRs are special and need a special fence: */ +weak_wrmsr_fence ();__x2apic_send_IPI_dest (dest, vector,APIC_DEST_LOGICAL ); }
@@ -41,7 +42,8 @@ __x2apic_send_IPI_mask(const struct cpumask *mask, int vector, int apic_dest)unsigned long flags;u32 dest; -x2apic_wrmsr_fence (); +/* x2apic MSRs are special and need a special fence: */ +weak_wrmsr_fence ();local_irq_save (flags); tmpmsk =this_cpu_cpumask_var_ptr (ipi_mask);
arch/x86/kernel/apic/x2apic_phys.c +6 -3
@@ -43,7 +43,8 @@ static void x2apic_send_IPI(int cpu, int vector) {u32 dest =per_cpu (x86_cpu_to_apicid, cpu); -x2apic_wrmsr_fence (); +/* x2apic MSRs are special and need a special fence: */ +weak_wrmsr_fence ();__x2apic_send_IPI_dest (dest, vector,APIC_DEST_PHYSICAL ); }
@@ -54,7 +55,8 @@ __x2apic_send_IPI_mask(const struct cpumask *mask, int vector, int apic_dest)unsigned long this_cpu;unsigned long flags; -x2apic_wrmsr_fence (); +/* x2apic MSRs are special and need a special fence: */ +weak_wrmsr_fence ();local_irq_save (flags);
@@ -125,7 +127,8 @@ void __x2apic_send_IPI_shorthand(int vector, u32 which) {unsigned long cfg =__prepare_ICR (which, vector,0 ); -x2apic_wrmsr_fence (); +/* x2apic MSRs are special and need a special fence: */ +weak_wrmsr_fence ();native_x2apic_icr_write (cfg,0 ); }
arch/x86/kernel/hw_breakpoint.c +40 -21
106 lines not on this page · raw message
arch/x86/kvm/cpuid.c +1 -1
@@ -320,7 +320,7 @@ int kvm_vcpu_ioctl_get_cpuid2(struct kvm_vcpu *vcpu,if (cpuid->nent < vcpu->arch.cpuid_nent) goto out; r = -EFAULT ; -if (copy_to_user (entries, &vcpu->arch.cpuid_entries, +if (copy_to_user (entries, vcpu->arch.cpuid_entries, vcpu->arch.cpuid_nent *sizeof (struct kvm_cpuid_entry2 ))) goto out;return 0 ;
arch/x86/kvm/emulate.c +2 -0
@@ -2879,6 +2879,8 @@ static int em_sysenter(struct x86_emulate_ctxt *ctxt) ops->get_msr (ctxt,MSR_IA32_SYSENTER_ESP , &msr_data); *reg_write (ctxt,VCPU_REGS_RSP ) = (efer &EFER_LMA ) ? msr_data : (u32 )msr_data; +if (efer &EFER_LMA ) + ctxt->mode =X86EMUL_MODE_PROT64 ;return X86EMUL_CONTINUE ; }
arch/x86/kvm/mmu/tdp_mmu.c +3 -3
@@ -1037,8 +1037,8 @@ bool kvm_tdp_mmu_slot_set_dirty(struct kvm *kvm, struct kvm_memory_slot *slot) }/* -* Clear non-leaf entries (and free associated page tables) which could -* be replaced by large mappings, for GFNs within the slot. +* Clear leaf entries which could be replaced by large mappings, for +* GFNs within the slot. */ static void zap_collapsible_spte_range(struct kvm *kvm, struct kvm_mmu_page *root,
@@ -1050,7 +1050,7 @@ static void zap_collapsible_spte_range(struct kvm *kvm,tdp_root_for_each_pte (iter, root, start, end) {if (!is_shadow_present_pte (iter.old_spte) || -is_last_spte (iter.old_spte, iter.level)) + !is_last_spte (iter.old_spte, iter.level))continue ; pfn =spte_to_pfn (iter.old_spte);
arch/x86/kvm/svm/sev.c +10 -7
@@ -320,6 +320,8 @@ static struct page **sev_pin_memory(struct kvm *kvm, unsigned long uaddr,unsigned long first, last;int ret; +lockdep_assert_held (&kvm->lock); +if (ulen ==0 || uaddr + ulen < uaddr)return ERR_PTR (-EINVAL );
@@ -1001,12 +1003,20 @@ int svm_register_enc_region(struct kvm *kvm,if (!region)return -ENOMEM ; +mutex_lock (&kvm->lock); region->pages =sev_pin_memory (kvm, range->addr, range->size, ®ion->npages,1 );if (IS_ERR (region->pages)) { ret =PTR_ERR (region->pages); +mutex_unlock (&kvm->lock); goto e_free; } + region->uaddr = range->addr; + region->size = range->size; + +list_add_tail (®ion->list, &sev->regions_list); +mutex_unlock (&kvm->lock); +/* * The guest may change the memory encryption attribute from C=0 -> C=1 * or vice versa for this memory range. Lets make sure caches are
@@ -1015,13 +1025,6 @@ int svm_register_enc_region(struct kvm *kvm,*/ sev_clflush_pages (region->pages, region->npages); - region->uaddr = range->addr; - region->size = range->size; - -mutex_lock (&kvm->lock); -list_add_tail (®ion->list, &sev->regions_list); -mutex_unlock (&kvm->lock); -return ret; e_free:
arch/x86/kvm/svm/svm.c +5 -0
@@ -438,6 +438,11 @@ static int has_svm(void)return 0 ; } +if (sev_active ()) { +pr_info ("KVM is unsupported when running as an SEV guest\n" ); +return 0 ; + } +return 1 ; }
arch/x86/kvm/vmx/vmx.c +13 -4
@@ -6874,11 +6874,20 @@ static int vmx_create_vcpu(struct kvm_vcpu *vcpu)switch (index) {case MSR_IA32_TSX_CTRL :/* -* No need to pass TSX_CTRL_CPUID_CLEAR through, so -* let's avoid changing CPUID bits under the host -* kernel's feet. +* TSX_CTRL_CPUID_CLEAR is handled in the CPUID +* interception. Keep the host value unchanged to avoid +* changing CPUID bits under the host kernel's feet. +* +* hle=0, rtm=0, tsx_ctrl=1 can be found with some +* combinations of new kernel and old userspace. If +* those guests run on a tsx=off host, do allow guests +* to use TSX_CTRL, but do not change the value on the +* host so that TSX remains always disabled. */ - vmx->guest_uret_msrs[j].mask = ~(u64 )TSX_CTRL_CPUID_CLEAR ; +if (boot_cpu_has (X86_FEATURE_RTM )) + vmx->guest_uret_msrs[j].mask = ~(u64 )TSX_CTRL_CPUID_CLEAR ; +else + vmx->guest_uret_msrs[j].mask =0 ;break ;default : vmx->guest_uret_msrs[j].mask =-1ull ;
arch/x86/kvm/x86.c +18 -9
@@ -1376,16 +1376,24 @@ static u64 kvm_get_arch_capabilities(void)if (!boot_cpu_has_bug (X86_BUG_MDS )) data |=ARCH_CAP_MDS_NO ; -/* -* On TAA affected systems: -* - nothing to do if TSX is disabled on the host. -* - we emulate TSX_CTRL if present on the host. -* This lets the guest use VERW to clear CPU buffers. -*/ -if (!boot_cpu_has (X86_FEATURE_RTM )) - data &= ~(ARCH_CAP_TAA_NO |ARCH_CAP_TSX_CTRL_MSR ); -else if (!boot_cpu_has_bug (X86_BUG_TAA )) +if (!boot_cpu_has (X86_FEATURE_RTM )) { +/* +* If RTM=0 because the kernel has disabled TSX, the host might +* have TAA_NO or TSX_CTRL. Clear TAA_NO (the guest sees RTM=0 +* and therefore knows that there cannot be TAA) but keep +* TSX_CTRL: some buggy userspaces leave it set on tsx=on hosts, +* and we want to allow migrating those guests to tsx=off hosts. +*/ + data &= ~ARCH_CAP_TAA_NO ; + }else if (!boot_cpu_has_bug (X86_BUG_TAA )) { data |=ARCH_CAP_TAA_NO ; + }else { +/* +* Nothing to do here; we emulate TSX_CTRL if present on the +* host so the guest can choose between disabling TSX or +* using VERW to clear CPU buffers. +*/ + }return data; }
@@ -9907,6 +9915,7 @@ int kvm_arch_vcpu_create(struct kvm_vcpu *vcpu)fx_init (vcpu); vcpu->arch.maxphyaddr =cpuid_query_maxphyaddr (vcpu); + vcpu->arch.cr3_lm_rsvd_bits =rsvd_bits (cpuid_maxphyaddr (vcpu),63 ); vcpu->arch.pat =MSR_IA32_CR_PAT_DEFAULT ;
arch/x86/mm/mem_encrypt.c +1 -0
@@ -351,6 +351,7 @@ bool sev_active(void) {return sev_status &MSR_AMD64_SEV_ENABLED ; } +EXPORT_SYMBOL_GPL (sev_active);/* Needs to be called from non-instrumentable code */ bool noinstr sev_es_active(void)
drivers/gpio/gpiolib.c +8 -2
@@ -602,7 +602,11 @@ int gpiochip_add_data_with_key(struct gpio_chip *gc, void *data, ret = gdev->id; goto err_free_gdev; } -dev_set_name (&gdev->dev,GPIOCHIP_NAME "%d" , gdev->id); + + ret =dev_set_name (&gdev->dev,GPIOCHIP_NAME "%d" , gdev->id); +if (ret) + goto err_free_ida; +device_initialize (&gdev->dev);dev_set_drvdata (&gdev->dev, gdev);if (gc->parent && gc->parent->driver)
@@ -616,7 +620,7 @@ int gpiochip_add_data_with_key(struct gpio_chip *gc, void *data, gdev->descs =kcalloc (gc->ngpio,sizeof (gdev->descs[0 ]),GFP_KERNEL );if (!gdev->descs) { ret = -ENOMEM ; - goto err_free_ida; + goto err_free_dev_name; }if (gc->ngpio ==0 ) {
@@ -767,6 +771,8 @@ int gpiochip_add_data_with_key(struct gpio_chip *gc, void *data,kfree_const (gdev->label); err_free_descs:kfree (gdev->descs); +err_free_dev_name: +kfree (dev_name (&gdev->dev)); err_free_ida:ida_free (&gpio_ida, gdev->id); err_free_gdev:
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -2
@@ -2278,8 +2278,6 @@ void amdgpu_dm_update_connector_after_detect(drm_connector_update_edid_property (connector, aconnector->edid); -drm_add_edid_modes (connector, aconnector->edid); -if (aconnector->dc_link->aux_mode)drm_dp_cec_set_edid (&aconnector->dm_dp_aux.aux, aconnector->edid);
drivers/gpu/drm/drm_dp_mst_topology.c +18 -6
@@ -3629,14 +3629,26 @@ static int drm_dp_send_up_ack_reply(struct drm_dp_mst_topology_mgr *mgr,return 0 ; } -static int drm_dp_get_vc_payload_bw (u8 dp_link_bw,u8 dp_link_count) +/** +* drm_dp_get_vc_payload_bw - get the VC payload BW for an MST link +* @link_rate: link rate in 10kbits/s units +* @link_lane_count: lane count +* +* Calculate the total bandwidth of a MultiStream Transport link. The returned +* value is in units of PBNs/(timeslots/1 MTP). This value can be used to +* convert the number of PBNs required for a given stream to the number of +* timeslots this stream requires in each MTP. +*/ +int drm_dp_get_vc_payload_bw (int link_rate,int link_lane_count) { -if (dp_link_bw ==0 || dp_link_count ==0 ) -DRM_DEBUG_KMS ("invalid link bandwidth in DPCD: %x (link count: %d)\n" , - dp_link_bw, dp_link_count); +if (link_rate ==0 || link_lane_count ==0 ) +DRM_DEBUG_KMS ("invalid link rate/lane count: (%d / %d)\n" , + link_rate, link_lane_count); -return dp_link_bw * dp_link_count /2 ; +/* See DP v2.0 2.6.4.2, VCPayload_Bandwidth_for_OneTimeSlotPer_MTP_Allocation */ +return link_rate * link_lane_count /54000 ; } +EXPORT_SYMBOL (drm_dp_get_vc_payload_bw);/** * drm_dp_read_mst_cap() - check whether or not a sink supports MST
@@ -3692,7 +3704,7 @@ int drm_dp_mst_topology_mgr_set_mst(struct drm_dp_mst_topology_mgr *mgr, bool ms goto out_unlock; } - mgr->pbn_div =drm_dp_get_vc_payload_bw (mgr->dpcd[1 ], + mgr->pbn_div =drm_dp_get_vc_payload_bw (drm_dp_bw_code_to_link_rate (mgr->dpcd[1 ]), mgr->dpcd[2 ] &DP_MAX_LANE_COUNT_MASK );if (mgr->pbn_div ==0 ) { ret = -EINVAL ;
drivers/gpu/drm/i915/display/intel_ddi.c +21 -16
@@ -3274,6 +3274,23 @@ static void intel_ddi_disable_fec_state(struct intel_encoder *encoder,intel_de_posting_read (dev_priv, intel_dp->regs.dp_tp_ctl); } +static void intel_ddi_power_up_lanes (struct intel_encoder *encoder, +const struct intel_crtc_state *crtc_state) +{ +struct drm_i915_private *i915 =to_i915 (encoder->base.dev); +struct intel_digital_port *dig_port =enc_to_dig_port (encoder); +enum phy phy =intel_port_to_phy (i915, encoder->port); + +if (intel_phy_is_combo (i915, phy)) { +bool lane_reversal = + dig_port->saved_port_bits &DDI_BUF_PORT_REVERSAL ; + +intel_combo_phy_power_up_lanes (i915, phy, false, + crtc_state->lane_count, + lane_reversal); + } +} + static void tgl_ddi_pre_enable_dp(struct intel_atomic_state *state, struct intel_encoder *encoder, const struct intel_crtc_state *crtc_state,
@@ -3367,14 +3384,7 @@ static void tgl_ddi_pre_enable_dp(struct intel_atomic_state *state,* 7.f Combo PHY: Configure PORT_CL_DW10 Static Power Down to power up * the used lanes of the DDI. */ -if (intel_phy_is_combo (dev_priv, phy)) { -bool lane_reversal = - dig_port->saved_port_bits &DDI_BUF_PORT_REVERSAL ; - -intel_combo_phy_power_up_lanes (dev_priv, phy, false, - crtc_state->lane_count, - lane_reversal); - } +intel_ddi_power_up_lanes (encoder, crtc_state);/* * 7.g Configure and enable DDI_BUF_CTL
@@ -3458,14 +3468,7 @@ static void hsw_ddi_pre_enable_dp(struct intel_atomic_state *state,else intel_prepare_dp_ddi_buffers (encoder, crtc_state); -if (intel_phy_is_combo (dev_priv, phy)) { -bool lane_reversal = - dig_port->saved_port_bits &DDI_BUF_PORT_REVERSAL ; - -intel_combo_phy_power_up_lanes (dev_priv, phy, false, - crtc_state->lane_count, - lane_reversal); - } +intel_ddi_power_up_lanes (encoder, crtc_state);intel_ddi_init_dp_buf_reg (encoder);if (!is_mst)
@@ -3933,6 +3936,8 @@ static void intel_enable_ddi_hdmi(struct intel_atomic_state *state,intel_de_write (dev_priv, reg, val); } +intel_ddi_power_up_lanes (encoder, crtc_state); +/* In HDMI/DVI mode, the port width, and swing/emphasis values * are ignored so nothing special needs to be done besides * enabling the port.
drivers/gpu/drm/i915/display/intel_display.c +4 -5
@@ -2294,7 +2294,7 @@ intel_pin_and_fence_fb_obj(struct drm_framebuffer *fb,*/ ret =i915_vma_pin_fence (vma);if (ret !=0 &&INTEL_GEN (dev_priv) <4 ) { -i915_gem_object_unpin_from_display_plane (vma); +i915_vma_unpin (vma); vma =ERR_PTR (ret); goto err; }
@@ -2312,12 +2312,9 @@ intel_pin_and_fence_fb_obj(struct drm_framebuffer *fb,void intel_unpin_fb_vma (struct i915_vma *vma,unsigned long flags) { -i915_gem_object_lock (vma->obj,NULL );if (flags &PLANE_HAS_FENCE )i915_vma_unpin_fence (vma); -i915_gem_object_unpin_from_display_plane (vma); -i915_gem_object_unlock (vma->obj); - +i915_vma_unpin (vma);i915_vma_put (vma); }
@@ -4883,6 +4880,8 @@ u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state, plane_color_ctl |=PLANE_COLOR_YUV_RANGE_CORRECTION_DISABLE ; }else if (fb->format->is_yuv) { plane_color_ctl |=PLANE_COLOR_INPUT_CSC_ENABLE ; +if (plane_state->hw.color_range ==DRM_COLOR_YCBCR_FULL_RANGE ) + plane_color_ctl |=PLANE_COLOR_YUV_RANGE_CORRECTION_DISABLE ; }return plane_color_ctl;
drivers/gpu/drm/i915/display/intel_dp_mst.c +3 -1
@@ -68,7 +68,9 @@ static int intel_dp_mst_compute_link_config(struct intel_encoder *encoder, slots =drm_dp_atomic_find_vcpi_slots (state, &intel_dp->mst_mgr, connector->port, - crtc_state->pbn,0 ); + crtc_state->pbn, +drm_dp_get_vc_payload_bw (crtc_state->port_clock, + crtc_state->lane_count));if (slots == -EDEADLK )return slots;if (slots >=0 )
drivers/gpu/drm/i915/display/intel_overlay.c +2 -2
@@ -359,7 +359,7 @@ static void intel_overlay_release_old_vma(struct intel_overlay *overlay)intel_frontbuffer_flip_complete (overlay->i915,INTEL_FRONTBUFFER_OVERLAY (overlay->crtc->pipe)); -i915_gem_object_unpin_from_display_plane (vma); +i915_vma_unpin (vma);i915_vma_put (vma); }
@@ -860,7 +860,7 @@ static int intel_overlay_do_put_image(struct intel_overlay *overlay,return 0 ; out_unpin: -i915_gem_object_unpin_from_display_plane (vma); +i915_vma_unpin (vma); out_pin_section:atomic_dec (&dev_priv->gpu_error.pending_fb_pin);
drivers/gpu/drm/i915/display/intel_sprite.c +10 -55
89 lines not on this page · raw message
drivers/gpu/drm/i915/gem/i915_gem_domain.c +0 -45
57 lines not on this page · raw message
drivers/gpu/drm/i915/gem/i915_gem_object.h +0 -1
@@ -471,7 +471,6 @@ i915_gem_object_pin_to_display_plane(struct drm_i915_gem_object *obj,u32 alignment, const struct i915_ggtt_view *view, unsigned int flags); -void i915_gem_object_unpin_from_display_plane (struct i915_vma *vma);void i915_gem_object_make_unshrinkable (struct drm_i915_gem_object *obj);void i915_gem_object_make_shrinkable (struct drm_i915_gem_object *obj);
drivers/gpu/drm/i915/gt/intel_breadcrumbs.c +4 -2
@@ -451,10 +451,12 @@ void i915_request_cancel_breadcrumb(struct i915_request *rq)struct intel_context *ce = rq->context;bool release; -if (!test_and_clear_bit (I915_FENCE_FLAG_SIGNAL , &rq->fence.flags)) +spin_lock (&ce->signal_lock); +if (!test_and_clear_bit (I915_FENCE_FLAG_SIGNAL , &rq->fence.flags)) { +spin_unlock (&ce->signal_lock);return ; + } -spin_lock (&ce->signal_lock);list_del_rcu (&rq->signal_link); release =remove_signaling_context (rq->engine->breadcrumbs, ce);spin_unlock (&ce->signal_lock);
drivers/input/joystick/xpad.c +16 -1
@@ -215,9 +215,17 @@ static const struct xpad_device { { 0x0e6f, 0x0213, "Afterglow Gamepad for Xbox 360", 0, XTYPE_XBOX360 }, { 0x0e6f, 0x021f, "Rock Candy Gamepad for Xbox 360", 0, XTYPE_XBOX360 }, { 0x0e6f, 0x0246, "Rock Candy Gamepad for Xbox One 2015", 0, XTYPE_XBOXONE }, - { 0x0e6f, 0x02ab, "PDP Controller for Xbox One", 0, XTYPE_XBOXONE }, + { 0x0e6f, 0x02a0, "PDP Xbox One Controller", 0, XTYPE_XBOXONE }, + { 0x0e6f, 0x02a1, "PDP Xbox One Controller", 0, XTYPE_XBOXONE }, + { 0x0e6f, 0x02a2, "PDP Wired Controller for Xbox One - Crimson Red", 0, XTYPE_XBOXONE }, { 0x0e6f, 0x02a4, "PDP Wired Controller for Xbox One - Stealth Series", 0, XTYPE_XBOXONE }, { 0x0e6f, 0x02a6, "PDP Wired Controller for Xbox One - Camo Series", 0, XTYPE_XBOXONE }, + { 0x0e6f, 0x02a7, "PDP Xbox One Controller", 0, XTYPE_XBOXONE }, + { 0x0e6f, 0x02a8, "PDP Xbox One Controller", 0, XTYPE_XBOXONE }, + { 0x0e6f, 0x02ab, "PDP Controller for Xbox One", 0, XTYPE_XBOXONE }, + { 0x0e6f, 0x02ad, "PDP Wired Controller for Xbox One - Stealth Series", 0, XTYPE_XBOXONE }, + { 0x0e6f, 0x02b3, "Afterglow Prismatic Wired Controller", 0, XTYPE_XBOXONE }, + { 0x0e6f, 0x02b8, "Afterglow Prismatic Wired Controller", 0, XTYPE_XBOXONE }, { 0x0e6f, 0x0301, "Logic3 Controller", 0, XTYPE_XBOX360 }, { 0x0e6f, 0x0346, "Rock Candy Gamepad for Xbox One 2016", 0, XTYPE_XBOXONE }, { 0x0e6f, 0x0401, "Logic3 Controller", 0, XTYPE_XBOX360 },
@@ -296,6 +304,9 @@ static const struct xpad_device { { 0x1bad, 0xfa01, "MadCatz GamePad", 0, XTYPE_XBOX360 }, { 0x1bad, 0xfd00, "Razer Onza TE", 0, XTYPE_XBOX360 }, { 0x1bad, 0xfd01, "Razer Onza", 0, XTYPE_XBOX360 }, + { 0x20d6, 0x2001, "BDA Xbox Series X Wired Controller", 0, XTYPE_XBOXONE }, + { 0x20d6, 0x281f, "PowerA Wired Controller For Xbox 360", 0, XTYPE_XBOX360 }, + { 0x2e24, 0x0652, "Hyperkin Duke X-Box One pad", 0, XTYPE_XBOXONE }, { 0x24c6, 0x5000, "Razer Atrox Arcade Stick", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 }, { 0x24c6, 0x5300, "PowerA MINI PROEX Controller", 0, XTYPE_XBOX360 }, { 0x24c6, 0x5303, "Xbox Airflo wired controller", 0, XTYPE_XBOX360 },
@@ -429,8 +440,12 @@ static const struct usb_device_id xpad_table[] = {XPAD_XBOX360_VENDOR (0x162e ),/* Joytech X-Box 360 controllers */ XPAD_XBOX360_VENDOR (0x1689 ),/* Razer Onza */ XPAD_XBOX360_VENDOR (0x1bad ),/* Harminix Rock Band Guitar and Drums */ +XPAD_XBOX360_VENDOR (0x20d6 ),/* PowerA Controllers */ +XPAD_XBOXONE_VENDOR (0x20d6 ),/* PowerA Controllers */ XPAD_XBOX360_VENDOR (0x24c6 ),/* PowerA Controllers */ XPAD_XBOXONE_VENDOR (0x24c6 ),/* PowerA Controllers */ +XPAD_XBOXONE_VENDOR (0x2e24 ),/* Hyperkin Duke X-Box One pad */ + XPAD_XBOX360_VENDOR(0x2f24), /* GameSir Controllers */ { } };
drivers/input/serio/i8042-x86ia64io.h +2 -0
@@ -219,6 +219,8 @@ static const struct dmi_system_id __initconst i8042_dmi_noloop_table[] = {DMI_MATCH (DMI_SYS_VENDOR ,"PEGATRON CORPORATION" ), DMI_MATCH(DMI_PRODUCT_NAME, "C15B"), }, + }, + { .matches = {DMI_MATCH (DMI_SYS_VENDOR ,"ByteSpeed LLC" ), DMI_MATCH(DMI_PRODUCT_NAME, "ByteSpeed Laptop C15B"),
drivers/input/touchscreen/goodix.c +2 -0
@@ -157,6 +157,7 @@ static const struct goodix_chip_id goodix_chip_ids[] = { { .id = "5663", .data = >1x_chip_data }, { .id = "5688", .data = >1x_chip_data }, { .id = "917S", .data = >1x_chip_data }, + { .id = "9286", .data = >1x_chip_data }, { .id = "911", .data = >911_chip_data }, { .id = "9271", .data = >911_chip_data },
@@ -1445,6 +1446,7 @@ static const struct of_device_id goodix_of_match[] = { { .compatible = "goodix,gt927" }, { .compatible = "goodix,gt9271" }, { .compatible = "goodix,gt928" }, + { .compatible = "goodix,gt9286" }, { .compatible = "goodix,gt967" }, { } };
drivers/input/touchscreen/ili210x.c +19 -7
@@ -29,11 +29,13 @@ struct ili2xxx_chip { void *buf, size_t len);int (*get_touch_data)(struct i2c_client *client,u8 *data);bool (*parse_touch_data)(const u8 *data,unsigned int finger, -unsigned int *x,unsigned int *y); +unsigned int *x,unsigned int *y, +unsigned int *z);bool (*continue_polling)(const u8 *data,bool touch);unsigned int max_touches;unsigned int resolution;bool has_calibrate_reg; +bool has_pressure_reg; };struct ili210x {
@@ -82,7 +84,8 @@ static int ili210x_read_touch_data(struct i2c_client *client, u8 *data)static bool ili210x_touchdata_to_coords (const u8 *touchdata,unsigned int finger, -unsigned int *x,unsigned int *y) +unsigned int *x,unsigned int *y, +unsigned int *z) {if (touchdata[0 ] &BIT (finger))return false;
@@ -137,7 +140,8 @@ static int ili211x_read_touch_data(struct i2c_client *client, u8 *data)static bool ili211x_touchdata_to_coords (const u8 *touchdata,unsigned int finger, -unsigned int *x,unsigned int *y) +unsigned int *x,unsigned int *y, +unsigned int *z) {u32 data;
@@ -169,7 +173,8 @@ static const struct ili2xxx_chip ili211x_chip = {static bool ili212x_touchdata_to_coords (const u8 *touchdata,unsigned int finger, -unsigned int *x,unsigned int *y) +unsigned int *x,unsigned int *y, +unsigned int *z) {u16 val;
@@ -235,7 +240,8 @@ static int ili251x_read_touch_data(struct i2c_client *client, u8 *data)static bool ili251x_touchdata_to_coords (const u8 *touchdata,unsigned int finger, -unsigned int *x,unsigned int *y) +unsigned int *x,unsigned int *y, +unsigned int *z) {u16 val;
@@ -245,6 +251,7 @@ static bool ili251x_touchdata_to_coords(const u8 *touchdata, *x = val &0x3fff ; *y =get_unaligned_be16 (touchdata +1 + (finger *5 ) +2 ); + *z = touchdata[1 + (finger *5 ) +4 ];return true; }
@@ -261,6 +268,7 @@ static const struct ili2xxx_chip ili251x_chip = { .continue_polling = ili251x_check_continue_polling, .max_touches = 10, .has_calibrate_reg = true, + .has_pressure_reg = true, };static bool ili210x_report_events (struct ili210x *priv,u8 *touchdata)
@@ -268,14 +276,16 @@ static bool ili210x_report_events(struct ili210x *priv, u8 *touchdata)struct input_dev *input = priv->input;int i;bool contact = false, touch; -unsigned int x =0 , y =0 ; +unsigned int x =0 , y =0 , z =0 ;for (i =0 ; i < priv->chip->max_touches; i++) { - touch = priv->chip->parse_touch_data (touchdata, i, &x, &y); + touch = priv->chip->parse_touch_data (touchdata, i, &x, &y, &z);input_mt_slot (input, i);if (input_mt_report_slot_state (input,MT_TOOL_FINGER , touch)) {touchscreen_report_pos (input, &priv->prop, x, y, true); +if (priv->chip->has_pressure_reg) +input_report_abs (input,ABS_MT_PRESSURE , z); contact = true; } }
@@ -437,6 +447,8 @@ static int ili210x_i2c_probe(struct i2c_client *client, max_xy = (chip->resolution ?:SZ_64K ) -1 ;input_set_abs_params (input,ABS_MT_POSITION_X ,0 , max_xy,0 ,0 );input_set_abs_params (input,ABS_MT_POSITION_Y ,0 , max_xy,0 ,0 ); +if (priv->chip->has_pressure_reg) +input_set_abs_params (input,ABS_MT_PRESSURE ,0 ,0xa ,0 ,0 );touchscreen_parse_properties (input, true, &priv->prop); error = input_mt_init_slots(input, priv->chip->max_touches,
drivers/md/md.c +2 -0
@@ -639,8 +639,10 @@ static void md_submit_flush_data(struct work_struct *ws)* could wait for this and below md_handle_request could wait for those * bios because of suspend check */ +spin_lock_irq (&mddev->lock); mddev->last_flush = mddev->start_flush; mddev->flush_bio =NULL ; +spin_unlock_irq (&mddev->lock);wake_up (&mddev->sb_wait);if (bio->bi_iter.bi_size ==0 ) {
drivers/mmc/core/sdio_cis.c +6 -0
@@ -20,6 +20,8 @@#include "sdio_cis.h" #include "sdio_ops.h" +#define SDIO_READ_CIS_TIMEOUT_MS (10 * 1000)/* 10s */ +static int cistpl_vers_1 (struct mmc_card *card,struct sdio_func *func,const unsigned char *buf,unsigned size) {
@@ -274,6 +276,8 @@ static int sdio_read_cis(struct mmc_card *card, struct sdio_func *func) do { unsigned char tpl_code, tpl_link; + unsigned long timeout = jiffies + + msecs_to_jiffies(SDIO_READ_CIS_TIMEOUT_MS); ret = mmc_io_rw_direct(card, 0, 0, ptr++, 0, &tpl_code); if (ret)
@@ -326,6 +330,8 @@ static int sdio_read_cis(struct mmc_card *card, struct sdio_func *func) prev = &this->next;if (ret == -ENOENT ) { +if (time_after (jiffies, timeout)) +break ;/* warn about unknown tuples */ pr_warn_ratelimited("%s: queuing unknown" " CIS tuple 0x%02x (%u bytes)\n",
drivers/mmc/host/sdhci-pltfm.h +6 -1
@@ -111,8 +111,13 @@ static inline void *sdhci_pltfm_priv(struct sdhci_pltfm_host *host) return host->private; } +extern const struct dev_pm_ops sdhci_pltfm_pmops; +#ifdef CONFIG_PM_SLEEP int sdhci_pltfm_suspend (struct device *dev);int sdhci_pltfm_resume (struct device *dev); -extern const struct dev_pm_ops sdhci_pltfm_pmops; +#else +static inline int sdhci_pltfm_suspend (struct device *dev) {return 0 ; } +static inline int sdhci_pltfm_resume (struct device *dev) {return 0 ; } +#endif #endif /* _DRIVERS_MMC_SDHCI_PLTFM_H */
drivers/net/dsa/mv88e6xxx/chip.c +5 -1
@@ -1669,7 +1669,11 @@ static int mv88e6xxx_port_db_load_purge(struct mv88e6xxx_chip *chip, int port,if (!entry.portvec) entry.state =0 ; }else { - entry.portvec |=BIT (port); +if (state ==MV88E6XXX_G1_ATU_DATA_STATE_UC_STATIC ) + entry.portvec =BIT (port); +else + entry.portvec |=BIT (port); + entry.state = state; }
drivers/net/ethernet/ibm/ibmvnic.c +0 -5
@@ -5339,11 +5339,6 @@ static int ibmvnic_remove(struct vio_dev *dev)unsigned long flags;spin_lock_irqsave (&adapter->state_lock, flags); -if (test_bit (0 , &adapter->resetting)) { -spin_unlock_irqrestore (&adapter->state_lock, flags); -return -EBUSY ; - } - adapter->state =VNIC_REMOVING ;spin_unlock_irqrestore (&adapter->state_lock, flags);
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +1 -12
@@ -55,12 +55,7 @@ static void i40e_vc_notify_vf_link_state(struct i40e_vf *vf) pfe.event =VIRTCHNL_EVENT_LINK_CHANGE ; pfe.severity =PF_EVENT_SEVERITY_INFO ; - -/* Always report link is down if the VF queues aren't enabled */ -if (!vf->queues_enabled) { - pfe.event_data.link_event.link_status = false; - pfe.event_data.link_event.link_speed =0 ; - }else if (vf->link_forced) { +if (vf->link_forced) { pfe.event_data.link_event.link_status = vf->link_up; pfe.event_data.link_event.link_speed = (vf->link_up ?VIRTCHNL_LINK_SPEED_40GB :0 );
@@ -70,7 +65,6 @@ static void i40e_vc_notify_vf_link_state(struct i40e_vf *vf) pfe.event_data.link_event.link_speed =i40e_virtchnl_link_speed (ls->link_speed); } -i40e_aq_send_msg_to_vf (hw, abs_vf_id,VIRTCHNL_OP_EVENT ,0 , (u8 *)&pfe,sizeof (pfe),NULL ); }
@@ -2443,8 +2437,6 @@ static int i40e_vc_enable_queues_msg(struct i40e_vf *vf, u8 *msg) } } - vf->queues_enabled = true; - error_param:/* send the response to the VF */ return i40e_vc_send_resp_to_vf(vf, VIRTCHNL_OP_ENABLE_QUEUES,
@@ -2466,9 +2458,6 @@ static int i40e_vc_disable_queues_msg(struct i40e_vf *vf, u8 *msg)struct i40e_pf *pf = vf->pf;i40e_status aq_ret =0 ; -/* Immediately mark queues as disabled */ - vf->queues_enabled = false; -if (!test_bit (I40E_VF_STATE_ACTIVE , &vf->vf_states)) { aq_ret =I40E_ERR_PARAM ; goto error_param;
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h +0 -1
@@ -98,7 +98,6 @@ struct i40e_vf {unsigned int tx_rate;/* Tx bandwidth limit in Mbps */ bool link_forced;bool link_up;/* only valid if VF link is forced */ -bool queues_enabled;/* true if the VF queues are enabled */ bool spoofchk;u16 num_vlan;
drivers/net/ethernet/intel/igc/igc_ethtool.c +2 -1
@@ -1714,7 +1714,8 @@ static int igc_ethtool_get_link_ksettings(struct net_device *netdev, Asym_Pause); } - status =rd32 (IGC_STATUS ); + status =pm_runtime_suspended (&adapter->pdev->dev) ? +0 :rd32 (IGC_STATUS );if (status &IGC_STATUS_LU ) {if (status &IGC_STATUS_SPEED_1000 ) {
drivers/net/ethernet/intel/igc/igc_i225.c +1 -2
@@ -219,9 +219,9 @@ static s32 igc_write_nvm_srwr(struct igc_hw *hw, u16 offset, u16 words, u16 *data) {struct igc_nvm_info *nvm = &hw->nvm; +s32 ret_val = -IGC_ERR_NVM ;u32 attempts =100000 ;u32 i, k, eewr =0 ; -s32 ret_val =0 ;/* A check for invalid values: offset too large, too many words, * too many words for the offset, and not enough words.
@@ -229,7 +229,6 @@ static s32 igc_write_nvm_srwr(struct igc_hw *hw, u16 offset, u16 words,if (offset >= nvm->word_size || (words > (nvm->word_size - offset)) || words ==0 ) {hw_dbg ("nvm parameter(s) out of bounds\n" ); - ret_val = -IGC_ERR_NVM ; goto out; }
drivers/net/ethernet/intel/igc/igc_mac.c +1 -1
@@ -638,7 +638,7 @@ s32 igc_config_fc_after_link_up(struct igc_hw *hw) } out: -return 0 ; +return ret_val; }/**
drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c +5 -5
@@ -29,16 +29,16 @@ static int mvpp2_prs_hw_write(struct mvpp2 *priv, struct mvpp2_prs_entry *pe)/* Clear entry invalidation bit */ pe->tcam[MVPP2_PRS_TCAM_INV_WORD ] &= ~MVPP2_PRS_TCAM_INV_MASK ; -/* Write tcam index - indirect access */ -mvpp2_write (priv,MVPP2_PRS_TCAM_IDX_REG , pe->index); -for (i =0 ; i <MVPP2_PRS_TCAM_WORDS ; i++) -mvpp2_write (priv,MVPP2_PRS_TCAM_DATA_REG (i), pe->tcam[i]); -/* Write sram index - indirect access */ mvpp2_write (priv,MVPP2_PRS_SRAM_IDX_REG , pe->index);for (i =0 ; i <MVPP2_PRS_SRAM_WORDS ; i++)mvpp2_write (priv,MVPP2_PRS_SRAM_DATA_REG (i), pe->sram[i]); +/* Write tcam index - indirect access */ +mvpp2_write (priv,MVPP2_PRS_TCAM_IDX_REG , pe->index); +for (i =0 ; i <MVPP2_PRS_TCAM_WORDS ; i++) +mvpp2_write (priv,MVPP2_PRS_TCAM_DATA_REG (i), pe->tcam[i]); +return 0 ; }
drivers/net/ethernet/mellanox/mlx5/core/en_main.c +2 -4
@@ -3593,12 +3593,10 @@ static int mlx5e_setup_tc_mqprio(struct mlx5e_priv *priv, err =mlx5e_safe_switch_channels (priv, &new_channels, mlx5e_num_channels_changed_ctx,NULL ); -if (err) - goto out; - priv->max_opened_tc =max_t (u8, priv->max_opened_tc, - new_channels.params.num_tc); out: + priv->max_opened_tc =max_t (u8, priv->max_opened_tc, + priv->channels.params.num_tc);mutex_unlock (&priv->state_lock);return err; }
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c +12 -4
@@ -1262,8 +1262,10 @@ static void mlx5e_handle_rx_cqe(struct mlx5e_rq *rq, struct mlx5_cqe64 *cqe)mlx5e_complete_rx_cqe (rq, cqe, cqe_bcnt, skb);if (mlx5e_cqe_regb_chain (cqe)) -if (!mlx5e_tc_update_skb (cqe, skb)) +if (!mlx5e_tc_update_skb (cqe, skb)) { +dev_kfree_skb_any (skb); goto free_wqe; + }napi_gro_receive (rq->cq.napi, skb);
@@ -1316,8 +1318,10 @@ static void mlx5e_handle_rx_cqe_rep(struct mlx5e_rq *rq, struct mlx5_cqe64 *cqe)if (rep->vlan &&skb_vlan_tag_present (skb))skb_vlan_pop (skb); -if (!mlx5e_rep_tc_update_skb (cqe, skb, &tc_priv)) +if (!mlx5e_rep_tc_update_skb (cqe, skb, &tc_priv)) { +dev_kfree_skb_any (skb); goto free_wqe; + }napi_gro_receive (rq->cq.napi, skb);
@@ -1371,8 +1375,10 @@ static void mlx5e_handle_rx_cqe_mpwrq_rep(struct mlx5e_rq *rq, struct mlx5_cqe64mlx5e_complete_rx_cqe (rq, cqe, cqe_bcnt, skb); -if (!mlx5e_rep_tc_update_skb (cqe, skb, &tc_priv)) +if (!mlx5e_rep_tc_update_skb (cqe, skb, &tc_priv)) { +dev_kfree_skb_any (skb); goto mpwrq_cqe_out; + }napi_gro_receive (rq->cq.napi, skb);
@@ -1528,8 +1534,10 @@ static void mlx5e_handle_rx_cqe_mpwrq(struct mlx5e_rq *rq, struct mlx5_cqe64 *cqmlx5e_complete_rx_cqe (rq, cqe, cqe_bcnt, skb);if (mlx5e_cqe_regb_chain (cqe)) -if (!mlx5e_tc_update_skb (cqe, skb)) +if (!mlx5e_tc_update_skb (cqe, skb)) { +dev_kfree_skb_any (skb); goto mpwrq_cqe_out; + }napi_gro_receive (rq->cq.napi, skb);
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c +5 -0
@@ -1764,6 +1764,7 @@ try_add_to_existing_fg(struct mlx5_flow_table *ft,if (!fte_tmp)continue ; rule =add_rule_fg (g, spec, flow_act, dest, dest_num, fte_tmp); +/* No error check needed here, because insert_fte() is not called */ up_write_ref_node (&fte_tmp->node, false);tree_put_node (&fte_tmp->node, false);kmem_cache_free (steering->ftes_cache, fte);
@@ -1816,6 +1817,8 @@ try_add_to_existing_fg(struct mlx5_flow_table *ft,up_write_ref_node (&g->node, false); rule =add_rule_fg (g, spec, flow_act, dest, dest_num, fte);up_write_ref_node (&fte->node, false); +if (IS_ERR (rule)) +tree_put_node (&fte->node, false);return rule; } rule =ERR_PTR (-ENOENT );
@@ -1914,6 +1917,8 @@ _mlx5_add_flow_rules(struct mlx5_flow_table *ft,up_write_ref_node (&g->node, false); rule =add_rule_fg (g, spec, flow_act, dest, dest_num, fte);up_write_ref_node (&fte->node, false); +if (IS_ERR (rule)) +tree_put_node (&fte->node, false);tree_put_node (&g->node, false);return rule;
drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c +1 -1
@@ -76,7 +76,7 @@ enum {static u32 get_function (u16 func_id,bool ec_function) { -return func_id & (ec_function <<16 ); +return (u32 )func_id | (ec_function <<16 ); }static struct rb_root *page_root_per_function (struct mlx5_core_dev *dev,u32 function)
drivers/net/ethernet/realtek/r8169_main.c +67 -8
109 lines not on this page · raw message
drivers/net/ipa/gsi.c +1 -1
@@ -1256,7 +1256,7 @@ static int gsi_ring_alloc(struct gsi *gsi, struct gsi_ring *ring, u32 count)/* Hardware requires a 2^n ring size, with alignment equal to size */ ring->virt =dma_alloc_coherent (dev, size, &addr,GFP_KERNEL );if (ring->virt && addr % size) { -dma_free_coherent (dev, size, ring->virt, ring->addr); +dma_free_coherent (dev, size, ring->virt, addr);dev_err (dev,"unable to alloc 0x%zx-aligned ring buffer\n" , size);return -EINVAL ;/* Not a good error value, but distinct */
drivers/nvdimm/dimm_devs.c +15 -3
@@ -335,16 +335,16 @@ static ssize_t state_show(struct device *dev, struct device_attribute *attr, }static DEVICE_ATTR_RO (state); -static ssize_t available_slots_show (struct device *dev, -struct device_attribute *attr,char *buf) +static ssize_t __available_slots_show (struct nvdimm_drvdata *ndd,char *buf) { -struct nvdimm_drvdata *ndd =dev_get_drvdata (dev); +struct device *dev;ssize_t rc;u32 nfree;if (!ndd)return -ENXIO ; + dev = ndd->dev;nvdimm_bus_lock (dev); nfree =nd_label_nfree (ndd);if (nfree -1 > nfree) {
@@ -356,6 +356,18 @@ static ssize_t available_slots_show(struct device *dev,nvdimm_bus_unlock (dev);return rc; } + +static ssize_t available_slots_show (struct device *dev, +struct device_attribute *attr,char *buf) +{ +ssize_t rc; + +nd_device_lock (dev); + rc =__available_slots_show (dev_get_drvdata (dev), buf); +nd_device_unlock (dev); + +return rc; +}static DEVICE_ATTR_RO (available_slots); __weak ssize_t security_show(struct device *dev,
drivers/nvdimm/namespace_devs.c +5 -5
@@ -1635,11 +1635,11 @@ static umode_t namespace_visible(struct kobject *kobj,return a->mode; } -if (a == &dev_attr_nstype.attr || a == &dev_attr_size.attr - || a == &dev_attr_holder.attr - || a == &dev_attr_holder_class.attr - || a == &dev_attr_force_raw.attr - || a == &dev_attr_mode.attr) +/* base is_namespace_io() attributes */ +if (a == &dev_attr_nstype.attr || a == &dev_attr_size.attr || + a == &dev_attr_holder.attr || a == &dev_attr_holder_class.attr || + a == &dev_attr_force_raw.attr || a == &dev_attr_mode.attr || + a == &dev_attr_resource.attr)return a->mode;return 0 ;
drivers/nvme/host/pci.c +2 -0
@@ -3262,6 +3262,8 @@ static const struct pci_device_id nvme_id_table[] = { .driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES, }, { PCI_DEVICE(0x15b7, 0x2001), /* Sandisk Skyhawk */ .driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES, }, + { PCI_DEVICE(0x2646, 0x2263), /* KINGSTON A2000 NVMe SSD */ + .driver_data = NVME_QUIRK_NO_DEEPEST_PS, }, { PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2001), .driver_data = NVME_QUIRK_SINGLE_VECTOR }, { PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2003) },
drivers/nvme/target/tcp.c +2 -1
@@ -305,7 +305,7 @@ static void nvmet_tcp_map_pdu_iovec(struct nvmet_tcp_cmd *cmd) length = cmd->pdu_len; cmd->nr_mapped =DIV_ROUND_UP (length,PAGE_SIZE ); offset = cmd->rbytes_done; - cmd->sg_idx =DIV_ROUND_UP (offset,PAGE_SIZE ); + cmd->sg_idx = offset /PAGE_SIZE ; sg_offset = offset %PAGE_SIZE ; sg = &cmd->req.sg[cmd->sg_idx];
@@ -318,6 +318,7 @@ static void nvmet_tcp_map_pdu_iovec(struct nvmet_tcp_cmd *cmd) length -= iov_len; sg =sg_next (sg); iov++; + sg_offset =0 ; } iov_iter_kvec(&cmd->recv_msg.msg_iter, READ, cmd->iov,
drivers/thunderbolt/acpi.c +1 -1
@@ -56,7 +56,7 @@ static acpi_status tb_acpi_add_link(acpi_handle handle, u32 level, void *data,* managed with the xHCI and the SuperSpeed hub so we create the * link from xHCI instead. */ -while (!dev_is_pci (dev)) +while (dev && !dev_is_pci (dev)) dev = dev->parent;if (!dev)
drivers/usb/class/usblp.c +11 -8
@@ -1329,14 +1329,17 @@ static int usblp_set_protocol(struct usblp *usblp, int protocol)if (protocol <USBLP_FIRST_PROTOCOL || protocol >USBLP_LAST_PROTOCOL )return -EINVAL ; - alts = usblp->protocol[protocol].alt_setting; -if (alts <0 ) -return -EINVAL ; - r =usb_set_interface (usblp->dev, usblp->ifnum, alts); -if (r <0 ) { -printk (KERN_ERR "usblp: can't set desired altsetting %d on interface %d\n" , - alts, usblp->ifnum); -return r; +/* Don't unnecessarily set the interface if there's a single alt. */ +if (usblp->intf->num_altsetting >1 ) { + alts = usblp->protocol[protocol].alt_setting; +if (alts <0 ) +return -EINVAL ; + r =usb_set_interface (usblp->dev, usblp->ifnum, alts); +if (r <0 ) { +printk (KERN_ERR "usblp: can't set desired altsetting %d on interface %d\n" , + alts, usblp->ifnum); +return r; + } } usblp->bidir = (usblp->protocol[protocol].epread !=NULL );
drivers/usb/dwc2/gadget.c +1 -7
@@ -1543,7 +1543,6 @@ static void dwc2_hsotg_complete_oursetup(struct usb_ep *ep,static struct dwc2_hsotg_ep *ep_from_windex (struct dwc2_hsotg *hsotg,u32 windex) { -struct dwc2_hsotg_ep *ep;int dir = (windex &USB_DIR_IN ) ?1 :0 ;int idx = windex &0x7F ;
@@ -1553,12 +1552,7 @@ static struct dwc2_hsotg_ep *ep_from_windex(struct dwc2_hsotg *hsotg,if (idx > hsotg->num_of_eps)return NULL ; - ep =index_to_ep (hsotg, idx, dir); - -if (idx && ep->dir_in != dir) -return NULL ; - -return ep; +return index_to_ep (hsotg, idx, dir); }/**
drivers/usb/dwc3/core.c +1 -1
@@ -1758,7 +1758,7 @@ static int dwc3_resume_common(struct dwc3 *dwc, pm_message_t msg)if (PMSG_IS_AUTO (msg))break ; - ret =dwc3_core_init (dwc); + ret =dwc3_core_init_for_resume (dwc);if (ret)return ret;
drivers/usb/gadget/legacy/ether.c +3 -1
@@ -403,8 +403,10 @@ static int eth_bind(struct usb_composite_dev *cdev)struct usb_descriptor_header *usb_desc; usb_desc =usb_otg_descriptor_alloc (gadget); -if (!usb_desc) +if (!usb_desc) { + status = -ENOMEM ; goto fail1; + }usb_otg_descriptor_init (gadget, usb_desc); otg_desc[0 ] = usb_desc; otg_desc[1 ] =NULL ;
drivers/usb/gadget/udc/aspeed-vhub/hub.c +3 -1
@@ -999,8 +999,10 @@ static int ast_vhub_of_parse_str_desc(struct ast_vhub *vhub, str_array[offset].s =NULL ; ret =ast_vhub_str_alloc_add (vhub, &lang_str); -if (ret) +if (ret) { +of_node_put (child);break ; + } }return ret;
drivers/usb/host/xhci-mtk-sch.c +93 -37
195 lines not on this page · raw message
drivers/usb/host/xhci-mtk.c +2 -0
@@ -347,6 +347,8 @@ static void usb_wakeup_set(struct xhci_hcd_mtk *mtk, bool enable)static int xhci_mtk_setup (struct usb_hcd *hcd);static const struct xhci_driver_overrides xhci_mtk_overrides__initconst = { .reset = xhci_mtk_setup, + .check_bandwidth = xhci_mtk_check_bandwidth, + .reset_bandwidth = xhci_mtk_reset_bandwidth, };static struct hc_driver __read_mostly xhci_mtk_hc_driver;
drivers/usb/host/xhci-mtk.h +15 -0
@@ -59,6 +59,7 @@ struct mu3h_sch_bw_info {* @ep_type: endpoint type * @maxpkt: max packet size of endpoint * @ep: address of usb_host_endpoint struct +* @allocated: the bandwidth is aready allocated from bus_bw * @offset: which uframe of the interval that transfer should be * scheduled first time within the interval * @repeat: the time gap between two uframes that transfers are
@@ -86,6 +87,7 @@ struct mu3h_sch_ep_info {u32 ep_type;u32 maxpkt;void *ep; +bool allocated;/* * mtk xHCI scheduling information put into reserved DWs * in ep context
@@ -131,6 +133,7 @@ struct xhci_hcd_mtk {struct device *dev;struct usb_hcd *hcd;struct mu3h_sch_bw_info *sch_array; +struct list_head bw_ep_chk_list;struct mu3c_ippc_regs __iomem *ippc_regs;bool has_ippc;int num_u2_ports;
@@ -166,6 +169,8 @@ int xhci_mtk_add_ep_quirk(struct usb_hcd *hcd, struct usb_device *udev, struct usb_host_endpoint *ep);void xhci_mtk_drop_ep_quirk (struct usb_hcd *hcd,struct usb_device *udev,struct usb_host_endpoint *ep); +int xhci_mtk_check_bandwidth (struct usb_hcd *hcd,struct usb_device *udev); +void xhci_mtk_reset_bandwidth (struct usb_hcd *hcd,struct usb_device *udev);#else static inline int xhci_mtk_add_ep_quirk(struct usb_hcd *hcd,
@@ -179,6 +184,16 @@ static inline void xhci_mtk_drop_ep_quirk(struct usb_hcd *hcd, { } +static inline int xhci_mtk_check_bandwidth (struct usb_hcd *hcd, +struct usb_device *udev) +{ +return 0 ; +} + +static inline void xhci_mtk_reset_bandwidth (struct usb_hcd *hcd, +struct usb_device *udev) +{ +}#endif #endif /* _XHCI_MTK_H_ */
drivers/usb/host/xhci-mvebu.c +42 -0
54 lines not on this page · raw message
drivers/usb/host/xhci-mvebu.h +6 -0
@@ -12,6 +12,7 @@ struct usb_hcd;#if IS_ENABLED (CONFIG_USB_XHCI_MVEBU )int xhci_mvebu_mbus_init_quirk (struct usb_hcd *hcd); +int xhci_mvebu_a3700_plat_setup (struct usb_hcd *hcd);int xhci_mvebu_a3700_init_quirk (struct usb_hcd *hcd);#else static inline int xhci_mvebu_mbus_init_quirk (struct usb_hcd *hcd)
@@ -19,6 +20,11 @@ static inline int xhci_mvebu_mbus_init_quirk(struct usb_hcd *hcd)return 0 ; } +static inline int xhci_mvebu_a3700_plat_setup (struct usb_hcd *hcd) +{ +return 0 ; +} +static inline int xhci_mvebu_a3700_init_quirk (struct usb_hcd *hcd) {return 0 ;
drivers/usb/host/xhci-plat.c +19 -1
@@ -44,6 +44,16 @@ static void xhci_priv_plat_start(struct usb_hcd *hcd) priv->plat_start (hcd); } +static int xhci_priv_plat_setup (struct usb_hcd *hcd) +{ +struct xhci_plat_priv *priv =hcd_to_xhci_priv (hcd); + +if (!priv->plat_setup) +return 0 ; + +return priv->plat_setup (hcd); +} +static int xhci_priv_init_quirk (struct usb_hcd *hcd) {struct xhci_plat_priv *priv =hcd_to_xhci_priv (hcd);
@@ -111,6 +121,7 @@ static const struct xhci_plat_priv xhci_plat_marvell_armada = { };static const struct xhci_plat_priv xhci_plat_marvell_armada3700 = { + .plat_setup = xhci_mvebu_a3700_plat_setup, .init_quirk = xhci_mvebu_a3700_init_quirk, };
@@ -330,7 +341,14 @@ static int xhci_plat_probe(struct platform_device *pdev) hcd->tpl_support =of_usb_host_tpl_support (sysdev->of_node); xhci->shared_hcd->tpl_support = hcd->tpl_support; -if (priv && (priv->quirks &XHCI_SKIP_PHY_INIT )) + +if (priv) { + ret =xhci_priv_plat_setup (hcd); +if (ret) + goto disable_usb_phy; + } + +if ((xhci->quirks &XHCI_SKIP_PHY_INIT ) || (priv && (priv->quirks &XHCI_SKIP_PHY_INIT ))) hcd->skip_phy_initialization =1 ;if (priv && (priv->quirks &XHCI_SG_TRB_CACHE_SIZE_QUIRK ))
drivers/usb/host/xhci-plat.h +1 -0
@@ -13,6 +13,7 @@struct xhci_plat_priv {const char *firmware_name;unsigned long long quirks; +int (*plat_setup)(struct usb_hcd *);void (*plat_start)(struct usb_hcd *);int (*init_quirk)(struct usb_hcd *);int (*suspend_quirk)(struct usb_hcd *);
drivers/usb/host/xhci-ring.c +20 -11
@@ -699,11 +699,16 @@ static void xhci_unmap_td_bounce_buffer(struct xhci_hcd *xhci,dma_unmap_single (dev, seg->bounce_dma, ring->bounce_buf_len,DMA_FROM_DEVICE );/* for in tranfers we need to copy the data from bounce to sg */ - len =sg_pcopy_from_buffer (urb->sg, urb->num_sgs, seg->bounce_buf, - seg->bounce_len, seg->bounce_offs); -if (len != seg->bounce_len) -xhci_warn (xhci,"WARN Wrong bounce buffer read length: %zu != %d\n" , - len, seg->bounce_len); +if (urb->num_sgs) { + len =sg_pcopy_from_buffer (urb->sg, urb->num_sgs, seg->bounce_buf, + seg->bounce_len, seg->bounce_offs); +if (len != seg->bounce_len) +xhci_warn (xhci,"WARN Wrong bounce buffer read length: %zu != %d\n" , + len, seg->bounce_len); + }else { +memcpy (urb->transfer_buffer + seg->bounce_offs, seg->bounce_buf, + seg->bounce_len); + } seg->bounce_len =0 ; seg->bounce_offs =0 ; }
@@ -3275,12 +3280,16 @@ static int xhci_align_td(struct xhci_hcd *xhci, struct urb *urb, u32 enqd_len,/* create a max max_pkt sized bounce buffer pointed to by last trb */ if (usb_urb_dir_out (urb)) { - len =sg_pcopy_to_buffer (urb->sg, urb->num_sgs, - seg->bounce_buf, new_buff_len, enqd_len); -if (len != new_buff_len) -xhci_warn (xhci, -"WARN Wrong bounce buffer write length: %zu != %d\n" , - len, new_buff_len); +if (urb->num_sgs) { + len =sg_pcopy_to_buffer (urb->sg, urb->num_sgs, + seg->bounce_buf, new_buff_len, enqd_len); +if (len != new_buff_len) +xhci_warn (xhci,"WARN Wrong bounce buffer write length: %zu != %d\n" , + len, new_buff_len); + }else { +memcpy (seg->bounce_buf, urb->transfer_buffer + enqd_len, new_buff_len); + } + seg->bounce_dma =dma_map_single (dev, seg->bounce_buf, max_pkt,DMA_TO_DEVICE ); }else {
drivers/usb/host/xhci.c +6 -2
@@ -2861,7 +2861,7 @@ static void xhci_check_bw_drop_ep_streams(struct xhci_hcd *xhci,* else should be touching the xhci->devs[slot_id] structure, so we * don't need to take the xhci->lock for manipulating that. */ -static int xhci_check_bandwidth (struct usb_hcd *hcd,struct usb_device *udev) +int xhci_check_bandwidth (struct usb_hcd *hcd,struct usb_device *udev) {int i;int ret =0 ;
@@ -2959,7 +2959,7 @@ static int xhci_check_bandwidth(struct usb_hcd *hcd, struct usb_device *udev)return ret; } -static void xhci_reset_bandwidth (struct usb_hcd *hcd,struct usb_device *udev) +void xhci_reset_bandwidth (struct usb_hcd *hcd,struct usb_device *udev) {struct xhci_hcd *xhci;struct xhci_virt_device *virt_dev;
@@ -5385,6 +5385,10 @@ void xhci_init_driver(struct hc_driver *drv, drv->reset = over->reset;if (over->start) drv->start = over->start; +if (over->check_bandwidth) + drv->check_bandwidth = over->check_bandwidth; +if (over->reset_bandwidth) + drv->reset_bandwidth = over->reset_bandwidth; } }EXPORT_SYMBOL_GPL (xhci_init_driver);
drivers/usb/host/xhci.h +4 -0
@@ -1916,6 +1916,8 @@ struct xhci_driver_overrides {size_t extra_priv_size;int (*reset)(struct usb_hcd *hcd);int (*start)(struct usb_hcd *hcd); +int (*check_bandwidth)(struct usb_hcd *,struct usb_device *); +void (*reset_bandwidth)(struct usb_hcd *,struct usb_device *); };#define XHCI_CFC_DELAY 10
@@ -2070,6 +2072,8 @@ int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks);void xhci_shutdown (struct usb_hcd *hcd);void xhci_init_driver (struct hc_driver *drv,const struct xhci_driver_overrides *over); +int xhci_check_bandwidth (struct usb_hcd *hcd,struct usb_device *udev); +void xhci_reset_bandwidth (struct usb_hcd *hcd,struct usb_device *udev);int xhci_disable_slot (struct xhci_hcd *xhci,u32 slot_id);int xhci_ext_cap_init (struct xhci_hcd *xhci);
drivers/usb/renesas_usbhs/fifo.c +1 -0
@@ -126,6 +126,7 @@ struct usbhs_pkt *usbhs_pkt_pop(struct usbhs_pipe *pipe, struct usbhs_pkt *pkt) }usbhs_pipe_clear_without_sequence (pipe,0 ,0 ); +usbhs_pipe_running (pipe,0 );__usbhsf_pkt_del (pkt); }
drivers/usb/serial/cp210x.c +2 -0
@@ -64,6 +64,7 @@ static const struct usb_device_id id_table[] = { { USB_DEVICE(0x08e6, 0x5501) }, /* Gemalto Prox-PU/CU contactless smartcard reader */ { USB_DEVICE(0x08FD, 0x000A) }, /* Digianswer A/S , ZigBee/802.15.4 MAC Device */ { USB_DEVICE(0x0908, 0x01FF) }, /* Siemens RUGGEDCOM USB Serial Console */ + { USB_DEVICE(0x0988, 0x0578) }, /* Teraoka AD2000 */ { USB_DEVICE(0x0B00, 0x3070) }, /* Ingenico 3070 */ { USB_DEVICE(0x0BED, 0x1100) }, /* MEI (TM) Cashflow-SC Bill/Voucher Acceptor */ { USB_DEVICE(0x0BED, 0x1101) }, /* MEI series 2000 Combo Acceptor */
@@ -204,6 +205,7 @@ static const struct usb_device_id id_table[] = { { USB_DEVICE(0x1901, 0x0194) }, /* GE Healthcare Remote Alarm Box */ { USB_DEVICE(0x1901, 0x0195) }, /* GE B850/B650/B450 CP2104 DP UART interface */ { USB_DEVICE(0x1901, 0x0196) }, /* GE B850 CP2105 DP UART interface */ + { USB_DEVICE(0x199B, 0xBA30) }, /* LORD WSDA-200-USB */ { USB_DEVICE(0x19CF, 0x3000) }, /* Parrot NMEA GPS Flight Recorder */ { USB_DEVICE(0x1ADB, 0x0001) }, /* Schweitzer Engineering C662 Cable */ { USB_DEVICE(0x1B1C, 0x1C00) }, /* Corsair USB Dongle */
drivers/usb/serial/option.c +6 -0
@@ -425,6 +425,8 @@ static void option_instat_callback(struct urb *urb);#define CINTERION_PRODUCT_AHXX_2RMNET 0x0084#define CINTERION_PRODUCT_AHXX_AUDIO 0x0085#define CINTERION_PRODUCT_CLS8 0x00b0 +#define CINTERION_PRODUCT_MV31_MBIM 0x00b3 +#define CINTERION_PRODUCT_MV31_RMNET 0x00b7/* Olivetti products */ #define OLIVETTI_VENDOR_ID 0x0b3c
@@ -1914,6 +1916,10 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE(SIEMENS_VENDOR_ID, CINTERION_PRODUCT_HC25_MDMNET) }, { USB_DEVICE(SIEMENS_VENDOR_ID, CINTERION_PRODUCT_HC28_MDM) }, /* HC28 enumerates with Siemens or Cinterion VID depending on FW revision */ { USB_DEVICE(SIEMENS_VENDOR_ID, CINTERION_PRODUCT_HC28_MDMNET) }, + { USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_MV31_MBIM, 0xff), + .driver_info = RSVD(3)}, + { USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_MV31_RMNET, 0xff), + .driver_info = RSVD(0)}, { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD100), .driver_info = RSVD(4) }, { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD120),
drivers/vdpa/mlx5/core/mlx5_vdpa.h +1 -0
@@ -15,6 +15,7 @@ struct mlx5_vdpa_direct_mr {struct sg_table sg_head;int log_size;int nsg; +int nent;struct list_head list;u64 offset; };
drivers/vdpa/mlx5/core/mr.c +12 -16
@@ -25,17 +25,6 @@ static int get_octo_len(u64 len, int page_shift)return (npages +1 ) /2 ; } -static void fill_sg (struct mlx5_vdpa_direct_mr *mr,void *in) -{ -struct scatterlist *sg; -__be64 *pas; -int i; - - pas =MLX5_ADDR_OF (create_mkey_in, in, klm_pas_mtt); -for_each_sg (mr->sg_head.sgl, sg, mr->nsg, i) - (*pas) =cpu_to_be64 (sg_dma_address (sg)); -} -static void mlx5_set_access_mode (void *mkc,int mode) {MLX5_SET (mkc, mkc, access_mode_1_0, mode &0x3 );
@@ -45,10 +34,18 @@ static void mlx5_set_access_mode(void *mkc, int mode)static void populate_mtts (struct mlx5_vdpa_direct_mr *mr,__be64 *mtt) {struct scatterlist *sg; +int nsg = mr->nsg; +u64 dma_addr; +u64 dma_len; +int j =0 ;int i; -for_each_sg (mr->sg_head.sgl, sg, mr->nsg, i) - mtt[i] =cpu_to_be64 (sg_dma_address (sg)); +for_each_sg (mr->sg_head.sgl, sg, mr->nent, i) { +for (dma_addr =sg_dma_address (sg), dma_len =sg_dma_len (sg); + nsg && dma_len; + nsg--, dma_addr +=BIT (mr->log_size), dma_len -=BIT (mr->log_size)) + mtt[j++] =cpu_to_be64 (dma_addr); + } }static int create_direct_mr (struct mlx5_vdpa_dev *mvdev,struct mlx5_vdpa_direct_mr *mr)
@@ -64,7 +61,6 @@ static int create_direct_mr(struct mlx5_vdpa_dev *mvdev, struct mlx5_vdpa_directreturn -ENOMEM ;MLX5_SET (create_mkey_in, in, uid, mvdev->res.uid); -fill_sg (mr, in); mkc =MLX5_ADDR_OF (create_mkey_in, in, memory_key_mkey_entry);MLX5_SET (mkc, mkc, lw, !!(mr->perm &VHOST_MAP_WO ));MLX5_SET (mkc, mkc, lr, !!(mr->perm &VHOST_MAP_RO ));
@@ -276,8 +272,8 @@ static int map_direct_mr(struct mlx5_vdpa_dev *mvdev, struct mlx5_vdpa_direct_mr done: mr->log_size = log_entity_size; mr->nsg = nsg; - err =dma_map_sg_attrs (dma, mr->sg_head.sgl, mr->nsg,DMA_BIDIRECTIONAL ,0 ); -if (!err) + mr->nent =dma_map_sg_attrs (dma, mr->sg_head.sgl, mr->nsg,DMA_BIDIRECTIONAL ,0 ); +if (!mr->nent) goto err_map; err =create_direct_mr (mvdev, mr);
drivers/vdpa/mlx5/net/mlx5_vnet.c +18 -0
@@ -77,6 +77,7 @@ struct mlx5_vq_restore_info {u64 device_addr;u64 driver_addr;u16 avail_index; +u16 used_index;bool ready;struct vdpa_callback cb;bool restore;
@@ -111,6 +112,7 @@ struct mlx5_vdpa_virtqueue {u32 virtq_id;struct mlx5_vdpa_net *ndev;u16 avail_idx; +u16 used_idx;int fw_state;/* keep last in the struct */
@@ -789,6 +791,7 @@ static int create_virtqueue(struct mlx5_vdpa_net *ndev, struct mlx5_vdpa_virtque obj_context =MLX5_ADDR_OF (create_virtio_net_q_in, in, obj_context);MLX5_SET (virtio_net_q_object, obj_context, hw_available_index, mvq->avail_idx); +MLX5_SET (virtio_net_q_object, obj_context, hw_used_index, mvq->used_idx);MLX5_SET (virtio_net_q_object, obj_context, queue_feature_bit_mask_12_3,get_features_12_3 (ndev->mvdev.actual_features)); vq_ctx =MLX5_ADDR_OF (virtio_net_q_object, obj_context, virtio_q_context);
@@ -1007,6 +1010,7 @@ static int connect_qps(struct mlx5_vdpa_net *ndev, struct mlx5_vdpa_virtqueue *mstruct mlx5_virtq_attr {u8 state;u16 available_index; +u16 used_index; }; static int query_virtqueue(struct mlx5_vdpa_net *ndev, struct mlx5_vdpa_virtqueue *mvq,
@@ -1037,6 +1041,7 @@ static int query_virtqueue(struct mlx5_vdpa_net *ndev, struct mlx5_vdpa_virtqueumemset (attr,0 ,sizeof (*attr)); attr->state =MLX5_GET (virtio_net_q_object, obj_context, state); attr->available_index =MLX5_GET (virtio_net_q_object, obj_context, hw_available_index); + attr->used_index =MLX5_GET (virtio_net_q_object, obj_context, hw_used_index);kfree (out);return 0 ;
@@ -1520,6 +1525,16 @@ static void teardown_virtqueues(struct mlx5_vdpa_net *ndev) } } +static void clear_virtqueues (struct mlx5_vdpa_net *ndev) +{ +int i; + +for (i = ndev->mvdev.max_vqs -1 ; i >=0 ; i--) { + ndev->vqs[i].avail_idx =0 ; + ndev->vqs[i].used_idx =0 ; + } +} +/* TODO: cross-endian support */ static inline bool mlx5_vdpa_is_little_endian (struct mlx5_vdpa_dev *mvdev) {
@@ -1595,6 +1610,7 @@ static int save_channel_info(struct mlx5_vdpa_net *ndev, struct mlx5_vdpa_virtqureturn err; ri->avail_index = attr.available_index; + ri->used_index = attr.used_index; ri->ready = mvq->ready; ri->num_ent = mvq->num_ent; ri->desc_addr = mvq->desc_addr;
@@ -1639,6 +1655,7 @@ static void restore_channels_info(struct mlx5_vdpa_net *ndev)continue ; mvq->avail_idx = ri->avail_index; + mvq->used_idx = ri->used_index; mvq->ready = ri->ready; mvq->num_ent = ri->num_ent; mvq->desc_addr = ri->desc_addr;
@@ -1753,6 +1770,7 @@ static void mlx5_vdpa_set_status(struct vdpa_device *vdev, u8 status)if (!status) {mlx5_vdpa_info (mvdev,"performing device reset\n" );teardown_driver (ndev); +clear_virtqueues (ndev);mlx5_vdpa_destroy_mr (&ndev->mvdev); ndev->mvdev.status =0 ; ndev->mvdev.mlx_features =0 ;
fs/afs/main.c +3 -3
@@ -193,7 +193,7 @@ static int __init afs_init(void) goto error_cache;#endif - ret =register_pernet_subsys (&afs_net_ops); + ret =register_pernet_device (&afs_net_ops);if (ret <0 ) goto error_net;
@@ -213,7 +213,7 @@ static int __init afs_init(void) error_proc:afs_fs_exit (); error_fs: -unregister_pernet_subsys (&afs_net_ops); +unregister_pernet_device (&afs_net_ops); error_net:#ifdef CONFIG_AFS_FSCACHE fscache_unregister_netfs (&afs_cache_netfs);
@@ -244,7 +244,7 @@ static void __exit afs_exit(void)proc_remove (afs_proc_symlink);afs_fs_exit (); -unregister_pernet_subsys (&afs_net_ops); +unregister_pernet_device (&afs_net_ops);#ifdef CONFIG_AFS_FSCACHE fscache_unregister_netfs (&afs_cache_netfs);#endif
fs/cifs/dir.c +20 -2
@@ -736,6 +736,7 @@ static int cifs_d_revalidate(struct dentry *direntry, unsigned int flags) {struct inode *inode; +int rc;if (flags &LOOKUP_RCU )return -ECHILD ;
@@ -745,8 +746,25 @@ cifs_d_revalidate(struct dentry *direntry, unsigned int flags)if ((flags &LOOKUP_REVAL ) && !CIFS_CACHE_READ (CIFS_I (inode)))CIFS_I (inode)->time =0 ;/* force reval */ -if (cifs_revalidate_dentry (direntry)) -return 0 ; + rc =cifs_revalidate_dentry (direntry); +if (rc) { +cifs_dbg (FYI ,"cifs_revalidate_dentry failed with rc=%d" , rc); +switch (rc) { +case -ENOENT : +case -ESTALE : +/* +* Those errors mean the dentry is invalid +* (file was deleted or recreated) +*/ +return 0 ; +default : +/* +* Otherwise some unexpected error happened +* report it as-is to VFS layer +*/ +return rc; + } + }else {/* * If the inode wasn't known to be a dfs entry when
fs/cifs/smb2pdu.h +1 -1
@@ -286,7 +286,7 @@ struct smb2_negotiate_req {__le32 NegotiateContextOffset;/* SMB3.1.1 only. MBZ earlier */ __le16 NegotiateContextCount;/* SMB3.1.1 only. MBZ earlier */ __le16 Reserved2; -__le16 Dialects[1 ];/* One dialect (vers=) at a time for now */ +__le16 Dialects[4 ];/* BB expand this if autonegotiate > 4 dialects */ } __packed;/* Dialects */
fs/cifs/transport.c +15 -3
@@ -655,10 +655,22 @@ wait_for_compound_request(struct TCP_Server_Info *server, int num,spin_lock (&server->req_lock);if (*credits < num) {/* -* Return immediately if not too many requests in flight since -* we will likely be stuck on waiting for credits. +* If the server is tight on resources or just gives us less +* credits for other reasons (e.g. requests are coming out of +* order and the server delays granting more credits until it +* processes a missing mid) and we exhausted most available +* credits there may be situations when we try to send +* a compound request but we don't have enough credits. At this +* point the client needs to decide if it should wait for +* additional credits or fail the request. If at least one +* request is in flight there is a high probability that the +* server will return enough credits to satisfy this compound +* request. +* +* Return immediately if no requests in flight since we will be +* stuck on waiting for credits. */ -if (server->in_flight < num - *credits) { +if (server->in_flight ==0 ) {spin_unlock (&server->req_lock);return -ENOTSUPP ; }
fs/hugetlbfs/inode.c +2 -1
@@ -735,9 +735,10 @@ static long hugetlbfs_fallocate(struct file *file, int mode, loff_t offset,mutex_unlock (&hugetlb_fault_mutex_table[hash]); +set_page_huge_active (page);/* * unlock_page because locked by add_to_page_cache() -* page_put due to reference from alloc_huge_page() +* put_page() due to reference from alloc_huge_page() */ unlock_page (page);put_page (page);
fs/io_uring.c +0 -6
@@ -8782,12 +8782,6 @@ static void io_uring_cancel_task_requests(struct io_ring_ctx *ctx,if ((ctx->flags &IORING_SETUP_SQPOLL ) && ctx->sq_data) {atomic_dec (&task->io_uring->in_idle); -/* -* If the files that are going away are the ones in the thread -* identity, clear them out. -*/ -if (task->io_uring->identity->files == files) - task->io_uring->identity->files =NULL ;io_sq_thread_unpark (ctx->sq_data); } }
fs/overlayfs/dir.c +1 -1
@@ -992,8 +992,8 @@ static char *ovl_get_redirect(struct dentry *dentry, bool abs_redirect) buflen -= thislen;memcpy (&buf[buflen], name, thislen); - tmp =dget_dlock (d->d_parent);spin_unlock (&d->d_lock); + tmp =dget_parent (d);dput (d); d = tmp;
fs/overlayfs/file.c +3 -2
@@ -445,8 +445,9 @@ static int ovl_fsync(struct file *file, loff_t start, loff_t end, int datasync)const struct cred *old_cred;int ret; -if (!ovl_should_sync (OVL_FS (file_inode (file)->i_sb))) -return 0 ; + ret =ovl_sync_status (OVL_FS (file_inode (file)->i_sb)); +if (ret <=0 ) +return ret; ret =ovl_real_fdget_meta (file, &real, !datasync);if (ret)
fs/overlayfs/overlayfs.h +1 -0
@@ -322,6 +322,7 @@ int ovl_check_metacopy_xattr(struct ovl_fs *ofs, struct dentry *dentry);bool ovl_is_metacopy_dentry (struct dentry *dentry);char *ovl_get_redirect_xattr (struct ovl_fs *ofs,struct dentry *dentry,int padding); +int ovl_sync_status (struct ovl_fs *ofs);static inline bool ovl_is_impuredir (struct super_block *sb,struct dentry *dentry)
fs/overlayfs/ovl_entry.h +2 -0
@@ -79,6 +79,8 @@ struct ovl_fs {atomic_long_t last_ino;/* Whiteout dentry cache */ struct dentry *whiteout; +/* r/o snapshot of upperdir sb's only taken on volatile mounts */ +errseq_t errseq; };static inline struct vfsmount *ovl_upper_mnt (struct ovl_fs *ofs)
fs/overlayfs/readdir.c +10 -18
@@ -865,7 +865,7 @@ struct file *ovl_dir_real_file(const struct file *file, bool want_upper)struct ovl_dir_file *od = file->private_data;struct dentry *dentry = file->f_path.dentry; -struct file *realfile = od->realfile; +struct file *old, *realfile = od->realfile;if (!OVL_TYPE_UPPER (ovl_path_type (dentry)))return want_upper ?NULL : realfile;
@@ -874,29 +874,20 @@ struct file *ovl_dir_real_file(const struct file *file, bool want_upper)* Need to check if we started out being a lower dir, but got copied up */ if (!od->is_upper) { -struct inode *inode =file_inode (file); - realfile =READ_ONCE (od->upperfile);if (!realfile) {struct path upperpath;ovl_path_upper (dentry, &upperpath); realfile =ovl_dir_open_realfile (file, &upperpath); +if (IS_ERR (realfile)) +return realfile; -inode_lock (inode); -if (!od->upperfile) { -if (IS_ERR (realfile)) { -inode_unlock (inode); -return realfile; - } -smp_store_release (&od->upperfile, realfile); - }else { -/* somebody has beaten us to it */ -if (!IS_ERR (realfile)) -fput (realfile); - realfile = od->upperfile; + old =cmpxchg_release (&od->upperfile,NULL , realfile); +if (old) { +fput (realfile); + realfile = old; } -inode_unlock (inode); } }
@@ -909,8 +900,9 @@ static int ovl_dir_fsync(struct file *file, loff_t start, loff_t end,struct file *realfile;int err; -if (!ovl_should_sync (OVL_FS (file->f_path.dentry->d_sb))) -return 0 ; + err =ovl_sync_status (OVL_FS (file->f_path.dentry->d_sb)); +if (err <=0 ) +return err; realfile =ovl_dir_real_file (file, true); err =PTR_ERR_OR_ZERO (realfile);
fs/overlayfs/super.c +27 -7
@@ -261,11 +261,20 @@ static int ovl_sync_fs(struct super_block *sb, int wait)struct super_block *upper_sb;int ret; -if (!ovl_upper_mnt (ofs)) -return 0 ; + ret =ovl_sync_status (ofs); +/* +* We have to always set the err, because the return value isn't +* checked in syncfs, and instead indirectly return an error via +* the sb's writeback errseq, which VFS inspects after this call. +*/ +if (ret <0 ) { +errseq_set (&sb->s_wb_err, -EIO ); +return -EIO ; + } + +if (!ret) +return ret; -if (!ovl_should_sync (ofs)) -return 0 ;/* * Not called for sync(2) call or an emergency sync (SB_I_SKIP_SYNC). * All the super blocks will be iterated, including upper_sb.
@@ -1927,6 +1936,8 @@ static int ovl_fill_super(struct super_block *sb, void *data, int silent) sb->s_op = &ovl_super_operations;if (ofs->config.upperdir) { +struct super_block *upper_sb; +if (!ofs->config.workdir) {pr_err ("missing 'workdir'\n" ); goto out_err;
@@ -1936,6 +1947,16 @@ static int ovl_fill_super(struct super_block *sb, void *data, int silent)if (err) goto out_err; + upper_sb =ovl_upper_mnt (ofs)->mnt_sb; +if (!ovl_should_sync (ofs)) { + ofs->errseq =errseq_sample (&upper_sb->s_wb_err); +if (errseq_check (&upper_sb->s_wb_err, ofs->errseq)) { + err = -EIO ; +pr_err ("Cannot mount volatile when upperdir has an unseen error. Sync upperdir fs to clear state.\n" ); + goto out_err; + } + } + err =ovl_get_workdir (sb, ofs, &upperpath);if (err) goto out_err;
@@ -1943,9 +1964,8 @@ static int ovl_fill_super(struct super_block *sb, void *data, int silent)if (!ofs->workdir) sb->s_flags |=SB_RDONLY ; - sb->s_stack_depth =ovl_upper_mnt (ofs)->mnt_sb->s_stack_depth; - sb->s_time_gran =ovl_upper_mnt (ofs)->mnt_sb->s_time_gran; - + sb->s_stack_depth = upper_sb->s_stack_depth; + sb->s_time_gran = upper_sb->s_time_gran; } oe =ovl_get_lowerstack (sb, splitlower, numlower, ofs, layers); err =PTR_ERR (oe);
fs/overlayfs/util.c +27 -0
@@ -950,3 +950,30 @@ char *ovl_get_redirect_xattr(struct ovl_fs *ofs, struct dentry *dentry,kfree (buf);return ERR_PTR (res); } + +/* +* ovl_sync_status() - Check fs sync status for volatile mounts +* +* Returns 1 if this is not a volatile mount and a real sync is required. +* +* Returns 0 if syncing can be skipped because mount is volatile, and no errors +* have occurred on the upperdir since the mount. +* +* Returns -errno if it is a volatile mount, and the error that occurred since +* the last mount. If the error code changes, it'll return the latest error +* code. +*/ + +int ovl_sync_status (struct ovl_fs *ofs) +{ +struct vfsmount *mnt; + +if (ovl_should_sync (ofs)) +return 1 ; + + mnt =ovl_upper_mnt (ofs); +if (!mnt) +return 0 ; + +return errseq_check (&mnt->mnt_sb->s_wb_err, ofs->errseq); +}
include/drm/drm_dp_mst_helper.h +1 -0
@@ -783,6 +783,7 @@ drm_dp_mst_detect_port(struct drm_connector *connector,struct edid *drm_dp_mst_get_edid (struct drm_connector *connector,struct drm_dp_mst_topology_mgr *mgr,struct drm_dp_mst_port *port); +int drm_dp_get_vc_payload_bw (int link_rate,int link_lane_count);int drm_dp_calc_pbn_mode (int clock,int bpp,bool dsc);
include/linux/hugetlb.h +2 -0
@@ -770,6 +770,8 @@ static inline void huge_ptep_modify_prot_commit(struct vm_area_struct *vma, }#endif +void set_page_huge_active (struct page *page); +#else /* CONFIG_HUGETLB_PAGE */ struct hstate {};
include/linux/iommu.h +4 -1
@@ -614,7 +614,10 @@ static inline void dev_iommu_fwspec_set(struct device *dev,static inline void *dev_iommu_priv_get (struct device *dev) { -return dev->iommu->priv; +if (dev->iommu) +return dev->iommu->priv; +else +return NULL ; }static inline void dev_iommu_priv_set (struct device *dev,void *priv)
include/linux/irq.h +2 -2
@@ -922,7 +922,7 @@ int __devm_irq_alloc_descs(struct device *dev, int irq, unsigned int from, __irq_alloc_descs(irq, from, cnt, node, THIS_MODULE, NULL)#define irq_alloc_desc (node) \ - irq_alloc_descs(-1, 0, 1, node) + irq_alloc_descs(-1, 1, 1, node)#define irq_alloc_desc_at (at, node) \ irq_alloc_descs(at, at, 1, node)
@@ -937,7 +937,7 @@ int __devm_irq_alloc_descs(struct device *dev, int irq, unsigned int from, __devm_irq_alloc_descs(dev, irq, from, cnt, node, THIS_MODULE, NULL)#define devm_irq_alloc_desc (dev, node) \ - devm_irq_alloc_descs(dev, -1, 0, 1, node) + devm_irq_alloc_descs(dev, -1, 1, 1, node)#define devm_irq_alloc_desc_at (dev, at, node) \ devm_irq_alloc_descs(dev, at, at, 1, node)
include/linux/kprobes.h +1 -1
@@ -251,7 +251,7 @@ extern void kprobes_inc_nmissed_count(struct kprobe *p);extern bool arch_within_kprobe_blacklist (unsigned long addr);extern int arch_populate_kprobe_blacklist (void );extern bool arch_kprobe_on_func_entry (unsigned long offset); -extern bool kprobe_on_func_entry (kprobe_opcode_t *addr,const char *sym,unsigned long offset); +extern int kprobe_on_func_entry (kprobe_opcode_t *addr,const char *sym,unsigned long offset);extern bool within_kprobe_blacklist (unsigned long addr);extern int kprobe_add_ksym_blacklist (unsigned long entry);
include/linux/msi.h +6 -0
@@ -139,6 +139,12 @@ struct msi_desc { list_for_each_entry((desc), dev_to_msi_list((dev)), list)#define for_each_msi_entry_safe (desc, tmp, dev) \ list_for_each_entry_safe((desc), (tmp), dev_to_msi_list((dev)), list) +#define for_each_msi_vector (desc, __irq, dev) \ + for_each_msi_entry((desc), (dev)) \ + if ((desc)->irq) \ + for (__irq = (desc)->irq; \ + __irq < ((desc)->irq + (desc)->nvec_used); \ + __irq++)#ifdef CONFIG_IRQ_MSI_IOMMU static inline const void *msi_desc_get_iommu_cookie (struct msi_desc *desc)
include/linux/tracepoint.h +7 -5
@@ -307,11 +307,13 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p) \ it_func_ptr = \ rcu_dereference_raw((&__tracepoint_##_name)->funcs); \ -do { \ - it_func = (it_func_ptr)->func; \ - __data = (it_func_ptr)->data; \ - ((void (*)(void *,proto ))(it_func))(__data, args); \ - }while ((++it_func_ptr)->func); \ +if (it_func_ptr) { \ +do { \ + it_func = (it_func_ptr)->func; \ + __data = (it_func_ptr)->data; \ + ((void (*)(void *,proto ))(it_func))(__data, args); \ + }while ((++it_func_ptr)->func); \ + } \return 0 ; \ } \ DEFINE_STATIC_CALL(tp_func_##_name, __traceiter_##_name);
include/linux/vmalloc.h +2 -7
@@ -24,7 +24,8 @@ struct notifier_block; /* in notifier.h */#define VM_UNINITIALIZED 0x00000020/* vm_struct is not fully initialized */ #define VM_NO_GUARD 0x00000040/* don't add guard page */ #define VM_KASAN 0x00000080/* has allocated kasan shadow memory */ -#define VM_MAP_PUT_PAGES 0x00000100/* put pages and free array in vfree */ +#define VM_FLUSH_RESET_PERMS 0x00000100/* reset direct map and flush TLB on unmap, can't be freed in atomic context */ +#define VM_MAP_PUT_PAGES 0x00000200/* put pages and free array in vfree */ /* * VM_KASAN is used slighly differently depending on CONFIG_KASAN_VMALLOC.
@@ -37,12 +38,6 @@ struct notifier_block; /* in notifier.h */* determine which allocations need the module shadow freed. */ -/* -* Memory with VM_FLUSH_RESET_PERMS cannot be freed in an interrupt or with -* vfree_atomic(). -*/ -#define VM_FLUSH_RESET_PERMS 0x00000100/* Reset direct map and flush TLB on unmap */ -/* bits [20..32] reserved for arch specific ioremap internals */ /*
include/net/sch_generic.h +1 -1
@@ -1155,7 +1155,7 @@ static inline struct Qdisc *qdisc_replace(struct Qdisc *sch, struct Qdisc *new, old = *pold; *pold = new;if (old !=NULL ) -qdisc_tree_flush_backlog (old); +qdisc_purge_queue (old);sch_tree_unlock (sch);return old;
include/net/udp.h +1 -1
@@ -178,7 +178,7 @@ struct sk_buff *udp_gro_receive(struct list_head *head, struct sk_buff *skb,int udp_gro_complete (struct sk_buff *skb,int nhoff,udp_lookup_t lookup);struct sk_buff *__udp_gso_segment (struct sk_buff *gso_skb, -netdev_features_t features); +netdev_features_t features,bool is_ipv6);static inline struct udphdr *udp_gro_udphdr (struct sk_buff *skb) {
init/init_task.c +2 -1
@@ -198,7 +198,8 @@ struct task_struct init_task .lockdep_recursion = 0,#endif #ifdef CONFIG_FUNCTION_GRAPH_TRACER - .ret_stack = NULL, + .ret_stack = NULL, + .tracing_graph_pause = ATOMIC_INIT(0),#endif #if defined(CONFIG_TRACING ) && defined(CONFIG_PREEMPTION ) .trace_recursion = 0,
kernel/bpf/bpf_inode_storage.c +5 -1
@@ -125,8 +125,12 @@ static int bpf_fd_inode_storage_update_elem(struct bpf_map *map, void *key, fd = *(int *)key; f =fget_raw (fd); -if (!f || !inode_storage_ptr (f->f_inode)) +if (!f) +return -EBADF ; +if (!inode_storage_ptr (f->f_inode)) { +fput (f);return -EBADF ; + } sdata = bpf_local_storage_update(f->f_inode, (struct bpf_local_storage_map *)map,
kernel/bpf/cgroup.c +6 -1
@@ -1442,6 +1442,11 @@ int __cgroup_bpf_run_filter_getsockopt(struct sock *sk, int level, goto out; } +if (ctx.optlen <0 ) { + ret = -EFAULT ; + goto out; + } +if (copy_from_user (ctx.optval, optval,min (ctx.optlen, max_optlen)) !=0 ) { ret = -EFAULT ;
@@ -1459,7 +1464,7 @@ int __cgroup_bpf_run_filter_getsockopt(struct sock *sk, int level, goto out; } -if (ctx.optlen > max_optlen) { +if (ctx.optlen > max_optlen || ctx.optlen <0 ) { ret = -EFAULT ; goto out; }
kernel/bpf/preload/Makefile +4 -1
@@ -4,8 +4,11 @@ LIBBPF_SRCS = $(srctree)/tools/lib/bpf/ LIBBPF_A = $(obj)/libbpf.a LIBBPF_OUT = $(abspath $(obj)) +# Although not in use by libbpf's Makefile, set $(O) so that the "dummy" test +# in tools/scripts/Makefile.include always succeeds when building the kernel +# with $(O) pointing to a relative path, as in "make O=build bindeb-pkg". $(LIBBPF_A): - $(Q)$(MAKE) -C $(LIBBPF_SRCS) OUTPUT=$(LIBBPF_OUT)/ $(LIBBPF_OUT)/libbpf.a + $(Q)$(MAKE) -C $(LIBBPF_SRCS) O=$(LIBBPF_OUT)/ OUTPUT=$(LIBBPF_OUT)/ $(LIBBPF_OUT)/libbpf.a userccflags += -I $(srctree)/tools/include/ -I $(srctree)/tools/include/uapi \ -I $(srctree)/tools/lib/ -Wno-unused-result
kernel/irq/msi.c +20 -24
70 lines not on this page · raw message
kernel/kprobes.c +28 -8
@@ -2082,28 +2082,48 @@ bool __weak arch_kprobe_on_func_entry(unsigned long offset)return !offset; } -bool kprobe_on_func_entry (kprobe_opcode_t *addr,const char *sym,unsigned long offset) +/** +* kprobe_on_func_entry() -- check whether given address is function entry +* @addr: Target address +* @sym: Target symbol name +* @offset: The offset from the symbol or the address +* +* This checks whether the given @addr+@offset or @sym+@offset is on the +* function entry address or not. +* This returns 0 if it is the function entry, or -EINVAL if it is not. +* And also it returns -ENOENT if it fails the symbol or address lookup. +* Caller must pass @addr or @sym (either one must be NULL), or this +* returns -EINVAL. +*/ +int kprobe_on_func_entry (kprobe_opcode_t *addr,const char *sym,unsigned long offset) {kprobe_opcode_t *kp_addr =_kprobe_addr (addr, sym, offset);if (IS_ERR (kp_addr)) -return false; +return PTR_ERR (kp_addr); -if (!kallsyms_lookup_size_offset ((unsigned long )kp_addr,NULL , &offset) || - !arch_kprobe_on_func_entry (offset)) -return false; +if (!kallsyms_lookup_size_offset ((unsigned long )kp_addr,NULL , &offset)) +return -ENOENT ; -return true; +if (!arch_kprobe_on_func_entry (offset)) +return -EINVAL ; + +return 0 ; }int register_kretprobe (struct kretprobe *rp) { -int ret =0 ; +int ret;struct kretprobe_instance *inst;int i;void *addr; -if (!kprobe_on_func_entry (rp->kp.addr, rp->kp.symbol_name, rp->kp.offset)) + ret =kprobe_on_func_entry (rp->kp.addr, rp->kp.symbol_name, rp->kp.offset); +if (ret) +return ret; + +/* If only rp->kp.addr is specified, check reregistering kprobes */ +if (rp->kp.addr &&check_kprobe_rereg (&rp->kp))return -EINVAL ;if (kretprobe_blacklist_size) {
kernel/trace/fgraph.c +0 -2
@@ -395,7 +395,6 @@ static int alloc_retstack_tasklist(struct ftrace_ret_stack **ret_stack_list) }if (t->ret_stack ==NULL ) { -atomic_set (&t->tracing_graph_pause,0 );atomic_set (&t->trace_overrun,0 ); t->curr_ret_stack =-1 ; t->curr_ret_depth =-1 ;
@@ -490,7 +489,6 @@ static DEFINE_PER_CPU(struct ftrace_ret_stack *, idle_ret_stack);static void graph_init_task (struct task_struct *t,struct ftrace_ret_stack *ret_stack) { -atomic_set (&t->tracing_graph_pause,0 );atomic_set (&t->trace_overrun,0 ); t->ftrace_timestamp =0 ;/* make curr_ret_stack visible before we add the ret_stack */
kernel/trace/trace_irqsoff.c +4 -0
@@ -562,6 +562,8 @@ static int __irqsoff_tracer_init(struct trace_array *tr)/* non overwrite screws up the latency tracers */ set_tracer_flag (tr,TRACE_ITER_OVERWRITE ,1 );set_tracer_flag (tr,TRACE_ITER_LATENCY_FMT ,1 ); +/* without pause, we will produce garbage if another latency occurs */ +set_tracer_flag (tr,TRACE_ITER_PAUSE_ON_TRACE ,1 ); tr->max_latency =0 ; irqsoff_trace = tr;
@@ -583,11 +585,13 @@ static void __irqsoff_tracer_reset(struct trace_array *tr) {int lat_flag = save_flags &TRACE_ITER_LATENCY_FMT ;int overwrite_flag = save_flags &TRACE_ITER_OVERWRITE ; +int pause_flag = save_flags &TRACE_ITER_PAUSE_ON_TRACE ;stop_irqsoff_tracer (tr,is_graph (tr));set_tracer_flag (tr,TRACE_ITER_LATENCY_FMT , lat_flag);set_tracer_flag (tr,TRACE_ITER_OVERWRITE , overwrite_flag); +set_tracer_flag (tr,TRACE_ITER_PAUSE_ON_TRACE , pause_flag);ftrace_reset_array_ops (tr); irqsoff_busy = false;
kernel/trace/trace_kprobe.c +6 -4
@@ -221,9 +221,9 @@ bool trace_kprobe_on_func_entry(struct trace_event_call *call) {struct trace_kprobe *tk =trace_kprobe_primary_from_call (call); -return tk ?kprobe_on_func_entry (tk->rp.kp.addr, +return tk ? (kprobe_on_func_entry (tk->rp.kp.addr, tk->rp.kp.addr ?NULL : tk->rp.kp.symbol_name, - tk->rp.kp.addr ?0 : tk->rp.kp.offset) : false; + tk->rp.kp.addr ?0 : tk->rp.kp.offset) ==0 ) : false; }bool trace_kprobe_error_injectable (struct trace_event_call *call)
@@ -828,9 +828,11 @@ static int trace_kprobe_create(int argc, const char *argv[]) }if (is_return) flags |=TPARG_FL_RETURN ; -if (kprobe_on_func_entry (NULL , symbol, offset)) + ret =kprobe_on_func_entry (NULL , symbol, offset); +if (ret ==0 ) flags |=TPARG_FL_FENTRY ; -if (offset && is_return && !(flags &TPARG_FL_FENTRY )) { +/* Defer the ENOENT case until register kprobe */ +if (ret == -EINVAL && is_return) {trace_probe_log_err (0 ,BAD_RETPROBE ); goto parse_error;
Lines of this file are not shown. View the raw message.
mm/hugetlb.c +43 -5
48 lines not on this page · raw message
mm/memblock.c +6 -43
49 lines not on this page · raw message
net/ipv4/udp_offload.c +64 -5
69 lines not on this page · 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.