5.10.13-rc1 review
Subsystems (2)
Greg Kroah-Hartman
maintainerPATCH 1/142 iwlwifi: provide gso_type to GSO packets
In reply to Greg Kroah-HartmanFrom: Eric Dumazet <[email protected]>
commit 81a86e1bd8e7060ebba1718b284d54f1238e9bf9 upstream.
net/core/tso.c got recent support for USO, and this broke iwlfifi because the driver implemented a limited form of GSO.
Providing ->gso_type allows for skb_is_gso_tcp() to provide a correct result.
--- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/wireless/intel/iwlwifi/mvm/tx.c +3 -0
@@ -833,6 +833,7 @@ iwl_mvm_tx_tso_segment(struct sk_buff *s next =skb_gso_segment (skb, netdev_flags);skb_shinfo (skb)->gso_size = mss; +skb_shinfo (skb)->gso_type = ipv4 ?SKB_GSO_TCPV4 :SKB_GSO_TCPV6 ;if (WARN_ON_ONCE (IS_ERR (next)))return -EINVAL ;else if (next)
@@ -855,6 +856,8 @@ iwl_mvm_tx_tso_segment(struct sk_buff *sif (tcp_payload_len > mss) {skb_shinfo (tmp)->gso_size = mss; +skb_shinfo (tmp)->gso_type = ipv4 ?SKB_GSO_TCPV4 : +SKB_GSO_TCPV6 ; }else {if (qos) {u8 *qc;
Greg Kroah-Hartman
maintainerPATCH 2/142 nbd: freeze the queue while were adding connections
In reply to Greg Kroah-HartmanFrom: Josef Bacik <[email protected]>
commit b98e762e3d71e893b221f871825dc64694cfb258 upstream.
When setting up a device, we can krealloc the config->socks array to add new sockets to the configuration. However if we happen to get a IO request in at this point even though we aren't setup we could hit a UAF, as we deref config->socks without any locking, assuming that the configuration was setup already and that ->socks is safe to access it as we have a reference on the configuration.
But there's nothing really preventing IO from occurring at this point of the device setup, we don't want to incur the overhead of a lock to access ->socks when it will never change while the device is running. To fix this UAF scenario simply freeze the queue if we are adding sockets. This will protect us from this particular case without adding any additional overhead for the normal running case.
--- drivers/block/nbd.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/block/nbd.c +8 -0
@@ -1029,6 +1029,12 @@ static int nbd_add_socket(struct nbd_devif (!sock)return err; +/* +* We need to make sure we don't get any errant requests while we're +* reallocating the ->socks array. +*/ +blk_mq_freeze_queue (nbd->disk->queue); +if (!netlink && !nbd->task_setup && !test_bit (NBD_RT_BOUND , &config->runtime_flags)) nbd->task_setup = current;
@@ -1067,10 +1073,12 @@ static int nbd_add_socket(struct nbd_dev nsock->cookie =0 ; socks[config->num_connections++] = nsock;atomic_inc (&config->live_connections); +blk_mq_unfreeze_queue (nbd->disk->queue);return 0 ; put_socket: +blk_mq_unfreeze_queue (nbd->disk->queue);sockfd_put (sock);return err; }
Greg Kroah-Hartman
maintainerPATCH 3/142 tty: avoid using vfs_iocb_iter_write() for redirected console writes
In reply to Greg Kroah-HartmanFrom: Linus Torvalds <[email protected]>
commit a9cbbb80e3e7dd38ceac166e0698f161862a18ae upstream.
It turns out that the vfs_iocb_iter_{read,write}() functions are entirely broken, and don't actually use the passed-in file pointer for IO - only for the preparatory work (permission checking and for the write_iter function lookup).
That worked fine for overlayfs, which always builds the new iocb with the same file pointer that it passes in, but in the general case it ends up doing nonsensical things (and could cause an iterator call that doesn't even match the passed-in file pointer).
This subtly broke the tty conversion to write_iter in commit 9bb48c82aced ("tty: implement write_iter"), because the console redirection didn't actually end up redirecting anything, since the passed-in file pointer was basically ignored, and the actual write was done with the original non-redirected console tty after all.
The main visible effect of this is that the console messages were no longer logged to /var/log/boot.log during graphical boot.
Fix the issue by simply not using the vfs write "helper" function at all, and just redirecting the write entirely internally to the tty layer. Do the target writability permission checks when actually registering the target tty with TIOCCONS instead of at write time.
--- drivers/tty/tty_io.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-)
drivers/tty/tty_io.c +17 -3
@@ -1027,9 +1027,8 @@ void tty_write_message(struct tty_struct* write method will not be invoked in parallel for each device. */ -static ssize_t tty_write (struct kiocb *iocb,struct iov_iter *from) +static ssize_t file_tty_write (struct file *file,struct kiocb *iocb,struct iov_iter *from) { -struct file *file = iocb->ki_filp;struct tty_struct *tty =file_tty (file);struct tty_ldisc *ld;ssize_t ret;
@@ -1052,6 +1051,11 @@ static ssize_t tty_write(struct kiocb *ireturn ret; } +static ssize_t tty_write (struct kiocb *iocb,struct iov_iter *from) +{ +return file_tty_write (iocb->ki_filp, iocb, from); +} +ssize_t redirected_tty_write (struct kiocb *iocb,struct iov_iter *iter) {struct file *p =NULL ;
@@ -1061,9 +1065,13 @@ ssize_t redirected_tty_write(struct kioc p =get_file (redirect);spin_unlock (&redirect_lock); +/* +* We know the redirected tty is just another tty, we can can +* call file_tty_write() directly with that file pointer. +*/ if (p) {ssize_t res; - res =vfs_iocb_iter_write (p, iocb, iter); + res =file_tty_write (p, iocb, iter);fput (p);return res; }
@@ -2306,6 +2314,12 @@ static int tioccons(struct file *file)fput (f);return 0 ; } +if (file->f_op->write_iter != tty_write) +return -ENOTTY ; +if (!(file->f_mode &FMODE_WRITE )) +return -EBADF ; +if (!(file->f_mode &FMODE_CAN_WRITE )) +return -EINVAL ;spin_lock (&redirect_lock);if (redirect) {spin_unlock (&redirect_lock);
Greg Kroah-Hartman
maintainerPATCH 4/142 ACPI: sysfs: Prefer "compatible" modalias
In reply to Greg Kroah-HartmanFrom: Kai-Heng Feng <[email protected]>
commit 36af2d5c4433fb40ee2af912c4ac0a30991aecfc upstream.
Commit 8765c5ba1949 ("ACPI / scan: Rework modalias creation when "compatible" is present") may create two "MODALIAS=" in one uevent file if specific conditions are met.
This breaks systemd-udevd, which assumes each "key" in one uevent file to be unique. The internal implementation of systemd-udevd overwrites the first MODALIAS with the second one, so its kmod rule doesn't load the driver for the first MODALIAS.
So if both the ACPI modalias and the OF modalias are present, use the latter to ensure that there will be only one MODALIAS.
--- drivers/acpi/device_sysfs.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-)
drivers/acpi/device_sysfs.c +6 -14
@@ -251,20 +251,12 @@ int __acpi_device_uevent_modalias(structif (add_uevent_var (env,"MODALIAS=" ))return -ENOMEM ; - len =create_pnp_modalias (adev, &env->buf[env->buflen -1 ], -sizeof (env->buf) - env->buflen); -if (len <0 ) -return len; - - env->buflen += len; -if (!adev->data.of_compatible) -return 0 ; - -if (len >0 &&add_uevent_var (env,"MODALIAS=" )) -return -ENOMEM ; - - len =create_of_modalias (adev, &env->buf[env->buflen -1 ], -sizeof (env->buf) - env->buflen); +if (adev->data.of_compatible) + len =create_of_modalias (adev, &env->buf[env->buflen -1 ], +sizeof (env->buf) - env->buflen); +else + len =create_pnp_modalias (adev, &env->buf[env->buflen -1 ], +sizeof (env->buf) - env->buflen);if (len <0 )return len;
Greg Kroah-Hartman
maintainercover 5.10.13-rc1 review
This is the start of the stable review cycle for the 5.10.13 release. There are 142 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 04 Feb 2021 13:29:33 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.13-rc1.gz
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.10.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 5.10.13-rc1
Pengcheng Yang <[email protected]>
tcp: fix TLP timer not set when CA_STATE changes from DISORDER to OPEN
Enke Chen <[email protected]>
tcp: make TCP_USER_TIMEOUT accurate for zero window probes
Ivan Vecera <[email protected]>
team: protect features update by RCU to avoid deadlock
Enzo Matsumiya <[email protected]>
scsi: qla2xxx: Fix description for parameter ql2xenforce_iocb_limit
Dan Carpenter <[email protected]>
ASoC: topology: Fix memory corruption in soc_tplg_denum_create_values()
Amadeusz Sławiński <[email protected]>
ASoC: topology: Properly unregister DAI on removal
Tzung-Bi Shih <[email protected]>
ASoC: mediatek: mt8183-mt6358: ignore TDM DAI link by default
Tzung-Bi Shih <[email protected]>
ASoC: mediatek: mt8183-da7219: ignore TDM DAI link by default
Pan Bian <[email protected]>
NFC: fix possible resource leak
Pan Bian <[email protected]>
NFC: fix resource leak when target index is invalid
Takeshi Misawa <[email protected]>
rxrpc: Fix memory leak in rxrpc_lookup_local
Danielle Ratson <[email protected]>
selftests: forwarding: Specify interface when invoking mausezahn
Daniel Wagner <[email protected]>
nvme-multipath: Early exit if no path is available
Lu Baolu <[email protected]>
iommu/vt-d: Correctly check addr alignment in qi_flush_dev_iotlb_pasid()
Suravee Suthikulpanit <[email protected]>
iommu/amd: Use IVHD EFR for early initialization of IOMMU features
Yong Wu <[email protected]>
of/device: Update dma_range_map only when dev has valid dma-ranges
Moritz Fischer <[email protected]>
ACPI/IORT: Do not blindly trust DMA masks from firmware
Dan Carpenter <[email protected]>
can: dev: prevent potential information leak in can_fill_info()
Paul Blakey <[email protected]>
net/mlx5: CT: Fix incorrect removal of tuple_nat_node from nat rhashtable
Maxim Mikityanskiy <[email protected]>
net/mlx5e: Revert parameters on errors when changing MTU and LRO state without reset
Maxim Mikityanskiy <[email protected]>
net/mlx5e: Revert parameters on errors when changing trust state without reset
Maxim Mikityanskiy <[email protected]>
net/mlx5e: Correctly handle changing the number of queues when the interface is down
Paul Blakey <[email protected]>
net/mlx5e: Fix CT rule + encap slow path offload and deletion
Maor Dickman <[email protected]>
net/mlx5e: Disable hw-tc-offload when MLX5_CLS_ACT config is disabled
Daniel Jurgens <[email protected]>
net/mlx5: Maintain separate page trees for ECPF and PF functions
Maor Dickman <[email protected]>
net/mlx5e: Reduce tc unsupported key print level
Pan Bian <[email protected]>
net/mlx5e: free page before return
Parav Pandit <[email protected]>
net/mlx5e: E-switch, Fix rate calculation for overflow
Roi Dayan <[email protected]>
net/mlx5: Fix memory leak on flow table creation error flow
Corinna Vinschen <[email protected]>
igc: fix link speed advertising
Stefan Assmann <[email protected]>
i40e: acquire VSI pointer only after VF is initialized
Brett Creeley <[email protected]>
ice: Fix MSI-X vector fallback logic
Brett Creeley <[email protected]>
ice: Don't allow more channels than LAN MSI-X available
Nick Nunley <[email protected]>
ice: update dev_addr in ice_set_mac_address even if HW filter exists
Nick Nunley <[email protected]>
ice: Implement flow for IPv6 next header (extension header)
Henry Tieman <[email protected]>
ice: fix FDir IPv6 flexbyte
Johannes Berg <[email protected]>
mac80211: pause TX while changing interface type
Johannes Berg <[email protected]>
iwlwifi: pcie: reschedule in long-running memory reads
Johannes Berg <[email protected]>
iwlwifi: pcie: use jiffies for memory read spin time limit
Johannes Berg <[email protected]>
iwlwifi: pcie: set LTR on more devices
Johannes Berg <[email protected]>
iwlwifi: pnvm: don't try to load after failures
Johannes Berg <[email protected]>
iwlwifi: pnvm: don't skip everything when not reloading
Johannes Berg <[email protected]>
iwlwifi: pcie: avoid potential PNVM leaks
Stephan Gerhold <[email protected]>
ASoC: qcom: lpass: Fix out-of-bounds DAI ID lookup
Pierre-Louis Bossart <[email protected]>
ASoC: SOF: Intel: soundwire: fix select/depend unmet dependencies
Trond Myklebust <[email protected]>
pNFS/NFSv4: Update the layout barrier when we schedule a layoutreturn
Trond Myklebust <[email protected]>
pNFS/NFSv4: Fix a layout segment leak in pnfs_layout_process()
Nicholas Piggin <[email protected]>
powerpc/64s: prevent recursive replay_soft_interrupts causing superfluous interrupt
Ricardo Ribalda <[email protected]>
ASoC: Intel: Skylake: skl-topology: Fix OOPs ib skl_tplg_complete
Pan Bian <[email protected]>
spi: altera: Fix memory leak on error path
Srinivas Kandagatla <[email protected]>
ASoC: qcom: lpass-ipq806x: fix bitwidth regmap field
Srinivas Kandagatla <[email protected]>
ASoC: qcom: Fix broken support to MI2S TERTIARY and QUATERNARY
Srinivasa Rao Mandadapu <[email protected]>
ASoC: qcom: Fix incorrect volatile registers
Srinivas Kandagatla <[email protected]>
ASoC: dt-bindings: lpass: Fix and common up lpass dai ids
Kamal Heib <[email protected]>
RDMA/cxgb4: Fix the reported max_recv_sge value
Randy Dunlap <[email protected]>
firmware: imx: select SOC_BUS to fix firmware build
Jacky Bai <[email protected]>
arm64: dts: imx8mp: Correct the gpio ranges of gpio3
Russell King <[email protected]>
ARM: dts: imx6qdl-sr-som: fix some cubox-i platforms
Marco Felsch <[email protected]>
ARM: dts: imx6qdl-kontron-samx6i: fix i2c_lcd/cam default status
Arnd Bergmann <[email protected]>
ARM: imx: fix imx8m dependencies
Michael Walle <[email protected]>
arm64: dts: ls1028a: fix the offset of the reset register
Visa Hankala <[email protected]>
xfrm: Fix wraparound in xfrm_policy_addr_delta()
Po-Hsu Lin <[email protected]>
selftests: xfrm: fix test return value override issue in xfrm_policy.sh
Eyal Birger <[email protected]>
xfrm: fix disable_xfrm sysctl when used on xfrm interfaces
Shmulik Ladkani <[email protected]>
xfrm: Fix oops in xfrm_replay_advance_bmp
Maxim Mikityanskiy <[email protected]>
Revert "block: simplify set_init_blocksize" to regain lost performance
Parav Pandit <[email protected]>
Revert "RDMA/mlx5: Fix devlink deadlock on net namespace deletion"
Pablo Neira Ayuso <[email protected]>
netfilter: nft_dynset: add timeout extension to template
Rob Herring <[email protected]>
ARM: zImage: atags_to_fdt: Fix node names on added root nodes
Max Krummenacher <[email protected]>
ARM: imx: build suspend-imx6.S with arm instruction set
Dmitry Baryshkov <[email protected]>
clk: qcom: gcc-sm250: Use floor ops for sdcc clks
Arnd Bergmann <[email protected]>
clk: mmp2: fix build without CONFIG_PM
Arnd Bergmann <[email protected]>
clk: imx: fix Kconfig warning for i.MX SCU clk
Ming Lei <[email protected]>
blk-mq: test QUEUE_FLAG_HCTX_ACTIVE for sbitmap_shared in hctx_may_queue
Roger Pau Monne <[email protected]>
xen-blkfront: allow discard-* nodes to be optional
Rouven Czerwinski <[email protected]>
tee: optee: replace might_sleep with cond_resched
Quentin Perret <[email protected]>
KVM: Documentation: Fix spec for KVM_CAP_ENABLE_CAP_VM
Justin Iurman <[email protected]>
uapi: fix big endian definition of ipv6_rpl_sr_hdr
Pan Bian <[email protected]>
drm/i915/selftest: Fix potential memory leak
Umesh Nerlige Ramappa <[email protected]>
drm/i915: Check for all subplatform bits
Bastian Beranek <[email protected]>
drm/nouveau/dispnv50: Restore pushing of all data.
Dom Cobley <[email protected]>
drm/vc4: Correct POS1_SCL for hvs5
Dom Cobley <[email protected]>
drm/vc4: Correct lbm size and calculation
Karol Herbst <[email protected]>
drm/nouveau/svm: fail NOUVEAU_SVM_INIT ioctl on unsupported devices
Marco Felsch <[email protected]>
ARM: dts: imx6qdl-kontron-samx6i: fix pwms for lcd-backlight
Maxim Mikityanskiy <[email protected]>
net/mlx5e: Fix IPSEC stats
Tvrtko Ursulin <[email protected]>
drm/i915/pmu: Don't grab wakeref when enabling events
Chris Wilson <[email protected]>
drm/i915/gt: Clear CACHE_MODE prior to clearing residuals
Matti Gottlieb <[email protected]>
iwlwifi: Fix IWL_SUBDEVICE_NO_160 macro to use the correct bit.
Lorenzo Bianconi <[email protected]>
mt7601u: fix rx buffer refcounting
Lorenzo Bianconi <[email protected]>
mt76: mt7663s: fix rx buffer refcounting
Lorenzo Bianconi <[email protected]>
mt7601u: fix kernel crash unplugging the device
Bharat Gooty <[email protected]>
arm64: dts: broadcom: Fix USB DMA address translation for Stingray
Andrea Righi <[email protected]>
leds: trigger: fix potential deadlock with libata
David Woodhouse <[email protected]>
xen: Fix XenStore initialisation for XS_LOCAL
Pavel Begunkov <[email protected]>
io_uring: fix wqe->lock/completion_lock deadlock
Marc Zyngier <[email protected]>
KVM: Forbid the use of tagged userspace addresses for memslots
Jay Zhou <[email protected]>
KVM: x86: get smi pending status correctly
Maxim Levitsky <[email protected]>
KVM: nVMX: Sync unsync'd vmcs02 state to vmcs12 on migration
Paolo Bonzini <[email protected]>
KVM: x86: allow KVM_REQ_GET_NESTED_STATE_PAGES outside guest mode for VMX
Maxim Levitsky <[email protected]>
KVM: nSVM: cancel KVM_REQ_GET_NESTED_STATE_PAGES on nested vmexit
Marc Zyngier <[email protected]>
KVM: arm64: Filter out v8.1+ events on v8.0 HW
Like Xu <[email protected]>
KVM: x86/pmu: Fix UBSAN shift-out-of-bounds warning in intel_pmu_refresh()
Like Xu <[email protected]>
KVM: x86/pmu: Fix HW_REF_CPU_CYCLES event pseudo-encoding in intel_arch_events[]
Josef Bacik <[email protected]>
btrfs: fix possible free space tree corruption with online conversion
Su Yue <[email protected]>
btrfs: fix lockdep warning due to seqcount_mutex on 32bit arch
Claudiu Beznea <[email protected]>
drivers: soc: atmel: add null entry at the end of at91_soc_allowed_list[]
Sudeep Holla <[email protected]>
drivers: soc: atmel: Avoid calling at91_soc_init on non AT91 SoCs
Herbert Xu <[email protected]>
crypto: marvel/cesa - Fix tdma descriptor on 64-bit
Lukas Wunner <[email protected]>
efi/apple-properties: Reinstate support for boolean properties
Nick Desaulniers <[email protected]>
x86/entry: Emit a symbol for register restoring thunk
Laurent Badel <[email protected]>
PM: hibernate: flush swap writer after marking
Tony Krowiak <[email protected]>
s390/vfio-ap: No need to disable IRQ after queue reset
Janosch Frank <[email protected]>
s390: uv: Fix sysfs max number of VCPUs reporting
Giacinto Cifelli <[email protected]>
net: usb: qmi_wwan: added support for Thales Cinterion PLSx3 modem family
Coly Li <[email protected]>
bcache: only check feature sets when sb->version >= BCACHE_SB_VERSION_CDEV_WITH_FEATURES
Lyude Paul <[email protected]>
drivers/nouveau/kms/nv50-: Reject format modifiers for cursor planes
Chris Wilson <[email protected]>
drm/i915/gt: Always try to reserve GGTT address 0x0
Chris Wilson <[email protected]>
drm/i915: Always flush the active worker before returning from the wait
Lyude Paul <[email protected]>
drm/nouveau/kms/gk104-gp1xx: Fix > 64x64 cursors
Alex Deucher <[email protected]>
Revert "drm/amdgpu/swsmu: drop set_fan_speed_percent (v2)"
Jaroslav Kysela <[email protected]>
ASoC: AMD Renoir - refine DMI entries for some Lenovo products
Juergen Gross <[email protected]>
x86/xen: avoid warning in Xen pv guest with CONFIG_AMD_MEM_ENCRYPT enabled
Johannes Berg <[email protected]>
wext: fix NULL-ptr-dereference with cfg80211's lack of commit()
Koen Vandeputte <[email protected]>
ARM: dts: imx6qdl-gw52xx: fix duplicate regulator naming
Linus Walleij <[email protected]>
ARM: dts: ux500: Reserve memory carveouts
Soeren Moch <[email protected]>
ARM: dts: tbs2910: rename MMC node aliases
Sean Young <[email protected]>
media: rc: ensure that uevent can be read directly after rc device register
Matthias Reichl <[email protected]>
media: rc: ite-cir: fix min_timeout calculation
Matthias Reichl <[email protected]>
media: rc: fix timeout handling after switch to microsecond durations
Ricardo Ribalda <[email protected]>
media: hantro: Fix reset_raw_fmt initialization
Jernej Skrabec <[email protected]>
media: cedrus: Fix H264 decoding
Yannick Fertre <[email protected]>
media: cec: add stm32 driver
Helge Deller <[email protected]>
parisc: Enable -mlong-calls gcc option by default when !CONFIG_MODULES
Takashi Iwai <[email protected]>
ALSA: hda/via: Apply the workaround generically for Clevo machines
Jian-Hong Pan <[email protected]>
ALSA: hda/realtek: Enable headset of ASUS B1400CEPE with ALC256
Baoquan He <[email protected]>
kernel: kexec: remove the lock operation of system_transition_mutex
Rafael J. Wysocki <[email protected]>
ACPI: thermal: Do not call acpi_thermal_check() directly
Kai-Heng Feng <[email protected]>
ACPI: sysfs: Prefer "compatible" modalias
Linus Torvalds <[email protected]>
tty: avoid using vfs_iocb_iter_write() for redirected console writes
Josef Bacik <[email protected]>
nbd: freeze the queue while we're adding connections
Eric Dumazet <[email protected]>
iwlwifi: provide gso_type to GSO packets
-------------
Diffstat:
Documentation/asm-annotations.rst | 5 ++ Documentation/virt/kvm/api.rst | 5 +- Makefile | 4 +- arch/arm/boot/compressed/atags_to_fdt.c | 3 +- arch/arm/boot/dts/imx6q-tbs2910.dts | 7 ++ arch/arm/boot/dts/imx6qdl-gw52xx.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-kontron-samx6i.dtsi | 6 +- arch/arm/boot/dts/imx6qdl-sr-som.dtsi | 12 ++- arch/arm/boot/dts/ste-db8500.dtsi | 38 ++++++++ arch/arm/boot/dts/ste-db8520.dtsi | 38 ++++++++ arch/arm/boot/dts/ste-db9500.dtsi | 35 ++++++++ arch/arm/boot/dts/ste-snowball.dts | 2 +- arch/arm/mach-imx/suspend-imx6.S | 1 + .../boot/dts/broadcom/stingray/stingray-usb.dtsi | 7 +- arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi | 2 +- arch/arm64/boot/dts/freescale/imx8mp.dtsi | 2 +- arch/arm64/kvm/pmu-emul.c | 10 ++- arch/parisc/Kconfig | 5 +- arch/parisc/kernel/entry.S | 13 ++- arch/powerpc/kernel/irq.c | 28 +++--- arch/s390/boot/uv.c | 2 +- arch/s390/include/asm/uv.h | 4 +- arch/s390/kernel/uv.c | 2 +- arch/x86/entry/thunk_64.S | 8 +- arch/x86/include/asm/idtentry.h | 1 + arch/x86/kvm/svm/nested.c | 6 ++ arch/x86/kvm/vmx/nested.c | 46 +++++++--- arch/x86/kvm/vmx/pmu_intel.c | 6 +- arch/x86/kvm/x86.c | 4 + arch/x86/xen/enlighten_pv.c | 15 +++- arch/x86/xen/xen-asm.S | 1 + block/blk-mq.h | 2 +- drivers/acpi/arm64/iort.c | 14 ++- drivers/acpi/device_sysfs.c | 20 ++--- drivers/acpi/thermal.c | 46 +++++++--- drivers/block/nbd.c | 8 ++ drivers/block/xen-blkfront.c | 20 ++--- drivers/clk/imx/Kconfig | 2 - drivers/clk/mmp/clk-audio.c | 6 +- drivers/clk/qcom/gcc-sm8250.c | 4 +- drivers/crypto/marvell/cesa/cesa.h | 4 +- drivers/firmware/efi/apple-properties.c | 13 ++- drivers/firmware/imx/Kconfig | 1 + drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h | 1 + drivers/gpu/drm/amd/pm/inc/smu_v11_0.h | 3 + drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 9 +- drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c | 1 + drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c | 1 + .../drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 1 + drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c | 31 ++++++- drivers/gpu/drm/i915/gt/gen7_renderclear.c | 12 +++ drivers/gpu/drm/i915/gt/intel_ggtt.c | 47 +++++++--- drivers/gpu/drm/i915/i915_active.c | 28 +++--- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_pmu.c | 30 ++++--- drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 2 +- drivers/gpu/drm/nouveau/dispnv50/base507c.c | 6 +- drivers/gpu/drm/nouveau/dispnv50/base827c.c | 6 +- drivers/gpu/drm/nouveau/dispnv50/head917d.c | 28 +++++- drivers/gpu/drm/nouveau/dispnv50/wndw.c | 17 +++- .../gpu/drm/nouveau/include/nvhw/class/cl917d.h | 4 + drivers/gpu/drm/nouveau/nouveau_svm.c | 4 + drivers/gpu/drm/vc4/vc4_hvs.c | 8 +- drivers/gpu/drm/vc4/vc4_plane.c | 11 ++- drivers/infiniband/hw/cxgb4/qp.c | 2 +- drivers/infiniband/hw/mlx5/main.c | 6 +- drivers/iommu/amd/amd_iommu.h | 7 +- drivers/iommu/amd/amd_iommu_types.h | 4 + drivers/iommu/amd/init.c | 56 +++++++++++- drivers/iommu/intel/dmar.c | 2 +- drivers/leds/led-triggers.c | 10 ++- drivers/md/bcache/features.h | 6 ++ drivers/media/cec/platform/Makefile | 1 + drivers/media/rc/ir-mce_kbd-decoder.c | 2 +- drivers/media/rc/ite-cir.c | 2 +- drivers/media/rc/rc-main.c | 8 +- drivers/media/rc/serial_ir.c | 2 +- drivers/net/can/dev.c | 2 +- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 11 +-- drivers/net/ethernet/intel/ice/ice.h | 4 +- drivers/net/ethernet/intel/ice/ice_ethtool.c | 8 +- drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c | 8 +- drivers/net/ethernet/intel/ice/ice_lib.c | 14 +-- drivers/net/ethernet/intel/ice/ice_main.c | 16 ++-- drivers/net/ethernet/intel/ice/ice_txrx.c | 9 +- drivers/net/ethernet/intel/igc/igc_ethtool.c | 24 +++-- .../net/ethernet/mellanox/mlx5/core/en/health.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c | 20 +++-- .../mellanox/mlx5/core/en_accel/ipsec_stats.c | 4 +- drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c | 13 +-- .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 8 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 39 +++++--- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 2 + drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 22 +++-- drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 1 + drivers/net/ethernet/mellanox/mlx5/core/lib/mlx5.h | 5 ++ .../net/ethernet/mellanox/mlx5/core/pagealloc.c | 58 +++++++----- drivers/net/team/team.c | 6 +- drivers/net/usb/qmi_wwan.c | 1 + drivers/net/wireless/intel/iwlwifi/fw/pnvm.c | 56 ++++++------ drivers/net/wireless/intel/iwlwifi/iwl-config.h | 2 +- drivers/net/wireless/intel/iwlwifi/iwl-prph.h | 6 ++ drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 3 + .../wireless/intel/iwlwifi/pcie/ctxt-info-gen3.c | 42 +++++---- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 14 +-- .../net/wireless/mediatek/mt76/mt7615/sdio_txrx.c | 9 +- drivers/net/wireless/mediatek/mt7601u/dma.c | 5 +- drivers/nvme/host/multipath.c | 2 +- drivers/of/device.c | 10 ++- drivers/s390/crypto/vfio_ap_drv.c | 6 +- drivers/s390/crypto/vfio_ap_ops.c | 100 +++++++++++++-------- drivers/s390/crypto/vfio_ap_private.h | 12 +-- drivers/scsi/qla2xxx/qla_os.c | 2 +- drivers/soc/atmel/soc.c | 13 +++ drivers/soc/imx/Kconfig | 2 +- drivers/spi/spi-altera.c | 3 +- drivers/staging/media/hantro/hantro_v4l2.c | 2 +- drivers/staging/media/sunxi/cedrus/cedrus_h264.c | 2 +- drivers/tee/optee/call.c | 4 +- drivers/tty/tty_io.c | 20 ++++- drivers/xen/xenbus/xenbus_probe.c | 31 +++++++ fs/block_dev.c | 10 ++- fs/btrfs/block-group.c | 10 ++- fs/btrfs/ctree.h | 3 + fs/btrfs/free-space-tree.c | 10 ++- fs/btrfs/volumes.c | 2 +- fs/btrfs/volumes.h | 11 +-- fs/io_uring.c | 10 +-- fs/nfs/pnfs.c | 40 +++++---- include/dt-bindings/sound/apq8016-lpass.h | 7 +- include/dt-bindings/sound/qcom,lpass.h | 15 ++++ include/dt-bindings/sound/sc7180-lpass.h | 6 +- include/linux/linkage.h | 5 ++ include/linux/mlx5/driver.h | 18 ---- include/net/tcp.h | 3 +- include/uapi/linux/rpl.h | 6 +- kernel/kexec_core.c | 2 - kernel/power/swap.c | 2 +- net/ipv4/tcp_input.c | 14 +-- net/ipv4/tcp_output.c | 2 + net/ipv4/tcp_recovery.c | 5 +- net/ipv4/tcp_timer.c | 18 ++++ net/mac80211/ieee80211_i.h | 1 + net/mac80211/iface.c | 6 ++ net/netfilter/nft_dynset.c | 4 +- net/nfc/netlink.c | 1 + net/nfc/rawsock.c | 2 +- net/rxrpc/call_accept.c | 1 + net/wireless/wext-core.c | 5 +- net/xfrm/xfrm_input.c | 2 +- net/xfrm/xfrm_policy.c | 30 ++++--- sound/pci/hda/patch_realtek.c | 1 + sound/pci/hda/patch_via.c | 2 +- sound/soc/amd/renoir/rn-pci-acp3x.c | 18 +++- sound/soc/intel/skylake/skl-topology.c | 13 +-- sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c | 5 +- .../mt8183/mt8183-mt6358-ts3a227-max98357.c | 5 +- sound/soc/qcom/lpass-cpu.c | 42 +++++---- sound/soc/qcom/lpass-ipq806x.c | 2 +- sound/soc/qcom/lpass-lpaif-reg.h | 2 +- sound/soc/qcom/lpass-platform.c | 27 +++--- sound/soc/qcom/lpass-sc7180.c | 9 +- sound/soc/qcom/lpass.h | 2 +- sound/soc/soc-topology.c | 11 +-- sound/soc/sof/intel/Kconfig | 3 +- .../selftests/net/forwarding/router_mpath_nh.sh | 2 +- .../selftests/net/forwarding/router_multipath.sh | 2 +- tools/testing/selftests/net/xfrm_policy.sh | 45 +++++++++- virt/kvm/kvm_main.c | 1 + 169 files changed, 1323 insertions(+), 563 deletions(-)
Greg Kroah-Hartman
maintainerPATCH 6/142 kernel: kexec: remove the lock operation of system_transition_mutex
From: Baoquan He <[email protected]>
commit 56c91a18432b631ca18438841fd1831ef756cabf upstream.
Function kernel_kexec() is called with lock system_transition_mutex held in reboot system call. While inside kernel_kexec(), it will acquire system_transition_mutex agin. This will lead to dead lock.
The dead lock should be easily triggered, it hasn't caused any failure report just because the feature 'kexec jump' is almost not used by anyone as far as I know. An inquiry can be made about who is using 'kexec jump' and where it's used. Before that, let's simply remove the lock operation inside CONFIG_KEXEC_JUMP ifdeffery scope.
--- kernel/kexec_core.c | 2 -- 1 file changed, 2 deletions(-)
kernel/kexec_core.c +0 -2
@@ -1135,7 +1135,6 @@ int kernel_kexec(void)#ifdef CONFIG_KEXEC_JUMP if (kexec_image->preserve_context) { -lock_system_sleep ();pm_prepare_console (); error =freeze_processes ();if (error) {
@@ -1198,7 +1197,6 @@ int kernel_kexec(void)thaw_processes (); Restore_console: pm_restore_console(); - unlock_system_sleep(); }#endif
Greg Kroah-Hartman
maintainerPATCH 7/142 ALSA: hda/realtek: Enable headset of ASUS B1400CEPE with ALC256
In reply to Greg Kroah-HartmanFrom: Jian-Hong Pan <[email protected]>
commit 5de3b9430221b11a5e1fc2f5687af80777c8392a upstream.
ASUS B1400CEPE laptop's headset audio is not enabled until ALC256_FIXUP_ASUS_HPE quirk is applied.
Here is the original pin node values:
0x12 0x400000000x13 0x411111f00x14 0x901701100x18 0x411111f00x19 0x411111f00x1a 0x411111f00x1b 0x411111f00x1d 0x40461b450x1e 0x411111f00x21 0x04211020
--- sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+)
sound/pci/hda/patch_realtek.c +1 -0
@@ -8006,6 +8006,7 @@ static const struct snd_pci_quirk alc269SND_PCI_QUIRK (0x1043 ,0x18b1 ,"Asus MJ401TA" ,ALC256_FIXUP_ASUS_HEADSET_MIC ),SND_PCI_QUIRK (0x1043 ,0x18f1 ,"Asus FX505DT" ,ALC256_FIXUP_ASUS_HEADSET_MIC ),SND_PCI_QUIRK (0x1043 ,0x194e ,"ASUS UX563FD" ,ALC294_FIXUP_ASUS_HPE ), +SND_PCI_QUIRK (0x1043 ,0x1982 ,"ASUS B1400CEPE" ,ALC256_FIXUP_ASUS_HPE ),SND_PCI_QUIRK (0x1043 ,0x19ce ,"ASUS B9450FA" ,ALC294_FIXUP_ASUS_HPE ),SND_PCI_QUIRK (0x1043 ,0x19e1 ,"ASUS UX581LV" ,ALC295_FIXUP_ASUS_MIC_NO_PRESENCE ), SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW),
Greg Kroah-Hartman
maintainerPATCH 23/142 drm/nouveau/kms/gk104-gp1xx: Fix > 64x64 cursors
In reply to Greg Kroah-HartmanFrom: Lyude Paul <[email protected]>
commit ba839b7598440a5d78550a115bac21b08d57cc32 upstream.
While we do handle the additional cursor sizes introduced in NVE4, it looks like we accidentally broke this when converting over to use Nvidia's display headers. Since we now use NVVAL in dispnv50/head907d.c in order to format the value for the cursor layout and NVD9 only had one byte reserved vs. the 2 bytes reserved in later generations, we end up accidentally stripping the second bit in the cursor layout format parameter - causing us to set the wrong cursor size.
This fixes that by adding our own curs_set hook for 917d which uses the NV917D headers.
drivers/gpu/drm/nouveau/dispnv50/head917d.c +27 -1
@@ -22,6 +22,7 @@#include "head.h" #include "core.h" +#include "nvif/push.h" #include <nvif/push507c.h> #include <nvhw/class/cl917d.h>
@@ -73,6 +74,31 @@ head917d_base(struct nv50_head *head, struct nv50_head_atom *asyh)return 0 ; } +static int +head917d_curs_set (struct nv50_head *head,struct nv50_head_atom *asyh) +{ +struct nvif_push *push =nv50_disp (head->base.base.dev)->core->chan.push; +const int i = head->base.index; +int ret; + + ret =PUSH_WAIT (push,5 ); +if (ret) +return ret; + +PUSH_MTHD (push,NV917D ,HEAD_SET_CONTROL_CURSOR (i), +NVDEF (NV917D ,HEAD_SET_CONTROL_CURSOR ,ENABLE ,ENABLE ) | +NVVAL (NV917D ,HEAD_SET_CONTROL_CURSOR ,FORMAT , asyh->curs.format) | +NVVAL (NV917D ,HEAD_SET_CONTROL_CURSOR ,SIZE , asyh->curs.layout) | +NVVAL (NV917D ,HEAD_SET_CONTROL_CURSOR ,HOT_SPOT_X ,0 ) | +NVVAL (NV917D ,HEAD_SET_CONTROL_CURSOR ,HOT_SPOT_Y ,0 ) | +NVDEF (NV917D ,HEAD_SET_CONTROL_CURSOR ,COMPOSITION ,ALPHA_BLEND ), + +HEAD_SET_OFFSET_CURSOR (i), asyh->curs.offset >>8 ); + +PUSH_MTHD (push,NV917D ,HEAD_SET_CONTEXT_DMA_CURSOR (i), asyh->curs.handle); +return 0 ; +} +int head917d_curs_layout (struct nv50_head *head,struct nv50_wndw_atom *asyw,struct nv50_head_atom *asyh)
@@ -101,7 +127,7 @@ head917d = { .core_clr = head907d_core_clr, .curs_layout = head917d_curs_layout, .curs_format = head507d_curs_format, - .curs_set = head907d_curs_set, + .curs_set = head917d_curs_set, .curs_clr = head907d_curs_clr, .base = head917d_base, .ovly = head907d_ovly,
drivers/gpu/drm/nouveau/include/nvhw/class/cl917d.h +4 -0
@@ -66,6 +66,10 @@#define NV917D_HEAD_SET_CONTROL_CURSOR_COMPOSITION_ALPHA_BLEND (0x00000000)#define NV917D_HEAD_SET_CONTROL_CURSOR_COMPOSITION_PREMULT_ALPHA_BLEND (0x00000001)#define NV917D_HEAD_SET_CONTROL_CURSOR_COMPOSITION_XOR (0x00000002) +#define NV917D_HEAD_SET_OFFSET_CURSOR (a) (0x00000484 + (a)*0x00000300) +#define NV917D_HEAD_SET_OFFSET_CURSOR_ORIGIN 31:0 +#define NV917D_HEAD_SET_CONTEXT_DMA_CURSOR (a) (0x0000048C + (a)*0x00000300) +#define NV917D_HEAD_SET_CONTEXT_DMA_CURSOR_HANDLE 31:0#define NV917D_HEAD_SET_DITHER_CONTROL (a) (0x000004A0 + (a)*0x00000300)#define NV917D_HEAD_SET_DITHER_CONTROL_ENABLE 0:0#define NV917D_HEAD_SET_DITHER_CONTROL_ENABLE_DISABLE (0x00000000)
Greg Kroah-Hartman
maintainerPATCH 16/142 ARM: dts: tbs2910: rename MMC node aliases
In reply to Greg Kroah-HartmanFrom: Soeren Moch <[email protected]>
commit fd25c883667b61f845a4188b6be110bb45de0bac upstream.
to be consistent with kernel versions up to v5.9 (mmc aliases not used here). usdhc1 is not wired up on this board and therefore cannot be used. Start mmc aliases with usdhc2.
--- arch/arm/boot/dts/imx6q-tbs2910.dts | 7 +++++++ 1 file changed, 7 insertions(+)
arch/arm/boot/dts/imx6q-tbs2910.dts +7 -0
@@ -16,6 +16,13 @@ stdout-path = &uart1; }; + aliases { + mmc0 = &usdhc2; + mmc1 = &usdhc3; + mmc2 = &usdhc4; + /delete-property/ mmc3; + }; + memory@10000000 { device_type = "memory"; reg = <0x10000000 0x80000000>;
Greg Kroah-Hartman
maintainerPATCH 22/142 Revert "drm/amdgpu/swsmu: drop set_fan_speed_percent (v2)"
In reply to Greg Kroah-HartmanFrom: Alex Deucher <[email protected]>
commit a119f87b86bcdf14a18ce39a899e97a1e9160f7f upstream.
On some boards the rpm interface apparently does not work at all leading to the fan not spinning or spinning at strange speeds. Revert this for now to fix 5.10, 5.11. The follow on patch fixes this properly for 5.12.
This reverts commit 8d6e65adc25e23fabbc5293b6cd320195c708dca.
--- drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h | 1 drivers/gpu/drm/amd/pm/inc/smu_v11_0.h | 3 + drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 9 +--- drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c | 1 drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c | 1 drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 1 drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c | 31 +++++++++++++++- 7 files changed, 39 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h +1 -0
@@ -575,6 +575,7 @@ struct pptable_funcs {int (*conv_power_profile_to_pplib_workload)(int power_profile);uint32_t (*get_fan_control_mode)(struct smu_context *smu);int (*set_fan_control_mode)(struct smu_context *smu,uint32_t mode); +int (*set_fan_speed_percent)(struct smu_context *smu,uint32_t speed);int (*set_fan_speed_rpm)(struct smu_context *smu,uint32_t speed);int (*set_xgmi_pstate)(struct smu_context *smu,uint32_t pstate);int (*gfx_off_control)(struct smu_context *smu,bool enable);
drivers/gpu/drm/amd/pm/inc/smu_v11_0.h +3 -0
@@ -200,6 +200,9 @@ int smu_v11_0_set_fan_control_mode(struct smu_context *smu, uint32_t mode); +int +smu_v11_0_set_fan_speed_percent (struct smu_context *smu,uint32_t speed); +int smu_v11_0_set_fan_speed_rpm (struct smu_context *smu,uint32_t speed);
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +2 -7
@@ -2255,19 +2255,14 @@ int smu_get_fan_speed_percent(struct smuint smu_set_fan_speed_percent (struct smu_context *smu,uint32_t speed) {int ret =0 ; -uint32_t rpm;if (!smu->pm_enabled || !smu->adev->pm.dpm_enabled)return -EOPNOTSUPP ;mutex_lock (&smu->mutex); -if (smu->ppt_funcs->set_fan_speed_rpm) { -if (speed >100 ) - speed =100 ; - rpm = speed * smu->fan_max_rpm /100 ; - ret = smu->ppt_funcs->set_fan_speed_rpm (smu, rpm); - } +if (smu->ppt_funcs->set_fan_speed_percent) + ret = smu->ppt_funcs->set_fan_speed_percent (smu, speed);mutex_unlock (&smu->mutex);
drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c +1 -0
@@ -2366,6 +2366,7 @@ static const struct pptable_funcs arctur .display_clock_voltage_request = smu_v11_0_display_clock_voltage_request, .get_fan_control_mode = smu_v11_0_get_fan_control_mode, .set_fan_control_mode = smu_v11_0_set_fan_control_mode, + .set_fan_speed_percent = smu_v11_0_set_fan_speed_percent, .set_fan_speed_rpm = smu_v11_0_set_fan_speed_rpm, .set_xgmi_pstate = smu_v11_0_set_xgmi_pstate, .gfx_off_control = smu_v11_0_gfx_off_control,
drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c +1 -0
@@ -2710,6 +2710,7 @@ static const struct pptable_funcs navi10 .display_clock_voltage_request = smu_v11_0_display_clock_voltage_request, .get_fan_control_mode = smu_v11_0_get_fan_control_mode, .set_fan_control_mode = smu_v11_0_set_fan_control_mode, + .set_fan_speed_percent = smu_v11_0_set_fan_speed_percent, .set_fan_speed_rpm = smu_v11_0_set_fan_speed_rpm, .set_xgmi_pstate = smu_v11_0_set_xgmi_pstate, .gfx_off_control = smu_v11_0_gfx_off_control,
drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c +1 -0
@@ -2776,6 +2776,7 @@ static const struct pptable_funcs sienna .display_clock_voltage_request = smu_v11_0_display_clock_voltage_request, .get_fan_control_mode = smu_v11_0_get_fan_control_mode, .set_fan_control_mode = smu_v11_0_set_fan_control_mode, + .set_fan_speed_percent = smu_v11_0_set_fan_speed_percent, .set_fan_speed_rpm = smu_v11_0_set_fan_speed_rpm, .set_xgmi_pstate = smu_v11_0_set_xgmi_pstate, .gfx_off_control = smu_v11_0_gfx_off_control,
drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c +30 -1
@@ -1123,6 +1123,35 @@ smu_v11_0_set_fan_static_mode(struct smu }int +smu_v11_0_set_fan_speed_percent (struct smu_context *smu,uint32_t speed) +{ +struct amdgpu_device *adev = smu->adev; +uint32_t duty100, duty; +uint64_t tmp64; + +if (speed >100 ) + speed =100 ; + +if (smu_v11_0_auto_fan_control (smu,0 )) +return -EINVAL ; + + duty100 =REG_GET_FIELD (RREG32_SOC15 (THM ,0 , mmCG_FDO_CTRL1), +CG_FDO_CTRL1 ,FMAX_DUTY100 ); +if (!duty100) +return -EINVAL ; + + tmp64 = (uint64_t )speed * duty100; +do_div (tmp64,100 ); + duty = (uint32_t )tmp64; + +WREG32_SOC15 (THM ,0 , mmCG_FDO_CTRL0, +REG_SET_FIELD (RREG32_SOC15 (THM ,0 , mmCG_FDO_CTRL0), +CG_FDO_CTRL0 ,FDO_STATIC_DUTY , duty)); + +return smu_v11_0_set_fan_static_mode (smu,FDO_PWM_MODE_STATIC ); +} + +int smu_v11_0_set_fan_control_mode (struct smu_context *smu,uint32_t mode) {
@@ -1130,7 +1159,7 @@ smu_v11_0_set_fan_control_mode(struct smswitch (mode) {case AMD_FAN_CTRL_NONE : - ret =smu_v11_0_set_fan_speed_rpm (smu, smu->fan_max_rpm); + ret =smu_v11_0_set_fan_speed_percent (smu,100 );break ;case AMD_FAN_CTRL_MANUAL : ret =smu_v11_0_auto_fan_control (smu,0 );
Greg Kroah-Hartman
maintainerPATCH 27/142 bcache: only check feature sets when sb->version >= BCACHE_SB_VERSION_CDEV_WITH_FEATURES
In reply to Greg Kroah-HartmanFrom: Coly Li <[email protected]>
commit 0df28cad06eb41cc36bfea69d9c882fb567fd0d6 upstream.
For super block version < BCACHE_SB_VERSION_CDEV_WITH_FEATURES, it doesn't make sense to check the feature sets. This patch checks super block version in bch_has_feature_* routines, if the version doesn't have feature sets yet, returns 0 (false) to the caller.
--- drivers/md/bcache/features.h | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/md/bcache/features.h +6 -0
@@ -33,6 +33,8 @@#define BCH_FEATURE_COMPAT_FUNCS (name, flagname) \ static inline int bch_has_feature_##name(struct cache_sb *sb) \ { \ + if (sb->version < BCACHE_SB_VERSION_CDEV_WITH_FEATURES) \ + return 0; \ return (((sb)->feature_compat & \ BCH##_FEATURE_COMPAT_##flagname) != 0); \ } \
@@ -50,6 +52,8 @@ static inline void bch_clear_feature_##n#define BCH_FEATURE_RO_COMPAT_FUNCS (name, flagname) \ static inline int bch_has_feature_##name(struct cache_sb *sb) \ { \ + if (sb->version < BCACHE_SB_VERSION_CDEV_WITH_FEATURES) \ + return 0; \ return (((sb)->feature_ro_compat & \ BCH##_FEATURE_RO_COMPAT_##flagname) != 0); \ } \
@@ -67,6 +71,8 @@ static inline void bch_clear_feature_##n#define BCH_FEATURE_INCOMPAT_FUNCS (name, flagname) \ static inline int bch_has_feature_##name(struct cache_sb *sb) \ { \ + if (sb->version < BCACHE_SB_VERSION_CDEV_WITH_FEATURES) \ + return 0; \ return (((sb)->feature_incompat & \ BCH##_FEATURE_INCOMPAT_##flagname) != 0); \ } \
Greg Kroah-Hartman
maintainerPATCH 28/142 net: usb: qmi_wwan: added support for Thales Cinterion PLSx3 modem family
In reply to Greg Kroah-HartmanFrom: Giacinto Cifelli <[email protected]>
commit 7e0e63d09516e96994c879f07c5a3c3269d7015e upstream.
Bus 003 Device 009: ID 1e2d:006f
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2 ?
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
idVendor 0x1e2d
idProduct 0x006f
bcdDevice 0.00
iManufacturer 3 Cinterion Wireless Modules iProduct 2 PLSx3 iSerial 4 fa3c1419 bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 303
bNumInterfaces 9
bConfigurationValue 1
iConfiguration 1 Cinterion Configuration
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 500mA
Interface Association:
bLength 8
bDescriptorType 11
bFirstInterface 0
bInterfaceCount 2
bFunctionClass 2 Communications
bFunctionSubClass 2 Abstract (modem)
bFunctionProtocol 1 AT-commands (v.25ter)
iFunction 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 2 Communications
bInterfaceSubClass 2 Abstract (modem)
bInterfaceProtocol 1 AT-commands (v.25ter)
iInterface 0
CDC Header:
bcdCDC 1.10
CDC ACM:
bmCapabilities 0x02
line coding and serial state
CDC Call Management:
bmCapabilities 0x03
call management
use DataInterface
bDataInterface 1
CDC Union:
bMasterInterface 0
bSlaveInterface 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 5
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 10 CDC Data
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Interface Association:
bLength 8
bDescriptorType 11
bFirstInterface 2
bInterfaceCount 2
bFunctionClass 2 Communications
bFunctionSubClass 2 Abstract (modem)
bFunctionProtocol 1 AT-commands (v.25ter)
iFunction 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 2 Communications
bInterfaceSubClass 2 Abstract (modem)
bInterfaceProtocol 1 AT-commands (v.25ter)
iInterface 0
CDC Header:
bcdCDC 1.10
CDC ACM:
bmCapabilities 0x02
line coding and serial state
CDC Call Management:
bmCapabilities 0x03
call management
use DataInterface
bDataInterface 3
CDC Union:
bMasterInterface 2
bSlaveInterface 3
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 5
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 3
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 10 CDC Data
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x84 EP 4 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Interface Association:
bLength 8
bDescriptorType 11
bFirstInterface 4
bInterfaceCount 2
bFunctionClass 2 Communications
bFunctionSubClass 2 Abstract (modem)
bFunctionProtocol 1 AT-commands (v.25ter)
iFunction 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 4
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 2 Communications
bInterfaceSubClass 2 Abstract (modem)
bInterfaceProtocol 1 AT-commands (v.25ter)
iInterface 0
CDC Header:
bcdCDC 1.10
CDC ACM:
bmCapabilities 0x02
line coding and serial state
CDC Call Management:
bmCapabilities 0x03
call management
use DataInterface
bDataInterface 5
CDC Union:
bMasterInterface 4
bSlaveInterface 5
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x85 EP 5 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 5
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 5
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 10 CDC Data
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x86 EP 6 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x03 EP 3 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Interface Association:
bLength 8
bDescriptorType 11
bFirstInterface 6
bInterfaceCount 2
bFunctionClass 2 Communications
bFunctionSubClass 2 Abstract (modem)
bFunctionProtocol 1 AT-commands (v.25ter)
iFunction 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 6
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 2 Communications
bInterfaceSubClass 2 Abstract (modem)
bInterfaceProtocol 1 AT-commands (v.25ter)
iInterface 0
CDC Header:
bcdCDC 1.10
CDC ACM:
bmCapabilities 0x02
line coding and serial state
CDC Call Management:
bmCapabilities 0x03
call management
use DataInterface
bDataInterface 7
CDC Union:
bMasterInterface 6
bSlaveInterface 7
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x87 EP 7 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 5
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 7
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 10 CDC Data
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x88 EP 8 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x04 EP 4 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 8
bAlternateSetting 0
bNumEndpoints 3
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x89 EP 9 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 5
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x8a EP 10 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x05 EP 5 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2 ?
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0000
(Bus Powered)
--- drivers/net/usb/qmi_wwan.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/usb/qmi_wwan.c +1 -0
@@ -1325,6 +1325,7 @@ static const struct usb_device_id produc {QMI_FIXED_INTF(0x0b3c, 0xc00a, 6)}, /* Olivetti Olicard 160 */ {QMI_FIXED_INTF(0x0b3c, 0xc00b, 4)}, /* Olivetti Olicard 500 */ {QMI_FIXED_INTF(0x1e2d, 0x0060, 4)}, /* Cinterion PLxx */ + {QMI_QUIRK_SET_DTR(0x1e2d, 0x006f, 8)}, /* Cinterion PLS83/PLS63 */ {QMI_FIXED_INTF(0x1e2d, 0x0053, 4)}, /* Cinterion PHxx,PXxx */ {QMI_FIXED_INTF(0x1e2d, 0x0063, 10)}, /* Cinterion ALASxx (1 RmNet) */ {QMI_FIXED_INTF(0x1e2d, 0x0082, 4)}, /* Cinterion PHxx,PXxx (2 RmNet) */
Greg Kroah-Hartman
maintainerPATCH 32/142 x86/entry: Emit a symbol for register restoring thunk
In reply to Greg Kroah-HartmanFrom: Nick Desaulniers <[email protected]>
commit 5e6dca82bcaa49348f9e5fcb48df4881f6d6c4ae upstream.
Arnd found a randconfig that produces the warning:
arch/x86/entry/thunk_64.o: warning: objtool: missing symbol for insn at offset 0x3e
when building with LLVM_IAS=1 (Clang's integrated assembler). Josh notes:
With the LLVM assembler not generating section symbols, objtool has no way to reference this code when it generates ORC unwinder entries, because this code is outside of any ELF function.
The limitation now being imposed by objtool is that all code must be contained in an ELF symbol. And .L symbols don't create such symbols.
So basically, you can use an .L symbol *inside* a function or a code segment, you just can't use the .L symbol to contain the code using a SYM_*_START/END annotation pair.
Fangrui notes that this optimization is helpful for reducing image size when compiling with -ffunction-sections and -fdata-sections. I have observed on the order of tens of thousands of symbols for the kernel images built with those flags.
A patch has been authored against GNU binutils to match this behavior of not generating unused section symbols ([1]), so this will also become a problem for users of GNU binutils once they upgrade to 2.36.
Omit the .L prefix on a label so that the assembler will emit an entry into the symbol table for the label, with STB_LOCAL binding. This enables objtool to generate proper unwind info here with LLVM_IAS=1 or GNU binutils 2.36+.
[ bp: Massage commit message. ]
--- Documentation/asm-annotations.rst | 5 +++++ arch/x86/entry/thunk_64.S | 8 ++++---- include/linux/linkage.h | 5 +++++ 3 files changed, 14 insertions(+), 4 deletions(-)
Documentation/asm-annotations.rst +5 -0
@@ -100,6 +100,11 @@ Instruction Macros ~~~~~~~~~~~~~~~~~~ This section covers ``SYM_FUNC_*`` and ``SYM_CODE_*`` enumerated above. +``objtool`` requires that all code must be contained in an ELF symbol. Symbol +names that have a ``.L`` prefix do not emit symbol table entries. ``.L`` +prefixed symbols can be used within a code region, but should be avoided for +denoting a range of code via ``SYM_*_START/END`` annotations. + * ``SYM_FUNC_START`` and ``SYM_FUNC_START_LOCAL`` are supposed to be **the most frequent markings**. They are used for functions with standard calling conventions -- global and local. Like in C, they both align the functions to
arch/x86/entry/thunk_64.S +4 -4
@@ -31,7 +31,7 @@ SYM_FUNC_START_NOALIGN(\name) .endif call \func - jmp .L_restore + jmp __thunk_restore SYM_FUNC_END(\name) _ASM_NOKPROBE(\name) .endm
@@ -44,7 +44,7 @@ SYM_FUNC_END(\name) #endif #ifdef CONFIG_PREEMPTION -SYM_CODE_START_LOCAL_NOALIGN(.L_restore) +SYM_CODE_START_LOCAL_NOALIGN(__thunk_restore) popq %r11 popq %r10 popq %r9
@@ -56,6 +56,6 @@ SYM_CODE_START_LOCAL_NOALIGN(.L_restore) popq %rdi popq %rbp ret - _ASM_NOKPROBE(.L_restore) -SYM_CODE_END(.L_restore) + _ASM_NOKPROBE(__thunk_restore) +SYM_CODE_END(__thunk_restore) #endif
include/linux/linkage.h +5 -0
@@ -178,6 +178,11 @@* Objtool generates debug info for both FUNC & CODE, but needs special * annotations for each CODE's start (to describe the actual stack frame). * +* Objtool requires that all code must be contained in an ELF symbol. Symbol +* names that have a .L prefix do not emit symbol table entries. .L +* prefixed symbols can be used within a code region, but should be avoided for +* denoting a range of code via ``SYM_*_START/END`` annotations. +* * ALIAS -- does not generate debug info -- the aliased function will */
Greg Kroah-Hartman
maintainerPATCH 8/142 ALSA: hda/via: Apply the workaround generically for Clevo machines
In reply to Greg Kroah-HartmanFrom: Takashi Iwai <[email protected]>
commit 4961167bf7482944ca09a6f71263b9e47f949851 upstream.
We've got another report indicating a similar problem wrt the power-saving behavior with VIA codec on Clevo machines. Let's apply the existing workaround generically to all Clevo devices with VIA codecs to cover all in once.
--- sound/pci/hda/patch_via.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/pci/hda/patch_via.c +1 -1
@@ -1043,7 +1043,7 @@ static const struct hda_fixup via_fixupsstatic const struct snd_pci_quirk vt2002p_fixups[] = {SND_PCI_QUIRK (0x1043 ,0x1487 ,"Asus G75" ,VIA_FIXUP_ASUS_G75 ),SND_PCI_QUIRK (0x1043 ,0x8532 ,"Asus X202E" ,VIA_FIXUP_INTMIC_BOOST ), -SND_PCI_QUIRK (0x1558 ,0x3501 ,"Clevo W35xSS_370SS" ,VIA_FIXUP_POWER_SAVE ), +SND_PCI_QUIRK_VENDOR (0x1558 ,"Clevo" ,VIA_FIXUP_POWER_SAVE ), {} };
Greg Kroah-Hartman
maintainerPATCH 37/142 btrfs: fix lockdep warning due to seqcount_mutex on 32bit arch
In reply to Greg Kroah-HartmanFrom: Su Yue <[email protected]>
commit c41ec4529d3448df8998950d7bada757a1b321cf upstream.
This effectively reverts commit d5c8238849e7 ("btrfs: convert data_seqcount to seqcount_mutex_t").
While running fstests on 32 bits test box, many tests failed because of warnings in dmesg. One of those warnings (btrfs/003):
[66.441317] WARNING: CPU: 6 PID: 9251 at include/linux/seqlock.h:279 btrfs_remove_chunk+0x58b/0x7b0 [btrfs] [66.441446] CPU: 6 PID: 9251 Comm: btrfs Tainted: G O 5.11.0-rc4-custom+ #5 [66.441449] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS ArchLinux 1.14.0-1 04/01/2014 [66.441451] EIP: btrfs_remove_chunk+0x58b/0x7b0 [btrfs] [66.441472] EAX: 00000000 EBX: 00000001 ECX: c576070c EDX: c6b15803 [66.441475] ESI: 10000000 EDI: 00000000 EBP: c56fbcfc ESP: c56fbc70 [66.441477] DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 EFLAGS: 00010246 [66.441481] CR0: 80050033 CR2: 05c8da20 CR3: 04b20000 CR4: 00350ed0 [66.441485] Call Trace: [66.441510] btrfs_relocate_chunk+0xb1/0x100 [btrfs] [66.441529] ? btrfs_lookup_block_group+0x17/0x20 [btrfs] [66.441562] btrfs_balance+0x8ed/0x13b0 [btrfs] [66.441586] ? btrfs_ioctl_balance+0x333/0x3c0 [btrfs] [66.441619] ? __this_cpu_preempt_check+0xf/0x11 [66.441643] btrfs_ioctl_balance+0x333/0x3c0 [btrfs] [66.441664] ? btrfs_ioctl_get_supported_features+0x30/0x30 [btrfs] [66.441683] btrfs_ioctl+0x414/0x2ae0 [btrfs] [66.441700] ? __lock_acquire+0x35f/0x2650 [66.441717] ? lockdep_hardirqs_on+0x87/0x120 [66.441720] ? lockdep_hardirqs_on_prepare+0xd0/0x1e0 [66.441724] ? call_rcu+0x2d3/0x530 [66.441731] ? __might_fault+0x41/0x90 [66.441736] ? kvm_sched_clock_read+0x15/0x50 [66.441740] ? sched_clock+0x8/0x10 [66.441745] ? sched_clock_cpu+0x13/0x180 [66.441750] ? btrfs_ioctl_get_supported_features+0x30/0x30 [btrfs] [66.441750] ? btrfs_ioctl_get_supported_features+0x30/0x30 [btrfs] [66.441768] __ia32_sys_ioctl+0x165/0x8a0 [66.441773] ? __this_cpu_preempt_check+0xf/0x11 [66.441785] ? __might_fault+0x89/0x90 [66.441791] __do_fast_syscall_32+0x54/0x80 [66.441796] do_fast_syscall_32+0x32/0x70 [66.441801] do_SYSENTER_32+0x15/0x20 [66.441805] entry_SYSENTER_32+0x9f/0xf2 [66.441808] EIP: 0xab7b5549 [66.441814] EAX: ffffffda EBX: 00000003 ECX: c4009420 EDX: bfa91f5c [66.441816] ESI: 00000003 EDI: 00000001 EBP: 00000000 ESP: bfa91e98 [66.441818] DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 007b EFLAGS: 00000292 [66.441833] irq event stamp: 42579 [66.441835] hardirqs last enabled at (42585): [<c60eb065>] console_unlock+0x495/0x590 [66.441838] hardirqs last disabled at (42590): [<c60eafd5>] console_unlock+0x405/0x590 [66.441840] softirqs last enabled at (41698): [<c601b76c>] call_on_stack+0x1c/0x60 [66.441843] softirqs last disabled at (41681): [<c601b76c>] call_on_stack+0x1c/0x60
========================================================================
btrfs_remove_chunk+0x58b/0x7b0: __seqprop_mutex_assert at linux/./include/linux/seqlock.h:279 (inlined by) btrfs_device_set_bytes_used at linux/fs/btrfs/volumes.h:212 (inlined by) btrfs_remove_chunk at linux/fs/btrfs/volumes.c:2994 ========================================================================
The warning is produced by lockdep_assert_held() in __seqprop_mutex_assert() if CONFIG_LOCKDEP is enabled. And "olumes.c:2994 is btrfs_device_set_bytes_used() with mutex lock fs_info->chunk_mutex held already.
After adding some debug prints, the cause was found that many __alloc_device() are called with NULL @fs_info (during scanning ioctl). Inside the function, btrfs_device_data_ordered_init() is expanded to seqcount_mutex_init(). In this scenario, its second parameter info->chunk_mutex is &NULL->chunk_mutex which equals to offsetof(struct btrfs_fs_info, chunk_mutex) unexpectedly. Thus, seqcount_mutex_init() is called in wrong way. And later btrfs_device_get/set helpers trigger lockdep warnings.
The device and filesystem object lifetimes are different and we'd have to synchronize initialization of the btrfs_device::data_seqcount with the fs_info, possibly using some additional synchronization. It would still not prevent concurrent access to the seqcount lock when it's used for read and initialization.
Commit d5c8238849e7 ("btrfs: convert data_seqcount to seqcount_mutex_t") does not mention a particular problem being fixed so revert should not cause any harm and we'll get the lockdep warning fixed.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=210139
--- fs/btrfs/volumes.c | 2 +- fs/btrfs/volumes.h | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-)
fs/btrfs/volumes.c +1 -1
@@ -431,7 +431,7 @@ static struct btrfs_device *__alloc_deviatomic_set (&dev->reada_in_flight,0 );atomic_set (&dev->dev_stats_ccnt,0 ); -btrfs_device_data_ordered_init (dev, fs_info); +btrfs_device_data_ordered_init (dev);INIT_RADIX_TREE (&dev->reada_zones,GFP_NOFS & ~__GFP_DIRECT_RECLAIM);INIT_RADIX_TREE (&dev->reada_extents,GFP_NOFS & ~__GFP_DIRECT_RECLAIM); extent_io_tree_init(fs_info, &dev->alloc_state,
fs/btrfs/volumes.h +6 -5
@@ -39,10 +39,10 @@ struct btrfs_io_geometry {#if BITS_PER_LONG ==32 && defined(CONFIG_SMP )#include <linux/seqlock.h> #define __BTRFS_NEED_DEVICE_DATA_ORDERED -#define btrfs_device_data_ordered_init (device, info) \ - seqcount_mutex_init(&device->data_seqcount, &info->chunk_mutex) +#define btrfs_device_data_ordered_init (device) \ + seqcount_init(&device->data_seqcount)#else -#define btrfs_device_data_ordered_init (device, info) do { } while (0) +#define btrfs_device_data_ordered_init (device) do { } while (0)#endif #define BTRFS_DEV_STATE_WRITEABLE (0)
@@ -72,8 +72,7 @@ struct btrfs_device {blk_status_t last_flush_error;#ifdef __BTRFS_NEED_DEVICE_DATA_ORDERED -/* A seqcount_t with associated chunk_mutex (for lockdep) */ -seqcount_mutex_t data_seqcount; +seqcount_t data_seqcount;#endif /* the internal btrfs device id */
@@ -164,9 +163,11 @@ btrfs_device_get_##name(const struct btr static inline void \ btrfs_device_set_##name(struct btrfs_device *dev, u64 size) \ { \ + preempt_disable(); \ write_seqcount_begin(&dev->data_seqcount); \ dev->name = size; \ write_seqcount_end(&dev->data_seqcount); \ + preempt_enable(); \ }#elif BITS_PER_LONG ==32 && defined(CONFIG_PREEMPTION )#define BTRFS_DEVICE_GETSET_FUNCS (name) \
Greg Kroah-Hartman
maintainerPATCH 14/142 media: rc: ite-cir: fix min_timeout calculation
In reply to Greg Kroah-HartmanFrom: Matthias Reichl <[email protected]>
commit e1def45b5291278590bc3033cc518bf5c964a18d upstream.
Commit 528222d853f92 ("media: rc: harmonize infrared durations to microseconds") missed to switch the min_timeout calculation from ns to us. This resulted in a minimum timeout of 1.2 seconds instead of 1.2ms, leading to large delays and long key repeats.
Fix this by applying proper ns->us conversion.
--- drivers/media/rc/ite-cir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/rc/ite-cir.c +1 -1
@@ -1551,7 +1551,7 @@ static int ite_probe(struct pnp_dev *pde rdev->s_rx_carrier_range = ite_set_rx_carrier_range;/* FIFO threshold is 17 bytes, so 17 * 8 samples minimum */ rdev->min_timeout =17 *8 *ITE_BAUDRATE_DIVISOR * - itdev->params.sample_period; + itdev->params.sample_period /1000 ; rdev->timeout =IR_DEFAULT_TIMEOUT ; rdev->max_timeout =10 *IR_DEFAULT_TIMEOUT ; rdev->rx_resolution = ITE_BAUDRATE_DIVISOR *
Greg Kroah-Hartman
maintainerPATCH 13/142 media: rc: fix timeout handling after switch to microsecond durations
In reply to Greg Kroah-HartmanFrom: Matthias Reichl <[email protected]>
commit 06b831588b639ad9d94e4789b0250562228722c2 upstream.
Commit 528222d853f92 ("media: rc: harmonize infrared durations to microseconds") missed to switch some timeout calculations from nanoseconds to microseconds. This resulted in spurious key_up+key_down events at the last scancode if the rc device uses a long timeout (eg 100ms on nuvoton-cir) as the device timeout wasn't properly accounted for in the keyup timeout calculation.
Fix this by applying the proper conversion functions.
--- drivers/media/rc/ir-mce_kbd-decoder.c | 2 +- drivers/media/rc/rc-main.c | 4 ++-- drivers/media/rc/serial_ir.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)
drivers/media/rc/ir-mce_kbd-decoder.c +1 -1
@@ -320,7 +320,7 @@ again: data->body);spin_lock (&data->keylock);if (scancode) { - delay =nsecs_to_jiffies (dev->timeout) + + delay =usecs_to_jiffies (dev->timeout) +msecs_to_jiffies (100 );mod_timer (&data->rx_timeout, jiffies + delay); }else {
drivers/media/rc/rc-main.c +2 -2
@@ -737,7 +737,7 @@ static unsigned int repeat_period(int prvoid rc_repeat (struct rc_dev *dev) {unsigned long flags; -unsigned int timeout =nsecs_to_jiffies (dev->timeout) + +unsigned int timeout =usecs_to_jiffies (dev->timeout) +msecs_to_jiffies (repeat_period (dev->last_protocol));struct lirc_scancode sc = { .scancode = dev->last_scancode, .rc_proto = dev->last_protocol,
@@ -855,7 +855,7 @@ void rc_keydown(struct rc_dev *dev, enumir_do_keydown (dev, protocol, scancode, keycode, toggle);if (dev->keypressed) { - dev->keyup_jiffies = jiffies +nsecs_to_jiffies (dev->timeout) + + dev->keyup_jiffies = jiffies +usecs_to_jiffies (dev->timeout) +msecs_to_jiffies (repeat_period (protocol));mod_timer (&dev->timer_keyup, dev->keyup_jiffies); }
drivers/media/rc/serial_ir.c +1 -1
@@ -385,7 +385,7 @@ static irqreturn_t serial_ir_irq_handler }while (!(sinp (UART_IIR ) &UART_IIR_NO_INT ));/* still pending ? */ mod_timer (&serial_ir.timeout_timer, - jiffies +nsecs_to_jiffies (serial_ir.rcdev->timeout)); + jiffies +usecs_to_jiffies (serial_ir.rcdev->timeout));ir_raw_event_handle (serial_ir.rcdev);
Greg Kroah-Hartman
maintainerPATCH 12/142 media: hantro: Fix reset_raw_fmt initialization
In reply to Greg Kroah-HartmanFrom: Ricardo Ribalda <[email protected]>
commit e081863ab48d9b2eee9e899cbd05752a2a30308d upstream.
raw_fmt->height in never initialized. But width in initialized twice.
--- drivers/staging/media/hantro/hantro_v4l2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/hantro/hantro_v4l2.c +1 -1
@@ -367,7 +367,7 @@ hantro_reset_raw_fmt(struct hantro_ctx *hantro_reset_fmt (raw_fmt, raw_vpu_fmt); raw_fmt->width = encoded_fmt->width; - raw_fmt->width = encoded_fmt->width; + raw_fmt->height = encoded_fmt->height;if (ctx->is_encoder)hantro_set_fmt_out (ctx, raw_fmt);else
Greg Kroah-Hartman
maintainerPATCH 33/142 efi/apple-properties: Reinstate support for boolean properties
In reply to Greg Kroah-HartmanFrom: Lukas Wunner <[email protected]>
commit 355845b738e76445c8522802552146d96cb4afa7 upstream.
Since commit 4466bf82821b ("efi/apple-properties: use PROPERTY_ENTRY_U8_ARRAY_LEN"), my MacBook Pro issues a -ENODATA error when trying to assign EFI properties to the discrete GPU:
pci 0000:01:00.0: assigning 56 device properties
pci 0000:01:00.0: error -61 assigning properties
That's because some of the properties have no value. They're booleans whose presence can be checked by drivers, e.g. "use-backlight-blanking".
Commit 6e98503dba64 ("efi/apple-properties: Remove redundant attribute initialization from unmarshal_key_value_pairs()") employed a trick to store such booleans as u8 arrays (which is the data type used for all other EFI properties on Macs): It cleared the property_entry's "is_array" flag, thereby denoting that the value is stored inline in the property_entry.
Commit 4466bf82821b erroneously removed that trick. It was probably a little fragile to begin with.
Reinstate support for boolean properties by explicitly invoking the PROPERTY_ENTRY_BOOL() initializer for properties with zero-length value.
--- drivers/firmware/efi/apple-properties.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)
drivers/firmware/efi/apple-properties.c +9 -4
@@ -3,8 +3,9 @@* apple-properties.c - EFI device properties on Macs * Copyright (C) 2016 Lukas Wunner <[email protected]> * -* Note, all properties are considered as u8 arrays. -* To get a value of any of them the caller must use device_property_read_u8_array(). +* Properties are stored either as: +* u8 arrays which can be retrieved with device_property_read_u8_array() or +* booleans which can be queried with device_property_present(). */ #define pr_fmt (fmt) "apple-properties: " fmt
@@ -88,8 +89,12 @@ static void __init unmarshal_key_value_p entry_data = ptr + key_len +sizeof (val_len); entry_len = val_len -sizeof (val_len); - entry[i] =PROPERTY_ENTRY_U8_ARRAY_LEN (key, entry_data, - entry_len); +if (entry_len) + entry[i] =PROPERTY_ENTRY_U8_ARRAY_LEN (key, entry_data, + entry_len); +else + entry[i] =PROPERTY_ENTRY_BOOL (key); +if (dump_properties) {dev_info (dev,"property: %s\n" , key); print_hex_dump(KERN_INFO, pr_fmt(), DUMP_PREFIX_OFFSET,
Greg Kroah-Hartman
maintainerPATCH 34/142 crypto: marvel/cesa - Fix tdma descriptor on 64-bit
In reply to Greg Kroah-HartmanFrom: Herbert Xu <[email protected]>
commit 4f6543f28bb05433d87b6de6c21e9c14c35ecf33 upstream.
The patch that added src_dma/dst_dma to struct mv_cesa_tdma_desc is broken on 64-bit systems as the size of the descriptor has been changed. This patch fixes it by using u32 instead of dma_addr_t.
--- drivers/crypto/marvell/cesa/cesa.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/crypto/marvell/cesa/cesa.h +2 -2
@@ -300,11 +300,11 @@ struct mv_cesa_tdma_desc {__le32 byte_cnt;union {__le32 src; -dma_addr_t src_dma; +u32 src_dma; };union {__le32 dst; -dma_addr_t dst_dma; +u32 dst_dma; };__le32 next_dma;
Greg Kroah-Hartman
maintainerPATCH 11/142 media: cedrus: Fix H264 decoding
In reply to Greg Kroah-HartmanFrom: Jernej Skrabec <[email protected]>
commit 73bc0b0c2a96b31199da0ce6c3d04be81ef73bb9 upstream.
During H264 API overhaul subtle bug was introduced Cedrus driver. Progressive references have both, top and bottom reference flags set. Cedrus reference list expects only bottom reference flag and only when interlaced frames are decoded. However, due to a bug in Cedrus check, exclusivity is not tested and that flag is set also for progressive references. That causes "jumpy" background with many videos.
Fix that by checking that only bottom reference flag is set in control and nothing else.
--- drivers/staging/media/sunxi/cedrus/cedrus_h264.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/sunxi/cedrus/cedrus_h264.c +1 -1
@@ -203,7 +203,7 @@ static void _cedrus_write_ref_list(struc position = cedrus_buf->codec.h264.position; sram_array[i] |= position <<1 ; -if (ref_list[i].fields &V4L2_H264_BOTTOM_FIELD_REF ) +if (ref_list[i].fields ==V4L2_H264_BOTTOM_FIELD_REF ) sram_array[i] |=BIT (0 ); }
Greg Kroah-Hartman
maintainerPATCH 9/142 parisc: Enable -mlong-calls gcc option by default when !CONFIG_MODULES
In reply to Greg Kroah-HartmanFrom: Helge Deller <[email protected]>
commit 00e35f2b0e8acb88d4e1aa96ff0490e3bfe46580 upstream.
When building a kernel without module support, the CONFIG_MLONGCALL option needs to be enabled in order to reach symbols which are outside of a 22-bit branch.
This patch changes the autodetection in the Kconfig script to always enable CONFIG_MLONGCALL when modules are disabled and uses a far call to preempt_schedule_irq() in intr_do_preempt() to reach the symbol in all cases.
--- arch/parisc/Kconfig | 5 ++--- arch/parisc/kernel/entry.S | 13 ++++++++++--- 2 files changed, 12 insertions(+), 6 deletions(-)
arch/parisc/Kconfig +2 -3
@@ -202,9 +202,8 @@ config PREFETCH depends on PA8X00 || PA7200 config MLONGCALLS - bool "Enable the -mlong-calls compiler option for big kernels" - default y if !MODULES || UBSAN || FTRACE - default n + def_bool y if !MODULES || UBSAN || FTRACE + bool "Enable the -mlong-calls compiler option for big kernels" if MODULES && !UBSAN && !FTRACE depends on PA8X00 help If you configure the kernel to include many drivers built-in instead
arch/parisc/kernel/entry.S +10 -3
@@ -997,10 +997,17 @@ intr_do_preempt: bb,<,n %r20, 31 - PSW_SM_I, intr_restore nop + /* ssm PSW_SM_I done later in intr_restore */ +#ifdef CONFIG_MLONGCALLS + ldil L%intr_restore, %r2 + load32 preempt_schedule_irq, %r1 + bv %r0(%r1) + ldo R%intr_restore(%r2), %r2 +#else + ldil L%intr_restore, %r1 BL preempt_schedule_irq, %r2 - nop - - b,n intr_restore /* ssm PSW_SM_I done by intr_restore */ + ldo R%intr_restore(%r1), %r2 +#endif #endif /* CONFIG_PREEMPTION */ /*
Greg Kroah-Hartman
maintainerPATCH 29/142 s390: uv: Fix sysfs max number of VCPUs reporting
In reply to Greg Kroah-HartmanFrom: Janosch Frank <[email protected]>
commit e82080e1f456467cc185fe65ee69fe9f9bd0b576 upstream.
The number reported by the query is N-1 and I think people reading the sysfs file would expect N instead. For users creating VMs there's no actual difference because KVM's limit is currently below the UV's limit.
arch/s390/boot/uv.c +1 -1
@@ -35,7 +35,7 @@ void uv_query_info(void) uv_info.guest_cpu_stor_len = uvcb.cpu_stor_len; uv_info.max_sec_stor_addr =ALIGN (uvcb.max_guest_stor_addr,PAGE_SIZE ); uv_info.max_num_sec_conf = uvcb.max_num_sec_conf; - uv_info.max_guest_cpus = uvcb.max_guest_cpus; + uv_info.max_guest_cpu_id = uvcb.max_guest_cpu_id; }#ifdef CONFIG_PROTECTED_VIRTUALIZATION_GUEST
arch/s390/include/asm/uv.h +2 -2
@@ -96,7 +96,7 @@ struct uv_cb_qui {u32 max_num_sec_conf;u64 max_guest_stor_addr;u8 reserved88[158 -136 ]; -u16 max_guest_cpus; +u16 max_guest_cpu_id;u8 reserveda0[200 -160 ]; } __packed__aligned(8) ;
@@ -273,7 +273,7 @@ struct uv_info {unsigned long guest_cpu_stor_len;unsigned long max_sec_stor_addr;unsigned int max_num_sec_conf; -unsigned short max_guest_cpus; +unsigned short max_guest_cpu_id; };extern struct uv_info uv_info;
arch/s390/kernel/uv.c +1 -1
@@ -368,7 +368,7 @@ static ssize_t uv_query_max_guest_cpus(struct kobject *kobj, struct kobj_attribute *attr, char *page) { return scnprintf(page, PAGE_SIZE, "%d\n", - uv_info.max_guest_cpus); + uv_info.max_guest_cpu_id + 1); } static struct kobj_attribute uv_query_max_guest_cpus_attr =
Greg Kroah-Hartman
maintainerPATCH 30/142 s390/vfio-ap: No need to disable IRQ after queue reset
In reply to Greg Kroah-HartmanFrom: Tony Krowiak <[email protected]>
commit 6c12a6384e0c0b96debd88b24028e58f2ebd417b upstream.
The queues assigned to a matrix mediated device are currently reset when:
* The VFIO_DEVICE_RESET ioctl is invoked
* The mdev fd is closed by userspace (QEMU)
* The mdev is removed from sysfs.
Immediately after the reset of a queue, a call is made to disable interrupts for the queue. This is entirely unnecessary because the reset of a queue disables interrupts, so this will be removed.
Furthermore, vfio_ap_irq_disable() does an unconditional PQAP/AQIC which can result in a specification exception (when the corresponding facility is not available), so this is actually a bugfix.
--- drivers/s390/crypto/vfio_ap_drv.c | 6 -- drivers/s390/crypto/vfio_ap_ops.c | 100 +++++++++++++++++++++------------- drivers/s390/crypto/vfio_ap_private.h | 12 ++-- 3 files changed, 69 insertions(+), 49 deletions(-)
drivers/s390/crypto/vfio_ap_drv.c +1 -5
@@ -71,15 +71,11 @@ static int vfio_ap_queue_dev_probe(strucstatic void vfio_ap_queue_dev_remove (struct ap_device *apdev) {struct vfio_ap_queue *q; -int apid, apqi;mutex_lock (&matrix_dev->lock); q =dev_get_drvdata (&apdev->device); +vfio_ap_mdev_reset_queue (q,1 );dev_set_drvdata (&apdev->device,NULL ); - apid =AP_QID_CARD (q->apqn); - apqi =AP_QID_QUEUE (q->apqn); -vfio_ap_mdev_reset_queue (apid, apqi,1 ); -vfio_ap_irq_disable (q);kfree (q);mutex_unlock (&matrix_dev->lock); }
drivers/s390/crypto/vfio_ap_ops.c +62 -38
176 lines not on this page · raw message
drivers/s390/crypto/vfio_ap_private.h +6 -6
@@ -88,11 +88,6 @@ struct ap_matrix_mdev {struct mdev_device *mdev; }; -extern int vfio_ap_mdev_register (void ); -extern void vfio_ap_mdev_unregister (void ); -int vfio_ap_mdev_reset_queue (unsigned int apid,unsigned int apqi, -unsigned int retry); -struct vfio_ap_queue {struct ap_matrix_mdev *matrix_mdev;unsigned long saved_pfn;
@@ -100,5 +95,10 @@ struct vfio_ap_queue {#define VFIO_AP_ISC_INVALID 0xff unsigned char saved_isc; }; -struct ap_queue_status vfio_ap_irq_disable (struct vfio_ap_queue *q); + +int vfio_ap_mdev_register (void ); +void vfio_ap_mdev_unregister (void ); +int vfio_ap_mdev_reset_queue (struct vfio_ap_queue *q, +unsigned int retry); +#endif /* _VFIO_AP_PRIVATE_H_ */
Greg Kroah-Hartman
maintainerPATCH 31/142 PM: hibernate: flush swap writer after marking
In reply to Greg Kroah-HartmanFrom: Laurent Badel <[email protected]>
commit fef9c8d28e28a808274a18fbd8cc2685817fd62a upstream.
Flush the swap writer after, not before, marking the files, to ensure the signature is properly written.
--- kernel/power/swap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/power/swap.c +1 -1
@@ -497,10 +497,10 @@ static int swap_writer_finish(struct swa unsigned int flags, int error) {if (!error) { -flush_swap_writer (handle);pr_info ("S" ); error =mark_swapfiles (handle, flags);pr_cont ("|\n" ); +flush_swap_writer (handle); }if (error)
Greg Kroah-Hartman
maintainerPATCH 40/142 KVM: x86/pmu: Fix UBSAN shift-out-of-bounds warning in intel_pmu_refresh()
In reply to Greg Kroah-HartmanFrom: Like Xu <[email protected]>
commit e61ab2a320c3dfd6209efe18a575979e07470597 upstream.
Since we know vPMU will not work properly when (1) the guest bit_width(s) of the [gp|fixed] counters are greater than the host ones, or (2) guest requested architectural events exceeds the range supported by the host, so we can setup a smaller left shift value and refresh the guest cpuid entry, thus fixing the following UBSAN shift-out-of-bounds warning:
shift exponent 197 is too large for 64-bit type 'long long unsigned int'
Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x107/0x163 lib/dump_stack.c:120 ubsan_epilogue+0xb/0x5a lib/ubsan.c:148 __ubsan_handle_shift_out_of_bounds.cold+0xb1/0x181 lib/ubsan.c:395 intel_pmu_refresh.cold+0x75/0x99 arch/x86/kvm/vmx/pmu_intel.c:348 kvm_vcpu_after_set_cpuid+0x65a/0xf80 arch/x86/kvm/cpuid.c:177 kvm_vcpu_ioctl_set_cpuid2+0x160/0x440 arch/x86/kvm/cpuid.c:308 kvm_arch_vcpu_ioctl+0x11b6/0x2d70 arch/x86/kvm/x86.c:4709 kvm_vcpu_ioctl+0x7b9/0xdb0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3386 vfs_ioctl fs/ioctl.c:48 [inline] __do_sys_ioctl fs/ioctl.c:753 [inline] __se_sys_ioctl fs/ioctl.c:739 [inline] __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:739 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9
Message-Id: <[email protected]>
--- arch/x86/kvm/vmx/pmu_intel.c | 4 ++++ 1 file changed, 4 insertions(+)
arch/x86/kvm/vmx/pmu_intel.c +4 -0
@@ -345,7 +345,9 @@ static void intel_pmu_refresh(struct kvm pmu->nr_arch_gp_counters =min_t (int, eax.split.num_counters, x86_pmu.num_counters_gp); + eax.split.bit_width =min_t (int, eax.split.bit_width, x86_pmu.bit_width_gp); pmu->counter_bitmask[KVM_PMC_GP ] = ((u64 )1 << eax.split.bit_width) -1 ; + eax.split.mask_length =min_t (int, eax.split.mask_length, x86_pmu.events_mask_len); pmu->available_event_types = ~entry->ebx & ((1ull << eax.split.mask_length) -1 );
@@ -355,6 +357,8 @@ static void intel_pmu_refresh(struct kvm pmu->nr_arch_fixed_counters =min_t (int, edx.split.num_counters_fixed, x86_pmu.num_counters_fixed); + edx.split.bit_width_fixed =min_t (int, + edx.split.bit_width_fixed, x86_pmu.bit_width_fixed); pmu->counter_bitmask[KVM_PMC_FIXED ] = ((u64 )1 << edx.split.bit_width_fixed) -1 ; }
Greg Kroah-Hartman
maintainerPATCH 50/142 arm64: dts: broadcom: Fix USB DMA address translation for Stingray
In reply to Greg Kroah-HartmanFrom: Bharat Gooty <[email protected]>
commit da8ee66f56071aef0b5b0de41d2c2a97fa30c8a1 upstream.
Add a non-empty dma-ranges so that DMA address translation happens.
--- arch/arm64/boot/dts/broadcom/stingray/stingray-usb.dtsi | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/broadcom/stingray/stingray-usb.dtsi +6 -1
@@ -4,11 +4,16 @@ */ usb { compatible = "simple-bus"; - dma-ranges; #address-cells = <2>; #size-cells = <2>; ranges = <0x0 0x0 0x0 0x68500000 0x0 0x00400000>; + /* + * Internally, USB bus to the interconnect can only address up + * to 40-bit + */ + dma-ranges = <0 0 0 0 0x100 0x0>; + usbphy0: usb-phy@0 { compatible = "brcm,sr-usb-combo-phy"; reg = <0x0 0x00000000 0x0 0x100>;
Greg Kroah-Hartman
maintainerPATCH 5/142 ACPI: thermal: Do not call acpi_thermal_check() directly
In reply to Greg Kroah-HartmanFrom: Rafael J. Wysocki <[email protected]>
commit 81b704d3e4674e09781d331df73d76675d5ad8cb upstream.
Calling acpi_thermal_check() from acpi_thermal_notify() directly is problematic if _TMP triggers Notify () on the thermal zone for which it has been evaluated (which happens on some systems), because it causes a new acpi_thermal_notify() invocation to be queued up every time and if that takes place too often, an indefinite number of pending work items may accumulate in kacpi_notify_wq over time.
Besides, it is not really useful to queue up a new invocation of acpi_thermal_check() if one of them is pending already.
For these reasons, rework acpi_thermal_notify() to queue up a thermal check instead of calling acpi_thermal_check() directly and only allow one thermal check to be pending at a time. Moreover, only allow one acpi_thermal_check_fn() instance at a time to run thermal_zone_device_update() for one thermal zone and make it return early if it sees other instances running for the same thermal zone.
While at it, fold acpi_thermal_check() into acpi_thermal_check_fn(), as it is only called from there after the other changes made here.
[This issue appears to have been exposed by commit 6d25be5782e4
("sched/core, workqueues: Distangle worker accounting from rq lock"), but it is unclear why it was not visible earlier.]
--- drivers/acpi/thermal.c | 46 +++++++++++++++++++++++++++++++++------------- 1 file changed, 33 insertions(+), 13 deletions(-)
drivers/acpi/thermal.c +33 -13
@@ -174,6 +174,8 @@ struct acpi_thermal {struct thermal_zone_device *thermal_zone;int kelvin_offset;/* in millidegrees */ struct work_struct thermal_check_work; +struct mutex thermal_check_lock; +refcount_t thermal_check_count; };/* --------------------------------------------------------------------------
@@ -495,14 +497,6 @@ static int acpi_thermal_get_trip_points(return 0 ; } -static void acpi_thermal_check (void *data) -{ -struct acpi_thermal *tz = data; - -thermal_zone_device_update (tz->thermal_zone, -THERMAL_EVENT_UNSPECIFIED ); -} -/* sys I/F for generic thermal sysfs support */ static int thermal_get_temp (struct thermal_zone_device *thermal,int *temp)
@@ -900,6 +894,12 @@ static void acpi_thermal_unregister_therDriver Interface -------------------------------------------------------------------------- */ +static void acpi_queue_thermal_check (struct acpi_thermal *tz) +{ +if (!work_pending (&tz->thermal_check_work)) +queue_work (acpi_thermal_pm_queue, &tz->thermal_check_work); +} +static void acpi_thermal_notify (struct acpi_device *device,u32 event) {struct acpi_thermal *tz =acpi_driver_data (device);
@@ -910,17 +910,17 @@ static void acpi_thermal_notify(struct aswitch (event) {case ACPI_THERMAL_NOTIFY_TEMPERATURE : -acpi_thermal_check (tz); +acpi_queue_thermal_check (tz);break ;case ACPI_THERMAL_NOTIFY_THRESHOLDS :acpi_thermal_trips_update (tz,ACPI_TRIPS_REFRESH_THRESHOLDS ); -acpi_thermal_check (tz); +acpi_queue_thermal_check (tz);acpi_bus_generate_netlink_event (device->pnp.device_class,dev_name (&device->dev), event,0 );break ;case ACPI_THERMAL_NOTIFY_DEVICES :acpi_thermal_trips_update (tz,ACPI_TRIPS_REFRESH_DEVICES ); -acpi_thermal_check (tz); +acpi_queue_thermal_check (tz);acpi_bus_generate_netlink_event (device->pnp.device_class,dev_name (&device->dev), event,0 );break ;
@@ -1020,7 +1020,25 @@ static void acpi_thermal_check_fn(struct { struct acpi_thermal *tz = container_of(work, struct acpi_thermal, thermal_check_work); -acpi_thermal_check (tz); + +/* +* In general, it is not sufficient to check the pending bit, because +* subsequent instances of this function may be queued after one of them +* has started running (e.g. if _TMP sleeps). Avoid bailing out if just +* one of them is running, though, because it may have done the actual +* check some time ago, so allow at least one of them to block on the +* mutex while another one is running the update. +*/ +if (!refcount_dec_not_one (&tz->thermal_check_count)) +return ; + +mutex_lock (&tz->thermal_check_lock); + +thermal_zone_device_update (tz->thermal_zone,THERMAL_EVENT_UNSPECIFIED ); + +refcount_inc (&tz->thermal_check_count); + +mutex_unlock (&tz->thermal_check_lock); }static int acpi_thermal_add (struct acpi_device *device)
@@ -1052,6 +1070,8 @@ static int acpi_thermal_add(struct acpi_if (result) goto free_memory; +refcount_set (&tz->thermal_check_count,3 ); +mutex_init (&tz->thermal_check_lock);INIT_WORK (&tz->thermal_check_work, acpi_thermal_check_fn); pr_info(PREFIX "%s [%s] (%ld C)\n", acpi_device_name(device),
@@ -1117,7 +1137,7 @@ static int acpi_thermal_resume(struct de tz->state.active |= tz->trips.active[i].flags.enabled; } -queue_work (acpi_thermal_pm_queue, &tz->thermal_check_work); +acpi_queue_thermal_check (tz);return AE_OK ; }
Greg Kroah-Hartman
maintainerPATCH 51/142 mt7601u: fix kernel crash unplugging the device
In reply to Greg Kroah-HartmanFrom: Lorenzo Bianconi <[email protected]>
commit 0acb20a5438c36e0cf2b8bf255f314b59fcca6ef upstream.
The following crash log can occur unplugging the usb dongle since, after the urb poison in mt7601u_free_tx_queue(), usb_submit_urb() will always fail resulting in a skb kfree while the skb has been already queued.
Fix the issue enqueuing the skb only if usb_submit_urb() succeed.
Hardware name: Hewlett-Packard 500-539ng/2B2C, BIOS 80.06 04/01/2015 Workqueue: usb_hub_wq hub_event RIP: 0010:skb_trim+0x2c/0x30 RSP: 0000:ffffb4c88005bba8 EFLAGS: 00010206 RAX: 000000004ad483ee RBX: ffff9a236625dee0 RCX: 000000000000662f RDX: 000000000000000c RSI: 0000000000000000 RDI: ffff9a2343179300 RBP: ffff9a2343179300 R08: 0000000000000001 R09: 0000000000000000 R10: ffff9a23748f7840 R11: 0000000000000001 R12: ffff9a236625e4d4 R13: ffff9a236625dee0 R14: 0000000000001080 R15: 0000000000000008 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fd410a34ef8 CR3: 00000001416ee001 CR4: 00000000001706f0 Call Trace: mt7601u_tx_status+0x3e/0xa0 [mt7601u] mt7601u_dma_cleanup+0xca/0x110 [mt7601u] mt7601u_cleanup+0x22/0x30 [mt7601u] mt7601u_disconnect+0x22/0x60 [mt7601u] usb_unbind_interface+0x8a/0x270 ? kernfs_find_ns+0x35/0xd0 __device_release_driver+0x17a/0x230 device_release_driver+0x24/0x30 bus_remove_device+0xdb/0x140 device_del+0x18b/0x430 ? kobject_put+0x98/0x1d0 usb_disable_device+0xc6/0x1f0 usb_disconnect.cold+0x7e/0x20a hub_event+0xbf3/0x1870 process_one_work+0x1b6/0x350 worker_thread+0x53/0x3e0 ? process_one_work+0x350/0x350 kthread+0x11b/0x140 ? __kthread_bind_mask+0x60/0x60 ret_from_fork+0x22/0x30
--- drivers/net/wireless/mediatek/mt7601u/dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt7601u/dma.c +1 -1
@@ -310,7 +310,6 @@ static int mt7601u_dma_submit_tx(struct } e = &q->e[q->end]; - e->skb = skb;usb_fill_bulk_urb (e->urb, usb_dev, snd_pipe, skb->data, skb->len, mt7601u_complete_tx, q); ret =usb_submit_urb (e->urb,GFP_ATOMIC );
@@ -328,6 +327,7 @@ static int mt7601u_dma_submit_tx(struct q->end = (q->end +1 ) % q->entries; q->used++; + e->skb = skb;if (q->used >= q->entries)ieee80211_stop_queue (dev->hw,skb_get_queue_mapping (skb));
Greg Kroah-Hartman
maintainerPATCH 52/142 mt76: mt7663s: fix rx buffer refcounting
In reply to Greg Kroah-HartmanFrom: Lorenzo Bianconi <[email protected]>
commit 952de419b6179ad1424f512d52ec7122662fdf63 upstream.
Similar to mt7601u driver, fix erroneous rx page refcounting
--- drivers/net/wireless/mediatek/mt76/mt7615/sdio_txrx.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7615/sdio_txrx.c +4 -5
@@ -85,7 +85,7 @@ static int mt7663s_rx_run_queue(struct m {struct mt76_queue *q = &dev->q_rx[qid];struct mt76_sdio *sdio = &dev->sdio; -int len =0 , err, i, order; +int len =0 , err, i;struct page *page;u8 *buf;
@@ -98,8 +98,7 @@ static int mt7663s_rx_run_queue(struct mif (len > sdio->func->cur_blksize) len =roundup (len, sdio->func->cur_blksize); - order =get_order (len); - page =__dev_alloc_pages (GFP_KERNEL , order); + page =__dev_alloc_pages (GFP_KERNEL ,get_order (len));if (!page)return -ENOMEM ;
@@ -111,7 +110,7 @@ static int mt7663s_rx_run_queue(struct mif (err <0 ) {dev_err (dev->dev,"sdio read data failed:%d\n" , err); -__free_pages (page, order); +put_page (page);return err; }
@@ -128,7 +127,7 @@ static int mt7663s_rx_run_queue(struct mif (q->queued + i +1 == q->ndesc)break ; } -__free_pages (page, order); +put_page (page);spin_lock_bh (&q->lock); q->head = (q->head + i) % q->ndesc;
Greg Kroah-Hartman
maintainerPATCH 49/142 leds: trigger: fix potential deadlock with libata
In reply to Greg Kroah-HartmanFrom: Andrea Righi <[email protected]>
commit 27af8e2c90fba242460b01fa020e6e19ed68c495 upstream.
We have the following potential deadlock condition:
========================================================
WARNING: possible irq lock inversion dependency detected 5.10.0-rc2+ #25 Not tainted
--------------------------------------------------------
swapper/3/0 just changed the state of lock:
ffff8880063bd618 (&host->lock){-...}-{2:2}, at: ata_bmdma_interrupt+0x27/0x200 but this lock took another, HARDIRQ-READ-unsafe lock in the past:
(&trig->leddev_list_lock){.+.?}-{2:2}
and interrupts could create inverse lock ordering between them.
other info that might help us debug this:
Possible interrupt unsafe locking scenario:
CPU0 CPU1
---- ----
lock(&trig->leddev_list_lock);
local_irq_disable();
lock(&host->lock);
lock(&trig->leddev_list_lock);
<Interrupt>
lock(&host->lock);*** DEADLOCK ***
no locks held by swapper/3/0.
the shortest dependencies between 2nd lock and 1st lock:
-> (&trig->leddev_list_lock){.+.?}-{2:2} ops: 46 {
HARDIRQ-ON-R at:
lock_acquire+0x15f/0x420
_raw_read_lock+0x42/0x90
led_trigger_event+0x2b/0x70
rfkill_global_led_trigger_worker+0x94/0xb0
process_one_work+0x240/0x560
worker_thread+0x58/0x3d0
kthread+0x151/0x170
ret_from_fork+0x1f/0x30
IN-SOFTIRQ-R at:
lock_acquire+0x15f/0x420
_raw_read_lock+0x42/0x90
led_trigger_event+0x2b/0x70
kbd_bh+0x9e/0xc0
tasklet_action_common.constprop.0+0xe9/0x100
tasklet_action+0x22/0x30
__do_softirq+0xcc/0x46d
run_ksoftirqd+0x3f/0x70
smpboot_thread_fn+0x116/0x1f0
kthread+0x151/0x170
ret_from_fork+0x1f/0x30
SOFTIRQ-ON-R at:
lock_acquire+0x15f/0x420
_raw_read_lock+0x42/0x90
led_trigger_event+0x2b/0x70
rfkill_global_led_trigger_worker+0x94/0xb0
process_one_work+0x240/0x560
worker_thread+0x58/0x3d0
kthread+0x151/0x170
ret_from_fork+0x1f/0x30
INITIAL READ USE at:
lock_acquire+0x15f/0x420
_raw_read_lock+0x42/0x90
led_trigger_event+0x2b/0x70
rfkill_global_led_trigger_worker+0x94/0xb0
process_one_work+0x240/0x560
worker_thread+0x58/0x3d0
kthread+0x151/0x170
ret_from_fork+0x1f/0x30
}
... key at: [<ffffffff83da4c00>] __key.0+0x0/0x10
... acquired at:
_raw_read_lock+0x42/0x90
led_trigger_blink_oneshot+0x3b/0x90
ledtrig_disk_activity+0x3c/0xa0
ata_qc_complete+0x26/0x450
ata_do_link_abort+0xa3/0xe0
ata_port_freeze+0x2e/0x40
ata_hsm_qc_complete+0x94/0xa0
ata_sff_hsm_move+0x177/0x7a0
ata_sff_pio_task+0xc7/0x1b0
process_one_work+0x240/0x560
worker_thread+0x58/0x3d0
kthread+0x151/0x170
ret_from_fork+0x1f/0x30 -> (&host->lock){-...}-{2:2} ops: 69 {
IN-HARDIRQ-W at:
lock_acquire+0x15f/0x420
_raw_spin_lock_irqsave+0x52/0xa0
ata_bmdma_interrupt+0x27/0x200
__handle_irq_event_percpu+0xd5/0x2b0
handle_irq_event+0x57/0xb0
handle_edge_irq+0x8c/0x230
asm_call_irq_on_stack+0xf/0x20
common_interrupt+0x100/0x1c0
asm_common_interrupt+0x1e/0x40
native_safe_halt+0xe/0x10
arch_cpu_idle+0x15/0x20
default_idle_call+0x59/0x1c0
do_idle+0x22c/0x2c0
cpu_startup_entry+0x20/0x30
start_secondary+0x11d/0x150
secondary_startup_64_no_verify+0xa6/0xab
INITIAL USE at:
lock_acquire+0x15f/0x420
_raw_spin_lock_irqsave+0x52/0xa0
ata_dev_init+0x54/0xe0
ata_link_init+0x8b/0xd0
ata_port_alloc+0x1f1/0x210
ata_host_alloc+0xf1/0x130
ata_host_alloc_pinfo+0x14/0xb0
ata_pci_sff_prepare_host+0x41/0xa0
ata_pci_bmdma_prepare_host+0x14/0x30
piix_init_one+0x21f/0x600
local_pci_probe+0x48/0x80
pci_device_probe+0x105/0x1c0
really_probe+0x221/0x490
driver_probe_device+0xe9/0x160
device_driver_attach+0xb2/0xc0
__driver_attach+0x91/0x150
bus_for_each_dev+0x81/0xc0
driver_attach+0x1e/0x20
bus_add_driver+0x138/0x1f0
driver_register+0x91/0xf0
__pci_register_driver+0x73/0x80
piix_init+0x1e/0x2e
do_one_initcall+0x5f/0x2d0
kernel_init_freeable+0x26f/0x2cf
kernel_init+0xe/0x113
ret_from_fork+0x1f/0x30
}
... key at: [<ffffffff83d9fdc0>] __key.6+0x0/0x10
... acquired at:
__lock_acquire+0x9da/0x2370
lock_acquire+0x15f/0x420
_raw_spin_lock_irqsave+0x52/0xa0
ata_bmdma_interrupt+0x27/0x200
__handle_irq_event_percpu+0xd5/0x2b0
handle_irq_event+0x57/0xb0
handle_edge_irq+0x8c/0x230
asm_call_irq_on_stack+0xf/0x20
common_interrupt+0x100/0x1c0
asm_common_interrupt+0x1e/0x40
native_safe_halt+0xe/0x10
arch_cpu_idle+0x15/0x20
default_idle_call+0x59/0x1c0
do_idle+0x22c/0x2c0
cpu_startup_entry+0x20/0x30
start_secondary+0x11d/0x150
secondary_startup_64_no_verify+0xa6/0xabThis lockdep splat is reported after:
commit e918188611f0 ("locking: More accurate annotations for read_lock()")
To clarify:
- read-locks are recursive only in interrupt context (when in_interrupt() returns true)
- after acquiring host->lock in CPU1, another cpu (i.e. CPU2) may call write_lock(&trig->leddev_list_lock) that would be blocked by CPU0 that holds trig->leddev_list_lock in read-mode
- when CPU1 (ata_ac_complete()) tries to read-lock trig->leddev_list_lock, it would be blocked by the write-lock waiter on CPU2 (because we are not in interrupt context, so the read-lock is not recursive)
- at this point if an interrupt happens on CPU0 and ata_bmdma_interrupt() is executed it will try to acquire host->lock, that is held by CPU1, that is currently blocked by CPU2, so:
* CPU0 blocked by CPU1
* CPU1 blocked by CPU2
* CPU2 blocked by CPU0
*** DEADLOCK ***
The deadlock scenario is better represented by the following schema (thanks to Boqun Feng <[email protected]> for the schema and the detailed explanation of the deadlock condition):
CPU 0: CPU 1: CPU 2:
----- ----- -----
led_trigger_event():
read_lock(&trig->leddev_list_lock);
<workqueue>
ata_hsm_qc_complete():
spin_lock_irqsave(&host->lock);
write_lock(&trig->leddev_list_lock);
ata_port_freeze():
ata_do_link_abort():
ata_qc_complete():
ledtrig_disk_activity():
led_trigger_blink_oneshot():
read_lock(&trig->leddev_list_lock);
// ^ not in in_interrupt() context, so could get blocked by CPU 2
<interrupt>
ata_bmdma_interrupt():
spin_lock_irqsave(&host->lock);Fix by using read_lock_irqsave/irqrestore() in led_trigger_event(), so that no interrupt can happen in between, preventing the deadlock condition.
Apply the same change to led_trigger_blink_setup() as well, since the same deadlock scenario can also happen in power_supply_update_bat_leds() -> led_trigger_blink() -> led_trigger_blink_setup() (workqueue context), and potentially prevent other similar usages.
--- drivers/leds/led-triggers.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/leds/led-triggers.c +6 -4
@@ -378,14 +378,15 @@ void led_trigger_event(struct led_trigge enum led_brightness brightness) {struct led_classdev *led_cdev; +unsigned long flags;if (!trig)return ; -read_lock (&trig->leddev_list_lock); +read_lock_irqsave (&trig->leddev_list_lock, flags);list_for_each_entry (led_cdev, &trig->led_cdevs, trig_list)led_set_brightness (led_cdev, brightness); -read_unlock (&trig->leddev_list_lock); +read_unlock_irqrestore (&trig->leddev_list_lock, flags); }EXPORT_SYMBOL_GPL (led_trigger_event);
@@ -396,11 +397,12 @@ static void led_trigger_blink_setup(stru int invert) {struct led_classdev *led_cdev; +unsigned long flags;if (!trig)return ; -read_lock (&trig->leddev_list_lock); +read_lock_irqsave (&trig->leddev_list_lock, flags);list_for_each_entry (led_cdev, &trig->led_cdevs, trig_list) {if (oneshot) led_blink_set_oneshot(led_cdev, delay_on, delay_off,
@@ -408,7 +410,7 @@ static void led_trigger_blink_setup(struelse led_blink_set (led_cdev, delay_on, delay_off); } -read_unlock (&trig->leddev_list_lock); +read_unlock_irqrestore (&trig->leddev_list_lock, flags); } void led_trigger_blink(struct led_trigger *trig,
Greg Kroah-Hartman
maintainerPATCH 53/142 mt7601u: fix rx buffer refcounting
In reply to Greg Kroah-HartmanFrom: Lorenzo Bianconi <[email protected]>
commit d24c790577ef01bfa01da2b131313a38c843a634 upstream.
Fix the following crash due to erroneous page refcounting:
[ 32.445919] BUG: Bad page state in process swapper/1 pfn:11f65a [ 32.447409] page:00000000938f0632 refcount:0 mapcount:-128 mapping:0000000000000000 index:0x0 pfn:0x11f65a [ 32.449605] flags: 0x8000000000000000() [ 32.450421] raw: 8000000000000000 ffffffff825b0148 ffffea00045ae988 0000000000000000 [ 32.451795] raw: 0000000000000000 0000000000000001 00000000ffffff7f 0000000000000000 [ 32.452999] page dumped because: nonzero mapcount [ 32.453888] Modules linked in: [ 32.454492] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 5.11.0-rc2+ #1976 [ 32.455695] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-1.fc33 04/01/2014 [ 32.457157] Call Trace: [ 32.457636] <IRQ> [ 32.457993] dump_stack+0x77/0x97 [ 32.458576] bad_page.cold+0x65/0x96 [ 32.459198] get_page_from_freelist+0x46a/0x11f0 [ 32.460008] __alloc_pages_nodemask+0x10a/0x2b0 [ 32.460794] mt7601u_rx_tasklet+0x651/0x720 [ 32.461505] tasklet_action_common.constprop.0+0x6b/0xd0 [ 32.462343] __do_softirq+0x152/0x46c [ 32.462928] asm_call_irq_on_stack+0x12/0x20 [ 32.463610] </IRQ> [ 32.463953] do_softirq_own_stack+0x5b/0x70 [ 32.464582] irq_exit_rcu+0x9f/0xe0 [ 32.465028] common_interrupt+0xae/0x1a0 [ 32.465536] asm_common_interrupt+0x1e/0x40 [ 32.466071] RIP: 0010:default_idle+0x18/0x20 [ 32.468981] RSP: 0018:ffffc90000077f00 EFLAGS: 00000246 [ 32.469648] RAX: 0000000000000000 RBX: 0000000000000001 RCX: 0000000000000000 [ 32.470550] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff81aac3dd [ 32.471463] RBP: ffff88810022ab00 R08: 0000000000000001 R09: 0000000000000001 [ 32.472335] R10: 0000000000000046 R11: 0000000000005aa0 R12: 0000000000000000 [ 32.473235] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 32.474139] ? default_idle_call+0x4d/0x200 [ 32.474681] default_idle_call+0x74/0x200 [ 32.475192] do_idle+0x1d5/0x250 [ 32.475612] cpu_startup_entry+0x19/0x20 [ 32.476114] secondary_startup_64_no_verify+0xb0/0xbb [ 32.476765] Disabling lock debugging due to kernel taint
--- drivers/net/wireless/mediatek/mt7601u/dma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/wireless/mediatek/mt7601u/dma.c +1 -2
@@ -152,8 +152,7 @@ mt7601u_rx_process_entry(struct mt7601u_if (new_p) {/* we have one extra ref from the allocator */ -__free_pages (e->p,MT_RX_ORDER ); - +put_page (e->p); e->p = new_p; } }
Greg Kroah-Hartman
maintainerPATCH 55/142 drm/i915/gt: Clear CACHE_MODE prior to clearing residuals
In reply to Greg Kroah-HartmanFrom: Chris Wilson <[email protected]>
commit ef99a60ffd9b918354e038bc5e61f007ff7e901d upstream.
Since we do a bare context switch with no restore, the clear residual kernel runs on dirty state, and we must be careful to avoid executing with bad state from context registers inherited from a malicious client.
Testcase: igt/gem_ctx_isolation # ivb,vlv
--- drivers/gpu/drm/i915/gt/gen7_renderclear.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
drivers/gpu/drm/i915/gt/gen7_renderclear.c +12 -0
@@ -390,6 +390,16 @@ static void emit_batch(struct i915_vma * &cb_kernel_ivb, desc_count); +/* Reset inherited context registers */ +gen7_emit_pipeline_invalidate (&cmds); +batch_add (&cmds,MI_LOAD_REGISTER_IMM (2 )); +batch_add (&cmds,i915_mmio_reg_offset (CACHE_MODE_0_GEN7 )); +batch_add (&cmds,0xffff0000 ); +batch_add (&cmds,i915_mmio_reg_offset (CACHE_MODE_1 )); +batch_add (&cmds,0xffff0000 |PIXEL_SUBSPAN_COLLECT_OPT_DISABLE ); +gen7_emit_pipeline_flush (&cmds); + +/* Switch to the media pipeline and our base address */ gen7_emit_pipeline_invalidate (&cmds);batch_add (&cmds,PIPELINE_SELECT |PIPELINE_SELECT_MEDIA );batch_add (&cmds,MI_NOOP );
@@ -399,9 +409,11 @@ static void emit_batch(struct i915_vma *gen7_emit_state_base_address (&cmds, descriptors);gen7_emit_pipeline_invalidate (&cmds); +/* Set the clear-residual kernel state */ gen7_emit_vfe_state (&cmds, bv, urb_size -1 ,0 ,0 );gen7_emit_interface_descriptor_load (&cmds, descriptors, desc_count); +/* Execute the kernel on all HW threads */ for (i =0 ; i <num_primitives (bv); i++)gen7_emit_media_object (&cmds, i);
Greg Kroah-Hartman
maintainerPATCH 54/142 iwlwifi: Fix IWL_SUBDEVICE_NO_160 macro to use the correct bit.
In reply to Greg Kroah-HartmanFrom: Matti Gottlieb <[email protected]>
commit 4886460c4d1576e85b12601b8b328278a483df86 upstream.
The bit that indicates if the device supports 160MHZ is bit #9. The macro checks bit #8.
Fix IWL_SUBDEVICE_NO_160 macro to use the correct bit.
--- drivers/net/wireless/intel/iwlwifi/iwl-config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/intel/iwlwifi/iwl-config.h +1 -1
@@ -498,7 +498,7 @@ struct iwl_cfg {#define IWL_CFG_CORES_BT_GNSS 0x5#define IWL_SUBDEVICE_RF_ID (subdevice) ((u16)((subdevice) & 0x00F0) >> 4) -#define IWL_SUBDEVICE_NO_160 (subdevice) ((u16)((subdevice) & 0x0100) >> 9) +#define IWL_SUBDEVICE_NO_160 (subdevice) ((u16)((subdevice) & 0x0200) >> 9)#define IWL_SUBDEVICE_CORES (subdevice) ((u16)((subdevice) & 0x1C00) >> 10)struct iwl_dev_info {
Greg Kroah-Hartman
maintainerPATCH 57/142 net/mlx5e: Fix IPSEC stats
In reply to Greg Kroah-HartmanFrom: Maxim Mikityanskiy <[email protected]>
commit 45c9a30835d84009dfe711f5c8836720767c286e upstream.
When IPSEC offload isn't active, the number of stats is not zero, but the strings are not filled, leading to exposing stats with empty names. Fix this by using the same condition for NUM_STATS and FILL_STRS.
--- drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_stats.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_stats.c +2 -2
@@ -76,7 +76,7 @@ static const struct counter_desc mlx5e_istatic MLX5E_DECLARE_STATS_GRP_OP_NUM_STATS (ipsec_sw) { -return NUM_IPSEC_SW_COUNTERS ; +return priv->ipsec ?NUM_IPSEC_SW_COUNTERS :0 ; }static inline MLX5E_DECLARE_STATS_GRP_OP_UPDATE_STATS (ipsec_sw) {}
@@ -105,7 +105,7 @@ static MLX5E_DECLARE_STATS_GRP_OP_FILL_Sstatic MLX5E_DECLARE_STATS_GRP_OP_NUM_STATS (ipsec_hw) { -return (mlx5_fpga_ipsec_device_caps (priv->mdev)) ?NUM_IPSEC_HW_COUNTERS :0 ; +return (priv->ipsec &&mlx5_fpga_ipsec_device_caps (priv->mdev)) ?NUM_IPSEC_HW_COUNTERS :0 ; }static MLX5E_DECLARE_STATS_GRP_OP_UPDATE_STATS (ipsec_hw)
Greg Kroah-Hartman
maintainerPATCH 59/142 drm/nouveau/svm: fail NOUVEAU_SVM_INIT ioctl on unsupported devices
In reply to Greg Kroah-HartmanFrom: Karol Herbst <[email protected]>
commit dcd602cc5fe2803bf532d407cde24ba0b7808ff3 upstream.
Fixes a crash when trying to create a channel on e.g. Turing GPUs when NOUVEAU_SVM_INIT was called before.
--- drivers/gpu/drm/nouveau/nouveau_svm.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpu/drm/nouveau/nouveau_svm.c +4 -0
@@ -315,6 +315,10 @@ nouveau_svmm_init(struct drm_device *devstruct drm_nouveau_svm_init *args = data;int ret; +/* We need to fail if svm is disabled */ +if (!cli->drm->svm) +return -ENOSYS ; +/* Allocate tracking for SVM-enabled VMM. */ if (!(svmm =kzalloc (sizeof (*svmm),GFP_KERNEL )))return -ENOMEM ;
Greg Kroah-Hartman
maintainerPATCH 60/142 drm/vc4: Correct lbm size and calculation
In reply to Greg Kroah-HartmanFrom: Dom Cobley <[email protected]>
commit 78e5330329ee206d6aa4593a90320fd837f7966e upstream.
LBM base address is measured in units of pixels per cycle. That is 4 for 2711 (hvs5) and 2 for 2708.
We are wasting 75% of lbm by indexing without the scaling. But we were also using too high a size for the lbm resulting in partial corruption (right hand side) of vertically scaled images, usually at 4K or lower resolutions with more layers.
The physical RAM of LBM on 2711 is 8 * 1920 * 16 * 12-bit (pixels are stored 12-bits per component regardless of format).
The LBM address indexes work in units of pixels per clock, so for 4 pixels per clock that means we have 32 * 1920 = 60K
--- drivers/gpu/drm/vc4/vc4_hvs.c | 8 ++++---- drivers/gpu/drm/vc4/vc4_plane.c | 7 ++++++- 2 files changed, 10 insertions(+), 5 deletions(-)
drivers/gpu/drm/vc4/vc4_hvs.c +4 -4
@@ -618,11 +618,11 @@ static int vc4_hvs_bind(struct device *d* for now we just allocate globally. */ if (!hvs->hvs5) -/* 96kB */ -drm_mm_init (&hvs->lbm_mm,0 ,96 *1024 ); +/* 48k words of 2x12-bit pixels */ +drm_mm_init (&hvs->lbm_mm,0 ,48 *1024 );else -/* 70k words */ -drm_mm_init (&hvs->lbm_mm,0 ,70 *2 *1024 ); +/* 60k words of 4x12-bit pixels */ +drm_mm_init (&hvs->lbm_mm,0 ,60 *1024 );/* Upload filter kernels. We only have the one for now, so we * keep it around for the lifetime of the driver.
drivers/gpu/drm/vc4/vc4_plane.c +6 -1
@@ -437,6 +437,7 @@ static void vc4_write_ppf(struct vc4_plastatic u32 vc4_lbm_size (struct drm_plane_state *state) {struct vc4_plane_state *vc4_state =to_vc4_plane_state (state); +struct vc4_dev *vc4 =to_vc4_dev (state->plane->dev);u32 pix_per_line;u32 lbm;
@@ -472,7 +473,11 @@ static u32 vc4_lbm_size(struct drm_plane lbm = pix_per_line *16 ; } - lbm =roundup (lbm,32 ); +/* Align it to 64 or 128 (hvs5) bytes */ + lbm =roundup (lbm, vc4->hvs->hvs5 ?128 :64 ); + +/* Each "word" of the LBM memory contains 2 or 4 (hvs5) pixels */ + lbm /= vc4->hvs->hvs5 ?4 :2 ;return lbm; }
Greg Kroah-Hartman
maintainerPATCH 63/142 drm/i915: Check for all subplatform bits
In reply to Greg Kroah-HartmanFrom: Umesh Nerlige Ramappa <[email protected]>
commit 8f6d08c9af284d74276da6681348e4673f13caea upstream.
Current code is checking only 2 bits in the subplatform, but actually 3 bits are allocated for the field. Check all 3 bits.
--- drivers/gpu/drm/i915/i915_drv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_drv.h +1 -1
@@ -1347,7 +1347,7 @@ intel_subplatform(const struct intel_run {const unsigned int pi =__platform_mask_index (info, p); -return info->platform_mask[pi] &INTEL_SUBPLATFORM_BITS ; +return info->platform_mask[pi] & ((1 <<INTEL_SUBPLATFORM_BITS ) -1 ); }static __always_inline bool
Greg Kroah-Hartman
maintainerPATCH 64/142 drm/i915/selftest: Fix potential memory leak
In reply to Greg Kroah-HartmanFrom: Pan Bian <[email protected]>
commit 3d480fe1befa0ef434f5c25199e7d45c26870555 upstream.
Object out is not released on path that no VMA instance found. The root cause is jumping to an unexpected label on the error path.
--- drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/selftests/i915_gem_gtt.c +1 -1
@@ -1880,7 +1880,7 @@ static int igt_cs_tlb(void *arg) vma =i915_vma_instance (out, vm,NULL );if (IS_ERR (vma)) { err =PTR_ERR (vma); - goto out_put_batch; + goto out_put_out; } err = i915_vma_pin(vma, 0, 0,
Greg Kroah-Hartman
maintainerPATCH 65/142 uapi: fix big endian definition of ipv6_rpl_sr_hdr
In reply to Greg Kroah-HartmanFrom: Justin Iurman <[email protected]>
commit 07d46d93c9acdfe0614071d73c415dd5f745cc6e upstream.
Following RFC 6554 [1], the current order of fields is wrong for big endian definition. Indeed, here is how the header looks like:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Next Header | Hdr Ext Len | Routing Type | Segments Left | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | CmprI | CmprE | Pad | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
This patch reorders fields so that big endian definition is now correct.
[1] https://tools.ietf.org/html/rfc6554#section-3
--- include/uapi/linux/rpl.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
include/uapi/linux/rpl.h +3 -3
@@ -28,10 +28,10 @@ struct ipv6_rpl_sr_hdr { pad:4 , reserved1:16;#elif defined(__BIG_ENDIAN_BITFIELD) - __u32 reserved:20, + __u32 cmpri:4, + cmpre:4, pad:4, - cmpri:4, - cmpre:4; + reserved:20;#else #error "Please fix <asm/byteorder.h>"#endif
Greg Kroah-Hartman
maintainerPATCH 68/142 xen-blkfront: allow discard-* nodes to be optional
In reply to Greg Kroah-HartmanFrom: Roger Pau Monne <[email protected]>
commit 0549cd67b01016b579047bce045b386202a8bcfc upstream.
This is inline with the specification described in blkif.h:
* discard-granularity: should be set to the physical block size if node is not present.
* discard-alignment, discard-secure: should be set to 0 if node not present.
This was detected as QEMU would only create the discard-granularity node but not discard-alignment, and thus the setup done in blkfront_setup_discard would fail.
Fix blkfront_setup_discard to not fail on missing nodes, and also fix blkif_set_queue_limits to set the discard granularity to the physical block size if none is specified in xenbus.
--- drivers/block/xen-blkfront.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-)
drivers/block/xen-blkfront.c +7 -13
@@ -945,7 +945,8 @@ static void blkif_set_queue_limits(strucif (info->feature_discard) {blk_queue_flag_set (QUEUE_FLAG_DISCARD , rq);blk_queue_max_discard_sectors (rq,get_capacity (gd)); - rq->limits.discard_granularity = info->discard_granularity; + rq->limits.discard_granularity = info->discard_granularity ?: + info->physical_sector_size; rq->limits.discard_alignment = info->discard_alignment;if (info->feature_secdiscard)blk_queue_flag_set (QUEUE_FLAG_SECERASE , rq);
@@ -2179,19 +2180,12 @@ static void blkfront_closing(struct blkfstatic void blkfront_setup_discard (struct blkfront_info *info) { -int err; -unsigned int discard_granularity; -unsigned int discard_alignment; - info->feature_discard =1 ; - err =xenbus_gather (XBT_NIL , info->xbdev->otherend, -"discard-granularity" ,"%u" , &discard_granularity, -"discard-alignment" ,"%u" , &discard_alignment, -NULL ); -if (!err) { - info->discard_granularity = discard_granularity; - info->discard_alignment = discard_alignment; - } + info->discard_granularity =xenbus_read_unsigned (info->xbdev->otherend, +"discard-granularity" , +0 ); + info->discard_alignment =xenbus_read_unsigned (info->xbdev->otherend, +"discard-alignment" ,0 ); info->feature_secdiscard = !!xenbus_read_unsigned (info->xbdev->otherend,"discard-secure" ,0 );
Greg Kroah-Hartman
maintainerPATCH 67/142 tee: optee: replace might_sleep with cond_resched
In reply to Greg Kroah-HartmanFrom: Rouven Czerwinski <[email protected]>
commit dcb3b06d9c34f33a249f65c08805461fb0c4325b upstream.
might_sleep() is a debugging aid and triggers rescheduling only for certain kernel configurations. Replace with an explicit check and reschedule to work for all kernel configurations. Fixes the following trace:
[ 572.945146] rcu: INFO: rcu_sched self-detected stall on CPU [ 572.949275] rcu: 0-....: (2099 ticks this GP) idle=572/1/0x40000002 softirq=7412/7412 fqs=974 [ 572.957964] (t=2100 jiffies g=10393 q=21) [ 572.962054] NMI backtrace for cpu 0 [ 572.965540] CPU: 0 PID: 165 Comm: xtest Not tainted 5.8.7 #1 [ 572.971188] Hardware name: STM32 (Device Tree Support) [ 572.976354] [<c011163c>] (unwind_backtrace) from [<c010b7f8>] (show_stack+0x10/0x14) [ 572.984080] [<c010b7f8>] (show_stack) from [<c0511e4c>] (dump_stack+0xc4/0xd8) [ 572.991300] [<c0511e4c>] (dump_stack) from [<c0519abc>] (nmi_cpu_backtrace+0x90/0xc4) [ 572.999130] [<c0519abc>] (nmi_cpu_backtrace) from [<c0519bdc>] (nmi_trigger_cpumask_backtrace+0xec/0x130) [ 573.008706] [<c0519bdc>] (nmi_trigger_cpumask_backtrace) from [<c01a5184>] (rcu_dump_cpu_stacks+0xe8/0x110) [ 573.018453] [<c01a5184>] (rcu_dump_cpu_stacks) from [<c01a4234>] (rcu_sched_clock_irq+0x7fc/0xa88) [ 573.027416] [<c01a4234>] (rcu_sched_clock_irq) from [<c01acdd0>] (update_process_times+0x30/0x8c) [ 573.036291] [<c01acdd0>] (update_process_times) from [<c01bfb90>] (tick_sched_timer+0x4c/0xa8) [ 573.044905] [<c01bfb90>] (tick_sched_timer) from [<c01adcc8>] (__hrtimer_run_queues+0x174/0x358) [ 573.053696] [<c01adcc8>] (__hrtimer_run_queues) from [<c01aea2c>] (hrtimer_interrupt+0x118/0x2bc) [ 573.062573] [<c01aea2c>] (hrtimer_interrupt) from [<c09ad664>] (arch_timer_handler_virt+0x28/0x30) [ 573.071536] [<c09ad664>] (arch_timer_handler_virt) from [<c0190f50>] (handle_percpu_devid_irq+0x8c/0x240) [ 573.081109] [<c0190f50>] (handle_percpu_devid_irq) from [<c018ab8c>] (generic_handle_irq+0x34/0x44) [ 573.090156] [<c018ab8c>] (generic_handle_irq) from [<c018b194>] (__handle_domain_irq+0x5c/0xb0) [ 573.098857] [<c018b194>] (__handle_domain_irq) from [<c052ac50>] (gic_handle_irq+0x4c/0x90) [ 573.107209] [<c052ac50>] (gic_handle_irq) from [<c0100b0c>] (__irq_svc+0x6c/0x90) [ 573.114682] Exception stack(0xd90dfcf8 to 0xd90dfd40) [ 573.119732] fce0: ffff0004 00000000 [ 573.127917] fd00: 00000000 00000000 00000000 00000000 00000000 00000000 d93493cc ffff0000 [ 573.136098] fd20: d2bc39c0 be926998 d90dfd58 d90dfd48 c09f3384 c01151f0 400d0013 ffffffff [ 573.144281] [<c0100b0c>] (__irq_svc) from [<c01151f0>] (__arm_smccc_smc+0x10/0x20) [ 573.151854] [<c01151f0>] (__arm_smccc_smc) from [<c09f3384>] (optee_smccc_smc+0x3c/0x44) [ 573.159948] [<c09f3384>] (optee_smccc_smc) from [<c09f4170>] (optee_do_call_with_arg+0xb8/0x154) [ 573.168735] [<c09f4170>] (optee_do_call_with_arg) from [<c09f4638>] (optee_invoke_func+0x110/0x190) [ 573.177786] [<c09f4638>] (optee_invoke_func) from [<c09f1ebc>] (tee_ioctl+0x10b8/0x11c0) [ 573.185879] [<c09f1ebc>] (tee_ioctl) from [<c029f62c>] (ksys_ioctl+0xe0/0xa4c) [ 573.193101] [<c029f62c>] (ksys_ioctl) from [<c0100060>] (ret_fast_syscall+0x0/0x54) [ 573.200750] Exception stack(0xd90dffa8 to 0xd90dfff0) [ 573.205803] ffa0: be926bf4 be926a78 00000003 8010a403 be926908 004e3cf8 [ 573.213987] ffc0: be926bf4 be926a78 00000000 00000036 be926908 be926918 be9269b0 bffdf0f8 [ 573.222162] ffe0: b6d76fb0 be9268fc b6d66621 b6c7e0d8
seen on STM32 DK2 with CONFIG_PREEMPT_NONE.
--- drivers/tee/optee/call.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/tee/optee/call.c +3 -1
@@ -7,6 +7,7 @@#include <linux/err.h> #include <linux/errno.h> #include <linux/mm.h> +#include <linux/sched.h> #include <linux/slab.h> #include <linux/tee_drv.h> #include <linux/types.h>
@@ -148,7 +149,8 @@ u32 optee_do_call_with_arg(struct tee_co*/ optee_cq_wait_for_completion (&optee->call_queue, &w); }else if (OPTEE_SMC_RETURN_IS_RPC (res.a0)) { -might_sleep (); +if (need_resched ()) +cond_resched (); param.a0 = res.a0; param.a1 = res.a1; param.a2 = res.a2;
Greg Kroah-Hartman
maintainerPATCH 69/142 blk-mq: test QUEUE_FLAG_HCTX_ACTIVE for sbitmap_shared in hctx_may_queue
In reply to Greg Kroah-HartmanFrom: Ming Lei <[email protected]>
commit 2569063c7140c65a0d0ad075e95ddfbcda9ba3c0 upstream.
In case of blk_mq_is_sbitmap_shared(), we should test QUEUE_FLAG_HCTX_ACTIVE against q->queue_flags instead of BLK_MQ_S_TAG_ACTIVE.
So fix it.
--- block/blk-mq.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
block/blk-mq.h +1 -1
@@ -303,7 +303,7 @@ static inline bool hctx_may_queue(structstruct request_queue *q = hctx->queue;struct blk_mq_tag_set *set = q->tag_set; -if (!test_bit (BLK_MQ_S_TAG_ACTIVE , &q->queue_flags)) +if (!test_bit (QUEUE_FLAG_HCTX_ACTIVE , &q->queue_flags))return true; users =atomic_read (&set->active_queues_shared_sbitmap); }else {
Greg Kroah-Hartman
maintainerPATCH 48/142 xen: Fix XenStore initialisation for XS_LOCAL
In reply to Greg Kroah-HartmanFrom: David Woodhouse <[email protected]>
commit 5f46400f7a6a4fad635d5a79e2aa5a04a30ffea1 upstream.
In commit 3499ba8198ca ("xen: Fix event channel callback via INTX/GSI") I reworked the triggering of xenbus_probe().
I tried to simplify things by taking out the workqueue based startup triggered from wake_waiting(); the somewhat poorly named xenbus IRQ handler.
I missed the fact that in the XS_LOCAL case (Dom0 starting its own xenstored or xenstore-stubdom, which happens after the kernel is booted completely), that IRQ-based trigger is still actually needed.
So... put it back, except more cleanly. By just spawning a xenbus_probe thread which waits on xb_waitq and runs the probe the first time it gets woken, just as the workqueue-based hack did.
This is actually a nicer approach for *all* the back ends with different interrupt methods, and we can switch them all over to that without the complex conditions for when to trigger it. But not in -rc6. This is the minimal fix for the regression, although it's a step in the right direction instead of doing a partial revert and actually putting the workqueue back. It's also simpler than the workqueue.
--- drivers/xen/xenbus/xenbus_probe.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+)
drivers/xen/xenbus/xenbus_probe.c +31 -0
@@ -714,6 +714,23 @@ static bool xs_hvm_defer_init_for_callba#endif } +static int xenbus_probe_thread (void *unused) +{ +DEFINE_WAIT (w); + +/* +* We actually just want to wait for *any* trigger of xb_waitq, +* and run xenbus_probe() the moment it occurs. +*/ +prepare_to_wait (&xb_waitq, &w,TASK_INTERRUPTIBLE ); +schedule (); +finish_wait (&xb_waitq, &w); + +DPRINTK ("probing" ); +xenbus_probe (); +return 0 ; +} +static int __init xenbus_probe_initcall (void ) {/*
@@ -725,6 +742,20 @@ static int __init xenbus_probe_initcall( !xs_hvm_defer_init_for_callback()))xenbus_probe (); +/* +* For XS_LOCAL, spawn a thread which will wait for xenstored +* or a xenstore-stubdom to be started, then probe. It will be +* triggered when communication starts happening, by waiting +* on xb_waitq. +*/ +if (xen_store_domain_type ==XS_LOCAL ) { +struct task_struct *probe_task; + + probe_task =kthread_run (xenbus_probe_thread,NULL , +"xenbus_probe" ); +if (IS_ERR (probe_task)) +return PTR_ERR (probe_task); + }return 0 ; }device_initcall (xenbus_probe_initcall);
Greg Kroah-Hartman
maintainerPATCH 70/142 clk: imx: fix Kconfig warning for i.MX SCU clk
In reply to Greg Kroah-HartmanFrom: Arnd Bergmann <[email protected]>
commit 73f6b7ed9835ad9f953aebd60dd720aabc487b81 upstream.
A previous patch introduced a harmless randconfig warning:
WARNING: unmet direct dependencies detected for MXC_CLK_SCU
Depends on [n]: COMMON_CLK [=y] && ARCH_MXC [=n] && IMX_SCU [=y] && HAVE_ARM_SMCCC [=y]
Selected by [m]:
- CLK_IMX8QXP [=m] && COMMON_CLK [=y] && (ARCH_MXC [=n] && ARM64 [=y] || COMPILE_TEST [=y]) && IMX_SCU [=y] && HAVE_ARM_SMCCC [=y]
Since the symbol is now hidden and only selected by other symbols, just remove the dependencies and require the other drivers to get it right.
--- drivers/clk/imx/Kconfig | 2 -- 1 file changed, 2 deletions(-)
drivers/clk/imx/Kconfig +0 -2
@@ -6,8 +6,6 @@ config MXC_CLK config MXC_CLK_SCU tristate - depends on ARCH_MXC - depends on IMX_SCU && HAVE_ARM_SMCCC config CLK_IMX1 def_bool SOC_IMX1
Greg Kroah-Hartman
maintainerPATCH 46/142 KVM: Forbid the use of tagged userspace addresses for memslots
In reply to Greg Kroah-HartmanFrom: Marc Zyngier <[email protected]>
commit 139bc8a6146d92822c866cf2fd410159c56b3648 upstream.
The use of a tagged address could be pretty confusing for the whole memslot infrastructure as well as the MMU notifiers.
Forbid it altogether, as it never quite worked the first place.
--- Documentation/virt/kvm/api.rst | 3 +++ virt/kvm/kvm_main.c | 1 + 2 files changed, 4 insertions(+)
Documentation/virt/kvm/api.rst +3 -0
@@ -1264,6 +1264,9 @@ field userspace_addr, which must point a the entire memory slot size. Any object may back this memory, including anonymous memory, ordinary files, and hugetlbfs. +On architectures that support a form of address tagging, userspace_addr must +be an untagged address. + It is recommended that the lower 21 bits of guest_phys_addr and userspace_addr be identical. This allows large pages in the guest to be backed by large pages in the host.
virt/kvm/kvm_main.c +1 -0
@@ -1289,6 +1289,7 @@ int __kvm_set_memory_region(struct kvm *return -EINVAL ;/* We can read the guest memory with __xxx_user() later on. */ if ((mem->userspace_addr & (PAGE_SIZE -1 )) || + (mem->userspace_addr !=untagged_addr (mem->userspace_addr)) || !access_ok ((void __user *)(unsigned long )mem->userspace_addr, mem->memory_size))return -EINVAL ;
Greg Kroah-Hartman
maintainerPATCH 74/142 ARM: zImage: atags_to_fdt: Fix node names on added root nodes
In reply to Greg Kroah-HartmanFrom: Rob Herring <[email protected]>
commit 30596ae0547dbda469d31a2678d9072fb0a3fa27 upstream.
Commit 7536c7e03e74 ("of/fdt: Remove redundant kbasename function call") exposed a bug creating DT nodes in the ATAGS to DT fixup code. Non-existent nodes would mistaken get created with a leading '/'. The problem was fdt_path_offset() takes a full path while creating a node with fdt_add_subnode() takes just the basename.
Since this we only add root child nodes, we can just skip over the '/'.
--- arch/arm/boot/compressed/atags_to_fdt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/boot/compressed/atags_to_fdt.c +2 -1
@@ -15,7 +15,8 @@ static int node_offset(void *fdt, const {int offset =fdt_path_offset (fdt, node_path);if (offset == -FDT_ERR_NOTFOUND ) - offset =fdt_add_subnode (fdt,0 , node_path); +/* Add the node to root if not found, dropping the leading '/' */ + offset =fdt_add_subnode (fdt,0 , node_path +1 );return offset; }
Greg Kroah-Hartman
maintainerPATCH 84/142 ARM: dts: imx6qdl-kontron-samx6i: fix i2c_lcd/cam default status
In reply to Greg Kroah-HartmanFrom: Marco Felsch <[email protected]>
[ Upstream commit 70b6ff4c549a62b59b286445f66cfec6c5327ac8 ]
Fix typo so the gpio i2c busses are really disabled.
--- arch/arm/boot/dts/imx6qdl-kontron-samx6i.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/imx6qdl-kontron-samx6i.dtsi +2 -2
@@ -167,7 +167,7 @@ i2c-gpio,delay-us = <2>; /* ~100 kHz */ #address-cells = <1>; #size-cells = <0>; - status = "disabld"; + status = "disabled"; }; i2c_cam: i2c-gpio-cam {
@@ -179,7 +179,7 @@ i2c-gpio,delay-us = <2>; /* ~100 kHz */ #address-cells = <1>; #size-cells = <0>; - status = "disabld"; + status = "disabled"; }; };
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 45/142 KVM: x86: get smi pending status correctly
In reply to Greg Kroah-HartmanFrom: Jay Zhou <[email protected]>
commit 1f7becf1b7e21794fc9d460765fe09679bc9b9e0 upstream.
The injection process of smi has two steps:
Qemu KVM
Step1:
cpu->interrupt_request &= \
~CPU_INTERRUPT_SMI;
kvm_vcpu_ioctl(cpu, KVM_SMI)
call kvm_vcpu_ioctl_smi() and
kvm_make_request(KVM_REQ_SMI, vcpu);Step2:
kvm_vcpu_ioctl(cpu, KVM_RUN, 0)
call process_smi() if kvm_check_request(KVM_REQ_SMI, vcpu) is true, mark vcpu->arch.smi_pending = true;
The vcpu->arch.smi_pending will be set true in step2, unfortunately if vcpu paused between step1 and step2, the kvm_run->immediate_exit will be set and vcpu has to exit to Qemu immediately during step2 before mark vcpu->arch.smi_pending true.
During VM migration, Qemu will get the smi pending status from KVM using KVM_GET_VCPU_EVENTS ioctl at the downtime, then the smi pending status will be lost.
Message-Id: <[email protected]>
--- arch/x86/kvm/x86.c | 4 ++++ 1 file changed, 4 insertions(+)
arch/x86/kvm/x86.c +4 -0
@@ -105,6 +105,7 @@ static u64 __read_mostly cr4_reserved_bistatic void update_cr8_intercept (struct kvm_vcpu *vcpu);static void process_nmi (struct kvm_vcpu *vcpu); +static void process_smi (struct kvm_vcpu *vcpu);static void enter_smm (struct kvm_vcpu *vcpu);static void __kvm_set_rflags (struct kvm_vcpu *vcpu,unsigned long rflags);static void store_regs (struct kvm_vcpu *vcpu);
@@ -4199,6 +4200,9 @@ static void kvm_vcpu_ioctl_x86_get_vcpu_ {process_nmi (vcpu); +if (kvm_check_request (KVM_REQ_SMI , vcpu)) +process_smi (vcpu); +/* * In guest mode, payload delivery should be deferred, * so that the L1 hypervisor can intercept #PF before
Greg Kroah-Hartman
maintainerPATCH 47/142 io_uring: fix wqe->lock/completion_lock deadlock
In reply to Greg Kroah-HartmanFrom: Pavel Begunkov <[email protected]>
commit 907d1df30a51cc1a1d25414a00cde0494b83df7b upstream.
Joseph reports following deadlock:
CPU0:
...io_kill_linked_timeout // &ctx->completion_lockio_commit_cqring__io_queue_deferred__io_queue_async_workio_wq_enqueueio_wqe_enqueue // &wqe->lock
CPU1:
...__io_uring_files_cancelio_wq_cancel_cbio_wqe_cancel_pending_work // &wqe->lockio_cancel_task_cb // &ctx->completion_lock
Only __io_queue_deferred() calls queue_async_work() while holding ctx->completion_lock, enqueue drained requests via io_req_task_queue() instead.
--- fs/io_uring.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-)
fs/io_uring.c +2 -8
@@ -972,6 +972,7 @@ static int io_setup_async_rw(struct io_kconst struct iovec *fast_iov, struct iov_iter *iter, bool force);static void io_req_drop_files (struct io_kiocb *req); +static void io_req_task_queue (struct io_kiocb *req);static struct kmem_cache *req_cachep;
@@ -1502,18 +1503,11 @@ static void __io_queue_deferred(struct ido {struct io_defer_entry *de =list_first_entry (&ctx->defer_list, struct io_defer_entry, list); -struct io_kiocb *link;if (req_need_defer (de->req, de->seq))break ;list_del_init (&de->list); -/* punt-init is done before queueing for defer */ - link =__io_queue_async_work (de->req); -if (link) { -__io_queue_linked_timeout (link); -/* drop submission reference */ -io_put_req_deferred (link,1 ); - } +io_req_task_queue (de->req);kfree (de); }while (!list_empty (&ctx->defer_list)); }
Greg Kroah-Hartman
maintainerPATCH 100/142 iwlwifi: pcie: avoid potential PNVM leaks
In reply to Greg Kroah-HartmanFrom: Johannes Berg <[email protected]>
[ Upstream commit 34b9434cd0d425330a0467e767f8d047ef62964d ]
If we erroneously try to set the PNVM data again after it has already been set, we could leak the old DMA memory. Avoid that and warn, we shouldn't be doing this.
--- drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info-gen3.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info-gen3.c +3 -0
@@ -341,6 +341,9 @@ int iwl_trans_pcie_ctx_info_gen3_set_pnvm(struct iwl_trans *trans,return ret; } +if (WARN_ON (prph_sc_ctrl->pnvm_cfg.pnvm_size)) +return -EBUSY ; + prph_sc_ctrl->pnvm_cfg.pnvm_base_addr =cpu_to_le64 (trans_pcie->pnvm_dram.physical); prph_sc_ctrl->pnvm_cfg.pnvm_size =
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 99/142 ASoC: qcom: lpass: Fix out-of-bounds DAI ID lookup
In reply to Greg Kroah-HartmanFrom: Stephan Gerhold <[email protected]>
[ Upstream commit 70041000450d0a071bf9931d634c8e2820340236 ]
The "dai_id" given into LPAIF_INTFDMA_REG(...) is already the real DAI ID, not an index into v->dai_driver. Looking it up again seems entirely redundant.
For IPQ806x (and SC7180 since commit 09a4f6f5d21c
("ASoC: dt-bindings: lpass: Fix and common up lpass dai ids") this is now often an out-of-bounds read because the indexes in the "dai_driver" array no longer match the actual DAI ID.
--- sound/soc/qcom/lpass-lpaif-reg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/qcom/lpass-lpaif-reg.h +1 -1
@@ -133,7 +133,7 @@#define LPAIF_WRDMAPERCNT_REG (v, chan) LPAIF_WRDMA_REG_ADDR(v, 0x14, (chan))#define LPAIF_INTFDMA_REG (v, chan, reg, dai_id) \ - ((v->dai_driver[dai_id].id == LPASS_DP_RX) ? \ + ((dai_id == LPASS_DP_RX) ? \ LPAIF_HDMI_RDMA##reg##_REG(v, chan) : \ LPAIF_RDMA##reg##_REG(v, chan))
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 96/142 pNFS/NFSv4: Fix a layout segment leak in pnfs_layout_process()
In reply to Greg Kroah-HartmanFrom: Trond Myklebust <[email protected]>
[ Upstream commit 814b84971388cd5fb182f2e914265b3827758455 ]
If the server returns a new stateid that does not match the one in our cache, then pnfs_layout_process() will leak the layout segments returned by pnfs_mark_layout_stateid_invalid().
--- fs/nfs/pnfs.c | 1 + 1 file changed, 1 insertion(+)
fs/nfs/pnfs.c +1 -0
@@ -2418,6 +2418,7 @@ out_forget:spin_unlock (&ino->i_lock); lseg->pls_layout = lo;NFS_SERVER (ino)->pnfs_curr_ld->free_lseg (lseg); +pnfs_free_lseg_list (&free_me);return ERR_PTR (-EAGAIN ); }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 97/142 pNFS/NFSv4: Update the layout barrier when we schedule a layoutreturn
In reply to Greg Kroah-HartmanFrom: Trond Myklebust <[email protected]>
[ Upstream commit 1bcf34fdac5f8c2fcd16796495db75744612ca27 ]
When we're scheduling a layoutreturn, we need to ignore any further incoming layouts with sequence ids that are going to be affected by the layout return.
--- fs/nfs/pnfs.c | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-)
fs/nfs/pnfs.c +21 -18
@@ -324,6 +324,21 @@ pnfs_grab_inode_layout_hdr(struct pnfs_layout_hdr *lo)return NULL ; } +/* +* Compare 2 layout stateid sequence ids, to see which is newer, +* taking into account wraparound issues. +*/ +static bool pnfs_seqid_is_newer (u32 s1,u32 s2) +{ +return (s32)(s1 - s2) >0 ; +} + +static void pnfs_barrier_update (struct pnfs_layout_hdr *lo,u32 newseq) +{ +if (pnfs_seqid_is_newer (newseq, lo->plh_barrier)) + lo->plh_barrier = newseq; +} +static void pnfs_set_plh_return_info (struct pnfs_layout_hdr *lo,enum pnfs_iomode iomode,u32 seq)
@@ -335,6 +350,7 @@ pnfs_set_plh_return_info(struct pnfs_layout_hdr *lo, enum pnfs_iomode iomode,if (seq !=0 ) {WARN_ON_ONCE (lo->plh_return_seq !=0 && lo->plh_return_seq != seq); lo->plh_return_seq = seq; +pnfs_barrier_update (lo, seq); } }
@@ -639,15 +655,6 @@ static int mark_lseg_invalid(struct pnfs_layout_segment *lseg,return rv; } -/* -* Compare 2 layout stateid sequence ids, to see which is newer, -* taking into account wraparound issues. -*/ -static bool pnfs_seqid_is_newer (u32 s1,u32 s2) -{ -return (s32)(s1 - s2) >0 ; -} -static bool pnfs_should_free_range (const struct pnfs_layout_range *lseg_range,const struct pnfs_layout_range *recall_range)
@@ -984,8 +991,7 @@ pnfs_set_layout_stateid(struct pnfs_layout_hdr *lo, const nfs4_stateid *new, new_barrier =be32_to_cpu (new->seqid); else if (new_barrier == 0) return; - if (pnfs_seqid_is_newer(new_barrier, lo->plh_barrier)) - lo->plh_barrier = new_barrier; + pnfs_barrier_update(lo, new_barrier); } static bool
@@ -1183,20 +1189,17 @@ pnfs_prepare_layoutreturn(struct pnfs_layout_hdr *lo,return false;set_bit (NFS_LAYOUT_RETURN , &lo->plh_flags);pnfs_get_layout_hdr (lo); +nfs4_stateid_copy (stateid, &lo->plh_stateid); + *cred =get_cred (lo->plh_lc_cred);if (test_bit (NFS_LAYOUT_RETURN_REQUESTED , &lo->plh_flags)) { -nfs4_stateid_copy (stateid, &lo->plh_stateid); - *cred =get_cred (lo->plh_lc_cred);if (lo->plh_return_seq !=0 ) stateid->seqid =cpu_to_be32 (lo->plh_return_seq);if (iomode !=NULL ) *iomode = lo->plh_return_iomode;pnfs_clear_layoutreturn_info (lo); -return true; - } -nfs4_stateid_copy (stateid, &lo->plh_stateid); - *cred =get_cred (lo->plh_lc_cred); -if (iomode !=NULL ) + }else if (iomode !=NULL ) *iomode =IOMODE_ANY ; +pnfs_barrier_update (lo,be32_to_cpu (stateid->seqid));return true; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 102/142 iwlwifi: pnvm: dont try to load after failures
In reply to Greg Kroah-HartmanFrom: Johannes Berg <[email protected]>
[ Upstream commit 82a08d0cd7b503be426fb856a0fb73c9c976aae1 ]
If loading the PNVM file failed on the first try during the interface up, the file is unlikely to show up later, and we already don't try to reload it if it changes, so just don't try loading it again and again.
This also fixes some issues where we may try to load it at resume time, which may not be possible yet.
--- drivers/net/wireless/intel/iwlwifi/fw/pnvm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/net/wireless/intel/iwlwifi/fw/pnvm.c +7 -1
@@ -232,7 +232,7 @@ int iwl_pnvm_load(struct iwl_trans *trans,if (!trans->sku_id[0 ] && !trans->sku_id[1 ] && !trans->sku_id[2 ])return 0 ; -/* load from disk only if we haven't done it before */ +/* load from disk only if we haven't done it (or tried) before */ if (!trans->pnvm_loaded) {const struct firmware *pnvm;char pnvm_name[64 ];
@@ -253,6 +253,12 @@ int iwl_pnvm_load(struct iwl_trans *trans,if (ret) {IWL_DEBUG_FW (trans,"PNVM file %s not found %d\n" , pnvm_name, ret); +/* +* Pretend we've loaded it - at least we've tried and +* couldn't load it at all, so there's no point in +* trying again over and over. +*/ + trans->pnvm_loaded = true; }else {iwl_pnvm_parse (trans, pnvm->data, pnvm->size);
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 80/142 selftests: xfrm: fix test return value override issue in xfrm_policy.sh
In reply to Greg Kroah-HartmanFrom: Po-Hsu Lin <[email protected]>
[ Upstream commit f6e9ceb7a7fc321a31a9dde93a99b7b4b016a3b3 ]
When running this xfrm_policy.sh test script, even with some cases marked as FAIL, the overall test result will still be PASS:
$ sudo ./xfrm_policy.sh PASS: policy before exception matches FAIL: expected ping to .254 to fail (exceptions) PASS: direct policy matches (exceptions) PASS: policy matches (exceptions) FAIL: expected ping to .254 to fail (exceptions and block policies) PASS: direct policy matches (exceptions and block policies) PASS: policy matches (exceptions and block policies) FAIL: expected ping to .254 to fail (exceptions and block policies after hresh changes) PASS: direct policy matches (exceptions and block policies after hresh changes) PASS: policy matches (exceptions and block policies after hresh changes) FAIL: expected ping to .254 to fail (exceptions and block policies after hthresh change in ns3) PASS: direct policy matches (exceptions and block policies after hthresh change in ns3) PASS: policy matches (exceptions and block policies after hthresh change in ns3) FAIL: expected ping to .254 to fail (exceptions and block policies after htresh change to normal) PASS: direct policy matches (exceptions and block policies after htresh change to normal) PASS: policy matches (exceptions and block policies after htresh change to normal) PASS: policies with repeated htresh change $ echo $? 0
This is because the $lret in check_xfrm() is not a local variable. Therefore when a test failed in check_exceptions(), the non-zero $lret will later get reset to 0 when the next test calls check_xfrm().
With this fix, the final return value will be 1. Make it easier for testers to spot this failure.
--- tools/testing/selftests/net/xfrm_policy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/net/xfrm_policy.sh +1 -1
@@ -202,7 +202,7 @@ check_xfrm() { # 1: iptables -m policy rule count != 0 rval=$1 ip=$2 - lret=0 + local lret=0 ip netns exec ns1 ping -q -c 1 10.0.2.$ip > /dev/null
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 81/142 xfrm: Fix wraparound in xfrm_policy_addr_delta()
In reply to Greg Kroah-HartmanFrom: Visa Hankala <[email protected]>
[ Upstream commit da64ae2d35d3673233f0403b035d4c6acbf71965 ]
Use three-way comparison for address components to avoid integer wraparound in the result of xfrm_policy_addr_delta(). This ensures that the search trees are built and traversed correctly.
Treat IPv4 and IPv6 similarly by returning 0 when prefixlen == 0. Prefix /0 has only one equivalence class.
--- net/xfrm/xfrm_policy.c | 26 +++++++++---- tools/testing/selftests/net/xfrm_policy.sh | 43 ++++++++++++++++++++++ 2 files changed, 61 insertions(+), 8 deletions(-)
net/xfrm/xfrm_policy.c +18 -8
@@ -793,15 +793,22 @@ static int xfrm_policy_addr_delta(const xfrm_address_t *a,const xfrm_address_t *b, u8 prefixlen, u16 family) { + u32 ma, mb, mask;unsigned int pdw, pbi;int delta =0 ;switch (family) {case AF_INET : -if (sizeof (long ) ==4 && prefixlen ==0 ) -return ntohl (a->a4) -ntohl (b->a4); -return (ntohl (a->a4) & ((~0UL << (32 - prefixlen)))) - - (ntohl (b->a4) & ((~0UL << (32 - prefixlen)))); +if (prefixlen ==0 ) +return 0 ; + mask = ~0U << (32 - prefixlen); + ma =ntohl (a->a4) & mask; + mb =ntohl (b->a4) & mask; +if (ma < mb) + delta =-1 ; +else if (ma > mb) + delta =1 ; +break ;case AF_INET6 : pdw = prefixlen >>5 ; pbi = prefixlen &0x1f ;
@@ -812,10 +819,13 @@ static int xfrm_policy_addr_delta(const xfrm_address_t *a,return delta; }if (pbi) { -u32 mask = ~0u << (32 - pbi); - - delta = (ntohl (a->a6[pdw]) & mask) - - (ntohl (b->a6[pdw]) & mask); + mask = ~0U << (32 - pbi); + ma =ntohl (a->a6[pdw]) & mask; + mb =ntohl (b->a6[pdw]) & mask; +if (ma < mb) + delta =-1 ; +else if (ma > mb) + delta =1 ; }break ;default :
tools/testing/selftests/net/xfrm_policy.sh +43 -0
55 lines not on this page · raw message
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 109/142 ice: update dev_addr in ice_set_mac_address even if HW filter exists
In reply to Greg Kroah-HartmanFrom: Nick Nunley <[email protected]>
[ Upstream commit 13ed5e8a9b9ccd140a79e80283f69d724c9bb2be ]
Fix the driver to copy the MAC address configured in ndo_set_mac_address into dev_addr, even if the MAC filter already exists in HW. In some situations (e.g. bonding) the netdev's dev_addr could have been modified outside of the driver, with no change to the HW filter, so the driver cannot assume that they match.
--- drivers/net/ethernet/intel/ice/ice_main.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/net/ethernet/intel/ice/ice_main.c +7 -1
@@ -4887,9 +4887,15 @@ static int ice_set_mac_address(struct net_device *netdev, void *pi) goto err_update_filters; } -/* Add filter for new MAC. If filter exists, just return success */ +/* Add filter for new MAC. If filter exists, return success */ status =ice_fltr_add_mac (vsi, mac,ICE_FWD_TO_VSI );if (status ==ICE_ERR_ALREADY_EXISTS ) { +/* Although this MAC filter is already present in hardware it's +* possible in some cases (e.g. bonding) that dev_addr was +* modified outside of the driver and needs to be restored back +* to this value. +*/ +memcpy (netdev->dev_addr, mac, netdev->addr_len);netdev_dbg (netdev,"filter for MAC %pM already exists\n" , mac);return 0 ; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 118/142 net/mlx5: Maintain separate page trees for ECPF and PF functions
In reply to Greg Kroah-HartmanFrom: Daniel Jurgens <[email protected]>
[ Upstream commit 0aa128475d33d2d0095947eeab6b3e4d22dbd578 ]
Pages for the host PF and ECPF were stored in the same tree, so the ECPF pages were being freed along with the host PF's when the host driver unloaded.
Combine the function ID and ECPF flag to use as an index into the x-array containing the trees to get a different tree for the host PF and ECPF.
--- .../ethernet/mellanox/mlx5/core/pagealloc.c | 58 +++++++++++-------- 1 file changed, 34 insertions(+), 24 deletions(-)
drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c +34 -24
@@ -58,7 +58,7 @@ struct fw_page {struct rb_node rb_node;u64 addr;struct page *page; -u16 func_id; +u32 function;unsigned long bitmask;struct list_head list;unsigned free_count;
@@ -74,12 +74,17 @@ enum { MLX5_NUM_4K_IN_PAGE = PAGE_SIZE / MLX5_ADAPTER_PAGE_SIZE, }; -static struct rb_root *page_root_per_func_id (struct mlx5_core_dev *dev,u16 func_id) +static u32 get_function (u16 func_id,bool ec_function) +{ +return func_id & (ec_function <<16 ); +} + +static struct rb_root *page_root_per_function (struct mlx5_core_dev *dev,u32 function) {struct rb_root *root;int err; - root =xa_load (&dev->priv.page_root_xa, func_id); + root =xa_load (&dev->priv.page_root_xa, function);if (root)return root;
@@ -87,7 +92,7 @@ static struct rb_root *page_root_per_func_id(struct mlx5_core_dev *dev, u16 funcif (!root)return ERR_PTR (-ENOMEM ); - err =xa_insert (&dev->priv.page_root_xa, func_id, root,GFP_KERNEL ); + err =xa_insert (&dev->priv.page_root_xa, function, root,GFP_KERNEL );if (err) {kfree (root);return ERR_PTR (err);
@@ -98,7 +103,7 @@ static struct rb_root *page_root_per_func_id(struct mlx5_core_dev *dev, u16 funcreturn root; } -static int insert_page (struct mlx5_core_dev *dev,u64 addr,struct page *page,u16 func_id) +static int insert_page (struct mlx5_core_dev *dev,u64 addr,struct page *page,u32 function) {struct rb_node *parent =NULL ;struct rb_root *root;
@@ -107,7 +112,7 @@ static int insert_page(struct mlx5_core_dev *dev, u64 addr, struct page *page, ustruct fw_page *tfp;int i; - root =page_root_per_func_id (dev, func_id); + root =page_root_per_function (dev, function);if (IS_ERR (root))return PTR_ERR (root);
@@ -130,7 +135,7 @@ static int insert_page(struct mlx5_core_dev *dev, u64 addr, struct page *page, u nfp->addr = addr; nfp->page = page; - nfp->func_id = func_id; + nfp->function = function; nfp->free_count =MLX5_NUM_4K_IN_PAGE ;for (i =0 ; i <MLX5_NUM_4K_IN_PAGE ; i++)set_bit (i, &nfp->bitmask);
@@ -143,14 +148,14 @@ static int insert_page(struct mlx5_core_dev *dev, u64 addr, struct page *page, u }static struct fw_page *find_fw_page (struct mlx5_core_dev *dev,u64 addr, -u32 func_id) +u32 function) {struct fw_page *result =NULL ;struct rb_root *root;struct rb_node *tmp;struct fw_page *tfp; - root =xa_load (&dev->priv.page_root_xa, func_id); + root =xa_load (&dev->priv.page_root_xa, function);if (WARN_ON_ONCE (!root))return NULL ;
@@ -194,14 +199,14 @@ static int mlx5_cmd_query_pages(struct mlx5_core_dev *dev, u16 *func_id,return err; } -static int alloc_4k (struct mlx5_core_dev *dev,u64 *addr,u16 func_id) +static int alloc_4k (struct mlx5_core_dev *dev,u64 *addr,u32 function) {struct fw_page *fp =NULL ;struct fw_page *iter;unsigned n;list_for_each_entry (iter, &dev->priv.free_list, list) { -if (iter->func_id != func_id) +if (iter->function != function)continue ; fp = iter; }
@@ -231,7 +236,7 @@ static void free_fwp(struct mlx5_core_dev *dev, struct fw_page *fwp, {struct rb_root *root; - root =xa_load (&dev->priv.page_root_xa, fwp->func_id); + root =xa_load (&dev->priv.page_root_xa, fwp->function);if (WARN_ON_ONCE (!root))return ;
@@ -244,12 +249,12 @@ static void free_fwp(struct mlx5_core_dev *dev, struct fw_page *fwp,kfree (fwp); } -static void free_4k (struct mlx5_core_dev *dev,u64 addr,u32 func_id) +static void free_4k (struct mlx5_core_dev *dev,u64 addr,u32 function) {struct fw_page *fwp;int n; - fwp =find_fw_page (dev, addr &MLX5_U64_4K_PAGE_MASK , func_id); + fwp =find_fw_page (dev, addr &MLX5_U64_4K_PAGE_MASK , function);if (!fwp) {mlx5_core_warn_rl (dev,"page not found\n" );return ;
@@ -263,7 +268,7 @@ static void free_4k(struct mlx5_core_dev *dev, u64 addr, u32 func_id)list_add (&fwp->list, &dev->priv.free_list); } -static int alloc_system_page (struct mlx5_core_dev *dev,u16 func_id) +static int alloc_system_page (struct mlx5_core_dev *dev,u32 function) {struct device *device =mlx5_core_dma_dev (dev);int nid =dev_to_node (device);
@@ -291,7 +296,7 @@ map: goto map; } - err =insert_page (dev, addr, page, func_id); + err =insert_page (dev, addr, page, function);if (err) {mlx5_core_err (dev,"failed to track allocated page\n" );dma_unmap_page (device, addr,PAGE_SIZE ,DMA_BIDIRECTIONAL );
@@ -328,6 +333,7 @@ static void page_notify_fail(struct mlx5_core_dev *dev, u16 func_id,static int give_pages (struct mlx5_core_dev *dev,u16 func_id,int npages,int notify_fail,bool ec_function) { +u32 function =get_function (func_id, ec_function);u32 out[MLX5_ST_SZ_DW (manage_pages_out)] = {0 };int inlen =MLX5_ST_SZ_BYTES (manage_pages_in);u64 addr;
@@ -345,10 +351,10 @@ static int give_pages(struct mlx5_core_dev *dev, u16 func_id, int npages,for (i =0 ; i < npages; i++) { retry: - err =alloc_4k (dev, &addr, func_id); + err =alloc_4k (dev, &addr, function);if (err) {if (err == -ENOMEM ) - err =alloc_system_page (dev, func_id); + err =alloc_system_page (dev, function);if (err) goto out_4k;
@@ -384,7 +390,7 @@ retry: out_4k:for (i--; i >=0 ; i--) -free_4k (dev,MLX5_GET64 (manage_pages_in, in, pas[i]), func_id); +free_4k (dev,MLX5_GET64 (manage_pages_in, in, pas[i]), function); out_free:kvfree (in);if (notify_fail)
@@ -392,14 +398,15 @@ out_free:return err; } -static void release_all_pages (struct mlx5_core_dev *dev,u32 func_id, +static void release_all_pages (struct mlx5_core_dev *dev,u16 func_id,bool ec_function) { +u32 function =get_function (func_id, ec_function);struct rb_root *root;struct rb_node *p;int npages =0 ; - root =xa_load (&dev->priv.page_root_xa, func_id); + root =xa_load (&dev->priv.page_root_xa, function);if (WARN_ON_ONCE (!root))return ;
@@ -446,6 +453,7 @@ static int reclaim_pages_cmd(struct mlx5_core_dev *dev,struct rb_root *root;struct fw_page *fwp;struct rb_node *p; +bool ec_function;u32 func_id;u32 npages;u32 i =0 ;
@@ -456,8 +464,9 @@ static int reclaim_pages_cmd(struct mlx5_core_dev *dev,/* No hard feelings, we want our pages back! */ npages =MLX5_GET (manage_pages_in, in, input_num_entries); func_id =MLX5_GET (manage_pages_in, in, function_id); + ec_function =MLX5_GET (manage_pages_in, in, embedded_cpu_function); - root =xa_load (&dev->priv.page_root_xa, func_id); + root =xa_load (&dev->priv.page_root_xa,get_function (func_id, ec_function));if (WARN_ON_ONCE (!root))return -EEXIST ;
@@ -473,9 +482,10 @@ static int reclaim_pages_cmd(struct mlx5_core_dev *dev,return 0 ; } -static int reclaim_pages (struct mlx5_core_dev *dev,u32 func_id,int npages, +static int reclaim_pages (struct mlx5_core_dev *dev,u16 func_id,int npages,int *nclaimed,bool ec_function) { +u32 function =get_function (func_id, ec_function);int outlen =MLX5_ST_SZ_BYTES (manage_pages_out);u32 in[MLX5_ST_SZ_DW (manage_pages_in)] = {};int num_claimed;
@@ -514,7 +524,7 @@ static int reclaim_pages(struct mlx5_core_dev *dev, u32 func_id, int npages, }for (i =0 ; i < num_claimed; i++) -free_4k (dev,MLX5_GET64 (manage_pages_out, out, pas[i]), func_id); +free_4k (dev,MLX5_GET64 (manage_pages_out, out, pas[i]), function);if (nclaimed) *nclaimed = num_claimed;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 119/142 net/mlx5e: Disable hw-tc-offload when MLX5_CLS_ACT config is disabled
In reply to Greg Kroah-HartmanFrom: Maor Dickman <[email protected]>
[ Upstream commit 156878d0e697187c7d207ee6c22afe50b7f3678c ]
The cited commit introduce new CONFIG_MLX5_CLS_ACT kconfig variable to control compilation of TC hardware offloads implementation. When this configuration is disabled the driver is still wrongly reports in ethtool that hw-tc-offload is supported.
Fixed by reporting hw-tc-offload is supported only when CONFIG_MLX5_CLS_ACT is enabled.
--- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlx5/core/en_main.c +1 -1
@@ -4990,7 +4990,7 @@ static void mlx5e_build_nic_netdev(struct net_device *netdev) FT_CAP(modify_root) && FT_CAP(identified_miss_table_mode) && FT_CAP(flow_table_modify)) { -#ifdef CONFIG_MLX5_ESWITCH +#if IS_ENABLED (CONFIG_MLX5_CLS_ACT ) netdev->hw_features |=NETIF_F_HW_TC ;#endif #ifdef CONFIG_MLX5_EN_ARFS
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c +2 -0
@@ -738,7 +738,9 @@ static void mlx5e_build_rep_netdev(struct net_device *netdev) netdev->features |=NETIF_F_NETNS_LOCAL ; +#if IS_ENABLED (CONFIG_MLX5_CLS_ACT ) netdev->hw_features |=NETIF_F_HW_TC ; +#endif netdev->hw_features |=NETIF_F_SG ; netdev->hw_features |=NETIF_F_IP_CSUM ; netdev->hw_features |=NETIF_F_IPV6_CSUM ;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 120/142 net/mlx5e: Fix CT rule + encap slow path offload and deletion
In reply to Greg Kroah-HartmanFrom: Paul Blakey <[email protected]>
[ Upstream commit 89e394675818bde8e30e135611c506455fa03fb7 ]
Currently, if a neighbour isn't valid when offloading tunnel encap rules, we offload the original match and replace the original action with "goto slow path" action. For this we use a temporary flow attribute based on the original flow attribute and then change the action. Flow flags, which among those is the CT flag, are still shared for the slow path rule offload, so we end up parsing this flow as a CT + goto slow path rule.
Besides being unnecessary, CT action offload saves extra information in the passed flow attribute, such as created ct_flow and mod_hdr, which is lost onces the temporary flow attribute is freed.
When a neigh is updated and is valid, we offload the original CT rule with original CT action, which again creates a ct_flow and mod_hdr and saves it in the flow's original attribute. Then we delete the slow path rule with a temporary flow attribute based on original updated flow attribute, and we free the relevant ct_flow and mod_hdr.
Then when tc deletes this flow, we try to free the ct_flow and mod_hdr on the flow's attribute again.
To fix the issue, skip all furture proccesing (CT/Sample/Split rules) in offload/unoffload of slow path rules.
Call trace: [ 758.850525] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000218 [ 758.952987] Internal error: Oops: 96000005 [#1] PREEMPT SMP [ 758.964170] Modules linked in: act_csum(E) act_pedit(E) act_tunnel_key(E) act_ct(E) nf_flow_table(E) xt_nat(E) ip6table_filter(E) ip6table_nat(E) xt_comment(E) ip6_tables(E) xt_conntrack(E) xt_MASQUERADE(E) nf_conntrack_netlink(E) xt_addrtype(E) iptable_filter(E) iptable_nat(E) bpfilter(E) br_netfilter(E) bridge(E) stp(E) llc(E) xfrm_user(E) overlay(E) act_mirred(E) act_skbedit(E) rdma_ucm(OE) rdma_cm(OE) iw_cm(OE) ib_ipoib(OE) ib_cm(OE) ib_umad(OE) esp6_offload(E) esp6(E) esp4_offload(E) esp4(E) xfrm_algo(E) mlx5_ib(OE) ib_uverbs(OE) geneve(E) ip6_udp_tunnel(E) udp_tunnel(E) nfnetlink_cttimeout(E) nfnetlink(E) mlx5_core(OE) act_gact(E) cls_flower(E) sch_ingress(E) openvswitch(E) nsh(E) nf_conncount(E) nf_nat(E) mlxfw(OE) psample(E) nf_conntrack(E) nf_defrag_ipv4(E) vfio_mdev(E) mdev(E) ib_core(OE) mlx_compat(OE) crct10dif_ce(E) uio_pdrv_genirq(E) uio(E) i2c_mlx(E) mlxbf_pmc(E) sbsa_gwdt(E) mlxbf_gige(E) gpio_mlxbf2(E) mlxbf_pka(E) mlx_trio(E) mlx_bootctl(E) bluefield_edac(E) knem(O) [ 758.964225] ip_tables(E) mlxbf_tmfifo(E) ipv6(E) crc_ccitt(E) nf_defrag_ipv6(E) [ 759.154186] CPU: 5 PID: 122 Comm: kworker/u16:1 Tainted: G OE 5.4.60-mlnx.52.gde81e85 #1 [ 759.172870] Hardware name: https://www.mellanox.com BlueField SoC/BlueField SoC, BIOS BlueField:3.5.0-2-gc1b5d64 Jan 4 2021 [ 759.195466] Workqueue: mlx5e mlx5e_rep_neigh_update [mlx5_core] [ 759.207344] pstate: a0000005 (NzCv daif -PAN -UAO) [ 759.217003] pc : mlx5_del_flow_rules+0x5c/0x160 [mlx5_core] [ 759.228229] lr : mlx5_del_flow_rules+0x34/0x160 [mlx5_core] [ 759.405858] Call trace: [ 759.410804] mlx5_del_flow_rules+0x5c/0x160 [mlx5_core] [ 759.421337] __mlx5_eswitch_del_rule.isra.43+0x5c/0x1c8 [mlx5_core] [ 759.433963] mlx5_eswitch_del_offloaded_rule_ct+0x34/0x40 [mlx5_core] [ 759.446942] mlx5_tc_rule_delete_ct+0x68/0x74 [mlx5_core] [ 759.457821] mlx5_tc_ct_delete_flow+0x160/0x21c [mlx5_core] [ 759.469051] mlx5e_tc_unoffload_fdb_rules+0x158/0x168 [mlx5_core] [ 759.481325] mlx5e_tc_encap_flows_del+0x140/0x26c [mlx5_core] [ 759.492901] mlx5e_rep_update_flows+0x11c/0x1ec [mlx5_core] [ 759.504127] mlx5e_rep_neigh_update+0x160/0x200 [mlx5_core] [ 759.515314] process_one_work+0x178/0x400 [ 759.523350] worker_thread+0x58/0x3e8 [ 759.530685] kthread+0x100/0x12c [ 759.537152] ret_from_fork+0x10/0x18 [ 759.544320] Code: 97ffef55 51000673 3100067f 54ffff41 (b9421ab3) [ 759.556548] ---[ end trace fab818bb1085832d ]---
--- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +7 -0
@@ -1165,6 +1165,9 @@ mlx5e_tc_offload_fdb_rules(struct mlx5_eswitch *esw,struct mlx5e_tc_mod_hdr_acts *mod_hdr_acts;struct mlx5_flow_handle *rule; +if (attr->flags &MLX5_ESW_ATTR_FLAG_SLOW_PATH ) +return mlx5_eswitch_add_offloaded_rule (esw, spec, attr); +if (flow_flag_test (flow,CT )) { mod_hdr_acts = &attr->parse_attr->mod_hdr_acts;
@@ -1195,6 +1198,9 @@ mlx5e_tc_unoffload_fdb_rules(struct mlx5_eswitch *esw, {flow_flag_clear (flow,OFFLOADED ); +if (attr->flags &MLX5_ESW_ATTR_FLAG_SLOW_PATH ) + goto offload_rule_0; +if (flow_flag_test (flow,CT )) {mlx5_tc_ct_delete_flow (get_ct_priv (flow->priv), flow, attr);return ;
@@ -1203,6 +1209,7 @@ mlx5e_tc_unoffload_fdb_rules(struct mlx5_eswitch *esw,if (attr->esw_attr->split_count)mlx5_eswitch_del_fwd_rule (esw, flow->rule[1 ], attr); +offload_rule_0:mlx5_eswitch_del_offloaded_rule (esw, flow->rule[0 ], attr); }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 122/142 net/mlx5e: Revert parameters on errors when changing trust state without reset
In reply to Greg Kroah-HartmanFrom: Maxim Mikityanskiy <[email protected]>
[ Upstream commit 912c9b5fcca1ab65b806c19dd3b3cb12d73c6fe2 ]
Trust state may be changed without recreating the channels. It happens when the channels are closed, and when channel parameters (min inline mode) stay the same after changing the trust state. Changing the trust state is a hardware command that may fail. The current code didn't restore the channel parameters to their old values if an error happened and the channels were closed. This commit adds handling for this case.
--- drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)
drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c +8 -5
@@ -1151,6 +1151,7 @@ static int mlx5e_set_trust_state(struct mlx5e_priv *priv, u8 trust_state) {struct mlx5e_channels new_channels = {};bool reset_channels = true; +bool opened;int err =0 ;mutex_lock (&priv->state_lock);
@@ -1159,22 +1160,24 @@ static int mlx5e_set_trust_state(struct mlx5e_priv *priv, u8 trust_state)mlx5e_params_calc_trust_tx_min_inline_mode (priv->mdev, &new_channels.params, trust_state); -if (!test_bit (MLX5E_STATE_OPENED , &priv->state)) { - priv->channels.params = new_channels.params; + opened =test_bit (MLX5E_STATE_OPENED , &priv->state); +if (!opened) reset_channels = false; - }/* Skip if tx_min_inline is the same */ if (new_channels.params.tx_min_inline_mode == priv->channels.params.tx_min_inline_mode) reset_channels = false; -if (reset_channels) +if (reset_channels) { err =mlx5e_safe_switch_channels (priv, &new_channels, mlx5e_update_trust_state_hw, &trust_state); -else + }else { err =mlx5e_update_trust_state_hw (priv, &trust_state); +if (!err && !opened) + priv->channels.params = new_channels.params; + }mutex_unlock (&priv->state_lock);
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 121/142 net/mlx5e: Correctly handle changing the number of queues when the interface is down
In reply to Greg Kroah-HartmanFrom: Maxim Mikityanskiy <[email protected]>
[ Upstream commit 57ac4a31c48377a3e675b2a731ceacbefefcd34d ]
This commit addresses two issues related to changing the number of queues when the channels are closed:
1. Missing call to mlx5e_num_channels_changed to update real_num_tx_queues when the number of TCs is changed.
2. When mlx5e_num_channels_changed returns an error, the channel parameters must be reverted.
Two Fixes: tags correspond to the first commits where these two issues were introduced.
--- drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 8 +++++++- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 7 +++++++ 2 files changed, 14 insertions(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c +7 -1
@@ -444,12 +444,18 @@ int mlx5e_ethtool_set_channels(struct mlx5e_priv *priv, goto out; } - new_channels.params = priv->channels.params; + new_channels.params = *cur_params; new_channels.params.num_channels = count;if (!test_bit (MLX5E_STATE_OPENED , &priv->state)) { +struct mlx5e_params old_params; + + old_params = *cur_params; *cur_params = new_channels.params; err =mlx5e_num_channels_changed (priv); +if (err) + *cur_params = old_params; + goto out; }
drivers/net/ethernet/mellanox/mlx5/core/en_main.c +7 -0
@@ -3580,7 +3580,14 @@ static int mlx5e_setup_tc_mqprio(struct mlx5e_priv *priv, new_channels.params.num_tc = tc ? tc :1 ;if (!test_bit (MLX5E_STATE_OPENED , &priv->state)) { +struct mlx5e_params old_params; + + old_params = priv->channels.params; priv->channels.params = new_channels.params; + err =mlx5e_num_channels_changed (priv); +if (err) + priv->channels.params = old_params; + goto out; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 134/142 NFC: fix possible resource leak
In reply to Greg Kroah-HartmanFrom: Pan Bian <[email protected]>
commit d8f923c3ab96dbbb4e3c22d1afc1dc1d3b195cd8 upstream.
Put the device to avoid resource leak on path that the polling flag is invalid.
--- net/nfc/netlink.c | 1 + 1 file changed, 1 insertion(+)
net/nfc/netlink.c +1 -0
@@ -852,6 +852,7 @@ static int nfc_genl_stop_poll(struct sk_if (!dev->polling) {device_unlock (&dev->dev); +nfc_put_device (dev);return -EINVAL ; }
Greg Kroah-Hartman
maintainerPATCH 139/142 scsi: qla2xxx: Fix description for parameter ql2xenforce_iocb_limit
In reply to Greg Kroah-HartmanFrom: Enzo Matsumiya <[email protected]>
commit aa2c24e7f415e9c13635cee22ff4e15a80215551 upstream.
Parameter ql2xenforce_iocb_limit is enabled by default.
--- drivers/scsi/qla2xxx/qla_os.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/qla2xxx/qla_os.c +1 -1
@@ -42,7 +42,7 @@ MODULE_PARM_DESC(ql2xfulldump_on_mpifailint ql2xenforce_iocb_limit =1 ;module_param (ql2xenforce_iocb_limit, int,S_IRUGO |S_IWUSR );MODULE_PARM_DESC (ql2xenforce_iocb_limit, -"Enforce IOCB throttling, to avoid FW congestion. (default: 0)" ); +"Enforce IOCB throttling, to avoid FW congestion. (default: 1)" );/* * CT6 CTX allocation cache
Greg Kroah-Hartman
maintainerPATCH 138/142 ASoC: topology: Fix memory corruption in soc_tplg_denum_create_values()
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
commit 543466ef3571069b8eb13a8ff7c7cfc8d8a75c43 upstream.
The allocation uses sizeof(u32) when it should use sizeof(unsigned long) so it leads to memory corruption later in the function when the data is initialized.
--- sound/soc/soc-topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/soc-topology.c +1 -1
@@ -987,7 +987,7 @@ static int soc_tplg_denum_create_values(return -EINVAL ; se->dobj.control.dvalues =kzalloc (le32_to_cpu (ec->items) * -sizeof (u32), +sizeof (*se->dobj.control.dvalues),GFP_KERNEL );if (!se->dobj.control.dvalues)return -ENOMEM ;
Greg Kroah-Hartman
maintainerPATCH 136/142 ASoC: mediatek: mt8183-mt6358: ignore TDM DAI link by default
In reply to Greg Kroah-HartmanFrom: Tzung-Bi Shih <[email protected]>
commit 5ac154443e686b06242aa49de30a12b74ea9ca98 upstream.
hdmi-codec is an optional property. Ignore to bind TDM DAI link if the property isn't specified.
--- sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c +4 -1
@@ -515,6 +515,7 @@ static struct snd_soc_dai_link mt8183_mt .ignore_suspend = 1, .be_hw_params_fixup = mt8183_i2s_hw_params_fixup, .ops = &mt8183_mt6358_tdm_ops, + .ignore = 1, .init = mt8183_mt6358_ts3a227_max98357_hdmi_init, SND_SOC_DAILINK_REG(tdm), },
@@ -661,8 +662,10 @@ mt8183_mt6358_ts3a227_max98357_dev_probeSND_SOC_DAIFMT_CBM_CFM ; } -if (hdmi_codec &&strcmp (dai_link->name,"TDM" ) ==0 ) +if (hdmi_codec &&strcmp (dai_link->name,"TDM" ) ==0 ) { dai_link->codecs->of_node = hdmi_codec; + dai_link->ignore =0 ; + }if (!dai_link->platforms->name) dai_link->platforms->of_node = platform_node;
Greg Kroah-Hartman
maintainerPATCH 112/142 i40e: acquire VSI pointer only after VF is initialized
In reply to Greg Kroah-HartmanFrom: Stefan Assmann <[email protected]>
[ Upstream commit 67a3c6b3cc40bb217c3ff947a55053151a00fea0 ]
This change simplifies the VF initialization check and also minimizes the delay between acquiring the VSI pointer and using it. As known by the commit being fixed, there is a risk of the VSI pointer getting changed. Therefore minimize the delay between getting and using the pointer.
--- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +4 -7
@@ -4046,20 +4046,16 @@ int i40e_ndo_set_vf_mac(struct net_device *netdev, int vf_id, u8 *mac) goto error_param; vf = &pf->vf[vf_id]; - vsi = pf->vsi[vf->lan_vsi_idx];/* When the VF is resetting wait until it is done. * It can take up to 200 milliseconds, * but wait for up to 300 milliseconds to be safe. -* If the VF is indeed in reset, the vsi pointer has -* to show on the newly loaded vsi under pf->vsi[id]. +* Acquire the VSI pointer only after the VF has been +* properly initialized. */ for (i =0 ; i <15 ; i++) { -if (test_bit (I40E_VF_STATE_INIT , &vf->vf_states)) { -if (i >0 ) - vsi = pf->vsi[vf->lan_vsi_idx]; +if (test_bit (I40E_VF_STATE_INIT , &vf->vf_states))break ; - }msleep (20 ); }if (!test_bit (I40E_VF_STATE_INIT , &vf->vf_states)) {
@@ -4068,6 +4064,7 @@ int i40e_ndo_set_vf_mac(struct net_device *netdev, int vf_id, u8 *mac) ret = -EAGAIN ; goto error_param; } + vsi = pf->vsi[vf->lan_vsi_idx];if (is_multicast_ether_addr (mac)) { dev_err(&pf->pdev->dev,
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 116/142 net/mlx5e: free page before return
In reply to Greg Kroah-HartmanFrom: Pan Bian <[email protected]>
[ Upstream commit 258ed19f075fbc834fe5d69d8b54983fc11e0d4a ]
Instead of directly return, goto the error handling label to free allocated page.
--- drivers/net/ethernet/mellanox/mlx5/core/en/health.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlx5/core/en/health.c +1 -1
@@ -275,7 +275,7 @@ int mlx5e_health_rsc_fmsg_dump(struct mlx5e_priv *priv, struct mlx5_rsc_key *key err =devlink_fmsg_binary_pair_nest_start (fmsg,"data" );if (err) -return err; + goto free_page; cmd =mlx5_rsc_dump_cmd_create (mdev, key);if (IS_ERR (cmd)) {
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 115/142 net/mlx5e: E-switch, Fix rate calculation for overflow
In reply to Greg Kroah-HartmanFrom: Parav Pandit <[email protected]>
[ Upstream commit 1fe3e3166b35240615ab7f8276af2bbf2e51f559 ]
rate_bytes_ps is a 64-bit field. It passed as 32-bit field to apply_police_params(). Due to this when police rate is higher than 4Gbps, 32-bit calculation ignores the carry. This results in incorrect rate configurationn the device.
Fix it by performing 64-bit calculation.
--- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +8 -3
@@ -67,6 +67,7 @@#include "lib/geneve.h" #include "lib/fs_chains.h" #include "diag/en_tc_tracepoint.h" +#include <asm/div64.h> #define nic_chains (priv) ((priv)->fs.tc.chains)#define MLX5_MH_ACT_SZ MLX5_UN_SZ_BYTES(set_add_copy_action_in_auto)
@@ -5009,13 +5010,13 @@ errout:return err; } -static int apply_police_params (struct mlx5e_priv *priv,u32 rate, +static int apply_police_params (struct mlx5e_priv *priv,u64 rate,struct netlink_ext_ack *extack) {struct mlx5e_rep_priv *rpriv = priv->ppriv;struct mlx5_eswitch *esw; +u32 rate_mbps =0 ;u16 vport_num; -u32 rate_mbps;int err; vport_num = rpriv->rep->vport;
@@ -5032,7 +5033,11 @@ static int apply_police_params(struct mlx5e_priv *priv, u32 rate,* Moreover, if rate is non zero we choose to configure to a minimum of * 1 mbit/sec. */ - rate_mbps = rate ?max_t (u32, (rate *8 +500000 ) /1000000 ,1 ) :0 ; +if (rate) { + rate = (rate *BITS_PER_BYTE ) +500000 ; + rate_mbps =max_t (u32,do_div (rate,1000000 ),1 ); + } + err =mlx5_esw_modify_vport_rate (esw, vport_num, rate_mbps);if (err)NL_SET_ERR_MSG_MOD (extack,"failed applying action to hardware" );
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 142/142 tcp: fix TLP timer not set when CA_STATE changes from DISORDER to OPEN
In reply to Greg Kroah-HartmanFrom: Pengcheng Yang <[email protected]>
commit 62d9f1a6945ba69c125e548e72a36d203b30596e upstream.
Upon receiving a cumulative ACK that changes the congestion state from Disorder to Open, the TLP timer is not set. If the sender is app-limited, it can only wait for the RTO timer to expire and retransmit.
The reason for this is that the TLP timer is set before the congestion state changes in tcp_ack(), so we delay the time point of calling tcp_set_xmit_timer() until after tcp_fastretrans_alert() returns and remove the FLAG_SET_XMIT_TIMER from ack_flag when the RACK reorder timer is set.
This commit has two additional benefits:
1) Make sure to reset RTO according to RFC6298 when receiving ACK, to avoid spurious RTO caused by RTO timer early expires.
2) Reduce the xmit timer reschedule once per ACK when the RACK reorder timer is set.
--- include/net/tcp.h | 2 +- net/ipv4/tcp_input.c | 10 ++++++---- net/ipv4/tcp_recovery.c | 5 +++-- 3 files changed, 10 insertions(+), 7 deletions(-)
include/net/tcp.h +1 -1
@@ -2066,7 +2066,7 @@ void tcp_mark_skb_lost(struct sock *sk,void tcp_newreno_mark_lost (struct sock *sk,bool snd_una_advanced);extern s32 tcp_rack_skb_timeout (struct tcp_sock *tp,struct sk_buff *skb,u32 reo_wnd); -extern void tcp_rack_mark_lost (struct sock *sk); +extern bool tcp_rack_mark_lost (struct sock *sk);extern void tcp_rack_advance (struct tcp_sock *tp,u8 sacked,u32 end_seq,u64 xmit_time);extern void tcp_rack_reo_timeout (struct sock *sk);
net/ipv4/tcp_input.c +6 -4
@@ -2845,7 +2845,8 @@ static void tcp_identify_packet_loss(str }else if (tcp_is_rack (sk)) {u32 prior_retrans = tp->retrans_out; -tcp_rack_mark_lost (sk); +if (tcp_rack_mark_lost (sk)) + *ack_flag &= ~FLAG_SET_XMIT_TIMER ;if (prior_retrans > tp->retrans_out) *ack_flag |=FLAG_LOST_RETRANS ; }
@@ -3802,9 +3803,6 @@ static int tcp_ack(struct sock *sk, consif (tp->tlp_high_seq)tcp_process_tlp_ack (sk, ack, flag); -/* If needed, reset TLP/RTO timer; RACK may later override this. */ -if (flag &FLAG_SET_XMIT_TIMER ) -tcp_set_xmit_timer (sk);if (tcp_ack_is_dubious (sk, flag)) {if (!(flag & (FLAG_SND_UNA_ADVANCED |FLAG_NOT_DUP ))) {
@@ -3817,6 +3815,10 @@ static int tcp_ack(struct sock *sk, cons &rexmit); } +/* If needed, reset TLP/RTO timer when RACK doesn't set. */ +if (flag &FLAG_SET_XMIT_TIMER ) +tcp_set_xmit_timer (sk); +if ((flag &FLAG_FORWARD_PROGRESS ) || !(flag &FLAG_NOT_DUP ))sk_dst_confirm (sk);
net/ipv4/tcp_recovery.c +3 -2
@@ -96,13 +96,13 @@ static void tcp_rack_detect_loss(struct } } -void tcp_rack_mark_lost (struct sock *sk) +bool tcp_rack_mark_lost (struct sock *sk) {struct tcp_sock *tp =tcp_sk (sk);u32 timeout;if (!tp->rack.advanced) -return ; +return false;/* Reset the advanced flag to avoid unnecessary queue scanning */ tp->rack.advanced =0 ;
@@ -112,6 +112,7 @@ void tcp_rack_mark_lost(struct sock *sk)inet_csk_reset_xmit_timer (sk,ICSK_TIME_REO_TIMEOUT , timeout,inet_csk (sk)->icsk_rto); } +return !!timeout; }/* Record the most recently (re)sent time among the (s)acked packets
Hi!
Quoted 4 lines
This is the start of the stable review cycle for the 5.10.13 release. There are 142 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
CIP testing did not find any problems here:
https://gitlab.com/cip-project/cip-testing/linux-stable-rc-ci/-/tree/linux-5.10.y
Best regards,
Pavel
Signature · 2 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Re: [PATCH 5.10 067/142] tee: optee: replace might_sleep with cond_resched
In reply to Greg Kroah-HartmanHi!
Quoted 8 lines
From: Rouven Czerwinski <[email protected]>
commit
dcb3b06d9c34f33a249f65c08805461fb0c4325bupstream.
might_sleep()is a debugging aid and triggers rescheduling only for certain kernel configurations. Replace with an explicit check and reschedule to work for all kernel configurations. Fixes the following trace:
The need_resched() part is unneccessary/wrong AFAICT. And it seems there's already a follow up patch that fixes this one.
(I'm not sure it causes any problem).
Best regards,
Pavel
Quoted 11 lines
drivers/tee/optee/call.c +2
-1@@ -148,7 +149,8 @@ u32 optee_do_call_with_arg(struct tee_co*/ optee_cq_wait_for_completion (&optee->call_queue, &w); }else if (OPTEE_SMC_RETURN_IS_RPC (res.a0)) { -might_sleep (); +if (need_resched ()) +cond_resched (); param.a0 = res.a0; param.a1 = res.a1; param.a2 = res.a2;
Signature · 1 line
http://www.livejournal.com/~pavelmachek
Greg Kroah-Hartman
maintainerPATCH 141/142 tcp: make TCP_USER_TIMEOUT accurate for zero window probes
In reply to Greg Kroah-HartmanFrom: Enke Chen <[email protected]>
commit 344db93ae3ee69fc137bd6ed89a8ff1bf5b0db08 upstream.
The TCP_USER_TIMEOUT is checked by the 0-window probe timer. As the timer has backoff with a max interval of about two minutes, the actual timeout for TCP_USER_TIMEOUT can be off by up to two minutes.
In this patch the TCP_USER_TIMEOUT is made more accurate by taking it into account when computing the timer value for the 0-window probes.
This patch is similar to and builds on top of the one that made TCP_USER_TIMEOUT accurate for RTOs in commit b701a99e431d ("tcp: Add tcp_clamp_rto_to_user_timeout() helper to improve accuracy").
--- include/net/tcp.h | 1 + net/ipv4/tcp_input.c | 4 ++-- net/ipv4/tcp_output.c | 2 ++ net/ipv4/tcp_timer.c | 18 ++++++++++++++++++ 4 files changed, 23 insertions(+), 2 deletions(-)
include/net/tcp.h +1 -0
@@ -625,6 +625,7 @@ static inline void tcp_clear_xmit_timersunsigned int tcp_sync_mss (struct sock *sk,u32 pmtu);unsigned int tcp_current_mss (struct sock *sk); +u32 tcp_clamp_probe0_to_user_timeout (const struct sock *sk,u32 when);/* Bound MSS / TSO packet size with the half of the window */ static inline int tcp_bound_to_half_wnd (struct tcp_sock *tp,int pktsize)
net/ipv4/tcp_input.c +2 -2
@@ -3378,8 +3378,8 @@ static void tcp_ack_probe(struct sock *s }else {unsigned long when =tcp_probe0_when (sk,TCP_RTO_MAX ); -tcp_reset_xmit_timer (sk,ICSK_TIME_PROBE0 , - when,TCP_RTO_MAX ); + when =tcp_clamp_probe0_to_user_timeout (sk, when); +tcp_reset_xmit_timer (sk,ICSK_TIME_PROBE0 , when,TCP_RTO_MAX ); } }
net/ipv4/tcp_output.c +2 -0
@@ -4095,6 +4095,8 @@ void tcp_send_probe0(struct sock *sk)*/ timeout =TCP_RESOURCE_PROBE_INTERVAL ; } + + timeout =tcp_clamp_probe0_to_user_timeout (sk, timeout);tcp_reset_xmit_timer (sk,ICSK_TIME_PROBE0 , timeout,TCP_RTO_MAX ); }
net/ipv4/tcp_timer.c +18 -0
@@ -40,6 +40,24 @@ static u32 tcp_clamp_rto_to_user_timeoutreturn min_t (u32, icsk->icsk_rto,msecs_to_jiffies (remaining)); } +u32 tcp_clamp_probe0_to_user_timeout (const struct sock *sk,u32 when) +{ +struct inet_connection_sock *icsk =inet_csk (sk); +u32 remaining; +s32 elapsed; + +if (!icsk->icsk_user_timeout || !icsk->icsk_probes_tstamp) +return when; + + elapsed = tcp_jiffies32 - icsk->icsk_probes_tstamp; +if (unlikely (elapsed <0 )) + elapsed =0 ; + remaining =msecs_to_jiffies (icsk->icsk_user_timeout) - elapsed; + remaining =max_t (u32, remaining,TCP_TIMEOUT_MIN ); + +return min_t (u32, remaining, when); +} +/** * tcp_write_err() - close socket and save error info * @sk: The socket the error has appeared on.
Greg Kroah-Hartman
maintainerPATCH 108/142 ice: Implement flow for IPv6 next header (extension header)
In reply to Greg Kroah-HartmanFrom: Nick Nunley <[email protected]>
[ Upstream commit 1b0b0b581b945ee27beb70e8199270a22dd5a2f6 ]
This patch is based on a similar change to i40e by Slawomir Laba:
"i40e: Implement flow for IPv6 next header (extension header)".
When a packet contains an IPv6 header with next header which is an extension header and not a protocol one, the kernel function skb_transport_header called with such sk_buff will return a pointer to the extension header and not to the TCP one.
The above explained call caused a problem with packet processing for skb with encapsulation for tunnel with ICE_TX_CTX_EIPT_IPV6. The extension header was not skipped at all.
The ipv6_skip_exthdr function does check if next header of the IPV6 header is an extension header and doesn't modify the l4_proto pointer if it points to a protocol header value so its safe to omit the comparison of exthdr and l4.hdr pointers. The ipv6_skip_exthdr can return value -1. This means that the skipping process failed and there is something wrong with the packet so it will be dropped.
--- drivers/net/ethernet/intel/ice/ice_txrx.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/net/ethernet/intel/ice/ice_txrx.c +6 -3
@@ -1923,12 +1923,15 @@ int ice_tx_csum(struct ice_tx_buf *first, struct ice_tx_offload_params *off)ICE_TX_CTX_EIPT_IPV4_NO_CSUM ; l4_proto = ip.v4->protocol; }else if (first->tx_flags &ICE_TX_FLAGS_IPV6 ) { +int ret; + tunnel |=ICE_TX_CTX_EIPT_IPV6 ; exthdr = ip.hdr +sizeof (*ip.v6); l4_proto = ip.v6->nexthdr; -if (l4.hdr != exthdr) -ipv6_skip_exthdr (skb, exthdr - skb->data, - &l4_proto, &frag_off); + ret =ipv6_skip_exthdr (skb, exthdr - skb->data, + &l4_proto, &frag_off); +if (ret <0 ) +return -1 ; }/* define outer transport */
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 117/142 net/mlx5e: Reduce tc unsupported key print level
In reply to Greg Kroah-HartmanFrom: Maor Dickman <[email protected]>
[ Upstream commit 48470a90a42a64dd2f70743a149894a292b356e0 ]
"Unsupported key used:" appears in kernel log when flows with unsupported key are used, arp fields for example.
OpenVSwitch was changed to match on arp fields by default that caused this warning to appear in kernel log for every arp rule, which can be a lot.
Fix by lowering print level from warning to debug.
--- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +2 -2
@@ -2272,8 +2272,8 @@ static int __parse_cls_flower(struct mlx5e_priv *priv, BIT(FLOW_DISSECTOR_KEY_ENC_OPTS) | BIT(FLOW_DISSECTOR_KEY_MPLS))) {NL_SET_ERR_MSG_MOD (extack,"Unsupported key" ); -netdev_warn (priv->netdev,"Unsupported key used: 0x%x\n" , - dissector->used_keys); +netdev_dbg (priv->netdev,"Unsupported key used: 0x%x\n" , + dissector->used_keys);return -EOPNOTSUPP ; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 114/142 net/mlx5: Fix memory leak on flow table creation error flow
In reply to Greg Kroah-HartmanFrom: Roi Dayan <[email protected]>
[ Upstream commit 487c6ef81eb98d0a43cb08be91b1fcc9b4250626 ]
When we create the ft object we also init rhltable in ft->fgs_hash. So in error flow before kfree of ft we need to destroy that rhltable.
--- drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c +1 -0
@@ -1141,6 +1141,7 @@ static struct mlx5_flow_table *__mlx5_create_flow_table(struct mlx5_flow_namespa destroy_ft: root->cmds->destroy_flow_table (root, ft); free_ft: +rhltable_destroy (&ft->fgs_hash);kfree (ft); unlock_root:mutex_unlock (&root->chain_lock);
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 113/142 igc: fix link speed advertising
In reply to Greg Kroah-HartmanFrom: Corinna Vinschen <[email protected]>
[ Upstream commit 329a3678ec69962aa67c91397efbd46d36635f91 ]
Link speed advertising in igc has two problems:
- When setting the advertisement via ethtool, the link speed is converted to the legacy 32 bit representation for the intel PHY code. This inadvertently drops ETHTOOL_LINK_MODE_2500baseT_Full_BIT (being beyond bit 31). As a result, any call to `ethtool -s ...' drops the 2500Mbit/s link speed from the PHY settings. Only reloading the driver alleviates that problem.
Fix this by converting the ETHTOOL_LINK_MODE_2500baseT_Full_BIT to the Intel PHY ADVERTISE_2500_FULL bit explicitly.
- Rather than checking the actual PHY setting, the .get_link_ksettings function always fills link_modes.advertising with all link speeds the device is capable of.
Fix this by checking the PHY autoneg_advertised settings and report only the actually advertised speeds up to ethtool.
--- drivers/net/ethernet/intel/igc/igc_ethtool.c | 24 +++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-)
drivers/net/ethernet/intel/igc/igc_ethtool.c +18 -6
@@ -1675,12 +1675,18 @@ static int igc_ethtool_get_link_ksettings(struct net_device *netdev, cmd->base.phy_address = hw->phy.addr;/* advertising link modes */ - ethtool_link_ksettings_add_link_mode(cmd, advertising, 10baseT_Half); - ethtool_link_ksettings_add_link_mode(cmd, advertising, 10baseT_Full); - ethtool_link_ksettings_add_link_mode(cmd, advertising, 100baseT_Half); - ethtool_link_ksettings_add_link_mode(cmd, advertising, 100baseT_Full); - ethtool_link_ksettings_add_link_mode(cmd, advertising, 1000baseT_Full); - ethtool_link_ksettings_add_link_mode(cmd, advertising, 2500baseT_Full); +if (hw->phy.autoneg_advertised &ADVERTISE_10_HALF ) + ethtool_link_ksettings_add_link_mode(cmd, advertising, 10baseT_Half); +if (hw->phy.autoneg_advertised &ADVERTISE_10_FULL ) + ethtool_link_ksettings_add_link_mode(cmd, advertising, 10baseT_Full); +if (hw->phy.autoneg_advertised &ADVERTISE_100_HALF ) + ethtool_link_ksettings_add_link_mode(cmd, advertising, 100baseT_Half); +if (hw->phy.autoneg_advertised &ADVERTISE_100_FULL ) + ethtool_link_ksettings_add_link_mode(cmd, advertising, 100baseT_Full); +if (hw->phy.autoneg_advertised &ADVERTISE_1000_FULL ) + ethtool_link_ksettings_add_link_mode(cmd, advertising, 1000baseT_Full); +if (hw->phy.autoneg_advertised &ADVERTISE_2500_FULL ) + ethtool_link_ksettings_add_link_mode(cmd, advertising, 2500baseT_Full);/* set autoneg settings */ if (hw->mac.autoneg ==1 ) {
@@ -1792,6 +1798,12 @@ igc_ethtool_set_link_ksettings(struct net_device *netdev,ethtool_convert_link_mode_to_legacy_u32 (&advertising, cmd->link_modes.advertising); +/* Converting to legacy u32 drops ETHTOOL_LINK_MODE_2500baseT_Full_BIT. +* We have to check this and convert it to ADVERTISE_2500_FULL +* (aka ETHTOOL_LINK_MODE_2500baseX_Full_BIT) explicitly. +*/ + if (ethtool_link_ksettings_test_link_mode(cmd, advertising, 2500baseT_Full)) + advertising |=ADVERTISE_2500_FULL ;if (cmd->base.autoneg ==AUTONEG_ENABLE ) { hw->mac.autoneg =1 ;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 140/142 team: protect features update by RCU to avoid deadlock
In reply to Greg Kroah-HartmanFrom: Ivan Vecera <[email protected]>
commit f0947d0d21b219e03940b9be6628a43445c0de7a upstream.
Function __team_compute_features() is protected by team->lock mutex when it is called from team_compute_features() used when features of an underlying device is changed. This causes a deadlock when NETDEV_FEAT_CHANGE notifier for underlying device is fired due to change propagated from team driver (e.g. MTU change). It's because callbacks like team_change_mtu() or team_vlan_rx_{add,del}_vid() protect their port list traversal by team->lock mutex.
Example (r8169 case where this driver disables TSO for certain MTU values):
...
[ 6391.348202] __mutex_lock.isra.6+0x2d0/0x4a0 [ 6391.358602] team_device_event+0x9d/0x160 [team] [ 6391.363756] notifier_call_chain+0x47/0x70 [ 6391.368329] netdev_update_features+0x56/0x60 [ 6391.373207] rtl8169_change_mtu+0x14/0x50 [r8169] [ 6391.378457] dev_set_mtu_ext+0xe1/0x1d0 [ 6391.387022] dev_set_mtu+0x52/0x90 [ 6391.390820] team_change_mtu+0x64/0xf0 [team] [ 6391.395683] dev_set_mtu_ext+0xe1/0x1d0 [ 6391.399963] do_setlink+0x231/0xf50
...
In fact team_compute_features() called from team_device_event() does not need to be protected by team->lock mutex and rcu_read_lock() is sufficient there for port list traversal.
--- drivers/net/team/team.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/team/team.c +3 -3
@@ -991,7 +991,8 @@ static void __team_compute_features(struunsigned int dst_release_flag =IFF_XMIT_DST_RELEASE |IFF_XMIT_DST_RELEASE_PERM ; -list_for_each_entry (port, &team->port_list, list) { +rcu_read_lock (); +list_for_each_entry_rcu (port, &team->port_list, list) { vlan_features =netdev_increment_features (vlan_features, port->dev->vlan_features,TEAM_VLAN_FEATURES );
@@ -1005,6 +1006,7 @@ static void __team_compute_features(struif (port->dev->hard_header_len > max_hard_header_len) max_hard_header_len = port->dev->hard_header_len; } +rcu_read_unlock (); team->dev->vlan_features = vlan_features; team->dev->hw_enc_features = enc_features | NETIF_F_GSO_ENCAP_ALL |
@@ -1020,9 +1022,7 @@ static void __team_compute_features(strustatic void team_compute_features (struct team *team) { -mutex_lock (&team->lock);__team_compute_features (team); -mutex_unlock (&team->lock);netdev_change_features (team->dev); }
Greg Kroah-Hartman
maintainerPATCH 111/142 ice: Fix MSI-X vector fallback logic
In reply to Greg Kroah-HartmanFrom: Brett Creeley <[email protected]>
[ Upstream commit f3fe97f64384fa4073d9dc0278c4b351c92e295c ]
The current MSI-X enablement logic tries to enable best-case MSI-X vectors and if that fails we only support a bare-minimum set. This includes a single MSI-X for 1 Tx and 1 Rx queue and a single MSI-X for the OICR interrupt. Unfortunately, the driver fails to load when we don't get as many MSI-X as requested for a couple reasons.
First, the code to allocate MSI-X in the driver tries to allocate num_online_cpus() MSI-X for LAN traffic without caring about the number of MSI-X actually enabled/requested from the kernel for LAN traffic. So, when calling ice_get_res() for the PF VSI, it returns failure because the number of available vectors is less than requested. Fix this by not allowing the PF VSI to allocation more than pf->num_lan_msix MSI-X vectors and pf->num_lan_msix Rx/Tx queues. Limiting the number of queues is done because we don't want more than 1 Tx/Rx queue per interrupt due to performance conerns.
Second, the driver assigns pf->num_lan_msix = 2, to account for LAN traffic and the OICR. However, pf->num_lan_msix is only meant for LAN MSI-X. This is causing a failure when the PF VSI tries to allocate/reserve the minimum pf->num_lan_msix because the OICR MSI-X has already been reserved, so there may not be enough MSI-X vectors left. Fix this by setting pf->num_lan_msix = 1 for the failure case. Then the ICE_MIN_MSIX accounts for the LAN MSI-X and the OICR MSI-X needed for the failure case.
Update the related defines used in ice_ena_msix_range() to align with the above behavior and remove the unused RDMA defines because RDMA is currently not supported. Also, remove the now incorrect comment.
--- drivers/net/ethernet/intel/ice/ice.h | 4 +++- drivers/net/ethernet/intel/ice/ice_lib.c | 14 +++++++++----- drivers/net/ethernet/intel/ice/ice_main.c | 8 ++------ 3 files changed, 14 insertions(+), 12 deletions(-)
drivers/net/ethernet/intel/ice/ice.h +3 -1
@@ -68,7 +68,9 @@#define ICE_INT_NAME_STR_LEN (IFNAMSIZ + 16)#define ICE_AQ_LEN 64#define ICE_MBXSQ_LEN 64 -#define ICE_MIN_MSIX 2 +#define ICE_MIN_LAN_TXRX_MSIX 1 +#define ICE_MIN_LAN_OICR_MSIX 1 +#define ICE_MIN_MSIX (ICE_MIN_LAN_TXRX_MSIX + ICE_MIN_LAN_OICR_MSIX)#define ICE_FDIR_MSIX 1#define ICE_NO_VSI 0xffff#define ICE_VSI_MAP_CONTIG 0
drivers/net/ethernet/intel/ice/ice_lib.c +9 -5
@@ -161,8 +161,9 @@ static void ice_vsi_set_num_qs(struct ice_vsi *vsi, u16 vf_id)switch (vsi->type) {case ICE_VSI_PF : - vsi->alloc_txq =min_t (int,ice_get_avail_txq_count (pf), -num_online_cpus ()); + vsi->alloc_txq =min3 (pf->num_lan_msix, +ice_get_avail_txq_count (pf), + (u16 )num_online_cpus ());if (vsi->req_txq) { vsi->alloc_txq = vsi->req_txq; vsi->num_txq = vsi->req_txq;
@@ -174,8 +175,9 @@ static void ice_vsi_set_num_qs(struct ice_vsi *vsi, u16 vf_id)if (!test_bit (ICE_FLAG_RSS_ENA , pf->flags)) { vsi->alloc_rxq =1 ; }else { - vsi->alloc_rxq =min_t (int,ice_get_avail_rxq_count (pf), -num_online_cpus ()); + vsi->alloc_rxq =min3 (pf->num_lan_msix, +ice_get_avail_rxq_count (pf), + (u16 )num_online_cpus ());if (vsi->req_rxq) { vsi->alloc_rxq = vsi->req_rxq; vsi->num_rxq = vsi->req_rxq;
@@ -184,7 +186,9 @@ static void ice_vsi_set_num_qs(struct ice_vsi *vsi, u16 vf_id) pf->num_lan_rx = vsi->alloc_rxq; - vsi->num_q_vectors =max_t (int, vsi->alloc_rxq, vsi->alloc_txq); + vsi->num_q_vectors =min_t (int, pf->num_lan_msix, +max_t (int, vsi->alloc_rxq, + vsi->alloc_txq));break ;case ICE_VSI_VF : vf = &pf->vf[vsi->vf_id];
drivers/net/ethernet/intel/ice/ice_main.c +2 -6
@@ -3433,18 +3433,14 @@ static int ice_ena_msix_range(struct ice_pf *pf)if (v_actual < v_budget) {dev_warn (dev,"not enough OS MSI-X vectors. requested = %d, obtained = %d\n" , v_budget, v_actual); -/* 2 vectors each for LAN and RDMA (traffic + OICR), one for flow director */ -#define ICE_MIN_LAN_VECS 2 -#define ICE_MIN_RDMA_VECS 2 -#define ICE_MIN_VECS (ICE_MIN_LAN_VECS + ICE_MIN_RDMA_VECS + 1) -if (v_actual <ICE_MIN_LAN_VECS ) { +if (v_actual <ICE_MIN_MSIX ) {/* error if we can't get minimum vectors */ pci_disable_msix (pf->pdev); err = -ERANGE ; goto msix_err; }else { - pf->num_lan_msix =ICE_MIN_LAN_VECS ; + pf->num_lan_msix =ICE_MIN_LAN_TXRX_MSIX ; } }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 135/142 ASoC: mediatek: mt8183-da7219: ignore TDM DAI link by default
In reply to Greg Kroah-HartmanFrom: Tzung-Bi Shih <[email protected]>
commit 4d36ed8eb0f749c9e781e0d3b041a7adeedcdaa9 upstream.
hdmi-codec is an optional property. Ignore to bind TDM DAI link if the property isn't specified.
--- sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c +4 -1
@@ -532,6 +532,7 @@ static struct snd_soc_dai_link mt8183_da .dpcm_playback = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8183_i2s_hw_params_fixup, + .ignore = 1, .init = mt8183_da7219_max98357_hdmi_init, SND_SOC_DAILINK_REG(tdm), },
@@ -754,8 +755,10 @@ static int mt8183_da7219_max98357_dev_pr } } -if (hdmi_codec &&strcmp (dai_link->name,"TDM" ) ==0 ) +if (hdmi_codec &&strcmp (dai_link->name,"TDM" ) ==0 ) { dai_link->codecs->of_node = hdmi_codec; + dai_link->ignore =0 ; + }if (!dai_link->platforms->name) dai_link->platforms->of_node = platform_node;
Greg Kroah-Hartman
maintainerPATCH 133/142 NFC: fix resource leak when target index is invalid
In reply to Greg Kroah-HartmanFrom: Pan Bian <[email protected]>
commit 3a30537cee233fb7da302491b28c832247d89bbe upstream.
Goto to the label put_dev instead of the label error to fix potential resource leak on path that the target index is invalid.
--- net/nfc/rawsock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/nfc/rawsock.c +1 -1
@@ -105,7 +105,7 @@ static int rawsock_connect(struct socketif (addr->target_idx > dev->target_next_idx -1 || addr->target_idx < dev->target_next_idx - dev->n_targets) { rc = -EINVAL ; - goto error; + goto put_dev; } rc =nfc_activate_target (dev, addr->target_idx, addr->nfc_protocol);
Greg Kroah-Hartman
maintainerPATCH 137/142 ASoC: topology: Properly unregister DAI on removal
In reply to Greg Kroah-HartmanFrom: Amadeusz Sławiński <[email protected]>
commit fc4cb1e15f0c66f2e37314349dc4a82bd946fbb1 upstream.
DAIs need to be removed when topology unload function is called (usually done when component is being removed). We can't do this when device is being removed, as structures we operate on when removing DAI can already be freed.
--- sound/soc/soc-topology.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
sound/soc/soc-topology.c +5 -4
@@ -506,7 +506,7 @@ static void remove_dai(struct snd_soc_co {struct snd_soc_dai_driver *dai_drv = container_of(dobj, struct snd_soc_dai_driver, dobj); -struct snd_soc_dai *dai; +struct snd_soc_dai *dai, *_dai;if (pass !=SOC_TPLG_PASS_PCM_DAI )return ;
@@ -514,9 +514,9 @@ static void remove_dai(struct snd_soc_coif (dobj->ops && dobj->ops->dai_unload) dobj->ops->dai_unload (comp, dobj); -for_each_component_dais (comp, dai) +for_each_component_dais_safe (comp, dai, _dai)if (dai->driver == dai_drv) - dai->driver =NULL ; +snd_soc_unregister_dai (dai);kfree (dai_drv->playback.stream_name);kfree (dai_drv->capture.stream_name);
@@ -1876,7 +1876,7 @@ static int soc_tplg_dai_create(struct solist_add (&dai_drv->dobj.list, &tplg->comp->dobj_list);/* register the DAI to the component */ - dai =devm_snd_soc_register_dai (tplg->comp->dev, tplg->comp, dai_drv, false); + dai =snd_soc_register_dai (tplg->comp, dai_drv, false);if (!dai)return -ENOMEM ;
@@ -1884,6 +1884,7 @@ static int soc_tplg_dai_create(struct so ret =snd_soc_dapm_new_dai_widgets (dapm, dai);if (ret !=0 ) {dev_err (dai->dev,"Failed to create DAI widgets %d\n" , ret); +snd_soc_unregister_dai (dai);return ret; }
Greg Kroah-Hartman
maintainerPATCH 132/142 rxrpc: Fix memory leak in rxrpc_lookup_local
In reply to Greg Kroah-HartmanFrom: Takeshi Misawa <[email protected]>
commit b8323f7288abd71794cd7b11a4c0a38b8637c8b5 upstream.
Commit 9ebeddef58c4 ("rxrpc: rxrpc_peer needs to hold a ref on the rxrpc_local record") Then release ref in __rxrpc_put_peer and rxrpc_put_peer_locked.
struct rxrpc_peer *rxrpc_alloc_peer(struct rxrpc_local *local, gfp_t gfp)
- peer->local = local;
+ peer->local = rxrpc_get_local(local);
rxrpc_discard_prealloc also need ref release in discarding.
syzbot report:
BUG: memory leak
unreferenced object 0xffff8881080ddc00 (size 256):
comm "syz-executor339", pid 8462, jiffies 4294942238 (age 12.350s)
hex dump (first 32 bytes):
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 0a 00 00 00 00 c0 00 08 81 88 ff ff ................
backtrace:
[<000000002b6e495f>] kmalloc include/linux/slab.h:552 [inline]
[<000000002b6e495f>] kzalloc include/linux/slab.h:682 [inline]
[<000000002b6e495f>] rxrpc_alloc_local net/rxrpc/local_object.c:79 [inline]
[<000000002b6e495f>] rxrpc_lookup_local+0x1c1/0x760 net/rxrpc/local_object.c:244
[<000000006b43a77b>] rxrpc_bind+0x174/0x240 net/rxrpc/af_rxrpc.c:149
[<00000000fd447a55>] afs_open_socket+0xdb/0x200 fs/afs/rxrpc.c:64
[<000000007fd8867c>] afs_net_init+0x2b4/0x340 fs/afs/main.c:126
[<0000000063d80ec1>] ops_init+0x4e/0x190 net/core/net_namespace.c:152
[<00000000073c5efa>] setup_net+0xde/0x2d0 net/core/net_namespace.c:342
[<00000000a6744d5b>] copy_net_ns+0x19f/0x3e0 net/core/net_namespace.c:483
[<0000000017d3aec3>] create_new_namespaces+0x199/0x4f0 kernel/nsproxy.c:110
[<00000000186271ef>] unshare_nsproxy_namespaces+0x9b/0x120 kernel/nsproxy.c:226
[<000000002de7bac4>] ksys_unshare+0x2fe/0x5c0 kernel/fork.c:2957
[<00000000349b12ba>] __do_sys_unshare kernel/fork.c:3025 [inline]
[<00000000349b12ba>] __se_sys_unshare kernel/fork.c:3023 [inline]
[<00000000349b12ba>] __x64_sys_unshare+0x12/0x20 kernel/fork.c:3023
[<000000006d178ef7>] do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
[<00000000637076d4>] entry_SYSCALL_64_after_hwframe+0x44/0xa9--- net/rxrpc/call_accept.c | 1 + 1 file changed, 1 insertion(+)
net/rxrpc/call_accept.c +1 -0
@@ -197,6 +197,7 @@ void rxrpc_discard_prealloc(struct rxrpc tail = b->peer_backlog_tail;while (CIRC_CNT (head, tail, size) >0 ) {struct rxrpc_peer *peer = b->peer_backlog[tail]; +rxrpc_put_local (peer->local);kfree (peer); tail = (tail +1 ) & (size -1 ); }
Greg Kroah-Hartman
maintainerPATCH 131/142 selftests: forwarding: Specify interface when invoking mausezahn
In reply to Greg Kroah-HartmanFrom: Danielle Ratson <[email protected]>
[ Upstream commit 11df27f7fdf02cc2bb354358ad482e1fdd690589 ]
Specify the interface through which packets should be transmitted so that the test will pass regardless of the libnet version against which mausezahn is linked.
--- tools/testing/selftests/net/forwarding/router_mpath_nh.sh | 2 +- tools/testing/selftests/net/forwarding/router_multipath.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
tools/testing/selftests/net/forwarding/router_mpath_nh.sh +1 -1
@@ -197,7 +197,7 @@ multipath4_test() t0_rp12=$(link_stats_tx_packets_get $rp12) t0_rp13=$(link_stats_tx_packets_get $rp13) - ip vrf exec vrf-h1 $MZ -q -p 64 -A 192.0.2.2 -B 198.51.100.2 \ + ip vrf exec vrf-h1 $MZ $h1 -q -p 64 -A 192.0.2.2 -B 198.51.100.2 \ -d 1msec -t udp "sp=1024,dp=0-32768" t1_rp12=$(link_stats_tx_packets_get $rp12)
tools/testing/selftests/net/forwarding/router_multipath.sh +1 -1
@@ -178,7 +178,7 @@ multipath4_test() t0_rp12=$(link_stats_tx_packets_get $rp12) t0_rp13=$(link_stats_tx_packets_get $rp13) - ip vrf exec vrf-h1 $MZ -q -p 64 -A 192.0.2.2 -B 198.51.100.2 \ + ip vrf exec vrf-h1 $MZ $h1 -q -p 64 -A 192.0.2.2 -B 198.51.100.2 \ -d 1msec -t udp "sp=1024,dp=0-32768" t1_rp12=$(link_stats_tx_packets_get $rp12)
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 127/142 of/device: Update dma_range_map only when dev has valid dma-ranges
In reply to Greg Kroah-HartmanFrom: Yong Wu <[email protected]>
[ Upstream commit 89c7cb1608ac3c7ecc19436469f35ed12da97e1d ]
The commit e0d072782c73 ("dma-mapping: introduce DMA range map, supplanting dma_pfn_offset") always update dma_range_map even though it was already set, like in the sunxi_mbus driver. the issue is reported at [1]. This patch avoid this(Updating it only when dev has valid dma-ranges).
Meanwhile, dma_range_map contains the devices' dma_ranges information, This patch moves dma_range_map before of_iommu_configure. The iommu driver may need to know the dma_address requirements of its iommu consumer devices.
[1] https://lore.kernel.org/linux-arm-kernel/[email protected]/
--- drivers/of/device.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
drivers/of/device.c +7 -3
@@ -162,9 +162,11 @@ int of_dma_configure_id(struct device *dev, struct device_node *np, mask =DMA_BIT_MASK (ilog2 (end) +1 ); dev->coherent_dma_mask &= mask; *dev->dma_mask &= mask; -/* ...but only set bus limit if we found valid dma-ranges earlier */ -if (!ret) +/* ...but only set bus limit and range map if we found valid dma-ranges earlier */ +if (!ret) { dev->bus_dma_limit = end; + dev->dma_range_map = map; + } coherent =of_dma_is_coherent (np); dev_dbg(dev, "device is%sdma coherent\n",
@@ -172,6 +174,9 @@ int of_dma_configure_id(struct device *dev, struct device_node *np, iommu =of_iommu_configure (dev, np, id);if (PTR_ERR (iommu) == -EPROBE_DEFER ) { +/* Don't touch range map if it wasn't set from a valid dma-ranges */ +if (!ret) + dev->dma_range_map =NULL ;kfree (map);return -EPROBE_DEFER ; }
@@ -181,7 +186,6 @@ int of_dma_configure_id(struct device *dev, struct device_node *np,arch_setup_dma_ops (dev, dma_start, size, iommu, coherent); - dev->dma_range_map = map;return 0 ; }EXPORT_SYMBOL_GPL (of_dma_configure_id);
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 130/142 nvme-multipath: Early exit if no path is available
In reply to Greg Kroah-HartmanFrom: Daniel Wagner <[email protected]>
[ Upstream commit d1bcf006a9d3d63c1bcb65a993cb13756954cd9c ]
nvme_round_robin_path() should test if the return ns pointer is valid. nvme_next_ns() will return a NULL pointer if there is no path left.
--- drivers/nvme/host/multipath.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/multipath.c +1 -1
@@ -221,7 +221,7 @@ static struct nvme_ns *nvme_round_robin_path(struct nvme_ns_head *head, }for (ns =nvme_next_ns (head, old); - ns != old; + ns && ns != old; ns =nvme_next_ns (head, ns)) {if (nvme_path_is_disabled (ns))continue ;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 125/142 can: dev: prevent potential information leak in can_fill_info()
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
[ Upstream commit b552766c872f5b0d90323b24e4c9e8fa67486dd5 ]
The "bec" struct isn't necessarily always initialized. For example, the mcp251xfd_get_berr_counter() function doesn't initialize anything if the interface is down.
--- drivers/net/can/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/can/dev.c +1 -1
@@ -1163,7 +1163,7 @@ static int can_fill_info(struct sk_buff *skb, const struct net_device *dev) {struct can_priv *priv =netdev_priv (dev);struct can_ctrlmode cm = {.flags = priv->ctrlmode}; -struct can_berr_counter bec; +struct can_berr_counter bec = { };enum can_state state = priv->state;if (priv->do_get_state)
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 126/142 ACPI/IORT: Do not blindly trust DMA masks from firmware
In reply to Greg Kroah-HartmanFrom: Moritz Fischer <[email protected]>
[ Upstream commit a1df829ead5877d4a1061e976a50e2e665a16f24 ]
Address issue observed on real world system with suboptimal IORT table where DMA masks of PCI devices would get set to 0 as result.
iort_dma_setup() would query the root complex'/named component IORT entry for a DMA mask, and use that over the one the device has been configured with earlier.
Ideally we want to use the minimum mask of what the IORT contains for the root complex and what the device was configured with.
--- drivers/acpi/arm64/iort.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
drivers/acpi/arm64/iort.c +12 -2
@@ -1107,6 +1107,11 @@ static int nc_dma_get_range(struct device *dev, u64 *size) ncomp = (struct acpi_iort_named_component *)node->node_data; +if (!ncomp->memory_address_limit) { +pr_warn (FW_BUG "Named component missing memory address limit\n" ); +return -EINVAL ; + } + *size = ncomp->memory_address_limit >=64 ?U64_MAX :1ULL <<ncomp->memory_address_limit;
@@ -1126,6 +1131,11 @@ static int rc_dma_get_range(struct device *dev, u64 *size) rc = (struct acpi_iort_root_complex *)node->node_data; +if (!rc->memory_address_limit) { +pr_warn (FW_BUG "Root complex missing memory address limit\n" ); +return -EINVAL ; + } + *size = rc->memory_address_limit >=64 ?U64_MAX :1ULL <<rc->memory_address_limit;
@@ -1173,8 +1183,8 @@ void iort_dma_setup(struct device *dev, u64 *dma_addr, u64 *dma_size) end = dmaaddr + size -1 ; mask =DMA_BIT_MASK (ilog2 (end) +1 ); dev->bus_dma_limit = end; - dev->coherent_dma_mask = mask; - *dev->dma_mask = mask; + dev->coherent_dma_mask =min (dev->coherent_dma_mask, mask); + *dev->dma_mask =min (*dev->dma_mask, mask); } *dma_addr = dmaaddr;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 110/142 ice: Dont allow more channels than LAN MSI-X available
In reply to Greg Kroah-HartmanFrom: Brett Creeley <[email protected]>
[ Upstream commit 943b881e35829403da638fcb34a959125deafef3 ]
Currently users could create more channels than LAN MSI-X available. This is happening because there is no check against pf->num_lan_msix when checking the max allowed channels and will cause performance issues if multiple Tx and Rx queues are tied to a single MSI-X. Fix this by not allowing more channels than LAN MSI-X available in pf->num_lan_msix.
--- drivers/net/ethernet/intel/ice/ice_ethtool.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/net/ethernet/intel/ice/ice_ethtool.c +4 -4
@@ -3258,8 +3258,8 @@ ice_set_rxfh(struct net_device *netdev, const u32 *indir, const u8 *key,*/ static int ice_get_max_txq (struct ice_pf *pf) { -return min_t (int,num_online_cpus (), - pf->hw.func_caps.common_cap.num_txq); +return min3 (pf->num_lan_msix, (u16 )num_online_cpus (), + (u16 )pf->hw.func_caps.common_cap.num_txq); }/**
@@ -3268,8 +3268,8 @@ static int ice_get_max_txq(struct ice_pf *pf)*/ static int ice_get_max_rxq (struct ice_pf *pf) { -return min_t (int,num_online_cpus (), - pf->hw.func_caps.common_cap.num_rxq); +return min3 (pf->num_lan_msix, (u16 )num_online_cpus (), + (u16 )pf->hw.func_caps.common_cap.num_rxq); }/**
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 129/142 iommu/vt-d: Correctly check addr alignment in qi_flush_dev_iotlb_pasid()
In reply to Greg Kroah-HartmanFrom: Lu Baolu <[email protected]>
[ Upstream commit 494b3688bb11a21af12e92a344a1313486693d47 ]
An incorrect address mask is being used in the qi_flush_dev_iotlb_pasid() to check the address alignment. This leads to a lot of spurious kernel warnings:
[ 485.837093] DMAR: Invalidate non-aligned address 7f76f47f9000, order 0 [ 485.837098] DMAR: Invalidate non-aligned address 7f76f47f9000, order 0 [ 492.494145] qi_flush_dev_iotlb_pasid: 5734 callbacks suppressed [ 492.494147] DMAR: Invalidate non-aligned address 7f7728800000, order 11 [ 492.508965] DMAR: Invalidate non-aligned address 7f7728800000, order 11
Fix it by checking the alignment in right way.
--- drivers/iommu/intel/dmar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/intel/dmar.c +1 -1
@@ -1496,7 +1496,7 @@ void qi_flush_dev_iotlb_pasid(struct intel_iommu *iommu, u16 sid, u16 pfsid,* Max Invs Pending (MIP) is set to 0 for now until we have DIT in * ECAP. */ -if (addr &GENMASK_ULL (size_order +VTD_PAGE_SHIFT ,0 )) +if (!IS_ALIGNED (addr,VTD_PAGE_SIZE << size_order))pr_warn_ratelimited ("Invalidate non-aligned address %llx, order %d\n" , addr, size_order);
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 128/142 iommu/amd: Use IVHD EFR for early initialization of IOMMU features
In reply to Greg Kroah-HartmanFrom: Suravee Suthikulpanit <[email protected]>
[ Upstream commit a44092e326d403c7878018ba532369f84d31dbfa ]
IOMMU Extended Feature Register (EFR) is used to communicate the supported features for each IOMMU to the IOMMU driver. This is normally read from the PCI MMIO register offset 0x30, and used by the iommu_feature() helper function.
However, there are certain scenarios where the information is needed prior to PCI initialization, and the iommu_feature() function is used prematurely w/o warning. This has caused incorrect initialization of IOMMU. This is the case for the commit 6d39bdee238f ("iommu/amd: Enforce 4k mapping for certain IOMMU data structures")
Since, the EFR is also available in the IVHD header, and is available to the driver prior to PCI initialization. Therefore, default to using the IVHD EFR instead.
--- drivers/iommu/amd/amd_iommu.h | 7 ++-- drivers/iommu/amd/amd_iommu_types.h | 4 +++ drivers/iommu/amd/init.c | 56 +++++++++++++++++++++++++++-- 3 files changed, 60 insertions(+), 7 deletions(-)
drivers/iommu/amd/amd_iommu.h +2 -5
@@ -84,12 +84,9 @@ static inline bool is_rd890_iommu(struct pci_dev *pdev) (pdev->device ==PCI_DEVICE_ID_RD890_IOMMU ); } -static inline bool iommu_feature (struct amd_iommu *iommu,u64 f) +static inline bool iommu_feature (struct amd_iommu *iommu,u64 mask) { -if (!(iommu->cap & (1 <<IOMMU_CAP_EFR ))) -return false; - -return !!(iommu->features & f); +return !!(iommu->features & mask); }static inline u64 iommu_virt_to_phys (void *vaddr)
drivers/iommu/amd/amd_iommu_types.h +4 -0
@@ -379,6 +379,10 @@#define IOMMU_CAP_NPCACHE 26#define IOMMU_CAP_EFR 27 +/* IOMMU IVINFO */ +#define IOMMU_IVINFO_OFFSET 36 +#define IOMMU_IVINFO_EFRSUP BIT(0) +/* IOMMU Feature Reporting Field (for IVHD type 10h */ #define IOMMU_FEAT_GASUP_SHIFT 6
drivers/iommu/amd/init.c +54 -2
98 lines not on this page · raw message
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 124/142 net/mlx5: CT: Fix incorrect removal of tuple_nat_node from nat rhashtable
In reply to Greg Kroah-HartmanFrom: Paul Blakey <[email protected]>
[ Upstream commit e2194a1744e8594e82a861687808c1adca419b85 ]
If a non nat tuple entry is inserted just to the regular tuples rhashtable (ct_tuples_ht) and not to natted tuples rhashtable (ct_nat_tuples_ht). Commit bc562be9674b ("net/mlx5e: CT: Save ct entries tuples in hashtables") mixed up the return labels and names sot that on cleanup or failure we still try to remove for the natted tuples rhashtable.
Fix that by correctly checking if a natted tuples insertion before removing it. While here make it more readable.
--- .../ethernet/mellanox/mlx5/core/en/tc_ct.c | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-)
drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c +13 -7
@@ -167,6 +167,12 @@ static const struct rhashtable_params tuples_nat_ht_params = { .min_size = 16 * 1024, }; +static bool +mlx5_tc_ct_entry_has_nat (struct mlx5_ct_entry *entry) +{ +return !!(entry->tuple_nat_node.next); +} +static int mlx5_tc_ct_rule_to_tuple (struct mlx5_ct_tuple *tuple,struct flow_rule *rule) {
@@ -911,13 +917,13 @@ mlx5_tc_ct_block_flow_offload_add(struct mlx5_ct_ft *ft, err_insert:mlx5_tc_ct_entry_del_rules (ct_priv, entry); err_rules: -rhashtable_remove_fast (&ct_priv->ct_tuples_nat_ht, - &entry->tuple_nat_node, tuples_nat_ht_params); +if (mlx5_tc_ct_entry_has_nat (entry)) +rhashtable_remove_fast (&ct_priv->ct_tuples_nat_ht, + &entry->tuple_nat_node, tuples_nat_ht_params); err_tuple_nat: -if (entry->tuple_node.next) -rhashtable_remove_fast (&ct_priv->ct_tuples_ht, - &entry->tuple_node, - tuples_ht_params); +rhashtable_remove_fast (&ct_priv->ct_tuples_ht, + &entry->tuple_node, + tuples_ht_params); err_tuple: err_set:kfree (entry);
@@ -932,7 +938,7 @@ mlx5_tc_ct_del_ft_entry(struct mlx5_tc_ct_priv *ct_priv, {mlx5_tc_ct_entry_del_rules (ct_priv, entry);mutex_lock (&ct_priv->shared_counter_lock); -if (entry->tuple_node.next) +if (mlx5_tc_ct_entry_has_nat (entry))rhashtable_remove_fast (&ct_priv->ct_tuples_nat_ht, &entry->tuple_nat_node, tuples_nat_ht_params);
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 123/142 net/mlx5e: Revert parameters on errors when changing MTU and LRO state without reset
In reply to Greg Kroah-HartmanFrom: Maxim Mikityanskiy <[email protected]>
[ Upstream commit 8355060f5ec381abda77659f91f56302203df535 ]
Sometimes, channel params are changed without recreating the channels. It happens in two basic cases: when the channels are closed, and when the parameter being changed doesn't affect how channels are configured. Such changes invoke a hardware command that might fail. The whole operation should be reverted in such cases, but the code that restores the parameters' values in the driver was missing. This commit adds this handling.
--- .../net/ethernet/mellanox/mlx5/core/en_main.c | 30 +++++++++++++------ 1 file changed, 21 insertions(+), 9 deletions(-)
drivers/net/ethernet/mellanox/mlx5/core/en_main.c +21 -9
@@ -3730,7 +3730,7 @@ static int set_feature_lro(struct net_device *netdev, bool enable)struct mlx5e_priv *priv =netdev_priv (netdev);struct mlx5_core_dev *mdev = priv->mdev;struct mlx5e_channels new_channels = {}; -struct mlx5e_params *old_params; +struct mlx5e_params *cur_params;int err =0 ;bool reset;
@@ -3743,8 +3743,8 @@ static int set_feature_lro(struct net_device *netdev, bool enable) goto out; } - old_params = &priv->channels.params; -if (enable && !MLX5E_GET_PFLAG (old_params,MLX5E_PFLAG_RX_STRIDING_RQ )) { + cur_params = &priv->channels.params; +if (enable && !MLX5E_GET_PFLAG (cur_params,MLX5E_PFLAG_RX_STRIDING_RQ )) {netdev_warn (netdev,"can't set LRO with legacy RQ\n" ); err = -EINVAL ; goto out;
@@ -3752,18 +3752,23 @@ static int set_feature_lro(struct net_device *netdev, bool enable) reset =test_bit (MLX5E_STATE_OPENED , &priv->state); - new_channels.params = *old_params; + new_channels.params = *cur_params; new_channels.params.lro_en = enable; -if (old_params->rq_wq_type !=MLX5_WQ_TYPE_CYCLIC ) { -if (mlx5e_rx_mpwqe_is_linear_skb (mdev, old_params,NULL ) == +if (cur_params->rq_wq_type !=MLX5_WQ_TYPE_CYCLIC ) { +if (mlx5e_rx_mpwqe_is_linear_skb (mdev, cur_params,NULL ) ==mlx5e_rx_mpwqe_is_linear_skb (mdev, &new_channels.params,NULL )) reset = false; }if (!reset) { - *old_params = new_channels.params; +struct mlx5e_params old_params; + + old_params = *cur_params; + *cur_params = new_channels.params; err =mlx5e_modify_tirs_lro (priv); +if (err) + *cur_params = old_params; goto out; }
@@ -4037,9 +4042,16 @@ int mlx5e_change_mtu(struct net_device *netdev, int new_mtu, }if (!reset) { +unsigned int old_mtu = params->sw_mtu; + params->sw_mtu = new_mtu; -if (preactivate) -preactivate (priv,NULL ); +if (preactivate) { + err =preactivate (priv,NULL ); +if (err) { + params->sw_mtu = old_mtu; + goto out; + } + } netdev->mtu = params->sw_mtu; goto out; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 106/142 mac80211: pause TX while changing interface type
In reply to Greg Kroah-HartmanFrom: Johannes Berg <[email protected]>
[ Upstream commit 054c9939b4800a91475d8d89905827bf9e1ad97a ]
syzbot reported a crash that happened when changing the interface type around a lot, and while it might have been easy to fix just the symptom there, a little deeper investigation found that really the reason is that we allowed packets to be transmitted while in the middle of changing the interface type.
Disallow TX by stopping the queues while changing the type.
--- net/mac80211/ieee80211_i.h | 1 + net/mac80211/iface.c | 6 ++++++ 2 files changed, 7 insertions(+)
net/mac80211/ieee80211_i.h +1 -0
@@ -1082,6 +1082,7 @@ enum queue_stop_reason {IEEE80211_QUEUE_STOP_REASON_FLUSH ,IEEE80211_QUEUE_STOP_REASON_TDLS_TEARDOWN ,IEEE80211_QUEUE_STOP_REASON_RESERVE_TID , +IEEE80211_QUEUE_STOP_REASON_IFTYPE_CHANGE , IEEE80211_QUEUE_STOP_REASONS, };
net/mac80211/iface.c +6 -0
@@ -1654,6 +1654,10 @@ static int ieee80211_runtime_change_iftype(struct ieee80211_sub_if_data *sdata,if (ret)return ret; +ieee80211_stop_vif_queues (local, sdata, +IEEE80211_QUEUE_STOP_REASON_IFTYPE_CHANGE ); +synchronize_net (); +ieee80211_do_stop (sdata, false);ieee80211_teardown_sdata (sdata);
@@ -1676,6 +1680,8 @@ static int ieee80211_runtime_change_iftype(struct ieee80211_sub_if_data *sdata, err =ieee80211_do_open (&sdata->wdev, false);WARN (err,"type change: do_open returned %d" , err); +ieee80211_wake_vif_queues (local, sdata, +IEEE80211_QUEUE_STOP_REASON_IFTYPE_CHANGE );return ret; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 107/142 ice: fix FDir IPv6 flexbyte
In reply to Greg Kroah-HartmanFrom: Henry Tieman <[email protected]>
[ Upstream commit 29e2d9eb82647654abff150ff02fa1e07362214f ]
The packet classifier would occasionally misrecognize an IPv6 training packet when the next protocol field was 0. The correct value for unspecified protocol is IPPROTO_NONE.
--- drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c +7 -1
@@ -1576,7 +1576,13 @@ ice_set_fdir_input_set(struct ice_vsi *vsi, struct ethtool_rx_flow_spec *fsp, sizeof(struct in6_addr)); input->ip.v6.l4_header = fsp->h_u.usr_ip6_spec.l4_4_bytes; input->ip.v6.tc = fsp->h_u.usr_ip6_spec.tclass; - input->ip.v6.proto = fsp->h_u.usr_ip6_spec.l4_proto; + +/* if no protocol requested, use IPPROTO_NONE */ +if (!fsp->m_u.usr_ip6_spec.l4_proto) + input->ip.v6.proto =IPPROTO_NONE ; +else + input->ip.v6.proto = fsp->h_u.usr_ip6_spec.l4_proto; +memcpy (input->mask.v6.dst_ip, fsp->m_u.usr_ip6_spec.ip6dst,sizeof (struct in6_addr )); memcpy(input->mask.v6.src_ip, fsp->m_u.usr_ip6_spec.ip6src,
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 73/142 ARM: imx: build suspend-imx6.S with arm instruction set
In reply to Greg Kroah-HartmanFrom: Max Krummenacher <[email protected]>
commit a88afa46b86ff461c89cc33fc3a45267fff053e8 upstream.
When the kernel is configured to use the Thumb-2 instruction set "suspend-to-memory" fails to resume. Observed on a Colibri iMX6ULL (i.MX 6ULL) and Apalis iMX6 (i.MX 6Q).
It looks like the CPU resumes unconditionally in ARM instruction mode and then chokes on the presented Thumb-2 code it should execute.
Fix this by using the arm instruction set for all code in suspend-imx6.S.
--- arch/arm/mach-imx/suspend-imx6.S | 1 + 1 file changed, 1 insertion(+)
arch/arm/mach-imx/suspend-imx6.S +1 -0
@@ -67,6 +67,7 @@ #define MX6Q_CCM_CCR 0x0 .align 3 + .arm .macro sync_l2_cache
Greg Kroah-Hartman
maintainerPATCH 77/142 Revert "block: simplify set_init_blocksize" to regain lost performance
In reply to Greg Kroah-HartmanFrom: Maxim Mikityanskiy <[email protected]>
commit 8dc932d3e8afb65e12eba7495f046c83884c49bf upstream.
The cited commit introduced a serious regression with SATA write speed, as found by bisecting. This patch reverts this commit, which restores write speed back to the values observed before this commit.
The performance tests were done on a Helios4 NAS (2nd batch) with 4 HDDs (WD8003FFBX) using dd (bs=1M count=2000). "Direct" is a test with a single HDD, the rest are different RAID levels built over the first partitions of 4 HDDs. Test results are in MB/s, R is read, W is write.
| Direct | RAID0 | RAID10 f2 | RAID10 n2 | RAID6 ----------------+--------+-------+-----------+-----------+-------- 9011495c9466 | R:256 | R:313 | R:276 | R:313 | R:323 (before faulty) | W:254 | W:253 | W:195 | W:204 | W:117 ----------------+--------+-------+-----------+-----------+-------- 5ff9f19231a0 | R:257 | R:398 | R:312 | R:344 | R:391 (faulty commit) | W:154 | W:122 | W:67.7 | W:66.6 | W:67.2 ----------------+--------+-------+-----------+-----------+-------- 5.10.10 | R:256 | R:401 | R:312 | R:356 | R:375 unpatched | W:149 | W:123 | W:64 | W:64.1 | W:61.5 ----------------+--------+-------+-----------+-----------+-------- 5.10.10 | R:255 | R:396 | R:312 | R:340 | R:393 patched | W:247 | W:274 | W:220 | W:225 | W:121
Applying this patch doesn't hurt read performance, while improves the write speed by 1.5x - 3.5x (more impact on RAID tests). The write speed is restored back to the state before the faulty commit, and even a bit higher in RAID tests (which aren't HDD-bound on this device) - that is likely related to other optimizations done between the faulty commit and 5.10.10 which also improved the read speed.
--- fs/block_dev.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
fs/block_dev.c +9 -1
@@ -134,7 +134,15 @@ EXPORT_SYMBOL(truncate_bdev_range);static void set_init_blocksize (struct block_device *bdev) { - bdev->bd_inode->i_blkbits =blksize_bits (bdev_logical_block_size (bdev)); +unsigned int bsize =bdev_logical_block_size (bdev); +loff_t size =i_size_read (bdev->bd_inode); + +while (bsize <PAGE_SIZE ) { +if (size & bsize) +break ; + bsize <<=1 ; + } + bdev->bd_inode->i_blkbits =blksize_bits (bsize); }int set_blocksize (struct block_device *bdev,int size)
Greg Kroah-Hartman
maintainerPATCH 78/142 xfrm: Fix oops in xfrm_replay_advance_bmp
In reply to Greg Kroah-HartmanFrom: Shmulik Ladkani <[email protected]>
[ Upstream commit 56ce7c25ae1525d83cf80a880cf506ead1914250 ]
When setting xfrm replay_window to values higher than 32, a rare page-fault occurs in xfrm_replay_advance_bmp:
BUG: unable to handle page fault for address: ffff8af350ad7920 #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page PGD ad001067 P4D ad001067 PUD 0 Oops: 0002 [#1] SMP PTI CPU: 3 PID: 30 Comm: ksoftirqd/3 Kdump: loaded Not tainted 5.4.52-050452-generic #202007160732 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.11.0-2.el7 04/01/2014 RIP: 0010:xfrm_replay_advance_bmp+0xbb/0x130 RSP: 0018:ffffa1304013ba40 EFLAGS: 00010206 RAX: 000000000000010d RBX: 0000000000000002 RCX: 00000000ffffff4b RDX: 0000000000000018 RSI: 00000000004c234c RDI: 00000000ffb3dbff RBP: ffffa1304013ba50 R08: ffff8af330ad7920 R09: 0000000007fffffa R10: 0000000000000800 R11: 0000000000000010 R12: ffff8af29d6258c0 R13: ffff8af28b95c700 R14: 0000000000000000 R15: ffff8af29d6258fc FS: 0000000000000000(0000) GS:ffff8af339ac0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffff8af350ad7920 CR3: 0000000015ee4000 CR4: 00000000001406e0 Call Trace: xfrm_input+0x4e5/0xa10 xfrm4_rcv_encap+0xb5/0xe0 xfrm4_udp_encap_rcv+0x140/0x1c0
Analysis revealed offending code is when accessing:
replay_esn->bmp[nr] |= (1U << bitnr);
with 'nr' being 0x07fffffa.
This happened in an SMP system when reordering of packets was present; A packet arrived with a "too old" sequence number (outside the window, i.e 'diff > replay_window'), and therefore the following calculation:
bitnr = replay_esn->replay_window - (diff - pos);
yields a negative result, but since bitnr is u32 we get a large unsigned quantity (in crash dump above: 0xffffff4b seen in ecx).
This was supposed to be protected by xfrm_input()'s former call to:
if (x->repl->check(x, skb, seq)) {However, the state's spinlock x->lock is *released* after '->check()' is performed, and gets re-acquired before '->advance()' - which gives a chance for a different core to update the xfrm state, e.g. by advancing 'replay_esn->seq' when it encounters more packets - leading to a 'diff > replay_window' situation when original core continues to xfrm_replay_advance_bmp().
An attempt to fix this issue was suggested in commit bcf66bf54aab ("xfrm: Perform a replay check after return from async codepaths"), by calling 'x->repl->recheck()' after lock is re-acquired, but fix applied only to asyncronous crypto algorithms.
Augment the fix, by *always* calling 'recheck()' - irrespective if we're using async crypto.
--- net/xfrm/xfrm_input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/xfrm/xfrm_input.c +1 -1
@@ -660,7 +660,7 @@ resume:/* only the first xfrm gets the encap type */ encap_type =0 ; -if (async && x->repl->recheck (x, skb, seq)) { +if (x->repl->recheck (x, skb, seq)) {XFRM_INC_STATS (net,LINUX_MIB_XFRMINSTATESEQERROR ); goto drop_unlock; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 79/142 xfrm: fix disable_xfrm sysctl when used on xfrm interfaces
In reply to Greg Kroah-HartmanFrom: Eyal Birger <[email protected]>
[ Upstream commit 9f8550e4bd9d78a8436c2061ad2530215f875376 ]
The disable_xfrm flag signals that xfrm should not be performed during routing towards a device before reaching device xmit.
For xfrm interfaces this is usually desired as they perform the outbound policy lookup as part of their xmit using their if_id.
Before this change enabling this flag on xfrm interfaces prevented them from xmitting as xfrm_lookup_with_ifid() would not perform a policy lookup in case the original dst had the DST_NOXFRM flag.
This optimization is incorrect when the lookup is done by the xfrm interface xmit logic.
Fix by performing policy lookup when invoked by xfrmi as if_id != 0.
Similarly it's unlikely for the 'no policy exists on net' check to yield any performance benefits when invoked from xfrmi.
--- net/xfrm/xfrm_policy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
net/xfrm/xfrm_policy.c +2 -2
@@ -3078,8 +3078,8 @@ struct dst_entry *xfrm_lookup_with_ifid(struct net *net, xflo.flags = flags;/* To accelerate a bit... */ -if ((dst_orig->flags &DST_NOXFRM ) || - !net->xfrm.policy_count[XFRM_POLICY_OUT ]) +if (!if_id && ((dst_orig->flags &DST_NOXFRM ) || + !net->xfrm.policy_count[XFRM_POLICY_OUT ])) goto nopol; xdst =xfrm_bundle_lookup (net, fl, family, dir, &xflo, if_id);
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 82/142 arm64: dts: ls1028a: fix the offset of the reset register
In reply to Greg Kroah-HartmanFrom: Michael Walle <[email protected]>
[ Upstream commit 1653e3d470629d25c64cd8a2f84adb20a9348b0c ]
The offset of the reset request register is 0, the absolute address is 0x1e60000. Boards without PSCI support will fail to perform a reset:
[ 26.734700] reboot: Restarting system [ 27.743259] Unable to restart system [ 27.746845] Reboot failed -- System halted
--- arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi +1 -1
@@ -93,7 +93,7 @@ reboot { compatible ="syscon-reboot"; regmap = <&rst>; - offset = <0xb0>; + offset = <0>; mask = <0x02>; };
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 103/142 iwlwifi: pcie: set LTR on more devices
In reply to Greg Kroah-HartmanFrom: Johannes Berg <[email protected]>
[ Upstream commit ed0022da8bd9a3ba1c0e1497457be28d52afa7e1 ]
To avoid completion timeouts during device boot, set up the LTR timeouts on more devices - similar to what we had before for AX210.
This also corrects the AX210 workaround to be done only on discrete (non-integrated) devices, otherwise the registers have no effect.
--- drivers/net/wireless/intel/iwlwifi/iwl-prph.h | 6 +++ .../intel/iwlwifi/pcie/ctxt-info-gen3.c | 39 +++++++++++-------- 2 files changed, 28 insertions(+), 17 deletions(-)
drivers/net/wireless/intel/iwlwifi/iwl-prph.h +6 -0
@@ -355,6 +355,12 @@#define RADIO_RSP_ADDR_POS (6)#define RADIO_RSP_RD_CMD (3) +/* LTR control (Qu only) */ +#define HPM_MAC_LTR_CSR 0xa0348c +#define HPM_MAC_LRT_ENABLE_ALL 0xf +/* also uses CSR_LTR_* for values */ +#define HPM_UMAC_LTR 0xa03480 +/* FW monitor */ #define MON_BUFF_SAMPLE_CTL (0xa03c00)#define MON_BUFF_BASE_ADDR (0xa03c1c)
drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info-gen3.c +22 -17
@@ -122,6 +122,15 @@ int iwl_pcie_ctxt_info_gen3_init(struct iwl_trans *trans, const struct fw_img *fw) {struct iwl_trans_pcie *trans_pcie =IWL_TRANS_GET_PCIE_TRANS (trans); +u32 ltr_val =CSR_LTR_LONG_VAL_AD_NO_SNOOP_REQ | +u32_encode_bits (CSR_LTR_LONG_VAL_AD_SCALE_USEC , +CSR_LTR_LONG_VAL_AD_NO_SNOOP_SCALE ) | +u32_encode_bits (250 , +CSR_LTR_LONG_VAL_AD_NO_SNOOP_VAL ) | +CSR_LTR_LONG_VAL_AD_SNOOP_REQ | +u32_encode_bits (CSR_LTR_LONG_VAL_AD_SCALE_USEC , +CSR_LTR_LONG_VAL_AD_SNOOP_SCALE ) | +u32_encode_bits (250 ,CSR_LTR_LONG_VAL_AD_SNOOP_VAL );struct iwl_context_info_gen3 *ctxt_info_gen3;struct iwl_prph_scratch *prph_scratch;struct iwl_prph_scratch_ctrl_cfg *prph_sc_ctrl;
@@ -253,23 +262,19 @@ int iwl_pcie_ctxt_info_gen3_init(struct iwl_trans *trans,iwl_set_bit (trans,CSR_CTXT_INFO_BOOT_CTRL ,CSR_AUTO_FUNC_BOOT_ENA ); -if (trans->trans_cfg->device_family ==IWL_DEVICE_FAMILY_AX210 ) { -/* -* The firmware initializes this again later (to a smaller -* value), but for the boot process initialize the LTR to -* ~250 usec. -*/ -u32 val =CSR_LTR_LONG_VAL_AD_NO_SNOOP_REQ | -u32_encode_bits (CSR_LTR_LONG_VAL_AD_SCALE_USEC , -CSR_LTR_LONG_VAL_AD_NO_SNOOP_SCALE ) | -u32_encode_bits (250 , -CSR_LTR_LONG_VAL_AD_NO_SNOOP_VAL ) | -CSR_LTR_LONG_VAL_AD_SNOOP_REQ | -u32_encode_bits (CSR_LTR_LONG_VAL_AD_SCALE_USEC , -CSR_LTR_LONG_VAL_AD_SNOOP_SCALE ) | -u32_encode_bits (250 ,CSR_LTR_LONG_VAL_AD_SNOOP_VAL ); - -iwl_write32 (trans,CSR_LTR_LONG_VAL_AD , val); +/* +* To workaround hardware latency issues during the boot process, +* initialize the LTR to ~250 usec (see ltr_val above). +* The firmware initializes this again later (to a smaller value). +*/ +if ((trans->trans_cfg->device_family ==IWL_DEVICE_FAMILY_AX210 || + trans->trans_cfg->device_family ==IWL_DEVICE_FAMILY_22000 ) && + !trans->trans_cfg->integrated) { +iwl_write32 (trans,CSR_LTR_LONG_VAL_AD , ltr_val); + }else if (trans->trans_cfg->integrated && + trans->trans_cfg->device_family ==IWL_DEVICE_FAMILY_22000 ) { +iwl_write_prph (trans,HPM_MAC_LTR_CSR ,HPM_MAC_LRT_ENABLE_ALL ); +iwl_write_prph (trans,HPM_UMAC_LTR , ltr_val); }if (trans->trans_cfg->device_family >=IWL_DEVICE_FAMILY_AX210 )
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 104/142 iwlwifi: pcie: use jiffies for memory read spin time limit
In reply to Greg Kroah-HartmanFrom: Johannes Berg <[email protected]>
[ Upstream commit 6701317476bbfb1f341aa935ddf75eb73af784f9 ]
There's no reason to use ktime_get() since we don't need any better precision than jiffies, and since we no longer disable interrupts around this code (when grabbing NIC access), jiffies will work fine. Use jiffies instead of ktime_get().
This cleanup is preparation for the following patch "iwlwifi: pcie: reschedule in long-running memory reads". The code gets simpler with the weird clock use etc. removed before we add cond_resched().
--- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
drivers/net/wireless/intel/iwlwifi/pcie/trans.c +2 -6
@@ -2161,7 +2161,7 @@ static int iwl_trans_pcie_read_mem(struct iwl_trans *trans, u32 addr,while (offs < dwords) {/* limit the time we spin here under lock to 1/2s */ -ktime_t timeout =ktime_add_us (ktime_get (),500 *USEC_PER_MSEC ); +unsigned long end = jiffies +HZ /2 ;if (iwl_trans_grab_nic_access (trans, &flags)) { iwl_write32(trans, HBUS_TARG_MEM_RADDR,
@@ -2172,11 +2172,7 @@ static int iwl_trans_pcie_read_mem(struct iwl_trans *trans, u32 addr, HBUS_TARG_MEM_RDAT); offs++; -/* calling ktime_get is expensive so -* do it once in 128 reads -*/ -if (offs %128 ==0 &&ktime_after (ktime_get (), - timeout)) +if (time_after (jiffies, end))break ; }iwl_trans_release_nic_access (trans, &flags);
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 105/142 iwlwifi: pcie: reschedule in long-running memory reads
In reply to Greg Kroah-HartmanFrom: Johannes Berg <[email protected]>
[ Upstream commit 3d372c4edfd4dffb7dea71c6b096fb414782b776 ]
If we spin for a long time in memory reads that (for some reason in hardware) take a long time, then we'll eventually get messages such as
watchdog: BUG: soft lockup - CPU#2 stuck for 24s! [kworker/2:2:272]
This is because the reading really does take a very long time, and we don't schedule, so we're hogging the CPU with this task, at least if CONFIG_PREEMPT is not set, e.g. with CONFIG_PREEMPT_VOLUNTARY=y.
Previously I misinterpreted the situation and thought that this was only going to happen if we had interrupts disabled, and then fixed this (which is good anyway, however), but that didn't always help; looking at it again now I realized that the spin unlock will only reschedule if CONFIG_PREEMPT is used.
In order to avoid this issue, change the code to cond_resched() if we've been spinning for too long here.
--- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/net/wireless/intel/iwlwifi/pcie/trans.c +7 -1
@@ -2162,6 +2162,7 @@ static int iwl_trans_pcie_read_mem(struct iwl_trans *trans, u32 addr,while (offs < dwords) {/* limit the time we spin here under lock to 1/2s */ unsigned long end = jiffies +HZ /2 ; +bool resched = false;if (iwl_trans_grab_nic_access (trans, &flags)) { iwl_write32(trans, HBUS_TARG_MEM_RADDR,
@@ -2172,10 +2173,15 @@ static int iwl_trans_pcie_read_mem(struct iwl_trans *trans, u32 addr, HBUS_TARG_MEM_RDAT); offs++; -if (time_after (jiffies, end)) +if (time_after (jiffies, end)) { + resched = true;break ; + } }iwl_trans_release_nic_access (trans, &flags); + +if (resched) +cond_resched (); }else {return -EBUSY ; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 76/142 Revert "RDMA/mlx5: Fix devlink deadlock on net namespace deletion"
In reply to Greg Kroah-HartmanFrom: Parav Pandit <[email protected]>
commit de641d74fb00f5b32f054ee154e31fb037e0db88 upstream.
This reverts commit fbdd0049d98d44914fc57d4b91f867f4996c787b.
Due to commit in fixes tag, netdevice events were received only in one net namespace of mlx5_core_dev. Due to this when netdevice events arrive in net namespace other than net namespace of mlx5_core_dev, they are missed.
This results in empty GID table due to RDMA device being detached from its net device.
Hence, revert back to receive netdevice events in all net namespaces to restore back RDMA functionality in non init_net net namespace. The deadlock will have to be addressed in another patch.
--- drivers/infiniband/hw/mlx5/main.c | 6 ++---- drivers/net/ethernet/mellanox/mlx5/core/lib/mlx5.h | 5 +++++ include/linux/mlx5/driver.h | 18 ------------------ 3 files changed, 7 insertions(+), 22 deletions(-)
drivers/infiniband/hw/mlx5/main.c +2 -4
@@ -3305,8 +3305,7 @@ static int mlx5_add_netdev_notifier(struint err; dev->port[port_num].roce.nb.notifier_call = mlx5_netdev_event; - err =register_netdevice_notifier_net (mlx5_core_net (dev->mdev), - &dev->port[port_num].roce.nb); + err =register_netdevice_notifier (&dev->port[port_num].roce.nb);if (err) { dev->port[port_num].roce.nb.notifier_call =NULL ;return err;
@@ -3318,8 +3317,7 @@ static int mlx5_add_netdev_notifier(strustatic void mlx5_remove_netdev_notifier (struct mlx5_ib_dev *dev,u8 port_num) {if (dev->port[port_num].roce.nb.notifier_call) { -unregister_netdevice_notifier_net (mlx5_core_net (dev->mdev), - &dev->port[port_num].roce.nb); +unregister_netdevice_notifier (&dev->port[port_num].roce.nb); dev->port[port_num].roce.nb.notifier_call =NULL ; } }
drivers/net/ethernet/mellanox/mlx5/core/lib/mlx5.h +5 -0
@@ -90,4 +90,9 @@ int mlx5_create_encryption_key(struct ml u32 key_type, u32 *p_key_id);void mlx5_destroy_encryption_key (struct mlx5_core_dev *mdev,u32 key_id); +static inline struct net *mlx5_core_net (struct mlx5_core_dev *dev) +{ +return devlink_net (priv_to_devlink (dev)); +} +#endif
include/linux/mlx5/driver.h +0 -18
@@ -1213,22 +1213,4 @@ static inline bool mlx5_is_roce_enabled( return val.vbool; } -/** -* mlx5_core_net - Provide net namespace of the mlx5_core_dev -* @dev: mlx5 core device -* -* mlx5_core_net() returns the net namespace of mlx5 core device. -* This can be called only in below described limited context. -* (a) When a devlink instance for mlx5_core is registered and -* when devlink reload operation is disabled. -* or -* (b) during devlink reload reload_down() and reload_up callbacks -* where it is ensured that devlink instance's net namespace is -* stable. -*/ -static inline struct net *mlx5_core_net (struct mlx5_core_dev *dev) -{ -return devlink_net (priv_to_devlink (dev)); -} -#endif /* MLX5_DRIVER_H */
Greg Kroah-Hartman
maintainerPATCH 98/142 ASoC: SOF: Intel: soundwire: fix select/depend unmet dependencies
In reply to Greg Kroah-HartmanFrom: Pierre-Louis Bossart <[email protected]>
[ Upstream commit bd9038faa9d7f162b47e1577e35ec5eac39f9d90 ]
The LKP bot reports the following issue:
WARNING: unmet direct dependencies detected for SOUNDWIRE_INTEL
Depends on [m]: SOUNDWIRE [=m] && ACPI [=y] && SND_SOC [=y] Selected by [y]:
- SND_SOC_SOF_INTEL_SOUNDWIRE [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && SND_SOC_SOF_TOPLEVEL [=y] && SND_SOC_SOF_INTEL_TOPLEVEL [=y] && SND_SOC_SOF_INTEL_PCI [=y]
This comes from having tristates being configured independently, when in practice the CONFIG_SOUNDWIRE needs to be aligned with the SOF
choices: when the SOF code is compiled as built-in, the CONFIG_SOUNDWIRE also needs to be 'y'.
The easiest fix is to replace the 'depends' with a 'select' and have a single user selection to activate SoundWire on Intel platforms. This still allows regmap to be compiled independently as a module.
This is just a temporary fix, the select/depend usage will be revisited and the SOF Kconfig re-organized, as suggested by Arnd Bergman.
--- sound/soc/sof/intel/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
sound/soc/sof/intel/Kconfig +2 -1
@@ -337,7 +337,7 @@ config SND_SOC_SOF_HDA config SND_SOC_SOF_INTEL_SOUNDWIRE_LINK bool "SOF support for SoundWire" - depends on SOUNDWIRE && ACPI + depends on ACPI help This adds support for SoundWire with Sound Open Firmware for Intel(R) platforms.
@@ -353,6 +353,7 @@ config SND_SOC_SOF_INTEL_SOUNDWIRE_LINK_BASELINE config SND_SOC_SOF_INTEL_SOUNDWIRE tristate + select SOUNDWIRE select SOUNDWIRE_INTEL help This option is not user-selectable but automagically handled by
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 94/142 ASoC: Intel: Skylake: skl-topology: Fix OOPs ib skl_tplg_complete
In reply to Greg Kroah-HartmanFrom: Ricardo Ribalda <[email protected]>
[ Upstream commit c1c3ba1f78354a20222d291ed6fedd17b7a74fd7 ]
If dobj->control is not initialized we end up in an OOPs during skl_tplg_complete:
[ 26.553358] BUG: kernel NULL pointer dereference, address: 0000000000000078 [ 26.561151] #PF: supervisor read access in kernel mode [ 26.566897] #PF: error_code(0x0000) - not-present page [ 26.572642] PGD 0 P4D 0 [ 26.575479] Oops: 0000 [#1] PREEMPT SMP PTI [ 26.580158] CPU: 2 PID: 2082 Comm: udevd Tainted: G C 5.4.81 #4 [ 26.588232] Hardware name: HP Soraka/Soraka, BIOS Google_Soraka.10431.106.0 12/03/2019 [ 26.597082] RIP: 0010:skl_tplg_complete+0x70/0x144 [snd_soc_skl]
--- sound/soc/intel/skylake/skl-topology.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
sound/soc/intel/skylake/skl-topology.c +7 -6
@@ -3619,15 +3619,16 @@ static void skl_tplg_complete(struct snd_soc_component *component)list_for_each_entry (dobj, &component->dobj_list, list) {struct snd_kcontrol *kcontrol = dobj->control.kcontrol; -struct soc_enum *se = - (struct soc_enum *)kcontrol->private_value; -char **texts = dobj->control.dtexts; +struct soc_enum *se; +char **texts;char chan_text[4 ]; -if (dobj->type !=SND_SOC_DOBJ_ENUM || - dobj->control.kcontrol->put != - skl_tplg_multi_config_set_dmic) +if (dobj->type !=SND_SOC_DOBJ_ENUM || !kcontrol || + kcontrol->put != skl_tplg_multi_config_set_dmic)continue ; + + se = (struct soc_enum *)kcontrol->private_value; + texts = dobj->control.dtexts;sprintf (chan_text,"c%d" , mach->mach_params.dmic_num);for (i =0 ; i < se->items; i++) {
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 93/142 spi: altera: Fix memory leak on error path
In reply to Greg Kroah-HartmanFrom: Pan Bian <[email protected]>
[ Upstream commit 55a8b42e8645a6dab88674a30cb6ed328e660680 ]
Release master that have been previously allocated if the number of chipselect is invalid.
--- drivers/spi/spi-altera.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/spi/spi-altera.c +2 -1
@@ -254,7 +254,8 @@ static int altera_spi_probe(struct platform_device *pdev)dev_err (&pdev->dev,"Invalid number of chipselect: %hu\n" , pdata->num_chipselect); -return -EINVAL ; + err = -EINVAL ; + goto exit; } master->num_chipselect = pdata->num_chipselect;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 101/142 iwlwifi: pnvm: dont skip everything when not reloading
In reply to Greg Kroah-HartmanFrom: Johannes Berg <[email protected]>
[ Upstream commit 1c58bed4b7f7551239b9005ad0a9a6566a3d9fbe ]
Even if we don't reload the file from disk, we still need to trigger the PNVM load flow with the device; fix that.
--- drivers/net/wireless/intel/iwlwifi/fw/pnvm.c | 50 ++++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-)
drivers/net/wireless/intel/iwlwifi/fw/pnvm.c +25 -25
@@ -224,40 +224,40 @@ static int iwl_pnvm_parse(struct iwl_trans *trans, const u8 *data,int iwl_pnvm_load (struct iwl_trans *trans,struct iwl_notif_wait_data *notif_wait) { -const struct firmware *pnvm;struct iwl_notification_wait pnvm_wait;static const u16 ntf_cmds[] = {WIDE_ID (REGULATORY_AND_NVM_GROUP ,PNVM_INIT_COMPLETE_NTFY ) }; -char pnvm_name[64 ]; -int ret;/* if the SKU_ID is empty, there's nothing to do */ if (!trans->sku_id[0 ] && !trans->sku_id[1 ] && !trans->sku_id[2 ])return 0 ; -/* if we already have it, nothing to do either */ -if (trans->pnvm_loaded) -return 0 ; +/* load from disk only if we haven't done it before */ +if (!trans->pnvm_loaded) { +const struct firmware *pnvm; +char pnvm_name[64 ]; +int ret; + +/* +* The prefix unfortunately includes a hyphen at the end, so +* don't add the dot here... +*/ +snprintf (pnvm_name,sizeof (pnvm_name),"%spnvm" , + trans->cfg->fw_name_pre); + +/* ...but replace the hyphen with the dot here. */ +if (strlen (trans->cfg->fw_name_pre) <sizeof (pnvm_name)) + pnvm_name[strlen (trans->cfg->fw_name_pre) -1 ] ='.' ; + + ret =firmware_request_nowarn (&pnvm, pnvm_name, trans->dev); +if (ret) { +IWL_DEBUG_FW (trans,"PNVM file %s not found %d\n" , + pnvm_name, ret); + }else { +iwl_pnvm_parse (trans, pnvm->data, pnvm->size); -/* -* The prefix unfortunately includes a hyphen at the end, so -* don't add the dot here... -*/ -snprintf (pnvm_name,sizeof (pnvm_name),"%spnvm" , - trans->cfg->fw_name_pre); - -/* ...but replace the hyphen with the dot here. */ -if (strlen (trans->cfg->fw_name_pre) <sizeof (pnvm_name)) - pnvm_name[strlen (trans->cfg->fw_name_pre) -1 ] ='.' ; - - ret =firmware_request_nowarn (&pnvm, pnvm_name, trans->dev); -if (ret) { -IWL_DEBUG_FW (trans,"PNVM file %s not found %d\n" , - pnvm_name, ret); - }else { -iwl_pnvm_parse (trans, pnvm->data, pnvm->size); - -release_firmware (pnvm); +release_firmware (pnvm); + } } iwl_init_notification_wait(notif_wait, &pnvm_wait,
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 95/142 powerpc/64s: prevent recursive replay_soft_interrupts causing superfluous interrupt
In reply to Greg Kroah-HartmanFrom: Nicholas Piggin <[email protected]>
[ Upstream commit 4025c784c573cab7e3f84746cc82b8033923ec62 ]
When an asynchronous interrupt calls irq_exit, it checks for softirqs that may have been created, and runs them. Running softirqs enables local irqs, which can replay pending interrupts causing recursion in replay_soft_interrupts. This abridged trace shows how this can occur:
! NIP replay_soft_interrupts
LR interrupt_exit_kernel_prepare
Call Trace:
interrupt_exit_kernel_prepare (unreliable)
interrupt_return
--- interrupt: ea0 at __rb_reserve_next
NIP __rb_reserve_next
LR __rb_reserve_next
Call Trace:
ring_buffer_lock_reserve
trace_function
function_trace_call
ftrace_call
__do_softirq
irq_exit
timer_interrupt! replay_soft_interrupts
interrupt_exit_kernel_prepare
interrupt_return
--- interrupt: ea0 at arch_local_irq_restore
This can not be prevented easily, because softirqs must not block hard irqs, so it has to be dealt with.
The recursion is bounded by design in the softirq code because softirq replay disables softirqs and loops around again to check for new softirqs created while it ran, so that's not a problem.
However it does mess up interrupt replay state, causing superfluous interrupts when the second replay_soft_interrupts clears a pending interrupt, leaving it still set in the first call in the 'happened' local variable.
Fix this by not caching a copy of irqs_happened across interrupt handler calls.
--- arch/powerpc/kernel/irq.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-)
arch/powerpc/kernel/irq.c +16 -12
@@ -180,13 +180,18 @@ void notrace restore_interrupts(void)void replay_soft_interrupts (void ) { +struct pt_regs regs; +/* -* We use local_paca rather than get_paca() to avoid all -* the debug_smp_processor_id() business in this low level -* function +* Be careful here, calling these interrupt handlers can cause +* softirqs to be raised, which they may run when calling irq_exit, +* which will cause local_irq_enable() to be run, which can then +* recurse into this function. Don't keep any state across +* interrupt handler calls which may change underneath us. +* +* We use local_paca rather than get_paca() to avoid all the +* debug_smp_processor_id() business in this low level function. */ -unsigned char happened = local_paca->irq_happened; -struct pt_regs regs;ppc_save_regs (®s); regs.softe =IRQS_ENABLED ;
@@ -209,7 +214,7 @@ again:* This is a higher priority interrupt than the others, so * replay it first. */ -if (IS_ENABLED (CONFIG_PPC_BOOK3S ) && (happened &PACA_IRQ_HMI )) { +if (IS_ENABLED (CONFIG_PPC_BOOK3S ) && (local_paca->irq_happened &PACA_IRQ_HMI )) { local_paca->irq_happened &= ~PACA_IRQ_HMI ; regs.trap =0xe60 ;handle_hmi_exception (®s);
@@ -217,7 +222,7 @@ again:hard_irq_disable (); } -if (happened &PACA_IRQ_DEC ) { +if (local_paca->irq_happened &PACA_IRQ_DEC ) { local_paca->irq_happened &= ~PACA_IRQ_DEC ; regs.trap =0x900 ;timer_interrupt (®s);
@@ -225,7 +230,7 @@ again:hard_irq_disable (); } -if (happened &PACA_IRQ_EE ) { +if (local_paca->irq_happened &PACA_IRQ_EE ) { local_paca->irq_happened &= ~PACA_IRQ_EE ; regs.trap =0x500 ;do_IRQ (®s);
@@ -233,7 +238,7 @@ again:hard_irq_disable (); } -if (IS_ENABLED (CONFIG_PPC_DOORBELL ) && (happened &PACA_IRQ_DBELL )) { +if (IS_ENABLED (CONFIG_PPC_DOORBELL ) && (local_paca->irq_happened &PACA_IRQ_DBELL )) { local_paca->irq_happened &= ~PACA_IRQ_DBELL ;if (IS_ENABLED (CONFIG_PPC_BOOK3E )) regs.trap =0x280 ;
@@ -245,7 +250,7 @@ again: }/* Book3E does not support soft-masking PMI interrupts */ -if (IS_ENABLED (CONFIG_PPC_BOOK3S ) && (happened &PACA_IRQ_PMI )) { +if (IS_ENABLED (CONFIG_PPC_BOOK3S ) && (local_paca->irq_happened &PACA_IRQ_PMI )) { local_paca->irq_happened &= ~PACA_IRQ_PMI ; regs.trap =0xf00 ;performance_monitor_exception (®s);
@@ -253,8 +258,7 @@ again:hard_irq_disable (); } - happened = local_paca->irq_happened; -if (happened & ~PACA_IRQ_HARD_DIS ) { +if (local_paca->irq_happened & ~PACA_IRQ_HARD_DIS ) {/* * We are responding to the next interrupt, so interrupt-off * latencies should be reset here.
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 75/142 netfilter: nft_dynset: add timeout extension to template
In reply to Greg Kroah-HartmanFrom: Pablo Neira Ayuso <[email protected]>
commit 0c5b7a501e7400869ee905b4f7af3d6717802bcb upstream.
Otherwise, the newly create element shows no timeout when listing the ruleset. If the set definition does not specify a default timeout, then the set element only shows the expiration time, but not the timeout. This is a problem when restoring a stateful ruleset listing since it skips the timeout policy entirely.
--- net/netfilter/nft_dynset.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
net/netfilter/nft_dynset.c +3 -1
@@ -204,8 +204,10 @@ static int nft_dynset_init(const structnft_set_ext_add_length (&priv->tmpl,NFT_SET_EXT_EXPR , priv->expr->ops->size);if (set->flags &NFT_SET_TIMEOUT ) { -if (timeout || set->timeout) +if (timeout || set->timeout) { +nft_set_ext_add (&priv->tmpl,NFT_SET_EXT_TIMEOUT );nft_set_ext_add (&priv->tmpl,NFT_SET_EXT_EXPIRATION ); + } } priv->timeout = timeout;
Greg Kroah-Hartman
maintainerPATCH 89/142 ASoC: dt-bindings: lpass: Fix and common up lpass dai ids
In reply to Greg Kroah-HartmanFrom: Srinivas Kandagatla <[email protected]>
[ Upstream commit 09a4f6f5d21cb1f2633f4e8b893336b60eee9a01 ]
Existing header file design of having separate SoC specific header files for the common lpass driver has mutiple issues.
This design is prone to break as an when new SoC header is added as the common DAI ids of other SoCs will be overwritten by the new ones.
One of them surfaced by recent patch that adds support to sc7180, this one totally broke LPASS drivers on other Qualcomm SoCs.
Before this gets worst, fix this by having a common header qcom,lpass.h. This should fix the issue and any new DAI ids should be added to the common header. This will be more sustainable then the existing design!
--- include/dt-bindings/sound/apq8016-lpass.h | 7 +++---- include/dt-bindings/sound/qcom,lpass.h | 15 +++++++++++++++ include/dt-bindings/sound/sc7180-lpass.h | 6 ++---- 3 files changed, 20 insertions(+), 8 deletions(-) create mode 100644 include/dt-bindings/sound/qcom,lpass.h
include/dt-bindings/sound/apq8016-lpass.h +3 -4
@@ -2,9 +2,8 @@#ifndef __DT_APQ8016_LPASS_H#define __DT_APQ8016_LPASS_H -#define MI2S_PRIMARY 0 -#define MI2S_SECONDARY 1 -#define MI2S_TERTIARY 2 -#define MI2S_QUATERNARY 3 +#include <dt-bindings/sound/qcom,lpass.h> + +/* NOTE: Use qcom,lpass.h to define any AIF ID's for LPASS */ #endif /* __DT_APQ8016_LPASS_H */
include/dt-bindings/sound/qcom,lpass.h new file +15 -0
@@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __DT_QCOM_LPASS_H +#define __DT_QCOM_LPASS_H + +#define MI2S_PRIMARY 0 +#define MI2S_SECONDARY 1 +#define MI2S_TERTIARY 2 +#define MI2S_QUATERNARY 3 +#define MI2S_QUINARY 4 + +#define LPASS_DP_RX 5 + +#define LPASS_MCLK0 0 + +#endif /* __DT_QCOM_LPASS_H */
include/dt-bindings/sound/sc7180-lpass.h +2 -4
@@ -2,10 +2,8 @@#ifndef __DT_SC7180_LPASS_H#define __DT_SC7180_LPASS_H -#define MI2S_PRIMARY 0 -#define MI2S_SECONDARY 1 -#define LPASS_DP_RX 2 +#include <dt-bindings/sound/qcom,lpass.h> -#define LPASS_MCLK0 0 +/* NOTE: Use qcom,lpass.h to define any AIF ID's for LPASS */ #endif /* __DT_APQ8016_LPASS_H */
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 91/142 ASoC: qcom: Fix broken support to MI2S TERTIARY and QUATERNARY
In reply to Greg Kroah-HartmanFrom: Srinivas Kandagatla <[email protected]>
[ Upstream commit cd3484f7f1386071b1af159023917ed12c182d39 ]
lpass hdmi support patch totally removed support for MI2S TERTIARY and QUATERNARY.
One of the major issue was spotted with the design of having separate SoC specific header files for the common lpass driver. This design is prone to break as an when new SoC header is added as the common DAI ids of other SoCs will be overwritten by the new ones.
Having a common header qcom,lpass.h should fix the issue and any new DAI ids should be added to the common header.
With this change lpass also needs a new of_xlate function to resolve dai name.
--- sound/soc/qcom/lpass-cpu.c | 22 ++++++++++++++++++++++ sound/soc/qcom/lpass-platform.c | 12 ++++++++++++ sound/soc/qcom/lpass-sc7180.c | 9 +++------ sound/soc/qcom/lpass.h | 2 +- 4 files changed, 38 insertions(+), 7 deletions(-)
sound/soc/qcom/lpass-cpu.c +22 -0
@@ -344,8 +344,30 @@ int asoc_qcom_lpass_cpu_dai_probe(struct snd_soc_dai *dai) }EXPORT_SYMBOL_GPL (asoc_qcom_lpass_cpu_dai_probe); +static int asoc_qcom_of_xlate_dai_name (struct snd_soc_component *component, +struct of_phandle_args *args, +const char **dai_name) +{ +struct lpass_data *drvdata =snd_soc_component_get_drvdata (component); +struct lpass_variant *variant = drvdata->variant; +int id = args->args[0 ]; +int ret = -EINVAL ; +int i; + +for (i =0 ; i < variant->num_dai; i++) { +if (variant->dai_driver[i].id == id) { + *dai_name = variant->dai_driver[i].name; + ret =0 ; +break ; + } + } + +return ret; +} +static const struct snd_soc_component_driver lpass_cpu_comp_driver = { .name ="lpass-cpu" , + .of_xlate_dai_name = asoc_qcom_of_xlate_dai_name, };static bool lpass_cpu_regmap_writeable (struct device *dev,unsigned int reg)
sound/soc/qcom/lpass-platform.c +12 -0
@@ -257,6 +257,9 @@ static int lpass_platform_pcmops_hw_params(struct snd_soc_component *component,break ;case MI2S_PRIMARY :case MI2S_SECONDARY : +case MI2S_TERTIARY : +case MI2S_QUATERNARY : +case MI2S_QUINARY : ret =regmap_fields_write (dmactl->intf, id,LPAIF_DMACTL_AUDINTF (dma_port));if (ret) {
@@ -507,6 +510,9 @@ static int lpass_platform_pcmops_trigger(struct snd_soc_component *component,break ;case MI2S_PRIMARY :case MI2S_SECONDARY : +case MI2S_TERTIARY : +case MI2S_QUATERNARY : +case MI2S_QUINARY : reg_irqclr =LPAIF_IRQCLEAR_REG (v,LPAIF_IRQ_PORT_HOST ); val_irqclr =LPAIF_IRQ_ALL (ch);
@@ -559,6 +565,9 @@ static int lpass_platform_pcmops_trigger(struct snd_soc_component *component,break ;case MI2S_PRIMARY :case MI2S_SECONDARY : +case MI2S_TERTIARY : +case MI2S_QUATERNARY : +case MI2S_QUINARY : reg_irqen =LPAIF_IRQEN_REG (v,LPAIF_IRQ_PORT_HOST ); val_mask =LPAIF_IRQ_ALL (ch); val_irqen =0 ;
@@ -655,6 +664,9 @@ static irqreturn_t lpass_dma_interrupt_handler(break ;case MI2S_PRIMARY :case MI2S_SECONDARY : +case MI2S_TERTIARY : +case MI2S_QUATERNARY : +case MI2S_QUINARY : map = drvdata->lpaif_map; reg =LPAIF_IRQCLEAR_REG (v,LPAIF_IRQ_PORT_HOST ); val =0 ;
sound/soc/qcom/lpass-sc7180.c +3 -6
@@ -20,7 +20,7 @@#include "lpass.h" static struct snd_soc_dai_driver sc7180_lpass_cpu_dai_driver[] = { - [MI2S_PRIMARY ] = { + { .id =MI2S_PRIMARY , .name ="Primary MI2S" , .playback = {
@@ -43,9 +43,7 @@ static struct snd_soc_dai_driver sc7180_lpass_cpu_dai_driver[] = { }, .probe = &asoc_qcom_lpass_cpu_dai_probe, .ops = &asoc_qcom_lpass_cpu_dai_ops, - }, - - [MI2S_SECONDARY] = { + }, { .id = MI2S_SECONDARY, .name = "Secondary MI2S", .playback = {
@@ -59,8 +57,7 @@ static struct snd_soc_dai_driver sc7180_lpass_cpu_dai_driver[] = { }, .probe = &asoc_qcom_lpass_cpu_dai_probe, .ops = &asoc_qcom_lpass_cpu_dai_ops, - }, - [LPASS_DP_RX] = { + }, { .id = LPASS_DP_RX, .name = "Hdmi", .playback = {
sound/soc/qcom/lpass.h +1 -1
@@ -12,7 +12,7 @@#include <linux/compiler.h> #include <linux/platform_device.h> #include <linux/regmap.h> -#include <dt-bindings/sound/sc7180-lpass.h> +#include <dt-bindings/sound/qcom,lpass.h> #include "lpass-hdmi.h" #define LPASS_AHBIX_CLOCK_FREQUENCY 131072000
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 92/142 ASoC: qcom: lpass-ipq806x: fix bitwidth regmap field
In reply to Greg Kroah-HartmanFrom: Srinivas Kandagatla <[email protected]>
[ Upstream commit 1e066a23e76f90c9c39c189fe0dbf7c6e3dd5044 ]
BIT_WIDTH field in I2S_CTL register is two bits wide, however recent regmap field conversion patch trimmed it down to one bit. Fix this by correcting the bit range!
--- sound/soc/qcom/lpass-ipq806x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/qcom/lpass-ipq806x.c +1 -1
@@ -131,7 +131,7 @@ static struct lpass_variant ipq806x_data = { .micmode = REG_FIELD_ID(0x0010, 4, 7, 5, 0x4), .micmono = REG_FIELD_ID(0x0010, 3, 3, 5, 0x4), .wssrc = REG_FIELD_ID(0x0010, 2, 2, 5, 0x4), - .bitwidth = REG_FIELD_ID(0x0010, 0, 0, 5, 0x4), + .bitwidth = REG_FIELD_ID(0x0010, 0, 1, 5, 0x4), .rdma_dyncclk = REG_FIELD_ID(0x6000, 12, 12, 4, 0x1000), .rdma_bursten = REG_FIELD_ID(0x6000, 11, 11, 4, 0x1000),
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 90/142 ASoC: qcom: Fix incorrect volatile registers
In reply to Greg Kroah-HartmanFrom: Srinivasa Rao Mandadapu <[email protected]>
[ Upstream commit 315fbe4cef98ee5fb6085bc54c7f25eb06466c70 ]
MI2S and DMA control registers are not volatile, so remove these from volatile registers list. Registers reset state check by reading non volatile registers makes no use,
so remove error check from cpu and platform trigger callbacks.
Initialized map variable two times in lpass platform trigger API,
so remove redundant initialization.
Fixes commit b1824968221cc ("ASoC: qcom: Fix enabling BCLK and LRCLK in LPAIF invalid state")
--- sound/soc/qcom/lpass-cpu.c | 20 ++------------------ sound/soc/qcom/lpass-platform.c | 15 --------------- 2 files changed, 2 insertions(+), 33 deletions(-)
sound/soc/qcom/lpass-cpu.c +2 -18
@@ -270,18 +270,6 @@ static int lpass_cpu_daiops_trigger(struct snd_pcm_substream *substream,struct lpaif_i2sctl *i2sctl = drvdata->i2sctl;unsigned int id = dai->driver->id;int ret = -EINVAL ; -unsigned int val =0 ; - - ret =regmap_read (drvdata->lpaif_map, -LPAIF_I2SCTL_REG (drvdata->variant, dai->driver->id), &val); -if (ret) { -dev_err (dai->dev,"error reading from i2sctl reg: %d\n" , ret); -return ret; - } -if (val ==LPAIF_I2SCTL_RESET_STATE ) { -dev_err (dai->dev,"error in i2sctl register state\n" ); -return -ENOTRECOVERABLE ; - }switch (cmd) {case SNDRV_PCM_TRIGGER_START :
@@ -454,20 +442,16 @@ static bool lpass_cpu_regmap_volatile(struct device *dev, unsigned int reg)struct lpass_variant *v = drvdata->variant;int i; -for (i =0 ; i < v->i2s_ports; ++i) -if (reg ==LPAIF_I2SCTL_REG (v, i)) -return true;for (i =0 ; i < v->irq_ports; ++i)if (reg ==LPAIF_IRQSTAT_REG (v, i))return true;for (i =0 ; i < v->rdma_channels; ++i) -if (reg ==LPAIF_RDMACURR_REG (v, i) || reg ==LPAIF_RDMACTL_REG (v, i)) +if (reg ==LPAIF_RDMACURR_REG (v, i))return true;for (i =0 ; i < v->wrdma_channels; ++i) -if (reg ==LPAIF_WRDMACURR_REG (v, i + v->wrdma_channel_start) || - reg ==LPAIF_WRDMACTL_REG (v, i + v->wrdma_channel_start)) +if (reg ==LPAIF_WRDMACURR_REG (v, i + v->wrdma_channel_start))return true;return false;
sound/soc/qcom/lpass-platform.c +0 -15
@@ -452,7 +452,6 @@ static int lpass_platform_pcmops_trigger(struct snd_soc_component *component,unsigned int reg_irqclr =0 , val_irqclr =0 ;unsigned int reg_irqen =0 , val_irqen =0 , val_mask =0 ;unsigned int dai_id = cpu_dai->driver->id; -unsigned int dma_ctrl_reg =0 ; ch = pcm_data->dma_ch;if (dir ==SNDRV_PCM_STREAM_PLAYBACK ) {
@@ -469,17 +468,7 @@ static int lpass_platform_pcmops_trigger(struct snd_soc_component *component, id = pcm_data->dma_ch - v->wrdma_channel_start; map = drvdata->lpaif_map; } - ret =regmap_read (map,LPAIF_DMACTL_REG (v, ch, dir, dai_id), &dma_ctrl_reg); -if (ret) { -dev_err (soc_runtime->dev,"error reading from rdmactl reg: %d\n" , ret); -return ret; - } -if (dma_ctrl_reg ==LPAIF_DMACTL_RESET_STATE || - dma_ctrl_reg ==LPAIF_DMACTL_RESET_STATE +1 ) { -dev_err (soc_runtime->dev,"error in rdmactl register state\n" ); -return -ENOTRECOVERABLE ; - }switch (cmd) {case SNDRV_PCM_TRIGGER_START :case SNDRV_PCM_TRIGGER_RESUME :
@@ -500,7 +489,6 @@ static int lpass_platform_pcmops_trigger(struct snd_soc_component *component, "error writing to rdmactl reg: %d\n", ret);return ret; } - map = drvdata->hdmiif_map; reg_irqclr =LPASS_HDMITX_APP_IRQCLEAR_REG (v); val_irqclr = (LPAIF_IRQ_ALL(ch) | LPAIF_IRQ_HDMI_REQ_ON_PRELOAD(ch) |
@@ -519,7 +507,6 @@ static int lpass_platform_pcmops_trigger(struct snd_soc_component *component,break ;case MI2S_PRIMARY :case MI2S_SECONDARY : - map = drvdata->lpaif_map; reg_irqclr =LPAIF_IRQCLEAR_REG (v,LPAIF_IRQ_PORT_HOST ); val_irqclr =LPAIF_IRQ_ALL (ch);
@@ -563,7 +550,6 @@ static int lpass_platform_pcmops_trigger(struct snd_soc_component *component, "error writing to rdmactl reg: %d\n", ret);return ret; } - map = drvdata->hdmiif_map; reg_irqen =LPASS_HDMITX_APP_IRQEN_REG (v); val_mask = (LPAIF_IRQ_ALL(ch) | LPAIF_IRQ_HDMI_REQ_ON_PRELOAD(ch) |
@@ -573,7 +559,6 @@ static int lpass_platform_pcmops_trigger(struct snd_soc_component *component,break ;case MI2S_PRIMARY :case MI2S_SECONDARY : - map = drvdata->lpaif_map; reg_irqen =LPAIF_IRQEN_REG (v,LPAIF_IRQ_PORT_HOST ); val_mask =LPAIF_IRQ_ALL (ch); val_irqen =0 ;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 86/142 arm64: dts: imx8mp: Correct the gpio ranges of gpio3
In reply to Greg Kroah-HartmanFrom: Jacky Bai <[email protected]>
[ Upstream commit b764eb65e1c932f0500b30fcc06417cd9bc3e583 ]
On i.MX8MP, The GPIO3's secondary gpio-ranges's 'gpio controller offset' cell value should be 26, so correct it.
--- arch/arm64/boot/dts/freescale/imx8mp.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/freescale/imx8mp.dtsi +1 -1
@@ -259,7 +259,7 @@ #gpio-cells = <2>; interrupt-controller; #interrupt-cells = <2>; - gpio-ranges = <&iomuxc 0 56 26>, <&iomuxc 0 144 4>; + gpio-ranges = <&iomuxc 0 56 26>, <&iomuxc 26 144 4>; }; gpio4: gpio@30230000 {
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 87/142 firmware: imx: select SOC_BUS to fix firmware build
In reply to Greg Kroah-HartmanFrom: Randy Dunlap <[email protected]>
[ Upstream commit 82c082784e03a9a9c043345f9bc04bc8254cf6da ]
Fix build error in firmware/imx/ selecting SOC_BUS.
riscv32-linux-ld: drivers/firmware/imx/imx-scu-soc.o: in function `.L9':
imx-scu-soc.c:(.text+0x1b0): undefined reference to `soc_device_register'
--- drivers/firmware/imx/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/firmware/imx/Kconfig +1 -0
@@ -13,6 +13,7 @@ config IMX_DSP config IMX_SCU bool "IMX SCU Protocol driver" depends on IMX_MBOX + select SOC_BUS help The System Controller Firmware (SCFW) is a low-level system function which runs on a dedicated Cortex-M core to provide power, clock, and
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 44/142 KVM: nVMX: Sync unsyncd vmcs02 state to vmcs12 on migration
In reply to Greg Kroah-HartmanFrom: Maxim Levitsky <[email protected]>
commit d51e1d3f6b4236e0352407d8a63f5c5f71ce193d upstream.
Even when we are outside the nested guest, some vmcs02 fields may not be in sync vs vmcs12. This is intentional, even across nested VM-exit, because the sync can be delayed until the nested hypervisor performs a VMCLEAR or a VMREAD/VMWRITE that affects those rarely accessed fields.
However, during KVM_GET_NESTED_STATE, the vmcs12 has to be up to date to be able to restore it. To fix that, call copy_vmcs02_to_vmcs12_rare() before the vmcs12 contents are copied to userspace.
Message-Id: <[email protected]>
--- arch/x86/kvm/vmx/nested.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)
arch/x86/kvm/vmx/nested.c +8 -5
@@ -6070,11 +6070,14 @@ static int vmx_get_nested_state(struct kif (is_guest_mode (vcpu)) {sync_vmcs02_to_vmcs12 (vcpu, vmcs12);sync_vmcs02_to_vmcs12_rare (vcpu, vmcs12); - }else if (!vmx->nested.need_vmcs12_to_shadow_sync) { -if (vmx->nested.hv_evmcs) -copy_enlightened_to_vmcs12 (vmx); -else if (enable_shadow_vmcs) -copy_shadow_to_vmcs12 (vmx); + }else { +copy_vmcs02_to_vmcs12_rare (vcpu,get_vmcs12 (vcpu)); +if (!vmx->nested.need_vmcs12_to_shadow_sync) { +if (vmx->nested.hv_evmcs) +copy_enlightened_to_vmcs12 (vmx); +else if (enable_shadow_vmcs) +copy_shadow_to_vmcs12 (vmx); + } }BUILD_BUG_ON (sizeof (user_vmx_nested_state->vmcs12) <VMCS12_SIZE );
Greg Kroah-Hartman
maintainerPATCH 85/142 ARM: dts: imx6qdl-sr-som: fix some cubox-i platforms
In reply to Greg Kroah-HartmanFrom: Russell King <[email protected]>
[ Upstream commit 2cc0bfc9c12784188482a8f3d751d44af45b0d97 ]
The PHY address bit 2 is configured by the LED pin. Attaching a LED to this pin is not sufficient to guarantee this configuration pin is correctly read. This leads to some platforms having their PHY at address 0 and others at address 4.
If there is no phy-handle specified, the FEC driver will scan the PHY bus for a PHY and use that. Consequently, adding the DT configuration of the PHY and the phy properties to the FEC driver broke some boards.
Fix this by removing the phy-handle property, and listing two PHY entries for both possible PHY addresses, so that the DT configuration for the PHY can be found by the PHY driver.
--- arch/arm/boot/dts/imx6qdl-sr-som.dtsi | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
arch/arm/boot/dts/imx6qdl-sr-som.dtsi +10 -2
@@ -53,7 +53,6 @@ &fec { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_microsom_enet_ar8035>; - phy-handle = <&phy>; phy-mode = "rgmii-id"; phy-reset-duration = <2>; phy-reset-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>;
@@ -63,10 +62,19 @@ #address-cells = <1>; #size-cells = <0>; - phy: ethernet-phy@0 { + /* + * The PHY can appear at either address 0 or 4 due to the + * configuration (LED) pin not being pulled sufficiently. + */ + ethernet-phy@0 { reg = <0>; qca,clk-out-frequency = <125000000>; }; + + ethernet-phy@4 { + reg = <4>; + qca,clk-out-frequency = <125000000>; + }; }; };
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 88/142 RDMA/cxgb4: Fix the reported max_recv_sge value
In reply to Greg Kroah-HartmanFrom: Kamal Heib <[email protected]>
[ Upstream commit a372173bf314d374da4dd1155549d8ca7fc44709 ]
The max_recv_sge value is wrongly reported when calling query_qp, This is happening due to a typo when assigning the max_recv_sge value, the value of sq_max_sges was assigned instead of rq_max_sges.
--- drivers/infiniband/hw/cxgb4/qp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/cxgb4/qp.c +1 -1
@@ -2471,7 +2471,7 @@ int c4iw_ib_query_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, init_attr->cap.max_send_wr = qhp->attr.sq_num_entries; init_attr->cap.max_recv_wr = qhp->attr.rq_num_entries; init_attr->cap.max_send_sge = qhp->attr.sq_max_sges; - init_attr->cap.max_recv_sge = qhp->attr.sq_max_sges; + init_attr->cap.max_recv_sge = qhp->attr.rq_max_sges; init_attr->cap.max_inline_data =T4_MAX_SEND_INLINE ; init_attr->sq_sig_type = qhp->sq_sig_all ?IB_SIGNAL_ALL_WR :0 ;return 0 ;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 39/142 KVM: x86/pmu: Fix HW_REF_CPU_CYCLES event pseudo-encoding in intel_arch_events[]
In reply to Greg Kroah-HartmanFrom: Like Xu <[email protected]>
commit 98dd2f108e448988d91e296173e773b06fb978b8 upstream.
The HW_REF_CPU_CYCLES event on the fixed counter 2 is pseudo-encoded as 0x0300 in the intel_perfmon_event_map[]. Correct its usage.
Message-Id: <[email protected]>
--- arch/x86/kvm/vmx/pmu_intel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kvm/vmx/pmu_intel.c +1 -1
@@ -29,7 +29,7 @@ static struct kvm_event_hw_type_mapping [4] = { 0x2e, 0x41, PERF_COUNT_HW_CACHE_MISSES }, [5] = { 0xc4, 0x00, PERF_COUNT_HW_BRANCH_INSTRUCTIONS }, [6] = { 0xc5, 0x00, PERF_COUNT_HW_BRANCH_MISSES }, - [7] = { 0x00, 0x30, PERF_COUNT_HW_REF_CPU_CYCLES }, + [7] = { 0x00, 0x03, PERF_COUNT_HW_REF_CPU_CYCLES }, };/* mapping between fixed pmc index and intel_arch_events array */
Greg Kroah-Hartman
maintainerPATCH 43/142 KVM: x86: allow KVM_REQ_GET_NESTED_STATE_PAGES outside guest mode for VMX
In reply to Greg Kroah-HartmanFrom: Paolo Bonzini <[email protected]>
commit 9a78e15802a87de2b08dfd1bd88e855201d2c8fa upstream.
VMX also uses KVM_REQ_GET_NESTED_STATE_PAGES for the Hyper-V eVMCS, which may need to be loaded outside guest mode. Therefore we cannot WARN in that case.
However, that part of nested_get_vmcs12_pages is _not_ needed at vmentry time. Split it out of KVM_REQ_GET_NESTED_STATE_PAGES handling, so that both vmentry and migration (and in the latter case, independent of is_guest_mode) do the parts that are needed.
--- arch/x86/kvm/svm/nested.c | 3 +++ arch/x86/kvm/vmx/nested.c | 31 +++++++++++++++++++++++++------ arch/x86/kvm/x86.c | 4 +--- 3 files changed, 29 insertions(+), 9 deletions(-)
arch/x86/kvm/svm/nested.c +3 -0
@@ -200,6 +200,9 @@ static bool svm_get_nested_state_pages(s {struct vcpu_svm *svm =to_svm (vcpu); +if (WARN_ON (!is_guest_mode (vcpu))) +return true; +if (!nested_svm_vmrun_msrpm (svm)) { vcpu->run->exit_reason =KVM_EXIT_INTERNAL_ERROR ; vcpu->run->internal.suberror =
arch/x86/kvm/vmx/nested.c +25 -6
@@ -3123,13 +3123,9 @@ static int nested_vmx_check_vmentry_hw(sreturn 0 ; } -static bool nested_get_vmcs12_pages (struct kvm_vcpu *vcpu) +static bool nested_get_evmcs_page (struct kvm_vcpu *vcpu) { -struct vmcs12 *vmcs12 =get_vmcs12 (vcpu);struct vcpu_vmx *vmx =to_vmx (vcpu); -struct kvm_host_map *map; -struct page *page; -u64 hpa;/* * hv_evmcs may end up being not mapped after migration (when
@@ -3152,6 +3148,17 @@ static bool nested_get_vmcs12_pages(stru } } +return true; +} + +static bool nested_get_vmcs12_pages (struct kvm_vcpu *vcpu) +{ +struct vmcs12 *vmcs12 =get_vmcs12 (vcpu); +struct vcpu_vmx *vmx =to_vmx (vcpu); +struct kvm_host_map *map; +struct page *page; +u64 hpa; +if (nested_cpu_has2 (vmcs12,SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES )) {/* * Translate L1 physical address to host physical
@@ -3220,6 +3227,18 @@ static bool nested_get_vmcs12_pages(struexec_controls_setbit (vmx,CPU_BASED_USE_MSR_BITMAPS ); elseexec_controls_clearbit (vmx ,CPU_BASED_USE_MSR_BITMAPS ); + +return true; +} + +static bool vmx_get_nested_state_pages (struct kvm_vcpu *vcpu) +{ +if (!nested_get_evmcs_page (vcpu)) +return false; + +if (is_guest_mode (vcpu) && !nested_get_vmcs12_pages (vcpu)) +return false; +return true; }
@@ -6575,7 +6594,7 @@ struct kvm_x86_nested_ops vmx_nested_ops .hv_timer_pending = nested_vmx_preemption_timer_pending, .get_state = vmx_get_nested_state, .set_state = vmx_set_nested_state, - .get_nested_state_pages = nested_get_vmcs12_pages, + .get_nested_state_pages = vmx_get_nested_state_pages, .write_log_dirty = nested_vmx_write_pml_buffer, .enable_evmcs = nested_enable_evmcs, .get_evmcs_version = nested_get_evmcs_version,
arch/x86/kvm/x86.c +1 -3
@@ -8750,9 +8750,7 @@ static int vcpu_enter_guest(struct kvm_vif (kvm_request_pending (vcpu)) {if (kvm_check_request (KVM_REQ_GET_NESTED_STATE_PAGES , vcpu)) { -if (WARN_ON_ONCE (!is_guest_mode (vcpu))) - ; -else if (unlikely (!kvm_x86_ops.nested_ops->get_nested_state_pages (vcpu))) { +if (unlikely (!kvm_x86_ops.nested_ops->get_nested_state_pages (vcpu))) { r =0 ; goto out; }
Greg Kroah-Hartman
maintainerPATCH 72/142 clk: qcom: gcc-sm250: Use floor ops for sdcc clks
In reply to Greg Kroah-HartmanFrom: Dmitry Baryshkov <[email protected]>
commit fd2383093593b23f8814a879093b746e502fe3cf upstream.
Followup to the commits 5e4b7e82d497 ("clk: qcom: gcc-sdm845: Use floor ops for sdcc clks") and 6d37a8d19283 ("clk: qcom: gcc-sc7180: Use floor ops for sdcc clks"). Use floor ops for sdcc clocks on sm8250.
drivers/clk/qcom/gcc-sm8250.c +2 -2
@@ -722,7 +722,7 @@ static struct clk_rcg2 gcc_sdcc2_apps_clk_src = { .name = "gcc_sdcc2_apps_clk_src", .parent_data = gcc_parent_data_4, .num_parents = 5, - .ops = &clk_rcg2_ops, + .ops = &clk_rcg2_floor_ops, }, };
@@ -745,7 +745,7 @@ static struct clk_rcg2 gcc_sdcc4_apps_clk_src = { .name = "gcc_sdcc4_apps_clk_src", .parent_data = gcc_parent_data_0, .num_parents = 3, - .ops = &clk_rcg2_ops, + .ops = &clk_rcg2_floor_ops, }, };
Greg Kroah-Hartman
maintainerPATCH 83/142 ARM: imx: fix imx8m dependencies
In reply to Greg Kroah-HartmanFrom: Arnd Bergmann <[email protected]>
[ Upstream commit 097530bf8cd469ef7b3d52ef00cafb64b33bacb1 ]
Selecting ARM_GIC_V3 on non-CP15 processors leads to build failures like
arch/arm/include/asm/arch_gicv3.h: In function 'write_ICC_AP1R3_EL1':arch/arm/include/asm/arch_gicv3.h:36:40: error: 'c12' undeclared (first use in this function)
36 | #define __ICC_AP1Rx(x) __ACCESS_CP15(c12, 0, c9, x)
| ^~~
Add a dependency to only enable the gic driver when building for at an ARMv7 target, which is the closes approximation to the ARMv8 processor that is actually in this chip.
--- drivers/soc/imx/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/imx/Kconfig +1 -1
@@ -13,7 +13,7 @@ config SOC_IMX8M depends on ARCH_MXC || COMPILE_TEST default ARCH_MXC && ARM64 select SOC_BUS - select ARM_GIC_V3 if ARCH_MXC + select ARM_GIC_V3 if ARCH_MXC && ARCH_MULTI_V7 help If you say yes here you get support for the NXP i.MX8M family support, it will provide the SoC info like SoC family,
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 42/142 KVM: nSVM: cancel KVM_REQ_GET_NESTED_STATE_PAGES on nested vmexit
In reply to Greg Kroah-HartmanFrom: Maxim Levitsky <[email protected]>
commit f2c7ef3ba9556d62a7e2bb23b563c6510007d55c upstream.
It is possible to exit the nested guest mode, entered by svm_set_nested_state prior to first vm entry to it (e.g due to pending event) if the nested run was not pending during the migration.
In this case we must not switch to the nested msr permission bitmap. Also add a warning to catch similar cases in the future.
Message-Id: <[email protected]>
--- arch/x86/kvm/svm/nested.c | 3 +++ arch/x86/kvm/vmx/nested.c | 2 ++ arch/x86/kvm/x86.c | 4 +++- 3 files changed, 8 insertions(+), 1 deletion(-)
arch/x86/kvm/svm/nested.c +3 -0
@@ -199,6 +199,7 @@ static bool nested_svm_vmrun_msrpm(strucstatic bool svm_get_nested_state_pages (struct kvm_vcpu *vcpu) {struct vcpu_svm *svm =to_svm (vcpu); +if (!nested_svm_vmrun_msrpm (svm)) { vcpu->run->exit_reason =KVM_EXIT_INTERNAL_ERROR ; vcpu->run->internal.suberror =
@@ -595,6 +596,8 @@ int nested_svm_vmexit(struct vcpu_svm *s svm->nested.vmcb12_gpa =0 ;WARN_ON_ONCE (svm->nested.nested_run_pending); +kvm_clear_request (KVM_REQ_GET_NESTED_STATE_PAGES , &svm->vcpu); +/* in case we halted in L2 */ svm->vcpu.arch.mp_state =KVM_MP_STATE_RUNNABLE ;
arch/x86/kvm/vmx/nested.c +2 -0
@@ -4416,6 +4416,8 @@ void nested_vmx_vmexit(struct kvm_vcpu */* trying to cancel vmlaunch/vmresume is a bug */ WARN_ON_ONCE (vmx->nested.nested_run_pending); +kvm_clear_request (KVM_REQ_GET_NESTED_STATE_PAGES , vcpu); +/* Service the TLB flush request for L2 before switching to L1. */ if (kvm_check_request (KVM_REQ_TLB_FLUSH_CURRENT , vcpu))kvm_vcpu_flush_tlb_current (vcpu);
arch/x86/kvm/x86.c +3 -1
@@ -8750,7 +8750,9 @@ static int vcpu_enter_guest(struct kvm_vif (kvm_request_pending (vcpu)) {if (kvm_check_request (KVM_REQ_GET_NESTED_STATE_PAGES , vcpu)) { -if (unlikely (!kvm_x86_ops.nested_ops->get_nested_state_pages (vcpu))) { +if (WARN_ON_ONCE (!is_guest_mode (vcpu))) + ; +else if (unlikely (!kvm_x86_ops.nested_ops->get_nested_state_pages (vcpu))) { r =0 ; goto out; }
Greg Kroah-Hartman
maintainerPATCH 71/142 clk: mmp2: fix build without CONFIG_PM
In reply to Greg Kroah-HartmanFrom: Arnd Bergmann <[email protected]>
commit c361c5a6c559d1e0a2717abe9162a71aa602954f upstream.
pm_clk_suspend()/pm_clk_resume() are defined as NULL pointers rather than empty inline stubs without CONFIG_PM:
drivers/clk/mmp/clk-audio.c:402:16: error: called object type 'void *' is not a function or function pointer
pm_clk_suspend(dev);
drivers/clk/mmp/clk-audio.c:411:15: error: called object type 'void *' is not a function or function pointer
pm_clk_resume(dev);I tried redefining the helper functions, but that caused additional problems. This is the simple solution of replacing the __maybe_unused trick with an #ifdef.
drivers/clk/mmp/clk-audio.c +4 -2
@@ -392,7 +392,8 @@ static int mmp2_audio_clk_remove(struct platform_device *pdev)return 0 ; } -static int __maybe_unused mmp2_audio_clk_suspend (struct device *dev) +#ifdef CONFIG_PM +static int mmp2_audio_clk_suspend (struct device *dev) {struct mmp2_audio_clk *priv =dev_get_drvdata (dev);
@@ -404,7 +405,7 @@ static int __maybe_unused mmp2_audio_clk_suspend(struct device *dev)return 0 ; } -static int __maybe_unused mmp2_audio_clk_resume (struct device *dev) +static int mmp2_audio_clk_resume (struct device *dev) {struct mmp2_audio_clk *priv =dev_get_drvdata (dev);
@@ -415,6 +416,7 @@ static int __maybe_unused mmp2_audio_clk_resume(struct device *dev)return 0 ; } +#endif static const struct dev_pm_ops mmp2_audio_clk_pm_ops = {SET_RUNTIME_PM_OPS (mmp2_audio_clk_suspend, mmp2_audio_clk_resume,NULL )
Greg Kroah-Hartman
maintainerPATCH 66/142 KVM: Documentation: Fix spec for KVM_CAP_ENABLE_CAP_VM
In reply to Greg Kroah-HartmanFrom: Quentin Perret <[email protected]>
commit a10f373ad3c760dd40b41e2f69a800ee7b8da15e upstream.
The documentation classifies KVM_ENABLE_CAP with KVM_CAP_ENABLE_CAP_VM as a vcpu ioctl, which is incorrect. Fix it by specifying it as a VM ioctl.
Message-Id: <[email protected]>
--- Documentation/virt/kvm/api.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/virt/kvm/api.rst +1 -1
@@ -1319,7 +1319,7 @@ documentation when it pops into existenc :Capability: KVM_CAP_ENABLE_CAP_VM :Architectures: all -:Type: vcpu ioctl +:Type: vm ioctl :Parameters: struct kvm_enable_cap (in) :Returns: 0 on success; -1 on error
Greg Kroah-Hartman
maintainerPATCH 61/142 drm/vc4: Correct POS1_SCL for hvs5
In reply to Greg Kroah-HartmanFrom: Dom Cobley <[email protected]>
commit f6b57101a6b31277a4bde1d8028c46e898bd2ff2 upstream.
Fixes failure with 4096x1080 resolutions
[ 284.315379] WARNING: CPU: 1 PID: 901 at drivers/gpu/drm/vc4/vc4_plane.c:981 vc4_plane_mode_set+0x1374/0x13c4 [ 284.315385] Modules linked in: ir_rc5_decoder rpivid_hevc(C) bcm2835_codec(C) bcm2835_isp(C) bcm2835_mmal_vchiq(C) bcm2835_gpiomem v4l2_mem2mem videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 videobuf2_common videodev mc cdc_acm xpad ir_rc6_decoder rc_rc6_mce gpio_ir_recv fuse [ 284.315509] CPU: 1 PID: 901 Comm: kodi.bin Tainted: G C 5.10.7 #1 [ 284.315514] Hardware name: BCM2711 [ 284.315518] Backtrace: [ 284.315533] [<c0cc5ca0>] (dump_backtrace) from [<c0cc6014>] (show_stack+0x20/0x24) [ 284.315540] r7:ffffffff r6:00000000 r5:68000013 r4:c18ecf1c [ 284.315549] [<c0cc5ff4>] (show_stack) from [<c0cca638>] (dump_stack+0xc4/0xf0) [ 284.315558] [<c0cca574>] (dump_stack) from [<c022314c>] (__warn+0xfc/0x158) [ 284.315564] r9:00000000 r8:00000009 r7:000003d5 r6:00000009 r5:c08cc7dc r4:c0fd09b8 [ 284.315572] [<c0223050>] (__warn) from [<c0cc67ec>] (warn_slowpath_fmt+0x74/0xe4) [ 284.315577] r7:c08cc7dc r6:000003d5 r5:c0fd09b8 r4:00000000 [ 284.315584] [<c0cc677c>] (warn_slowpath_fmt) from [<c08cc7dc>] (vc4_plane_mode_set+0x1374/0x13c4) [ 284.315589] r8:00000000 r7:00000000 r6:00001000 r5:c404c600 r4:c2e34600 [ 284.315596] [<c08cb468>] (vc4_plane_mode_set) from [<c08cc984>] (vc4_plane_atomic_check+0x40/0x1c0) [ 284.315601] r10:00000001 r9:c2e34600 r8:c0e67068 r7:c0fc44e0 r6:c2ce3640 r5:c3d636c0 [ 284.315605] r4:c2e34600 [ 284.315614] [<c08cc944>] (vc4_plane_atomic_check) from [<c0860504>] (drm_atomic_helper_check_planes+0xec/0x1ec) [ 284.315620] r9:c2e34600 r8:c0e67068 r7:c0fc44e0 r6:c2ce3640 r5:c3d636c0 r4:00000006 [ 284.315627] [<c0860418>] (drm_atomic_helper_check_planes) from [<c0860658>] (drm_atomic_helper_check+0x54/0x9c) [ 284.315633] r9:c2e35400 r8:00000006 r7:00000000 r6:c2ba7800 r5:c3d636c0 r4:00000000 [ 284.315641] [<c0860604>] (drm_atomic_helper_check) from [<c08b7ca8>] (vc4_atomic_check+0x25c/0x454) [ 284.315645] r7:00000000 r6:c2ba7800 r5:00000001 r4:c3d636c0 [ 284.315652] [<c08b7a4c>] (vc4_atomic_check) from [<c0881278>] (drm_atomic_check_only+0x5cc/0x7e0) [ 284.315658] r10:c404c6c8 r9:ffffffff r8:c472c480 r7:00000003 r6:c3d636c0 r5:00000000 [ 284.315662] r4:0000003c r3:c08b7a4c [ 284.315670] [<c0880cac>] (drm_atomic_check_only) from [<c089ba60>] (drm_mode_atomic_ioctl+0x758/0xa7c) [ 284.315675] r10:c3d46000 r9:c3d636c0 r8:c2ce8a70 r7:027e3a54 r6:00000043 r5:c1fbb800 [ 284.315679] r4:0281a858 [ 284.315688] [<c089b308>] (drm_mode_atomic_ioctl) from [<c086e9f8>] (drm_ioctl_kernel+0xc4/0x108) [ 284.315693] r10:c03864bc r9:c1fbb800 r8:c3d47e64 r7:c089b308 r6:00000002 r5:c2ba7800 [ 284.315697] r4:00000000 [ 284.315705] [<c086e934>] (drm_ioctl_kernel) from [<c086ee28>] (drm_ioctl+0x1e8/0x3a0) [ 284.315711] r9:c1fbb800 r8:000000bc r7:c3d47e64 r6:00000038 r5:c0e59570 r4:00000038 [ 284.315719] [<c086ec40>] (drm_ioctl) from [<c041f354>] (sys_ioctl+0x35c/0x914) [ 284.315724] r10:c2d08200 r9:00000000 r8:c36fa300 r7:befdd870 r6:c03864bc r5:c36fa301 [ 284.315728] r4:c03864bc [ 284.315735] [<c041eff8>] (sys_ioctl) from [<c0200040>] (ret_fast_syscall+0x0/0x28) [ 284.315739] Exception stack(0xc3d47fa8 to 0xc3d47ff0) [ 284.315745] 7fa0: 027eb750 befdd870 00000000 c03864bc befdd870 00000000 [ 284.315750] 7fc0: 027eb750 befdd870 c03864bc 00000036 027e3948 0281a640 0281a850 027e3a50 [ 284.315756] 7fe0: b4b64100 befdd844 b4b5ba2c b49c994c [ 284.315762] r10:00000036 r9:c3d46000 r8:c0200204 r7:00000036 r6:c03864bc r5:befdd870 [ 284.315765] r4:027eb750
--- drivers/gpu/drm/vc4/vc4_plane.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/vc4/vc4_plane.c +2 -2
@@ -917,9 +917,9 @@ static int vc4_plane_mode_set(struct drmif (!vc4_state->is_unity) {vc4_dlist_write (vc4_state,VC4_SET_FIELD (vc4_state->crtc_w, -SCALER_POS1_SCL_WIDTH ) | +SCALER5_POS1_SCL_WIDTH ) |VC4_SET_FIELD (vc4_state->crtc_h, -SCALER_POS1_SCL_HEIGHT )); +SCALER5_POS1_SCL_HEIGHT )); }/* Position Word 2: Source Image Size */
Greg Kroah-Hartman
maintainerPATCH 62/142 drm/nouveau/dispnv50: Restore pushing of all data.
In reply to Greg Kroah-HartmanFrom: Bastian Beranek <[email protected]>
commit fd55b61ebd31449549e14c33574825d64de2b29b upstream.
Commit f844eb485eb056ad3b67e49f95cbc6c685a73db4 introduced a regression for NV50, which lead to visual artifacts, tearing and eventual crashes.
In the changes of f844eb485eb056ad3b67e49f95cbc6c685a73db4 only the first line was correctly translated to the new NVIDIA header macros:
- PUSH_NVSQ(push, NV827C, 0x0110, 0,
- 0x0114, 0);
+ PUSH_MTHD(push, NV827C, SET_PROCESSING,
+ NVDEF(NV827C, SET_PROCESSING, USE_GAIN_OFS, DISABLE));
The lower part ("0x0114, 0") was probably omitted by accident.
This patch restores the push of the missing data and fixes the regression.
drivers/gpu/drm/nouveau/dispnv50/base507c.c +5 -1
@@ -88,7 +88,11 @@ base507c_image_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw) NVVAL(NV507C, SET_CONVERSION, OFS, 0x64)); }else {PUSH_MTHD (push,NV507C ,SET_PROCESSING , -NVDEF (NV507C ,SET_PROCESSING ,USE_GAIN_OFS ,DISABLE )); +NVDEF (NV507C ,SET_PROCESSING ,USE_GAIN_OFS ,DISABLE ), + +SET_CONVERSION , +NVVAL (NV507C ,SET_CONVERSION ,GAIN ,0 ) | +NVVAL (NV507C ,SET_CONVERSION ,OFS ,0 )); }PUSH_MTHD (push,NV507C ,SURFACE_SET_OFFSET (0 ,0 ), asyw->image.offset[0 ] >>8 );
drivers/gpu/drm/nouveau/dispnv50/base827c.c +5 -1
@@ -49,7 +49,11 @@ base827c_image_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw) NVVAL(NV827C, SET_CONVERSION, OFS, 0x64)); }else {PUSH_MTHD (push,NV827C ,SET_PROCESSING , -NVDEF (NV827C ,SET_PROCESSING ,USE_GAIN_OFS ,DISABLE )); +NVDEF (NV827C ,SET_PROCESSING ,USE_GAIN_OFS ,DISABLE ), + +SET_CONVERSION , +NVVAL (NV827C ,SET_CONVERSION ,GAIN ,0 ) | +NVVAL (NV827C ,SET_CONVERSION ,OFS ,0 )); } PUSH_MTHD(push, NV827C, SURFACE_SET_OFFSET(0, 0), asyw->image.offset[0] >> 8,
Greg Kroah-Hartman
maintainerPATCH 41/142 KVM: arm64: Filter out v8.1+ events on v8.0 HW
In reply to Greg Kroah-HartmanFrom: Marc Zyngier <[email protected]>
commit 9529aaa056edc76b3a41df616c71117ebe11e049 upstream.
When running on v8.0 HW, make sure we don't try to advertise events in the 0x4000-0x403f range.
--- arch/arm64/kvm/pmu-emul.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
arch/arm64/kvm/pmu-emul.c +7 -3
@@ -788,7 +788,7 @@ u64 kvm_pmu_get_pmceid(struct kvm_vcpu * {unsigned long *bmap = vcpu->kvm->arch.pmu_filter;u64 val, mask =0 ; -int base, i; +int base, i, nr_events;if (!pmceid1) { val =read_sysreg (pmceid0_el0);
@@ -801,13 +801,17 @@ u64 kvm_pmu_get_pmceid(struct kvm_vcpu *if (!bmap)return val; + nr_events =kvm_pmu_event_mask (vcpu->kvm) +1 ; +for (i =0 ; i <32 ; i +=8 ) {u64 byte; byte =bitmap_get_value8 (bmap, base + i); mask |= byte << i; - byte =bitmap_get_value8 (bmap,0x4000 + base + i); - mask |= byte << (32 + i); +if (nr_events >= (0x4000 + base +32 )) { + byte =bitmap_get_value8 (bmap,0x4000 + base + i); + mask |= byte << (32 + i); + } }return val & mask;
Greg Kroah-Hartman
maintainerPATCH 58/142 ARM: dts: imx6qdl-kontron-samx6i: fix pwms for lcd-backlight
In reply to Greg Kroah-HartmanFrom: Marco Felsch <[email protected]>
commit 6337c2353a069b6f1276dc35421e421ef6c1ead9 upstream.
The pwms property have to specify the no-/inverted flag since commit fa28d8212ede ("ARM: dts: imx: default to #pwm-cells = <3> in the SoC dtsi files").
--- arch/arm/boot/dts/imx6qdl-kontron-samx6i.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/imx6qdl-kontron-samx6i.dtsi +1 -1
@@ -137,7 +137,7 @@ lcd_backlight: lcd-backlight { compatible = "pwm-backlight"; - pwms = <&pwm4 0 5000000>; + pwms = <&pwm4 0 5000000 0>; pwm-names = "LCD_BKLT_PWM"; brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
Greg Kroah-Hartman
maintainerPATCH 26/142 drivers/nouveau/kms/nv50-: Reject format modifiers for cursor planes
In reply to Greg Kroah-HartmanFrom: Lyude Paul <[email protected]>
commit 7c6d659868c77da9b518f32348160340dcdfa008 upstream.
Nvidia hardware doesn't actually support using tiling formats with the cursor plane, only linear is allowed. In the future, we should write a testcase for this.
--- drivers/gpu/drm/nouveau/dispnv50/wndw.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-)
drivers/gpu/drm/nouveau/dispnv50/wndw.c +13 -4
@@ -702,6 +702,11 @@ nv50_wndw_init(struct nv50_wndw *wndw)nvif_notify_get (&wndw->notify); } +static const u64 nv50_cursor_format_modifiers[] = { +DRM_FORMAT_MOD_LINEAR , +DRM_FORMAT_MOD_INVALID , +}; + int nv50_wndw_new_(const struct nv50_wndw_func *func, struct drm_device *dev, enum drm_plane_type type, const char *name, int index,
@@ -713,6 +718,7 @@ nv50_wndw_new_(const struct nv50_wndw_fustruct nvif_mmu *mmu = &drm->client.mmu;struct nv50_disp *disp =nv50_disp (dev);struct nv50_wndw *wndw; +const u64 *format_modifiers;int nformat;int ret;
@@ -728,10 +734,13 @@ nv50_wndw_new_(const struct nv50_wndw_fufor (nformat =0 ; format[nformat]; nformat++); - ret =drm_universal_plane_init (dev, &wndw->plane, heads, &nv50_wndw, - format, nformat, -nouveau_display (dev)->format_modifiers, - type,"%s-%d" , name, index); +if (type ==DRM_PLANE_TYPE_CURSOR ) + format_modifiers = nv50_cursor_format_modifiers; +else + format_modifiers =nouveau_display (dev)->format_modifiers; + + ret =drm_universal_plane_init (dev, &wndw->plane, heads, &nv50_wndw, format, nformat, + format_modifiers, type,"%s-%d" , name, index);if (ret) {kfree (*pwndw); *pwndw =NULL ;
Greg Kroah-Hartman
maintainerPATCH 36/142 drivers: soc: atmel: add null entry at the end of at91_soc_allowed_list[]
In reply to Greg Kroah-HartmanFrom: Claudiu Beznea <[email protected]>
commit 680896556805d3ad3fa47f6002b87b3041a45ac2 upstream.
of_match_node() calls __of_match_node() which loops though the entries of matches array. It stops when condition:
(matches->name[0] || matches->type[0] || matches->compatible[0]) is false. Thus, add a null entry at the end of at91_soc_allowed_list[] array.
--- drivers/soc/atmel/soc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/soc/atmel/soc.c +2 -1
@@ -269,7 +269,8 @@ static const struct of_device_id at91_so { .compatible = "atmel,at91rm9200", }, { .compatible = "atmel,at91sam9", }, { .compatible = "atmel,sama5", }, - { .compatible = "atmel,samv7", } + { .compatible = "atmel,samv7", }, + { } }; static int __init atmel_soc_device_init(void)
Greg Kroah-Hartman
maintainerPATCH 10/142 media: cec: add stm32 driver
In reply to Greg Kroah-HartmanFrom: Yannick Fertre <[email protected]>
commit eaf18a4165141f04dd26f0c48a7e53438e5a3ea2 upstream.
Missing stm32 directory to Makefile.
--- drivers/media/cec/platform/Makefile | 1 + 1 file changed, 1 insertion(+)
drivers/media/cec/platform/Makefile +1 -0
@@ -10,5 +10,6 @@ obj-$(CONFIG_CEC_MESON_AO) += meson/ obj-$(CONFIG_CEC_SAMSUNG_S5P) += s5p/ obj-$(CONFIG_CEC_SECO) += seco/ obj-$(CONFIG_CEC_STI) += sti/ +obj-$(CONFIG_CEC_STM32) += stm32/ obj-$(CONFIG_CEC_TEGRA) += tegra/
Greg Kroah-Hartman
maintainerPATCH 35/142 drivers: soc: atmel: Avoid calling at91_soc_init on non AT91 SoCs
In reply to Greg Kroah-HartmanFrom: Sudeep Holla <[email protected]>
commit caab13b4960416b9fee83169a758eb0f31e65109 upstream.
Since at91_soc_init is called unconditionally from atmel_soc_device_init, we get the following warning on all non AT91 SoCs:
" AT91: Could not find identification node"
Fix the same by filtering with allowed AT91 SoC list.
--- drivers/soc/atmel/soc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
drivers/soc/atmel/soc.c +12 -0
@@ -265,8 +265,20 @@ struct soc_device * __init at91_soc_initreturn soc_dev; } +static const struct of_device_id at91_soc_allowed_list[]__initconst = { + { .compatible ="atmel,at91rm9200" , }, + { .compatible ="atmel,at91sam9" , }, + { .compatible ="atmel,sama5" , }, + { .compatible ="atmel,samv7" , } +}; +static int __init atmel_soc_device_init (void ) { +struct device_node *np =of_find_node_by_path ("/" ); + +if (!of_match_node (at91_soc_allowed_list, np)) +return 0 ; +at91_soc_init (socs);return 0 ;
Greg Kroah-Hartman
maintainerPATCH 38/142 btrfs: fix possible free space tree corruption with online conversion
In reply to Greg Kroah-HartmanFrom: Josef Bacik <[email protected]>
commit 2f96e40212d435b328459ba6b3956395eed8fa9f upstream.
While running btrfs/011 in a loop I would often ASSERT() while trying to add a new free space entry that already existed, or get an EEXIST while adding a new block to the extent tree, which is another indication of double allocation.
This occurs because when we do the free space tree population, we create the new root and then populate the tree and commit the transaction. The problem is when you create a new root, the root node and commit root node are the same. During this initial transaction commit we will run all of the delayed refs that were paused during the free space tree generation, and thus begin to cache block groups. While caching block groups the caching thread will be reading from the main root for the free space tree, so as we make allocations we'll be changing the free space tree, which can cause us to add the same range twice which results in either the ASSERT(ret != -EEXIST); in __btrfs_add_free_space, or in a variety of different errors when running delayed refs because of a double allocation.
Fix this by marking the fs_info as unsafe to load the free space tree, and fall back on the old slow method. We could be smarter than this, for example caching the block group while we're populating the free space tree, but since this is a serious problem I've opted for the simplest solution.
--- fs/btrfs/block-group.c | 10 +++++++++- fs/btrfs/ctree.h | 3 +++ fs/btrfs/free-space-tree.c | 10 +++++++++- 3 files changed, 21 insertions(+), 2 deletions(-)
fs/btrfs/block-group.c +9 -1
@@ -639,7 +639,15 @@ static noinline void caching_thread(strumutex_lock (&caching_ctl->mutex);down_read (&fs_info->commit_root_sem); -if (btrfs_fs_compat_ro (fs_info,FREE_SPACE_TREE )) +/* +* If we are in the transaction that populated the free space tree we +* can't actually cache from the free space tree as our commit root and +* real root are the same, so we could change the contents of the blocks +* while caching. Instead do the slow caching in this case, and after +* the transaction has committed we will be safe. +*/ +if (btrfs_fs_compat_ro (fs_info,FREE_SPACE_TREE ) && + !(test_bit (BTRFS_FS_FREE_SPACE_TREE_UNTRUSTED , &fs_info->flags))) ret =load_free_space_tree (caching_ctl);else ret =load_extent_tree_free (caching_ctl);
fs/btrfs/ctree.h +3 -0
@@ -146,6 +146,9 @@ enum {BTRFS_FS_STATE_DEV_REPLACING ,/* The btrfs_fs_info created for self-tests */ BTRFS_FS_STATE_DUMMY_FS_INFO , + +/* Indicate that we can't trust the free space tree for caching yet */ + BTRFS_FS_FREE_SPACE_TREE_UNTRUSTED, };#define BTRFS_BACKREF_REV_MAX 256
fs/btrfs/free-space-tree.c +9 -1
@@ -1152,6 +1152,7 @@ int btrfs_create_free_space_tree(structreturn PTR_ERR (trans);set_bit (BTRFS_FS_CREATING_FREE_SPACE_TREE , &fs_info->flags); +set_bit (BTRFS_FS_FREE_SPACE_TREE_UNTRUSTED , &fs_info->flags); free_space_root =btrfs_create_tree (trans,BTRFS_FREE_SPACE_TREE_OBJECTID );if (IS_ERR (free_space_root)) {
@@ -1173,11 +1174,18 @@ int btrfs_create_free_space_tree(structbtrfs_set_fs_compat_ro (fs_info,FREE_SPACE_TREE );btrfs_set_fs_compat_ro (fs_info,FREE_SPACE_TREE_VALID );clear_bit (BTRFS_FS_CREATING_FREE_SPACE_TREE , &fs_info->flags); + ret =btrfs_commit_transaction (trans); -return btrfs_commit_transaction (trans); +/* +* Now that we've committed the transaction any reading of our commit +* root will be safe, so we can cache from the free space tree now. +*/ +clear_bit (BTRFS_FS_FREE_SPACE_TREE_UNTRUSTED , &fs_info->flags); +return ret; abort:clear_bit (BTRFS_FS_CREATING_FREE_SPACE_TREE , &fs_info->flags); +clear_bit (BTRFS_FS_FREE_SPACE_TREE_UNTRUSTED , &fs_info->flags);btrfs_abort_transaction (trans, ret);btrfs_end_transaction (trans);return ret;
Greg Kroah-Hartman
maintainerPATCH 56/142 drm/i915/pmu: Dont grab wakeref when enabling events
In reply to Greg Kroah-HartmanFrom: Tvrtko Ursulin <[email protected]>
commit 171a8e99828144050015672016dd63494c6d200a upstream.
Chris found a CI report which points out calling intel_runtime_pm_get from inside i915_pmu_enable hook is not allowed since it can be invoked from hard irq context. This is something we knew but forgot, so lets fix it once again.
We do this by syncing the internal book keeping with hardware rc6 counter on driver load.
v2:
* Always sync on parking and fully sync on init.
--- drivers/gpu/drm/i915/i915_pmu.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-)
drivers/gpu/drm/i915/i915_pmu.c +16 -14
@@ -184,13 +184,24 @@ static u64 get_rc6(struct intel_gt *gt)return val; } -static void park_rc6 (struct drm_i915_private *i915) +static void init_rc6 (struct i915_pmu *pmu) { -struct i915_pmu *pmu = &i915->pmu; +struct drm_i915_private *i915 =container_of (pmu,typeof (*i915), pmu); +intel_wakeref_t wakeref; -if (pmu->enable &config_enabled_mask (I915_PMU_RC6_RESIDENCY )) + with_intel_runtime_pm(i915->gt.uncore->rpm, wakeref) { pmu->sample[__I915_SAMPLE_RC6].cur =__get_rc6 (&i915->gt); + pmu->sample[__I915_SAMPLE_RC6_LAST_REPORTED].cur = + pmu->sample[__I915_SAMPLE_RC6].cur; + pmu->sleep_last =ktime_get (); + } +} +static void park_rc6 (struct drm_i915_private *i915) +{ +struct i915_pmu *pmu = &i915->pmu; + + pmu->sample[__I915_SAMPLE_RC6].cur =__get_rc6 (&i915->gt); pmu->sleep_last =ktime_get (); }
@@ -201,6 +212,7 @@ static u64 get_rc6(struct intel_gt *gt) return __get_rc6(gt); } +static void init_rc6 (struct i915_pmu *pmu) { }static void park_rc6 (struct drm_i915_private *i915) {}#endif
@@ -613,10 +625,8 @@ static void i915_pmu_enable(struct perf_container_of (event->pmu,typeof (*i915), pmu.base);unsigned int bit =event_enabled_bit (event);struct i915_pmu *pmu = &i915->pmu; -intel_wakeref_t wakeref;unsigned long flags; - wakeref =intel_runtime_pm_get (&i915->runtime_pm);spin_lock_irqsave (&pmu->lock, flags);/*
@@ -627,13 +637,6 @@ static void i915_pmu_enable(struct perf_GEM_BUG_ON (bit >=ARRAY_SIZE (pmu->enable_count));GEM_BUG_ON (pmu->enable_count[bit] == ~0 ); -if (pmu->enable_count[bit] ==0 && -config_enabled_mask (I915_PMU_RC6_RESIDENCY ) &BIT_ULL (bit)) { - pmu->sample[__I915_SAMPLE_RC6_LAST_REPORTED].cur =0 ; - pmu->sample[__I915_SAMPLE_RC6].cur =__get_rc6 (&i915->gt); - pmu->sleep_last =ktime_get (); - } - pmu->enable |=BIT_ULL (bit); pmu->enable_count[bit]++;
@@ -674,8 +677,6 @@ static void i915_pmu_enable(struct perf_* an existing non-zero value. */ local64_set (&event->hw.prev_count,__i915_pmu_event_read (event)); - -intel_runtime_pm_put (&i915->runtime_pm, wakeref); }static void i915_pmu_disable (struct perf_event *event)
@@ -1101,6 +1102,7 @@ void i915_pmu_register(struct drm_i915_phrtimer_init (&pmu->timer,CLOCK_MONOTONIC ,HRTIMER_MODE_REL ); pmu->timer.function = i915_sample; pmu->cpuhp.slot =CPUHP_INVALID ; +init_rc6 (pmu);if (!is_igp (i915)) { pmu->name = kasprintf(GFP_KERNEL,
Greg Kroah-Hartman
maintainerPATCH 25/142 drm/i915/gt: Always try to reserve GGTT address 0x0
In reply to Greg Kroah-HartmanFrom: Chris Wilson <[email protected]>
commit 489140b5ba2e7cc4b853c29e0591895ddb462a82 upstream.
Since writing to address 0 is a very common mistake, let's try to avoid putting anything sensitive there.
--- drivers/gpu/drm/i915/gt/intel_ggtt.c | 47 ++++++++++++++++++++++++++--------- 1 file changed, 35 insertions(+), 12 deletions(-)
drivers/gpu/drm/i915/gt/intel_ggtt.c +35 -12
@@ -526,16 +526,39 @@ static int init_ggtt(struct i915_ggtt *gmutex_init (&ggtt->error_mutex);if (ggtt->mappable_end) { -/* Reserve a mappable slot for our lockless error capture */ - ret =drm_mm_insert_node_in_range (&ggtt->vm.mm, - &ggtt->error_capture, -PAGE_SIZE ,0 , -I915_COLOR_UNEVICTABLE , -0 , ggtt->mappable_end, -DRM_MM_INSERT_LOW ); -if (ret) -return ret; +/* +* Reserve a mappable slot for our lockless error capture. +* +* We strongly prefer taking address 0x0 in order to protect +* other critical buffers against accidental overwrites, +* as writing to address 0 is a very common mistake. +* +* Since 0 may already be in use by the system (e.g. the BIOS +* framebuffer), we let the reservation fail quietly and hope +* 0 remains reserved always. +* +* If we fail to reserve 0, and then fail to find any space +* for an error-capture, remain silent. We can afford not +* to reserve an error_capture node as we have fallback +* paths, and we trust that 0 will remain reserved. However, +* the only likely reason for failure to insert is a driver +* bug, which we expect to cause other failures... +*/ + ggtt->error_capture.size =I915_GTT_PAGE_SIZE ; + ggtt->error_capture.color =I915_COLOR_UNEVICTABLE ; +if (drm_mm_reserve_node (&ggtt->vm.mm, &ggtt->error_capture)) +drm_mm_insert_node_in_range (&ggtt->vm.mm, + &ggtt->error_capture, + ggtt->error_capture.size,0 , + ggtt->error_capture.color, +0 , ggtt->mappable_end, +DRM_MM_INSERT_LOW ); } +if (drm_mm_node_allocated (&ggtt->error_capture)) +drm_dbg (&ggtt->vm.i915->drm, +"Reserved GGTT:[%llx, %llx] for use by error capture\n" , + ggtt->error_capture.start, + ggtt->error_capture.start + ggtt->error_capture.size);/* * The upper portion of the GuC address space has a sizeable hole
@@ -548,9 +571,9 @@ static int init_ggtt(struct i915_ggtt *g/* Clear any non-preallocated blocks */ drm_mm_for_each_hole (entry, &ggtt->vm.mm, hole_start, hole_end) { -drm_dbg_kms (&ggtt->vm.i915->drm, -"clearing unused GTT space: [%lx, %lx]\n" , - hole_start, hole_end); +drm_dbg (&ggtt->vm.i915->drm, +"clearing unused GTT space: [%lx, %lx]\n" , + hole_start, hole_end); ggtt->vm.clear_range (&ggtt->vm, hole_start, hole_end - hole_start); }
Greg Kroah-Hartman
maintainerPATCH 24/142 drm/i915: Always flush the active worker before returning from the wait
In reply to Greg Kroah-HartmanFrom: Chris Wilson <[email protected]>
commit f6e98a1809faa02f40e0d089d6cfc1aa372a34c0 upstream.
The first thing the active retirement worker does is decrement the i915_active count.
The first thing we do during i915_active_wait is try to increment the i915_active count, but only if already active [non-zero].
The wait may see that the retirement is already started and so marked the i915_active as idle, and skip waiting for the retirement handler. However, the caller of i915_active_wait may immediately free the i915_active upon returning (e.g. i915_vma_destroy) so we must not return before the concurrent access from the worker is completed. We must always flush the worker.
drivers/gpu/drm/i915/i915_active.c +15 -13
@@ -631,24 +631,26 @@ static int flush_lazy_signals(struct i915_active *ref)int __i915_active_wait (struct i915_active *ref,int state) { -int err; -might_sleep (); -if (!i915_active_acquire_if_busy (ref)) -return 0 ; -/* Any fence added after the wait begins will not be auto-signaled */ - err =flush_lazy_signals (ref); -i915_active_release (ref); -if (err) -return err; +if (i915_active_acquire_if_busy (ref)) { +int err; -if (!i915_active_is_idle (ref) && -___wait_var_event (ref,i915_active_is_idle (ref), - state,0 ,0 ,schedule ())) -return -EINTR ; + err =flush_lazy_signals (ref); +i915_active_release (ref); +if (err) +return err; +if (___wait_var_event (ref,i915_active_is_idle (ref), + state,0 ,0 ,schedule ())) +return -EINTR ; + } + +/* +* After the wait is complete, the caller may free the active. +* We have to flush any concurrent retirement before returning. +*/ flush_work (&ref->work);return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 21/142 ASoC: AMD Renoir - refine DMI entries for some Lenovo products
In reply to Greg Kroah-HartmanFrom: Jaroslav Kysela <[email protected]>
commit 40caffd66ca9ad1baa2d5541232675160bc6c772 upstream.
Apparently, the DMI board name LNVNB161216 is also used also for products with the digital microphones connected to the AMD's audio bridge. Refine the DMI table - use product name identifiers extracted from https://bugzilla.redhat.com/show_bug.cgi?id=1892115 .
The report for Lenovo Yoga Slim 7 14ARE05 (82A2) is in buglink.
--- sound/soc/amd/renoir/rn-pci-acp3x.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-)
sound/soc/amd/renoir/rn-pci-acp3x.c +16 -2
@@ -165,10 +165,24 @@ static int rn_acp_deinit(void __iomem *astatic const struct dmi_system_id rn_acp_quirk_table[] = { { -/* Lenovo IdeaPad Flex 5 14ARE05, IdeaPad 5 15ARE05 */ +/* Lenovo IdeaPad S340-14API */ .matches = {DMI_EXACT_MATCH (DMI_BOARD_VENDOR ,"LENOVO" ), -DMI_EXACT_MATCH (DMI_BOARD_NAME ,"LNVNB161216" ), +DMI_EXACT_MATCH (DMI_PRODUCT_NAME ,"81NB" ), + } + }, + { +/* Lenovo IdeaPad Flex 5 14ARE05 */ + .matches = { +DMI_EXACT_MATCH (DMI_BOARD_VENDOR ,"LENOVO" ), +DMI_EXACT_MATCH (DMI_PRODUCT_NAME ,"81X2" ), + } + }, + { +/* Lenovo IdeaPad 5 15ARE05 */ + .matches = { +DMI_EXACT_MATCH (DMI_BOARD_VENDOR ,"LENOVO" ), +DMI_EXACT_MATCH (DMI_PRODUCT_NAME ,"81YQ" ), } }, {
Greg Kroah-Hartman
maintainerPATCH 20/142 x86/xen: avoid warning in Xen pv guest with CONFIG_AMD_MEM_ENCRYPT enabled
In reply to Greg Kroah-HartmanFrom: Juergen Gross <[email protected]>
commit 2e92493637a09547734f92c62a2471f6f0cb9a2c upstream.
When booting a kernel which has been built with CONFIG_AMD_MEM_ENCRYPT enabled as a Xen pv guest a warning is issued for each processor:
[ 5.964347] ------------[ cut here ]------------ [ 5.968314] WARNING: CPU: 0 PID: 1 at /home/gross/linux/head/arch/x86/xen/enlighten_pv.c:660 get_trap_addr+0x59/0x90 [ 5.972321] Modules linked in: [ 5.976313] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G W 5.11.0-rc5-default #75 [ 5.980313] Hardware name: Dell Inc. OptiPlex 9020/0PC5F7, BIOS A05 12/05/2013 [ 5.984313] RIP: e030:get_trap_addr+0x59/0x90 [ 5.988313] Code: 42 10 83 f0 01 85 f6 74 04 84 c0 75 1d b8 01 00 00 00 c3 48 3d 00 80 83 82 72 08 48 3d 20 81 83 82 72 0c b8 01 00 00 00 eb db <0f> 0b 31 c0 c3 48 2d 00 80 83 82 48 ba 72 1c c7 71 1c c7 71 1c 48 [ 5.992313] RSP: e02b:ffffc90040033d38 EFLAGS: 00010202 [ 5.996313] RAX: 0000000000000001 RBX: ffffffff82a141d0 RCX: ffffffff8222ec38 [ 6.000312] RDX: ffffffff8222ec38 RSI: 0000000000000005 RDI: ffffc90040033d40 [ 6.004313] RBP: ffff8881003984a0 R08: 0000000000000007 R09: ffff888100398000 [ 6.008312] R10: 0000000000000007 R11: ffffc90040246000 R12: ffff8884082182a8 [ 6.012313] R13: 0000000000000100 R14: 000000000000001d R15: ffff8881003982d0 [ 6.016316] FS: 0000000000000000(0000) GS:ffff888408200000(0000) knlGS:0000000000000000 [ 6.020313] CS: e030 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 6.024313] CR2: ffffc900020ef000 CR3: 000000000220a000 CR4: 0000000000050660 [ 6.028314] Call Trace: [ 6.032313] cvt_gate_to_trap.part.7+0x3f/0x90 [ 6.036313] ? asm_exc_double_fault+0x30/0x30 [ 6.040313] xen_convert_trap_info+0x87/0xd0 [ 6.044313] xen_pv_cpu_up+0x17a/0x450 [ 6.048313] bringup_cpu+0x2b/0xc0 [ 6.052313] ? cpus_read_trylock+0x50/0x50 [ 6.056313] cpuhp_invoke_callback+0x80/0x4c0 [ 6.060313] _cpu_up+0xa7/0x140 [ 6.064313] cpu_up+0x98/0xd0 [ 6.068313] bringup_nonboot_cpus+0x4f/0x60 [ 6.072313] smp_init+0x26/0x79 [ 6.076313] kernel_init_freeable+0x103/0x258 [ 6.080313] ? rest_init+0xd0/0xd0 [ 6.084313] kernel_init+0xa/0x110 [ 6.088313] ret_from_fork+0x1f/0x30 [ 6.092313] ---[ end trace be9ecf17dceeb4f3 ]---
Reason is that there is no Xen pv trap entry for X86_TRAP_VC.
Fix that by adding a generic trap handler for unknown traps and wire all unknown bare metal handlers to this generic handler, which will just crash the system in case such a trap will ever happen.
--- arch/x86/include/asm/idtentry.h | 1 + arch/x86/xen/enlighten_pv.c | 15 ++++++++++++++- arch/x86/xen/xen-asm.S | 1 + 3 files changed, 16 insertions(+), 1 deletion(-)
arch/x86/include/asm/idtentry.h +1 -0
@@ -616,6 +616,7 @@ DECLARE_IDTENTRY_VC(X86_TRAP_VC, exc_vmm#ifdef CONFIG_XEN_PV DECLARE_IDTENTRY_XENCB (X86_TRAP_OTHER , exc_xen_hypervisor_callback); +DECLARE_IDTENTRY_RAW (X86_TRAP_OTHER , exc_xen_unknown_trap);#endif /* Device interrupts common/spurious */
arch/x86/xen/enlighten_pv.c +14 -1
@@ -583,6 +583,13 @@ DEFINE_IDTENTRY_RAW(xenpv_exc_debug)exc_debug (regs); } +DEFINE_IDTENTRY_RAW (exc_xen_unknown_trap) +{ +/* This should never happen and there is no way to handle it. */ +pr_err ("Unknown trap in Xen PV mode." ); +BUG (); +} +struct trap_array_entry {void (*orig)(void );void (*xen)(void );
@@ -631,6 +638,7 @@ static bool __ref get_trap_addr(void **a {unsigned int nr;bool ist_okay = false; +bool found = false;/* * Replace trap handler addresses by Xen specific ones.
@@ -645,6 +653,7 @@ static bool __ref get_trap_addr(void **aif (*addr == entry->orig) { *addr = entry->xen; ist_okay = entry->ist_okay; + found = true;break ; } }
@@ -655,9 +664,13 @@ static bool __ref get_trap_addr(void **a nr = (*addr - (void *)early_idt_handler_array[0 ]) /EARLY_IDT_HANDLER_SIZE ; *addr = (void *)xen_early_idt_handler_array[nr]; + found = true; } -if (WARN_ON (ist !=0 && !ist_okay)) +if (!found) + *addr = (void *)xen_asm_exc_xen_unknown_trap; + +if (WARN_ON (found && ist !=0 && !ist_okay))return false;return true;
arch/x86/xen/xen-asm.S +1 -0
@@ -178,6 +178,7 @@ xen_pv_trap asm_exc_simd_coprocessor_err #ifdef CONFIG_IA32_EMULATION xen_pv_trap entry_INT80_compat #endif +xen_pv_trap asm_exc_xen_unknown_trap xen_pv_trap asm_exc_xen_hypervisor_callback __INIT
Greg Kroah-Hartman
maintainerPATCH 15/142 media: rc: ensure that uevent can be read directly after rc device register
In reply to Greg Kroah-HartmanFrom: Sean Young <[email protected]>
commit 896111dc4bcf887b835b3ef54f48b450d4692a1d upstream.
There is a race condition where if the /sys/class/rc0/uevent file is read before rc_dev->registered is set to true, -ENODEV will be returned.
--- drivers/media/rc/rc-main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/media/rc/rc-main.c +2 -2
@@ -1928,6 +1928,8 @@ int rc_register_device(struct rc_dev *de goto out_raw; } + dev->registered = true; + rc =device_add (&dev->dev);if (rc) goto out_rx_free;
@@ -1937,8 +1939,6 @@ int rc_register_device(struct rc_dev *de dev->device_name ?: "Unspecified device", path ?: "N/A");kfree (path); - dev->registered = true; -/* * once the the input device is registered in rc_setup_rx_device, * userspace can open the input device and rc_open() will be called
Greg Kroah-Hartman
maintainerPATCH 17/142 ARM: dts: ux500: Reserve memory carveouts
In reply to Greg Kroah-HartmanFrom: Linus Walleij <[email protected]>
commit 8a996b2d8a03beae3cb6adfc12673778c192085d upstream.
The Ux500 platforms have some memory carveouts set aside for communicating with the modem and for the initial secure software (ISSW). These areas are protected by the memory controller and will result in an external abort if accessed like common read/write memory.
On the legacy boot loaders, these were set aside by using cmdline arguments such as this:
mem=96M@0 mem_mtrace=15M@96M mem_mshared=1M@111M mem_modem=16M@112M mali.mali_mem=32M@128M mem=96M@160M hwmem=127M@256M mem_issw=1M@383M mem_ram_console=1M@384M mem=638M@385M
Reserve the relevant areas in the device tree instead. The "mali", "hwmem", "mem_ram_console" and the trailing 1MB at the end of the memory reservations in the list are not relevant for the upstream kernel as these are nowadays replaced with upstream technologies such as CMA. The modem and ISSW reservations are necessary.
This was manifested in a bug that surfaced in response to
commit 7fef431be9c9 ("mm/page_alloc: place pages to tail in __free_pages_core()") which changes the behaviour of memory allocations
in such a way that the platform will sooner run into these
dangerous areas, with "Unhandled fault: imprecise external
abort (0xc06) at 0xb6fd83dc" or similar: the real reason
turns out to be that the PTE is pointing right into one of
the reserved memory areas. We were just lucky until now.
We need to augment the DB8500 and DB8520 SoCs similarly and also create a new include for the DB9500 used in the Snowball since this does not have a modem and thus does not need the modem memory reservation, albeit it needs the ISSW reservation.
--- arch/arm/boot/dts/ste-db8500.dtsi | 38 +++++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/ste-db8520.dtsi | 38 +++++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/ste-db9500.dtsi | 35 ++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/ste-snowball.dts | 2 - 4 files changed, 112 insertions(+), 1 deletion(-)
arch/arm/boot/dts/ste-db8500.dtsi +38 -0
@@ -12,4 +12,42 @@ 200000 0>; }; }; + + reserved-memory { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + /* Modem trace memory */ + ram@06000000 { + reg = <0x06000000 0x00f00000>; + no-map; + }; + + /* Modem shared memory */ + ram@06f00000 { + reg = <0x06f00000 0x00100000>; + no-map; + }; + + /* Modem private memory */ + ram@07000000 { + reg = <0x07000000 0x01000000>; + no-map; + }; + + /* + * Initial Secure Software ISSW memory + * + * This is probably only used if the kernel tries + * to actually call into trustzone to run secure + * applications, which the mainline kernel probably + * will not do on this old chipset. But you can never + * be too careful, so reserve this memory anyway. + */ + ram@17f00000 { + reg = <0x17f00000 0x00100000>; + no-map; + }; + }; };
arch/arm/boot/dts/ste-db8520.dtsi +38 -0
@@ -12,4 +12,42 @@ 200000 0>; }; }; + + reserved-memory { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + /* Modem trace memory */ + ram@06000000 { + reg = <0x06000000 0x00f00000>; + no-map; + }; + + /* Modem shared memory */ + ram@06f00000 { + reg = <0x06f00000 0x00100000>; + no-map; + }; + + /* Modem private memory */ + ram@07000000 { + reg = <0x07000000 0x01000000>; + no-map; + }; + + /* + * Initial Secure Software ISSW memory + * + * This is probably only used if the kernel tries + * to actually call into trustzone to run secure + * applications, which the mainline kernel probably + * will not do on this old chipset. But you can never + * be too careful, so reserve this memory anyway. + */ + ram@17f00000 { + reg = <0x17f00000 0x00100000>; + no-map; + }; + }; };
arch/arm/boot/dts/ste-db9500.dtsi new file +35 -0
@@ -0,0 +1,35 @@ +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "ste-dbx5x0.dtsi" + +/ { + cpus { + cpu@300 { + /* cpufreq controls */ + operating-points = <1152000 0 + 800000 0 + 400000 0 + 200000 0>; + }; + }; + + reserved-memory { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + /* + * Initial Secure Software ISSW memory + * + * This is probably only used if the kernel tries + * to actually call into trustzone to run secure + * applications, which the mainline kernel probably + * will not do on this old chipset. But you can never + * be too careful, so reserve this memory anyway. + */ + ram@17f00000 { + reg = <0x17f00000 0x00100000>; + no-map; + }; + }; +};
arch/arm/boot/dts/ste-snowball.dts +1 -1
@@ -4,7 +4,7 @@ */ /dts-v1/; -#include "ste-db8500.dtsi" +#include "ste-db9500.dtsi" #include "ste-href-ab8500.dtsi" #include "ste-href-family-pinctrl.dtsi"
Greg Kroah-Hartman
maintainerPATCH 18/142 ARM: dts: imx6qdl-gw52xx: fix duplicate regulator naming
In reply to Greg Kroah-HartmanFrom: Koen Vandeputte <[email protected]>
commit 5a22747b76ca2384057d8e783265404439d31d7f upstream.
2 regulator descriptions carry identical naming.
This leads to following boot warning:
[ 0.173138] debugfs: Directory 'vdd1p8' with parent 'regulator' already present!
Fix this by renaming the one used for audio.
--- arch/arm/boot/dts/imx6qdl-gw52xx.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/imx6qdl-gw52xx.dtsi +1 -1
@@ -418,7 +418,7 @@ /* VDD_AUD_1P8: Audio codec */ reg_aud_1p8v: ldo3 { - regulator-name = "vdd1p8"; + regulator-name = "vdd1p8a"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; regulator-boot-on;
Greg Kroah-Hartman
maintainerPATCH 19/142 wext: fix NULL-ptr-dereference with cfg80211s lack of commit()
In reply to Greg Kroah-HartmanFrom: Johannes Berg <[email protected]>
commit 5122565188bae59d507d90a9a9fd2fd6107f4439 upstream.
Since cfg80211 doesn't implement commit, we never really cared about that code there (and it's configured out w/o CONFIG_WIRELESS_EXT). After all, since it has no commit, it shouldn't return -EIWCOMMIT to indicate commit is needed.
However, EIWCOMMIT is actually an alias for EINPROGRESS, which _can_ happen if e.g. we try to change the frequency but we're already in the process of connecting to some network, and drivers could return that value (or even cfg80211 itself might).
This then causes us to crash because dev->wireless_handlers is NULL but we try to check dev->wireless_handlers->standard[0].
Fix this by also checking dev->wireless_handlers. Also simplify the code a little bit.
--- net/wireless/wext-core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
net/wireless/wext-core.c +3 -2
@@ -896,8 +896,9 @@ out:int call_commit_handler (struct net_device *dev) {#ifdef CONFIG_WIRELESS_EXT -if ((netif_running (dev)) && - (dev->wireless_handlers->standard[0 ] !=NULL )) +if (netif_running (dev) && + dev->wireless_handlers && + dev->wireless_handlers->standard[0 ])/* Call the commit handler on the driver */ return dev->wireless_handlers->standard[0 ](dev,NULL ,NULL ,NULL );
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.13 release. There are 142 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 04 Feb 2021 13:29:33 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.13-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.10.y
and the diffstat can be found below.thanks,
greg k-h
All tests passing for Tegra ...
Test results for stable-v5.10:
12 builds: 12 pass, 0 fail
26 boots: 26 pass, 0 fail
65 tests: 65 pass, 0 failLinux version: 5.10.13-rc1-gb34e59747fbb
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,
tegra194-p2972-0000, tegra20-ventana,
tegra210-p2371-2180, tegra210-p3450-0000,
tegra30-cardhu-a04Jon
Sasha Levin
maintainerRe: [PATCH 5.10 066/142] KVM: Documentation: Fix spec for KVM_CAP_ENABLE_CAP_VM
In reply to Greg Kroah-HartmanQuoted 22 lines · Greg Kroah-Hartman
From: Quentin Perret <[email protected]>
commit
a10f373ad3c760dd40b41e2f69a800ee7b8da15eupstream.The documentation classifies
KVM_ENABLE_CAPwithKVM_CAP_ENABLE_CAP_VMas a vcpu ioctl, which is incorrect. Fix it by specifying it as a VM ioctl.Fixes e5d83c74a580 ("kvm: make KVM_CAP_ENABLE_CAP_VM architecture agnostic")Signed-off-by Quentin Perret <[email protected]>Message-Id: <[email protected]>
Signed-off-by Paolo Bonzini <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>---
Documentation/virt/kvm/api.rst| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)Documentation/virt/kvm/api.rst +0
-0@@ -1319,7 +1319,7 @@ documentation when it pops into existenc
Quoted 6 lines
:Capability:
KVM_CAP_ENABLE_CAP_VM
:Architectures: all
-:Type: vcpu ioctl
+:Type: vm ioctl
:Parameters: structkvm_enable_cap(in)
:Returns: 0 on success; -1 on error
Um, how did this patch made it in?
Signature · 2 lines
Thanks, Sasha
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.13 release. There are 142 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 04 Feb 2021 13:29:33 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 9 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.13-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.10.y
and the diffstat can be found below.thanks,
greg k-h
Results from Linaro’s test farm.
No regressions on arm64, arm, x86_64, and i386.
Summary
------------------------------------
kernel: 5.10.13-rc1
git repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git branch: linux-5.10.y
git commit: b34e59747fbb2a46f329a8562d3fd5ec6e24b2a1
git describe: v5.10.12-143-gb34e59747fbb
Test details: https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-5.10.y/build/v5.10.12-143-gb34e59747fbb
No regressions (compared to build v5.10.12)
No fixes (compared to build v5.10.12)
Ran 52801 total tests in the following environments and test suites.
Environments
-------------
- arc
- arm
- arm64
- dragonboard-410c
- hi6220-hikey
- i386
- juno-r2
- juno-r2-compat
- juno-r2-kasan
- mips
- nxp-ls2088
- nxp-ls2088-64k_page_size
- parisc
- powerpc
- qemu-arm-clang
- qemu-arm64-clang
- qemu-arm64-kasan
- qemu-i386-clang
- qemu-x86_64-clang
- qemu-x86_64-kasan
- qemu-x86_64-kcsan
- qemu_arm
- qemu_arm64
- qemu_arm64-compat
- qemu_i386
- qemu_x86_64
- qemu_x86_64-compat
- riscv
- s390
- sh
- sparc
- x15
- x86
- x86-kasan
- x86_64
Test Suites
------
* build
* linux-log-parser
* igt-gpu-tools
* install-android-platform-tools-r2600
* kselftest
* kselftest-android
* kselftest-capabilities
* kselftest-cgroup
* kselftest-clone3
* kselftest-core
* kselftest-cpu-hotplug
* kselftest-cpufreq
* kselftest-kvm
* kselftest-net
* kselftest-netfilter
* kselftest-nsfs
* kselftest-tc-testing
* ltp-cap_bounds-tests
* ltp-cpuhotplug-tests
* ltp-crypto-tests
* ltp-cve-tests
* ltp-dio-tests
* ltp-io-tests
* ltp-ipc-tests
* ltp-sched-tests
* ltp-tracing-tests
* v4l2-compliance
* fwts
* kselftest-bpf
* kselftest-efivarfs
* kselftest-filesystems
* kselftest-firmware
* kselftest-fpu
* kselftest-futex
* kselftest-gpio
* kselftest-intel_pstate
* kselftest-ipc
* kselftest-ir
* kselftest-kcmp
* kselftest-lib
* kselftest-livepatch
* kselftest-lkdtm
* kselftest-membarrier
* kselftest-memfd
* kselftest-memory-hotplug
* kselftest-mincore
* kselftest-mount
* kselftest-mqueue
* kselftest-openat2
* kselftest-pid_namespace
* kselftest-pidfd
* kselftest-proc
* kselftest-pstore
* kselftest-ptrace
* ltp-commands-tests
* ltp-fcntl-locktests-tests
* ltp-filecaps-tests
* ltp-fs_bind-tests
* ltp-fs_perms_simple-tests
* ltp-fsx-tests
* ltp-math-tests
* ltp-nptl-tests
* ltp-pty-tests
* ltp-securebits-tests
* network-basic-tests
* kselftest-kexec
* kselftest-rseq
* kselftest-rtc
* kselftest-seccomp
* kselftest-sigaltstack
* kselftest-size
* kselftest-splice
* kselftest-static_keys
* kselftest-sync
* kselftest-sysctl
* kselftest-timens
* kselftest-timers
* kselftest-tmpfs
* kselftest-tpm2
* kselftest-user
* kselftest-vm
* kselftest-x86
* kselftest-zram
* libhugetlbfs
* ltp-containers-tests
* ltp-controllers-tests
* ltp-fs-tests
* ltp-hugetlb-tests
* ltp-mm-tests
* ltp-open-posix-tests
* ltp-syscalls-tests
* perf
* kvm-unit-tests
* kunit
* rcutorture
* kselftest-vsyscall-mode-native-
* kselftest-vsyscall-mode-none-
* ssuite
-
Linaro LKFT
https://lkft.linaro.org
Greg Kroah-Hartman
maintainerRe: [PATCH 5.10 066/142] KVM: Documentation: Fix spec for KVM_CAP_ENABLE_CAP_VM
In reply to Sasha LevinQuoted 23 lines · Sasha Levin
Quoted 22 lines · Greg Kroah-Hartman
From: Quentin Perret <[email protected]>
commit
a10f373ad3c760dd40b41e2f69a800ee7b8da15eupstream.The documentation classifies
KVM_ENABLE_CAPwithKVM_CAP_ENABLE_CAP_VMas a vcpu ioctl, which is incorrect. Fix it by specifying it as a VM ioctl.Fixes e5d83c74a580 ("kvm: make KVM_CAP_ENABLE_CAP_VM architecture agnostic")Signed-off-by Quentin Perret <[email protected]>Message-Id: <[email protected]>
Signed-off-by Paolo Bonzini <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>---
Documentation/virt/kvm/api.rst| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)Documentation/virt/kvm/api.rst +0
-0@@ -1319,7 +1319,7 @@ documentation when it pops into existenc
Quoted 8 lines
Quoted 6 lines
:Capability:
KVM_CAP_ENABLE_CAP_VM
:Architectures: all
-:Type: vcpu ioctl
+:Type: vm ioctl
:Parameters: structkvm_enable_cap(in)
:Returns: 0 on success; -1 on errorUm, how did this patch made it in?
It came from my scripts, keeping documentation correct seems to be something it wanted to do :)
thanks,
greg k-h
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.13 release. There are 142 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 04 Feb 2021 13:29:33 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 9 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.13-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.10.y
and the diffstat can be found below.thanks,
greg k-h
Compiled and booted on my test system. No dmesg regressions.
thanks,
-- Shuah
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.13 release. There are 142 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 04 Feb 2021 13:29:33 +0000. Anything received after that time might be too late.
Build results:
total: 154 pass: 154 fail: 0 Qemu test results: total: 427 pass: 427 fail: 0
Guenter
Greg Kroah-Hartman
maintainerQuoted 7 lines · Pavel Machek
Hi!
Quoted 4 lines
This is the start of the stable review cycle for the 5.10.13 release. There are 142 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Quoted 5 lines
CIP testing did not find any problems here:
https://gitlab.com/cip-project/cip-testing/linux-stable-rc-ci/-/tree/linux-5.10.y
Tested-by Pavel Machek (CIP) <[email protected]>
Thanks for testing some of these and letting me know.
greg k-h
Greg Kroah-Hartman
maintainerQuoted 10 lines · Guenter Roeck
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.13 release. There are 142 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 04 Feb 2021 13:29:33 +0000. Anything received after that time might be too late.
Quoted 6 lines
Build results:
total: 154 pass: 154 fail: 0 Qemu test results: total: 427 pass: 427 fail: 0Tested-by Guenter Roeck <[email protected]>
Thanks for testing them all and letting me know.
greg k-h
Greg Kroah-Hartman
maintainerQuoted 15 lines · Shuah Khan
Quoted 14 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.13 release. There are 142 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 04 Feb 2021 13:29:33 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.13-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.10.y
and the diffstat can be found below.
Quoted 8 lines
Quoted 4 lines
thanks,
greg k-h
Compiled and booted on my test system. No dmesg regressions.
Tested-by Shuah Khan <[email protected]>
Thanks for testing these and letting me know.
greg k-h
Greg Kroah-Hartman
maintainerQuoted 26 lines · Jon Hunter
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.13 release. There are 142 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 04 Feb 2021 13:29:33 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.13-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.10.y
and the diffstat can be found below.thanks,
greg k-h
All tests passing for Tegra ...
Test results for stable-v5.10:
12 builds: 12 pass, 0 fail 26 boots: 26 pass, 0 fail 65 tests: 65 pass, 0 fail
Quoted 7 lines
Linux version: 5.10.13-rc1-gb34e59747fbb
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,tegra194-p2972-0000, tegra20-ventana, tegra210-p2371-2180, tegra210-p3450-0000, tegra30-cardhu-a04Tested-by Jon Hunter <[email protected]>
Thanks for testing them all and letting me know.
greg k-h
Greg Kroah-Hartman
maintainerQuoted 19 lines · Naresh Kamboju
Quoted 17 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.13 release. There are 142 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 04 Feb 2021 13:29:33 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.13-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.10.y
and the diffstat can be found below.thanks,
Quoted 7 lines
Quoted 2 lines
greg k-h
Results from Linaro’s test farm.
No regressions on arm64, arm,x86_64, and i386.
Thanks for all the testing!
greg k-h