5.11.21-rc1 review
Subsystems (5)
Greg Kroah-Hartman
maintainercover 5.11.21-rc1 review
This is the start of the stable review cycle for the 5.11.21 release. There are 601 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 Fri, 14 May 2021 14:47:09 +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.11.21-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.11.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 5.11.21-rc1
Xin Long <[email protected]>
sctp: delay auto_asconf init until binding the first addr
Xin Long <[email protected]>
Revert "net/sctp: fix race condition in sctp_destroy_sock"
Arnd Bergmann <[email protected]>
smp: Fix smp_call_function_single_async prototype
Jonathon Reinhart <[email protected]>
net: Only allow init netns to set default tcp cong to a restricted algo
Andrii Nakryiko <[email protected]>
bpf: Prevent writable memory-mapping of read-only ringbuf pages
Thadeu Lima de Souza Cascardo <[email protected]>
bpf, ringbuf: Deny reserve of buffers larger than ringbuf
Daniel Borkmann <[email protected]>
bpf: Fix alu32 const subreg bound tracking on bitwise operations
David Howells <[email protected]>
afs: Fix speculative status fetches
Jane Chu <[email protected]>
mm/memory-failure: unnecessary amount of unmapping
Wang Wensheng <[email protected]>
mm/sparse: add the missing sparse_buffer_fini() in error branch
Muchun Song <[email protected]>
mm: memcontrol: slab: fix obtain a reference to a freeing memcg
Vlastimil Babka <[email protected]>
mm, slub: enable slub_debug static key when creating cache with explicit debug flags
Nikolay Borisov <[email protected]>
mm/sl?b.c: remove ctor argument from kmem_cache_flags
Dan Carpenter <[email protected]>
kfifo: fix ternary sign extension bugs
Sergei Trofimovich <[email protected]>
ia64: fix EFI_DEBUG build
Leo Yan <[email protected]>
perf session: Add swap operation for event TIME_CONV
Leo Yan <[email protected]>
perf jit: Let convert_timestamp() to be backwards-compatible
Leo Yan <[email protected]>
perf tools: Change fields type in perf_record_time_conv
Lv Yunlong <[email protected]>
net:nfc:digital: Fix a double free in digital_tg_recv_dep_req
Tobias Waldekranz <[email protected]>
net: dsa: mv88e6xxx: Fix 6095/6097/6185 ports in non-SERDES CMODE
Linus Lüssing <[email protected]>
net: bridge: mcast: fix broken length + header check for MRDv6 Adv.
Lv Yunlong <[email protected]>
RDMA/bnxt_re: Fix a double free in bnxt_qplib_alloc_res
Lv Yunlong <[email protected]>
RDMA/siw: Fix a use after free in siw_alloc_mr
Daniel Borkmann <[email protected]>
bpf: Fix propagation of 32 bit unsigned bounds from 64 bit bounds
Andrii Nakryiko <[email protected]>
selftests/bpf: Fix core_reloc test runner
Andrii Nakryiko <[email protected]>
selftests/bpf: Fix field existence CO-RE reloc tests
Andrii Nakryiko <[email protected]>
selftests/bpf: Fix BPF_CORE_READ_BITFIELD() macro
Lv Yunlong <[email protected]>
net:emac/emac-mac: Fix a use after free in emac_mac_tx_buf_send
Sean Christopherson <[email protected]>
KVM: SVM: Disable SEV/SEV-ES if NPT is disabled
Sean Christopherson <[email protected]>
KVM: SVM: Free sev_asid_bitmap during init if SEV setup fails
Sean Christopherson <[email protected]>
KVM: SVM: Zero out the VMCB array used to track SEV ASID association
Sean Christopherson <[email protected]>
KVM: VMX: Intercept FS/GS_BASE MSR accesses for 32-bit KVM
Michael Chan <[email protected]>
bnxt_en: Fix RX consumer index logic in the error path.
Danielle Ratson <[email protected]>
selftests: mlxsw: Remove a redundant if statement in tc_flower_scale test
Petr Machata <[email protected]>
selftests: net: mirror_gre_vlan_bridge_1q: Make an FDB entry static
Phillip Potter <[email protected]>
net: geneve: modify IP header check in geneve6_xmit_skb and geneve_xmit_skb
Kunihiko Hayashi <[email protected]>
arm64: dts: uniphier: Change phy-mode to RGMII-ID to enable delay pins for RTL8211E
Kunihiko Hayashi <[email protected]>
ARM: dts: uniphier: Change phy-mode to RGMII-ID to enable delay pins for RTL8211E
Dan Carpenter <[email protected]>
bnxt_en: fix ternary sign extension bug in bnxt_show_temp()
Arnd Bergmann <[email protected]>
net: enetc: fix link error again
Maxim Kochetkov <[email protected]>
net: phy: marvell: fix m88e1111_set_downshift
Maxim Kochetkov <[email protected]>
net: phy: marvell: fix m88e1011_set_downshift
Christophe Leroy <[email protected]>
powerpc/52xx: Fix an invalid ASM expression ('addi' used instead of 'add')
Athira Rajeev <[email protected]>
powerpc/perf: Fix the threshold event selection for memory events in power10
Colin Ian King <[email protected]>
wlcore: Fix buffer overrun by snprintf due to incorrect buffer size
Shuah Khan <[email protected]>
ath10k: Fix ath10k_wmi_tlv_op_pull_peer_stats_info() unlock without lock
Lv Yunlong <[email protected]>
ath10k: Fix a use after free in ath10k_htc_send_bundle
Toke Høiland-Jørgensen <[email protected]>
ath9k: Fix error check in ath9k_hw_read_revisions() for PCI devices
Christophe Leroy <[email protected]>
powerpc/64: Fix the definition of the fixmap area
Shay Drory <[email protected]>
RDMA/core: Add CM to restrack after successful attachment to a device
Bob Pearson <[email protected]>
RDMA/rxe: Fix a bug in rxe_fill_ip_info()
Martin Schiller <[email protected]>
net: phy: intel-xway: enable integrated led functions
Yoshihiro Shimoda <[email protected]>
net: renesas: ravb: Fix a stuck issue when a lot of frames are received
Ong Boon Leong <[email protected]>
net: stmmac: fix TSO and TBS feature enabling during driver open
Yinjun Zhang <[email protected]>
nfp: devlink: initialize the devlink port attribute "lanes"
Tobias Waldekranz <[email protected]>
net: dsa: mv88e6xxx: Fix off-by-one in VTU devlink region size
Sean Christopherson <[email protected]>
crypto: ccp: Detect and reject "invalid" addresses destined for PSP
Leonardo Bras <[email protected]>
powerpc/pseries/iommu: Fix window size for direct mapping with pmem
Ryder Lee <[email protected]>
mt76: mt7915: fix memleak when mt7915_unregister_device()
Ryder Lee <[email protected]>
mt76: mt7615: fix memleak when mt7615_unregister_device()
Colin Ian King <[email protected]>
net: davinci_emac: Fix incorrect masking of tx and rx error channel
Vadym Kochan <[email protected]>
net: marvell: prestera: fix port event handling on init
Stefano Garzarella <[email protected]>
vsock/virtio: free queued packets when closing socket
Edward Cree <[email protected]>
sfc: ef10: fix TX queue lookup in TX event handling
Colin Ian King <[email protected]>
ALSA: usb: midi: don't return -ENOMEM when usb_urb_ep_type_check fails
Sindhu Devale <[email protected]>
RDMA/i40iw: Fix error unwinding when i40iw_hmc_sd_one fails
Potnuri Bharat Teja <[email protected]>
RDMA/cxgb4: add missing qpid increment
Alexander Lobakin <[email protected]>
gro: fix napi_gro_frags() Fast GRO breakage due to IP alignment check
Linus Walleij <[email protected]>
net: ethernet: ixp4xx: Set the DMA masks explicitly
Florent Revest <[email protected]>
libbpf: Initialize the bpf_seq_printf parameters array field by field
Stefano Garzarella <[email protected]>
vsock/vmci: log once the failed queue pair allocation
Pablo Neira Ayuso <[email protected]>
netfilter: nftables_offload: special ethertype handling for VLAN
Pablo Neira Ayuso <[email protected]>
netfilter: nftables_offload: VLAN id needs host byteorder in flow dissector
Pablo Neira Ayuso <[email protected]>
netfilter: nft_payload: fix C-VLAN offload support
Lv Yunlong <[email protected]>
mwl8k: Fix a double Free in mwl8k_probe_hw
Qii Wang <[email protected]>
i2c: mediatek: Fix wrong dma sync flag
Sergey Shtylyov <[email protected]>
i2c: sh7760: fix IRQ error path
Arnd Bergmann <[email protected]>
wlcore: fix overlapping snprintf arguments in debugfs
Ping-Ke Shih <[email protected]>
rtlwifi: 8821ae: upgrade PHY and RF parameters
David Edmondson <[email protected]>
KVM: x86: dump_vmcs should not assume GUEST_IA32_EFER is valid
Srikar Dronamraju <[email protected]>
powerpc/smp: Reintroduce cpu_core_mask
Geliang Tang <[email protected]>
mptcp: fix format specifiers for unsigned int
Tyrel Datwyler <[email protected]>
powerpc/pseries: extract host bridge from pci_bus prior to bus removal
Ilya Lipnitskiy <[email protected]>
MIPS: pci-legacy: stop using of_pci_range_to_resource
Dan Carpenter <[email protected]>
drm/amd/pm: fix error code in smu_set_power_limit()
Dan Carpenter <[email protected]>
drm/amdgpu: fix an error code in init_pmu_entry_by_type_and_add()
Vitaly Chikunov <[email protected]>
perf beauty: Fix fsconfig generator
Paul Menzel <[email protected]>
iommu/amd: Put newline after closing bracket in warning
Dan Carpenter <[email protected]>
drm/i915/gvt: Fix error code in intel_gvt_init_device()
Eric Dumazet <[email protected]>
net/packet: remove data races in fanout operations
Colin Ian King <[email protected]>
net/mlx5: Fix bit-wise and with zero
Shengjiu Wang <[email protected]>
ASoC: ak5558: correct reset polarity
Christophe Leroy <[email protected]>
powerpc/syscall: Change condition to check MSR_RI
Christophe Leroy <[email protected]>
powerpc/syscall: Rename syscall_64.c into interrupt.c
Cédric Le Goater <[email protected]>
powerpc/xive: Fix xmon command "dxi"
Cédric Le Goater <[email protected]>
powerpc/xive: Drop check on irq_data in xive_core_debug_show()
Mukesh Sisodiya <[email protected]>
iwlwifi: dbg: disable ini debug in 9000 family and below
Mordechay Goodstein <[email protected]>
iwlwifi: rs-fw: don't support stbc for HE 160
Sergey Shtylyov <[email protected]>
i2c: sh7760: add IRQ check
Sergey Shtylyov <[email protected]>
i2c: rcar: add IRQ check
Wolfram Sang <[email protected]>
i2c: rcar: protect against supurious interrupts on V3U
Wolfram Sang <[email protected]>
i2c: rcar: make sure irq is not threaded on Gen2 and earlier
Sergey Shtylyov <[email protected]>
i2c: mlxbf: add IRQ check
Sergey Shtylyov <[email protected]>
i2c: jz4780: add IRQ check
Sergey Shtylyov <[email protected]>
i2c: emev2: add IRQ check
Sergey Shtylyov <[email protected]>
i2c: cadence: add IRQ check
Qinglang Miao <[email protected]>
i2c: xiic: fix reference leak when pm_runtime_get_sync fails
Qinglang Miao <[email protected]>
i2c: stm32f7: fix reference leak when pm_runtime_get_sync fails
Qinglang Miao <[email protected]>
i2c: sprd: fix reference leak when pm_runtime_get_sync fails
Qinglang Miao <[email protected]>
i2c: omap: fix reference leak when pm_runtime_get_sync fails
Qinglang Miao <[email protected]>
i2c: imx: fix reference leak when pm_runtime_get_sync fails
Qinglang Miao <[email protected]>
i2c: imx-lpi2c: fix reference leak when pm_runtime_get_sync fails
Qinglang Miao <[email protected]>
i2c: img-scb: fix reference leak when pm_runtime_get_sync fails
Qinglang Miao <[email protected]>
i2c: cadence: fix reference leak when pm_runtime_get_sync fails
Gioh Kim <[email protected]>
RDMA/rtrs-clt: destroy sysfs after removing session from active list
Wang Wensheng <[email protected]>
RDMA/srpt: Fix error return code in srpt_cm_req_recv()
Colin Ian King <[email protected]>
net: thunderx: Fix unintentional sign extension issue
Colin Ian King <[email protected]>
cxgb4: Fix unintentional sign extension issues
Wang Wensheng <[email protected]>
RDMA/bnxt_re: Fix error return code in bnxt_qplib_cq_process_terminal()
Wang Wensheng <[email protected]>
IB/hfi1: Fix error return code in parse_platform_config()
Wang Wensheng <[email protected]>
RDMA/qedr: Fix error return code in qedr_iw_connect()
Amir Goldstein <[email protected]>
ovl: invalidate readdir cache on changes to dir with origin
Giuseppe Scrivano <[email protected]>
ovl: show "userxattr" in the mount data
Nicholas Piggin <[email protected]>
KVM: PPC: Book3S HV P9: Restore host CTRL SPR after guest exit
Ryder Lee <[email protected]>
mt76: mt7915: cleanup mcu tx queue in mt7915_dma_reset()
Felix Fietkau <[email protected]>
mt76: mt7915: bring up the WA event rx queue for band1
Ryder Lee <[email protected]>
mt76: mt7615: cleanup mcu tx queue in mt7615_dma_reset()
Sean Wang <[email protected]>
mt76: mt7663s: fix the possible device hang in high traffic
Sean Wang <[email protected]>
mt76: mt7663s: make all of packets 4-bytes aligned in sdio tx aggregation
Sean Wang <[email protected]>
mt76: mt7663: fix when beacon filter is being applied
Ryder Lee <[email protected]>
mt76: mt7915: fix txrate reporting
Ryder Lee <[email protected]>
mt76: mt7915: fix rxrate reporting
Lorenzo Bianconi <[email protected]>
mt76: check return value of mt76_txq_send_burst in mt76_txq_schedule_list
Felix Fietkau <[email protected]>
mt76: reduce q->lock hold time
Ryder Lee <[email protected]>
mt76: mt7915: fix mib stats counter reporting to mac80211
Lorenzo Bianconi <[email protected]>
mt76: mt7615: fix mib stats counter reporting to mac80211
Lorenzo Bianconi <[email protected]>
mt76: mt7915: fix aggr len debugfs node
Felix Fietkau <[email protected]>
mt76: mt7915: fix tx skb dma unmap
Felix Fietkau <[email protected]>
mt76: mt7615: fix tx skb dma unmap
Colin Ian King <[email protected]>
mt7601u: fix always true expression
Dan Carpenter <[email protected]>
rtw88: Fix an error code in rtw_debugfs_set_rsvd_page()
Colin Ian King <[email protected]>
xfs: fix return of uninitialized value in variable error
Weihang Li <[email protected]>
RDMA/hns: Fix missing assignment of max_inline_data
Smita Koralahalli <[email protected]>
perf vendor events amd: Fix broken L2 Cache Hits from L2 HWPF metric
Johannes Berg <[email protected]>
mac80211: bail out if cipher schemes are invalid
Randy Dunlap <[email protected]>
powerpc: iommu: fix build when neither PCI or IBMVIO is set
Athira Rajeev <[email protected]>
powerpc/perf: Fix PMU constraint check for EBB events
Michael Ellerman <[email protected]>
powerpc/64s: Use htab_convert_pte_flags() in hash__mark_rodata_ro()
Michael Ellerman <[email protected]>
powerpc/pseries: Add key to flags in pSeries_lpar_hpte_updateboltedpp()
Jordan Niethe <[email protected]>
powerpc/64s: Fix pte update for kernel memory on radix
Mike Marciniszyn <[email protected]>
IB/hfi1: Use kzalloc() for mmu_rb_handler allocation
Colin Ian King <[email protected]>
liquidio: Fix unintented sign extension of a left shift of a u16
Krzysztof Kozlowski <[email protected]>
ASoC: simple-card: fix possible uninitialized single_cpu local variable
Alexandru Elisei <[email protected]>
KVM: arm64: Initialize VCPU mdcr_el2 before loading it
Hans de Goede <[email protected]>
HID: lenovo: Map mic-mute button to KEY_F20 instead of KEY_MICMUTE
Hans de Goede <[email protected]>
HID: lenovo: Check hid_get_drvdata() returns non NULL in lenovo_event()
Hans de Goede <[email protected]>
HID: lenovo: Fix lenovo_led_set_tp10ubkbd() error handling
Hans de Goede <[email protected]>
HID: lenovo: Use brightness_set_blocking callback for setting LEDs brightness
Takashi Iwai <[email protected]>
ALSA: usb-audio: Add error checks for usb_driver_claim_interface() calls
Lu Baolu <[email protected]>
iommu/vt-d: Invalidate PASID cache when root/context entry changed
Lu Baolu <[email protected]>
iommu/vt-d: Remove WO permissions on second-level paging entries
Lu Baolu <[email protected]>
iommu/vt-d: Preset Access/Dirty bits for IOVA over FL
Lu Baolu <[email protected]>
iommu/vt-d: Report the right page fault address
Lu Baolu <[email protected]>
iommu/vt-d: Report right snoop capability when using FL for IOVA
Xiang Chen <[email protected]>
iommu: Fix a boundary issue to avoid performance drop
Lu Baolu <[email protected]>
iommu/vt-d: Don't set then clear private data in prq_event_thread()
Wang Wensheng <[email protected]>
KVM: arm64: Fix error return code in init_hyp_mode()
Álvaro Fernández Rojas <[email protected]>
mips: bmips: fix syscon-reboot nodes
Salil Mehta <[email protected]>
net: hns3: Limiting the scope of vector_ring_chain variable
Dan Carpenter <[email protected]>
nfc: pn533: prevent potential memory corruption
Håkon Bugge <[email protected]>
RDMA/core: Fix corrupted SL on passive side
Andrew Scull <[email protected]>
bug: Remove redundant condition check in report_bug
Yang Yingliang <[email protected]>
net/tipc: fix missing destroy_workqueue() on error in tipc_crypto_start()
Michael Ellerman <[email protected]>
powerpc/pseries: Only register vio drivers if vio bus exists
Paolo Abeni <[email protected]>
udp: never accept GSO_FRAGLIST packets
Andre Edich <[email protected]>
net: phy: lan87xx: fix access to wrong register of LAN87xx
Jia Zhou <[email protected]>
ALSA: core: remove redundant spin_lock pair in snd_card_disconnect
Dmitry Baryshkov <[email protected]>
ASoC: q6afe-clocks: fix reprobing of the driver
Yang Yingliang <[email protected]>
fs: dlm: fix missing unlock on error in accept_from_sock()
Álvaro Fernández Rojas <[email protected]>
gpio: guard gpiochip_irqchip_add_domain() with GPIOLIB_IRQCHIP
Tiezhu Yang <[email protected]>
MIPS/bpf: Enable bpf_probe_read{, str}() on MIPS again
Chen Huang <[email protected]>
powerpc: Fix HAVE_HARDLOCKUP_DETECTOR_ARCH build configuration
Lv Yunlong <[email protected]>
IB/isert: Fix a use after free in isert_connect_request
Maor Gottlieb <[email protected]>
RDMA/mlx5: Fix drop packet rule in egress table
Zhen Lei <[email protected]>
iommu/arm-smmu-v3: add bit field SFM into GERROR_ERR_MASK
Shengjiu Wang <[email protected]>
ASoC: wm8960: Remove bitclk relax condition in wm8960_configure_sysclk
Huang Pei <[email protected]>
MIPS: loongson64: fix bug when PAGE_SIZE > 16KB
Hanna Hawa <[email protected]>
pinctrl: pinctrl-single: fix pcs_pin_dbg_show() when bits_per_mux is not zero
Hanna Hawa <[email protected]>
pinctrl: pinctrl-single: remove unused parameter
Eric Dumazet <[email protected]>
inet: use bigger hash table for IP ID generation
Li Huafei <[email protected]>
ima: Fix the error code for restoring the PCR value
Huang Pei <[email protected]>
MIPS: fix local_irq_{disable,enable} in asmmacro.h
Nathan Chancellor <[email protected]>
powerpc/prom: Mark identical_pvr_fixup as __init
Nathan Chancellor <[email protected]>
powerpc/fadump: Mark fadump_calculate_reserve_size as __init
Sebastian Andrzej Siewior <[email protected]>
powerpc/mm: Move the linear_mapping_mutex to the ifdef where it is used
KP Singh <[email protected]>
libbpf: Add explicit padding to btf_dump_emit_type_decl_opts
Andrii Nakryiko <[email protected]>
selftests/bpf: Re-generate vmlinux.h and BPF skeletons if bpftool changed
Jacob Pan <[email protected]>
iommu/vt-d: Reject unsupported page request modes
Robin Murphy <[email protected]>
iommu/dma: Resurrect the "forcedac" option
Lianbo Jiang <[email protected]>
dma-iommu: use static-key to minimize the impact in the fast-path
Shameer Kolothum <[email protected]>
iommu: Check dev->iommu in iommu_dev_xxx functions
Andrii Nakryiko <[email protected]>
bpftool: Fix maybe-uninitialized warnings
Andrii Nakryiko <[email protected]>
libbpf: Add explicit padding to bpf_xdp_set_link_opts
Xie He <[email protected]>
net: lapbether: Prevent racing when checking whether the netif is running
Jiri Kosina <[email protected]>
Bluetooth: avoid deadlock between hci_dev->lock and socket lock
Sean Christopherson <[email protected]>
KVM: x86/mmu: Retry page faults that hit an invalid memslot
Marcus Folkesson <[email protected]>
wilc1000: write value to WILC_INTR2_ENABLE register
Mark Zhang <[email protected]>
RDMA/mlx5: Fix mlx5 rates to IB rates map
Cezary Rojewski <[email protected]>
ASoC: Intel: Skylake: Compile when any configuration is selected
Colin Ian King <[email protected]>
ASoC: Intel: boards: sof-wm8804: add check for PLL setting
Arnaldo Carvalho de Melo <[email protected]>
perf symbols: Fix dso__fprintf_symbols_by_name() to return the number of printed chars
Maxim Mikityanskiy <[email protected]>
HID: plantronics: Workaround for double volume key presses
Alexander Lobakin <[email protected]>
xsk: Respect device's headroom and tailroom on generic xmit path
Lv Yunlong <[email protected]>
drivers/block/null_blk/main: Fix a double free in null_init.
Dan Carpenter <[email protected]>
ataflop: fix off by one in ataflop_probe()
Dan Carpenter <[email protected]>
ataflop: potential out of bounds in do_format()
Peter Zijlstra <[email protected]>
kthread: Fix PF_KTHREAD vs to_kthread() race
Waiman Long <[email protected]>
sched/debug: Fix cgroup_path[] serialization
Dima Stepanov <[email protected]>
block/rnbd-clt-sysfs: Remove copy buffer overlap in rnbd_clt_get_path_name
Pavel Begunkov <[email protected]>
io_uring: fix overflows checks in provide buffers
Nathan Chancellor <[email protected]>
perf/amd/uncore: Fix sysfs type mismatch
Nathan Chancellor <[email protected]>
x86/events/amd/iommu: Fix sysfs type mismatch
Dan Carpenter <[email protected]>
HSI: core: fix resource leaks in hsi_add_client_from_dt()
Jernej Skrabec <[email protected]>
media: cedrus: Fix H265 status definitions
Neil Armstrong <[email protected]>
media: meson-ge2d: fix rotation parameters
Niklas Cassel <[email protected]>
nvme-pci: don't simple map sgl when sgls are disabled
Elad Grupi <[email protected]>
nvmet-tcp: fix a segmentation fault during io parsing error
Fabrice Gasnier <[email protected]>
mfd: stm32-timers: Avoid clearing auto reload register
Orson Zhai <[email protected]>
mailbox: sprd: Introduce refcnt when clients requests/free channels
Brian King <[email protected]>
scsi: ibmvfc: Fix invalid state machine BUG_ON()
Sergey Shtylyov <[email protected]>
scsi: sni_53c710: Add IRQ check
Sergey Shtylyov <[email protected]>
scsi: sun3x_esp: Add IRQ check
Sergey Shtylyov <[email protected]>
scsi: jazz_esp: Add IRQ check
Sergey Shtylyov <[email protected]>
scsi: hisi_sas: Fix IRQ checks
Sergey Shtylyov <[email protected]>
scsi: ufs: ufshcd-pltfrm: Fix deferred probing
Colin Ian King <[email protected]>
scsi: pm80xx: Fix potential infinite loop
Igor Pylypiv <[email protected]>
scsi: pm80xx: Increase timeout for pm80xx mpi_uninit_check()
Colin Ian King <[email protected]>
clk: uniphier: Fix potential infinite loop
Yingjie Wang <[email protected]>
drm/radeon: Fix a missing check bug in radeon_dp_mst_detect()
Sefa Eyeoglu <[email protected]>
drm/amd/display: check fb of primary plane
Nirmoy Das <[email protected]>
drm/amd/display: use GFP_ATOMIC in dcn20_resource_construct
Chen Hui <[email protected]>
clk: qcom: apss-ipq-pll: Add missing MODULE_DEVICE_TABLE
Chen Hui <[email protected]>
clk: qcom: a53-pll: Add missing MODULE_DEVICE_TABLE
Dan Carpenter <[email protected]>
drm: xlnx: zynqmp: fix a memset in zynqmp_dp_train()
Quanyang Wang <[email protected]>
clk: zynqmp: pll: add set_pll_mode to check condition in zynqmp_pll_enable
Quanyang Wang <[email protected]>
clk: zynqmp: move zynqmp_pll_set_mode out of round_rate callback
Jason Gunthorpe <[email protected]>
vfio/mdev: Do not allow a mdev_type to have a NULL parent pointer
Rob Clark <[email protected]>
drm/msm: Fix debugfs deadlock
Jason Gunthorpe <[email protected]>
vfio/pci: Re-order vfio_pci_probe()
Jason Gunthorpe <[email protected]>
vfio/pci: Move VGA and VF initialization to functions
Jason Gunthorpe <[email protected]>
vfio/fsl-mc: Re-order vfio_fsl_mc_probe()
Daniel Almeida <[email protected]>
media: rkvdec: Do not require all controls to be present in every request
Hans Verkuil <[email protected]>
media: v4l2-ctrls.c: fix race condition in hdl->requests list
Lad Prabhakar <[email protected]>
media: i2c: imx219: Balance runtime PM use-count
Lad Prabhakar <[email protected]>
media: i2c: imx219: Move out locking/unlocking of vflip and hflip controls from imx219_set_stream
Sakari Ailus <[email protected]>
media: ipu3-cio2: Fix pixel-rate derived link frequency
Sakari Ailus <[email protected]>
media: ccs: Fix sub-device function
Hannes Reinecke <[email protected]>
nvme: retrigger ANA log update if group descriptor isn't found
Ricardo Rivera-Matos <[email protected]>
power: supply: bq25980: Move props from battery node
Adam Ford <[email protected]>
clk: imx: Fix reparenting of UARTs not associated with stdout
Sagi Grimberg <[email protected]>
nvmet-tcp: fix incorrect locking in state_change sk callback
Sagi Grimberg <[email protected]>
nvme-tcp: block BH in sk state_change sk callback
[email protected] <[email protected]>
seccomp: Fix CONFIG tests for Seccomp_filters
Sergey Shtylyov <[email protected]>
ata: libahci_platform: fix IRQ check
Sergey Shtylyov <[email protected]>
sata_mv: add IRQ checks
Sergey Shtylyov <[email protected]>
pata_ipx4xx_cf: fix IRQ check
Sergey Shtylyov <[email protected]>
pata_arasan_cf: fix IRQ check
Ilya Leoshkevich <[email protected]>
selftests: fix prepending $(OUTPUT) to $(TEST_PROGS)
Masami Hiramatsu <[email protected]>
x86/kprobes: Fix to check non boostable prefixes correctly
kernel test robot <[email protected]>
of: overlay: fix for_each_child.cocci warnings
Felix Kuehling <[email protected]>
drm/amdkfd: fix build error with AMD_IOMMU_V2=m
Dan Carpenter <[email protected]>
media: atomisp: Fix use after free in atomisp_alloc_css_stat_bufs()
Colin Ian King <[email protected]>
media: m88rs6000t: avoid potential out-of-bounds reads on arrays
Souptick Joarder <[email protected]>
media: atomisp: Fixed error handling path
Colin Ian King <[email protected]>
media: [next] staging: media: atomisp: fix memory leak of object flash
Liu Ying <[email protected]>
media: docs: Fix data organization of MEDIA_BUS_FMT_RGB101010_1X30
Wei Yongjun <[email protected]>
media: m88ds3103: fix return value check in m88ds3103_probe()
Jia-Ju Bai <[email protected]>
media: platform: sunxi: sun6i-csi: fix error return code of sun6i_video_start_streaming()
Christophe JAILLET <[email protected]>
media: venus: core: Fix some resource leaks in the error path of 'venus_probe()'
Noralf Trønnes <[email protected]>
drm/probe-helper: Check epoch counter in output_poll_execute()
Jae Hyun Yoo <[email protected]>
media: aspeed: fix clock handling logic
Dafna Hirschfeld <[email protected]>
media: rkisp1: rsz: crash fix when setting src format
Yang Yingliang <[email protected]>
media: omap4iss: return error code when omap4iss_get() failed
Tasos Sahanidis <[email protected]>
media: saa7146: use sg_dma_len when building pgtable
Tasos Sahanidis <[email protected]>
media: saa7134: use sg_dma_len when building pgtable
Colin Ian King <[email protected]>
media: vivid: fix assignment of dev->fbuf_out_flags
Zhouyi Zhou <[email protected]>
rcu: Remove spurious instrumentation_end() in rcu_nmi_enter()
David Howells <[email protected]>
afs: Fix updating of i_mode due to 3rd party change
John Ogness <[email protected]>
printk: limit second loop of syslog_print_all
Valentin Schneider <[email protected]>
sched/fair: Fix shift-out-of-bounds in load_balance()
James Smart <[email protected]>
scsi: lpfc: Fix null pointer dereference in lpfc_prep_els_iocb()
Linus Walleij <[email protected]>
drm/mcde/panel: Inverse misunderstood flag
Dan Carpenter <[email protected]>
drm/amd/display: Fix off by one in hdmi_14_process_transaction()
Marek Vasut <[email protected]>
drm/stm: Fix bus_flags handling
Quanyang Wang <[email protected]>
drm/tilcdc: send vblank event when disabling crtc
Dan Carpenter <[email protected]>
soc: aspeed: fix a ternary sign expansion bug
Paul Durrant <[email protected]>
xen-blkback: fix compatibility bug with single page rings
Dario Binacchi <[email protected]>
serial: omap: fix rs485 half-duplex filtering
Dario Binacchi <[email protected]>
serial: omap: don't disable rs485 if rts gpio is missing
Tetsuo Handa <[email protected]>
ttyprintk: Add TTY hangup callback.
Artur Petrosyan <[email protected]>
usb: dwc2: Fix hibernation between host and device modes.
Artur Petrosyan <[email protected]>
usb: dwc2: Fix host mode hibernation exit with remote wakeup flow.
Chris von Recklinghausen <[email protected]>
PM: hibernate: x86: Use crc32 instead of md5 for hibernation e820 integrity check
Michael Kelley <[email protected]>
Drivers: hv: vmbus: Increase wait time for VMbus unload
Paul Fertser <[email protected]>
hwmon: (pmbus/pxe1610) don't bail out when not all pages are active
Ingo Molnar <[email protected]>
x86/platform/uv: Fix !KEXEC build failure
Quanyang Wang <[email protected]>
spi: spi-zynqmp-gqspi: return -ENOMEM if dma_map_single fails
Quanyang Wang <[email protected]>
spi: spi-zynqmp-gqspi: fix use-after-free in zynqmp_qspi_exec_op
Quanyang Wang <[email protected]>
spi: spi-zynqmp-gqspi: fix hang issue when suspend/resume
Quanyang Wang <[email protected]>
spi: spi-zynqmp-gqspi: fix clk_enable/disable imbalance issue
Dan Carpenter <[email protected]>
Drivers: hv: vmbus: Use after free in __vmbus_open()
Eddie James <[email protected]>
ARM: dts: aspeed: Rainier: Fix humidity sensor bus address
Steffen Dirkwinkel <[email protected]>
platform/x86: pmc_atom: Match all Beckhoff Automation baytrail boards with critclk_systems DMI table
James Bottomley <[email protected]>
security: keys: trusted: fix TPM2 authorizations
Krzysztof Kozlowski <[email protected]>
memory: samsung: exynos5422-dmc: handle clk_set_parent() failure
Krzysztof Kozlowski <[email protected]>
memory: renesas-rpc-if: fix possible NULL pointer dereference of resource
Wei Yongjun <[email protected]>
spi: spi-zynqmp-gqspi: Fix missing unlock on error in zynqmp_qspi_exec_op()
Liam Howlett <[email protected]>
m68k: Add missing mmap_read_lock() to sys_cacheflush()
Ye Bin <[email protected]>
usbip: vudc: fix missing unlock on error in usbip_sockfd_store()
Ayush Sawal <[email protected]>
crypto: chelsio - Read rxchannel-id from firmware
Dan Carpenter <[email protected]>
node: fix device cleanups in error handling code
He Ying <[email protected]>
firmware: qcom-scm: Fix QCOM_SCM configuration
Johan Hovold <[email protected]>
serial: core: return early on unsupported ioctls
Johan Hovold <[email protected]>
tty: fix return value for unsupported termiox ioctls
Johan Hovold <[email protected]>
tty: fix return value for unsupported ioctls
Johan Hovold <[email protected]>
tty: actually undefine superseded ASYNC flags
Johan Hovold <[email protected]>
USB: cdc-acm: fix TIOCGSERIAL implementation
Johan Hovold <[email protected]>
USB: cdc-acm: fix unprivileged TIOCCSERIAL
Colin Ian King <[email protected]>
usb: gadget: r8a66597: Add missing null check on return from platform_get_resource
Wang Li <[email protected]>
spi: fsl-lpspi: Fix PM reference leak in lpspi_prepare_xfer_hardware()
Quanyang Wang <[email protected]>
spi: spi-zynqmp-gqspi: fix incorrect operating mode in zynqmp_qspi_read_op
Quanyang Wang <[email protected]>
spi: spi-zynqmp-gqspi: transmit dummy circles by using the controller's internal functionality
Quanyang Wang <[email protected]>
spi: spi-zynqmp-gqspi: add mutex locking for exec_op
Quanyang Wang <[email protected]>
spi: spi-zynqmp-gqspi: use wait_for_completion_timeout to make zynqmp_qspi_exec_op not interruptible
Pali Rohár <[email protected]>
cpufreq: armada-37xx: Fix determining base CPU frequency
Pali Rohár <[email protected]>
cpufreq: armada-37xx: Fix driver cleanup when registration failed
Pali Rohár <[email protected]>
clk: mvebu: armada-37xx-periph: Fix workaround for switching from L1 to L0
Pali Rohár <[email protected]>
clk: mvebu: armada-37xx-periph: Fix switching CPU freq from 250 Mhz to 1 GHz
Pali Rohár <[email protected]>
cpufreq: armada-37xx: Fix the AVS value for load L1
Marek Behún <[email protected]>
clk: mvebu: armada-37xx-periph: remove .set_parent method for CPU PM clock
Marek Behún <[email protected]>
cpufreq: armada-37xx: Fix setting TBG parent for load levels
Lv Yunlong <[email protected]>
crypto: qat - Fix a double free in adf_create_ring
Colin Ian King <[email protected]>
crypto: sa2ul - Fix memory leak of rxd
Colin Ian King <[email protected]>
crypto: sun8i-ss - Fix memory leak of pad
Corentin Labbe <[email protected]>
crypto: allwinner - add missing CRYPTO_ prefix
Nathan Chancellor <[email protected]>
ACPI: CPPC: Replace cppc_attr with kobj_attribute
He Ying <[email protected]>
cpuidle: Fix ARM_QCOM_SPM_CPUIDLE configuration
YueHaibing <[email protected]>
PM: runtime: Replace inline function pm_runtime_callbacks_present()
Bjorn Andersson <[email protected]>
soc: qcom: mdt_loader: Detect truncated read of segments
Bjorn Andersson <[email protected]>
soc: qcom: mdt_loader: Validate that p_filesz < p_memsz
Yang Yingliang <[email protected]>
spi: fsl: add missing iounmap() on error in of_fsl_spi_probe()
William A. Kennington III <[email protected]>
spi: Fix use-after-free with devm_spi_alloc_*
Wei Yongjun <[email protected]>
clocksource/drivers/ingenic_ost: Fix return value check in ingenic_ost_probe()
Tony Lindgren <[email protected]>
clocksource/drivers/timer-ti-dm: Add missing set_state_oneshot_stopped
Tony Lindgren <[email protected]>
clocksource/drivers/timer-ti-dm: Fix posted mode status check order
Dong Aisheng <[email protected]>
PM / devfreq: Use more accurate returned new_freq as resume_freq
Qinglang Miao <[email protected]>
soc: qcom: pdr: Fix error return code in pdr_register_listener
Hans de Goede <[email protected]>
platform/x86: dell-wmi-sysman: Make init_bios_attributes() ACPI object parsing more robust
Johan Hovold <[email protected]>
staging: greybus: uart: fix unprivileged TIOCCSERIAL
Johan Hovold <[email protected]>
staging: fwserial: fix TIOCGSERIAL implementation
Johan Hovold <[email protected]>
staging: fwserial: fix TIOCSSERIAL implementation
Colin Ian King <[email protected]>
staging: rtl8192u: Fix potential infinite loop
Ian Abbott <[email protected]>
staging: comedi: tests: ni_routes_test: Fix compilation error
Arnd Bergmann <[email protected]>
irqchip/gic-v3: Fix OF_BAD_ADDR error handling
Lv Yunlong <[email protected]>
mtd: rawnand: gpmi: Fix a double free in gpmi_nand_init
Alexandru Ardelean <[email protected]>
iio: adc: Kconfig: make AD9467 depend on ADI_AXI_ADC symbol
Stephen Boyd <[email protected]>
firmware: qcom_scm: Workaround lack of "is available" call on SC7180
Stephen Boyd <[email protected]>
firmware: qcom_scm: Reduce locking section for __get_convention()
Stephen Boyd <[email protected]>
firmware: qcom_scm: Make __qcom_scm_is_call_available() return bool
Finn Thain <[email protected]>
m68k: mvme147,mvme16x: Don't wipe PCC timer config bits
Rander Wang <[email protected]>
soundwire: stream: fix memory leak in stream config error path
gexueyuan <[email protected]>
memory: pl353: fix mask of ECC page_size config register
Krzysztof Kozlowski <[email protected]>
ARM: dts: qcom: msm8974-samsung-klte: correct fuel gauge interrupt trigger level
Krzysztof Kozlowski <[email protected]>
ARM: dts: qcom: msm8974-lge-nexus5: correct fuel gauge interrupt trigger level
Andy Shevchenko <[email protected]>
driver core: platform: Declare early_platform_cleanup() prototype
Ravi Kumar Bokka <[email protected]>
drivers: nvmem: Fix voltage settings for QTI qfprom-efuse
Yang Yingliang <[email protected]>
USB: gadget: udc: fix wrong pointer passed to IS_ERR() and PTR_ERR()
Tao Ren <[email protected]>
usb: gadget: aspeed: fix dma map failure
Giovanni Cabiddu <[email protected]>
crypto: qat - fix error path in adf_isr_resource_alloc()
Arnd Bergmann <[email protected]>
crypto: poly1305 - fix poly1305_core_setkey() declaration
Olga Kornievskaia <[email protected]>
NFSv4.2: fix copy stateid copying for the async copy
Fabien Parent <[email protected]>
arm64: dts: mediatek: fix reset GPIO level on pumpkin
Wei Yongjun <[email protected]>
phy: ingenic: Fix a typo in ingenic_usb_phy_probe()
Wei Yongjun <[email protected]>
phy: ralink: phy-mt7621-pci: fix return value check in mt7621_pci_phy_probe()
Geert Uytterhoeven <[email protected]>
phy: marvell: ARMADA375_USBCLUSTER_PHY should not default to y, unconditionally
Sergio Paracuellos <[email protected]>
phy: ralink: phy-mt7621-pci: fix XTAL bitmask
Kishon Vijay Abraham I <[email protected]>
phy: ti: j721e-wiz: Delete "clk_div_sel" clk provider during cleanup
Srinivas Kandagatla <[email protected]>
soundwire: bus: Fix device found flag correctly
Pan Bian <[email protected]>
bus: qcom: Put child node before return
Chunfeng Yun <[email protected]>
arm64: dts: mt8173: fix wrong power-domain phandle of pmic
Hsin-Yi Wang <[email protected]>
arm64: dts: mt8183: Add gce client reg for display subcomponents
Yoshihiro Shimoda <[email protected]>
arm64: dts: renesas: r8a779a0: Fix PMU interrupt
Michael Walle <[email protected]>
mtd: require write permissions for locking and badblock ioctls
dillon min <[email protected]>
dt-bindings: serial: stm32: Use 'type: object' instead of false for 'additionalProperties'
Christophe JAILLET <[email protected]>
usb: gadget: s3c: Fix the error handling path in 's3c2410_udc_probe()'
Christophe JAILLET <[email protected]>
usb: gadget: s3c: Fix incorrect resources releasing
Fabian Vogt <[email protected]>
fotg210-udc: Complete OUT requests on short packets
Fabian Vogt <[email protected]>
fotg210-udc: Don't DMA more than the buffer can take
Fabian Vogt <[email protected]>
fotg210-udc: Mask GRP2 interrupts we don't handle
Fabian Vogt <[email protected]>
fotg210-udc: Remove a dubious condition leading to fotg210_done
Fabian Vogt <[email protected]>
fotg210-udc: Fix EP0 IN requests bigger than two packets
Fabian Vogt <[email protected]>
fotg210-udc: Fix DMA on EP0 for length > max packet size
Tong Zhang <[email protected]>
crypto: qat - ADF_STATUS_PF_RUNNING should be set after adf_dev_init
Tong Zhang <[email protected]>
crypto: qat - don't release uninitialized resources
Rijo Thomas <[email protected]>
crypto: ccp - fix command queuing to TEE ring buffer
Andy Shevchenko <[email protected]>
usb: gadget: pch_udc: Provide a GPIO line used on Intel Minnowboard (v1)
Andy Shevchenko <[email protected]>
usb: gadget: pch_udc: Initialize device pointer before use
Andy Shevchenko <[email protected]>
usb: gadget: pch_udc: Check for DMA mapping error
Andy Shevchenko <[email protected]>
usb: gadget: pch_udc: Check if driver is present before calling ->setup()
Andy Shevchenko <[email protected]>
usb: gadget: pch_udc: Replace cpu_to_le32() by lower_32_bits()
Rasmus Villemoes <[email protected]>
devtmpfs: fix placement of complete() call
Otavio Pontes <[email protected]>
x86/microcode: Check for offline CPUs before requesting new microcode
Andrea Parri (Microsoft) <[email protected]>
Drivers: hv: vmbus: Drop error message when 'No request id available'
Alain Volmat <[email protected]>
spi: stm32: Fix use-after-free on unbind
Andy Lutomirski <[email protected]>
selftests/x86: Add a missing .note.GNU-stack section to thunks_32.S
Vladimir Barinov <[email protected]>
arm64: dts: renesas: r8a77980: Fix vin4-7 endpoint binding
Dan Carpenter <[email protected]>
regulator: bd9576: Fix return from bd957x_probe()
Antonio Borneo <[email protected]>
spi: stm32: drop devres version of spi_register_master
Colin Ian King <[email protected]>
crypto: sun8i-ss - Fix memory leak of object d when dma_iv fails to map
Srinivas Kandagatla <[email protected]>
arm64: dts: qcom: db845c: fix correct powerdown pin for WSA881x
Shawn Guo <[email protected]>
arm64: dts: qcom: sm8250: fix number of pins in 'gpio-ranges'
Shawn Guo <[email protected]>
arm64: dts: qcom: sm8150: fix number of pins in 'gpio-ranges'
Shawn Guo <[email protected]>
arm64: dts: qcom: sdm845: fix number of pins in 'gpio-ranges'
Douglas Anderson <[email protected]>
arm64: dts: qcom: sc7180: Avoid glitching SPI CS at bootup on trogdor
Sai Prakash Ranjan <[email protected]>
arm64: dts: qcom: sm8250: Fix timer interrupt to specify EL2 physical timer
Sai Prakash Ranjan <[email protected]>
arm64: dts: qcom: sm8250: Fix level triggered PMU interrupt polarity
Matthias Kaehlcke <[email protected]>
arm64: dts: qcom: sc7180: trogdor: Fix trip point config of charger thermal zone
Nuno Sa <[email protected]>
iio: adis16480: fix pps mode sampling frequency math
Aswath Govindraju <[email protected]>
arm64: dts: ti: k3-j721e-main: Update the speed modes supported and their itap delay values for MMCSD subsystems
Valentin CARON - foss <[email protected]>
ARM: dts: stm32: fix usart 2 & 3 pinconf to wake up with flow control
Jia-Ju Bai <[email protected]>
mtd: maps: fix error return code of physmap_flash_remove()
David Bauer <[email protected]>
mtd: don't lock when recursively deleting partitions
Manivannan Sadhasivam <[email protected]>
mtd: rawnand: qcom: Return actual error code instead of -ENODEV
Manivannan Sadhasivam <[email protected]>
mtd: Handle possible -EPROBE_DEFER from parse_mtd_partitions()
Álvaro Fernández Rojas <[email protected]>
mtd: rawnand: brcmnand: fix OOB R/W with Hamming ECC
Dan Carpenter <[email protected]>
mtd: rawnand: fsmc: Fix error code in fsmc_nand_probe()
Arnd Bergmann <[email protected]>
spi: rockchip: avoid objtool warning
Meng Li <[email protected]>
regmap: set debugfs_name to NULL after it is freed
David E. Box <[email protected]>
mfd: intel_pmt: Fix nuisance messages and handling of disabled capabilities
Wei Yongjun <[email protected]>
usb: typec: stusb160x: fix return value check in stusb160x_probe()
Wei Yongjun <[email protected]>
usb: typec: tps6598x: Fix return value check in tps6598x_probe()
Badhri Jagan Sridharan <[email protected]>
usb: typec: tcpci: Check ROLE_CONTROL while interpreting CC_STATUS
Badhri Jagan Sridharan <[email protected]>
usb: typec: tcpm: Handle vbus shutoff when in source mode
Erwan Le Ray <[email protected]>
serial: stm32: fix tx_empty condition
Erwan Le Ray <[email protected]>
serial: stm32: add FIFO flush when port is closed
Erwan Le Ray <[email protected]>
serial: stm32: fix FIFO flush in startup and set_termios
Erwan Le Ray <[email protected]>
serial: stm32: call stm32_transmit_chars locked
Erwan Le Ray <[email protected]>
serial: stm32: fix tx dma completion, release channel
Wei Yongjun <[email protected]>
serial: liteuart: fix return value check in liteuart_probe()
Erwan Le Ray <[email protected]>
serial: stm32: fix a deadlock in set_termios
Erwan Le Ray <[email protected]>
serial: stm32: fix wake-up flag handling
Erwan Le Ray <[email protected]>
serial: stm32: fix a deadlock condition with wakeup event
Erwan Le Ray <[email protected]>
serial: stm32: fix TX and RX FIFO thresholds
Erwan Le Ray <[email protected]>
serial: stm32: fix incorrect characters on console
Erwan Le Ray <[email protected]>
serial: stm32: fix startup by enabling usart for reception
Stephen Boyd <[email protected]>
serial: stm32: Use of_device_get_match_data()
Erwan Le Ray <[email protected]>
serial: stm32: fix probe and remove order for dma
Erwan Le Ray <[email protected]>
serial: stm32: add "_usart" prefix in functions name
Erwan Le Ray <[email protected]>
serial: stm32: fix code cleaning warnings and checks
Mike Travis <[email protected]>
x86/platform/uv: Set section block size for hubless architectures
Tony Lindgren <[email protected]>
bus: ti-sysc: Fix initializing module_pa for modules without sysc register
Yoshihiro Shimoda <[email protected]>
arm64: dts: renesas: Add mmc aliases into board dts files
Yoshihiro Shimoda <[email protected]>
ARM: dts: renesas: Add mmc aliases into R-Car Gen2 board dts files
Krzysztof Kozlowski <[email protected]>
ARM: dts: s5pv210: correct fuel gauge interrupt trigger level on Fascinate family
Krzysztof Kozlowski <[email protected]>
ARM: dts: exynos: correct PMIC interrupt trigger level on Snow
Krzysztof Kozlowski <[email protected]>
ARM: dts: exynos: correct PMIC interrupt trigger level on SMDK5250
Krzysztof Kozlowski <[email protected]>
ARM: dts: exynos: correct PMIC interrupt trigger level on P4 Note family
Krzysztof Kozlowski <[email protected]>
ARM: dts: exynos: correct PMIC interrupt trigger level on Odroid X/U3 family
Krzysztof Kozlowski <[email protected]>
ARM: dts: exynos: correct PMIC interrupt trigger level on Midas family
Krzysztof Kozlowski <[email protected]>
ARM: dts: exynos: correct MUIC interrupt trigger level on Midas family
Krzysztof Kozlowski <[email protected]>
ARM: dts: exynos: correct fuel gauge interrupt trigger level on Midas family
Krzysztof Kozlowski <[email protected]>
ARM: dts: exynos: correct fuel gauge interrupt trigger level on P4 Note family
Krzysztof Kozlowski <[email protected]>
ARM: dts: exynos: correct fuel gauge interrupt trigger level on GT-I9100
Colin Ian King <[email protected]>
memory: gpmc: fix out of bounds read and dereference on gpmc_cs[]
Corentin Labbe <[email protected]>
crypto: sun8i-ss - fix result memory leak on error path
Wei Yongjun <[email protected]>
crypto: keembay-ocs-aes - Fix error return code in kmb_ocs_aes_probe()
Luca Ceresoli <[email protected]>
fpga: fpga-mgr: xilinx-spi: fix error messages on -EPROBE_DEFER
Jiri Slaby <[email protected]>
x86/vdso: Use proper modifier for len's format specifier in extract()
Nobuhiro Iwamatsu <[email protected]>
firmware: xilinx: Remove zynqmp_pm_get_eemi_ops() in IS_REACHABLE(CONFIG_ZYNQMP_FIRMWARE)
Tejas Patel <[email protected]>
firmware: xilinx: Fix dereferencing freed memory
Len Brown <[email protected]>
Revert "tools/power turbostat: adjust for temperature offset"
Andy Shevchenko <[email protected]>
usb: gadget: pch_udc: Revert d3cb25a12138 completely
Gerd Hoffmann <[email protected]>
Revert "drm/qxl: do not run release if qxl failed to init"
Dan Carpenter <[email protected]>
ovl: fix missing revert_creds() on error path
Rikard Falkeborn <[email protected]>
mfd: stmpe: Revert "Constify static struct resource"
Jae Hyun Yoo <[email protected]>
Revert "i3c master: fix missing destroy_workqueue() on error in i3c_master_register"
Xie He <[email protected]>
Revert "drivers/net/wan/hdlc_fr: Fix a double free in pvc_xmit"
Paolo Bonzini <[email protected]>
KVM: selftests: Always run vCPU thread with blocked SIG_IPI
Peter Xu <[email protected]>
KVM: selftests: Sync data verify of dirty logging with guest sync
Eric Auger <[email protected]>
KVM: arm64: Fix KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION read
Marc Zyngier <[email protected]>
KVM: arm64: Fully zero the vcpu state on reset
Sean Christopherson <[email protected]>
KVM: Stop looking for coalesced MMIO zones if the bus is destroyed
Sean Christopherson <[email protected]>
KVM: Destroy I/O bus devices on unregister failure _after_ sync'ing SRCU
Eric Auger <[email protected]>
KVM: arm/arm64: Fix KVM_VGIC_V3_ADDR_TYPE_REDIST read
Sean Christopherson <[email protected]>
KVM: nVMX: Truncate base/index GPR value on address calc in !64-bit
Sean Christopherson <[email protected]>
KVM: nVMX: Truncate bits 63:32 of VMCS field on nested check in !64-bit
Sean Christopherson <[email protected]>
KVM: nVMX: Defer the MMU reload to the normal path on an EPTP switch
Sean Christopherson <[email protected]>
KVM: SVM: Inject #GP on guest MSR_TSC_AUX accesses if RDTSCP unsupported
Sean Christopherson <[email protected]>
KVM: SVM: Do not allow SEV/SEV-ES initialization after vCPUs are created
Sean Christopherson <[email protected]>
KVM: SVM: Do not set sev->es_active until KVM_SEV_ES_INIT completes
Sean Christopherson <[email protected]>
KVM: SVM: Use online_vcpus, not created_vcpus, to iterate over vCPUs
Sean Christopherson <[email protected]>
KVM: SVM: Don't strip the C-bit from CR2 on #PF interception
Sean Christopherson <[email protected]>
KVM: nSVM: Set the shadow root level to the TDP level for nested NPT
Sean Christopherson <[email protected]>
KVM: x86: Remove emulator's broken checks on CR0/CR3/CR4 loads
Wanpeng Li <[email protected]>
KVM: X86: Fix failure to boost kernel lock holder candidate in SEV-ES guests
Sean Christopherson <[email protected]>
KVM: x86/mmu: Alloc page for PDPTEs when shadowing 32-bit NPT with 64-bit
Claudio Imbrenda <[email protected]>
KVM: s390: extend kvm_s390_shadow_fault to return entry pointer
Claudio Imbrenda <[email protected]>
KVM: s390: split kvm_s390_real_to_abs
Claudio Imbrenda <[email protected]>
KVM: s390: VSIE: fix MVPG handling for prefixing and MSO
David Hildenbrand <[email protected]>
s390: fix detection of vector enhancements facility 1 vs. vector packed decimal facility
Heiko Carstens <[email protected]>
KVM: s390: fix guarded storage control register handling
Claudio Imbrenda <[email protected]>
KVM: s390: split kvm_s390_logical_to_effective
Claudio Imbrenda <[email protected]>
KVM: s390: VSIE: correctly handle MVPG when in VSIE
Takashi Iwai <[email protected]>
ALSA: hda/realtek: Fix speaker amp on HP Envy AiO 32
Sami Loone <[email protected]>
ALSA: hda/realtek: ALC285 Thinkpad jack pin quirk is unreachable
Takashi Iwai <[email protected]>
ALSA: hda/realtek: Remove redundant entry for ALC861 Haier/Uniwill devices
Takashi Iwai <[email protected]>
ALSA: hda/realtek: Re-order ALC662 quirk table entries
Takashi Iwai <[email protected]>
ALSA: hda/realtek: Re-order remaining ALC269 quirk table entries
Takashi Iwai <[email protected]>
ALSA: hda/realtek: Re-order ALC269 Lenovo quirk table entries
Takashi Iwai <[email protected]>
ALSA: hda/realtek: Re-order ALC269 Sony quirk table entries
Takashi Iwai <[email protected]>
ALSA: hda/realtek: Re-order ALC269 ASUS quirk table entries
Takashi Iwai <[email protected]>
ALSA: hda/realtek: Re-order ALC269 Dell quirk table entries
Takashi Iwai <[email protected]>
ALSA: hda/realtek: Re-order ALC269 Acer quirk table entries
Takashi Iwai <[email protected]>
ALSA: hda/realtek: Re-order ALC269 HP quirk table entries
Takashi Iwai <[email protected]>
ALSA: hda/realtek: Re-order ALC882 Clevo quirk table entries
Takashi Iwai <[email protected]>
ALSA: hda/realtek: Re-order ALC882 Sony quirk table entries
Takashi Iwai <[email protected]>
ALSA: hda/realtek: Re-order ALC882 Acer quirk table entries
Bas Nieuwenhuizen <[email protected]>
drm/amdgpu: Init GFX10_ADDR_CONFIG for VCN v3 in DPG mode.
Evan Quan <[email protected]>
drm/amdgpu: add new MC firmware for Polaris12 32bit ASIC
Christian König <[email protected]>
drm/amdgpu: fix concurrent VM flushes on Vega/Navi v2
Harry Wentland <[email protected]>
drm/amd/display: Reject non-zero src_y and src_x for video planes
Paul Cercueil <[email protected]>
drm: bridge/panel: Cleanup connector on bridge detach
Randy Dunlap <[email protected]>
drm: bridge: fix ANX7625 use of mipi_dsi_() functions
Wayne Lin <[email protected]>
drm/dp_mst: Set CLEAR_PAYLOAD_ID_TABLE as broadcast
Wayne Lin <[email protected]>
drm/dp_mst: Revise broadcast msg lct & lcr
Colin Ian King <[email protected]>
drm/radeon: fix copy of uninitialized variable back to userspace
Boris Brezillon <[email protected]>
drm/panfrost: Don't try to map pages that are already mapped
Boris Brezillon <[email protected]>
drm/panfrost: Clear MMU irqs before handling the fault
Paul Cercueil <[email protected]>
drm/ingenic: Fix non-OSD mode
Gerd Hoffmann <[email protected]>
drm/qxl: use ttm bo priorities
Maciej W. Rozycki <[email protected]>
FDDI: defxx: Make MMIO the configuration default except for EISA
Felix Fietkau <[email protected]>
mt76: fix potential DMA mapping leak
Ping-Ke Shih <[email protected]>
rtw88: Fix array overrun in rtw_get_tx_power_params()
Johannes Berg <[email protected]>
cfg80211: scan: drop entry from hidden_list on overflow
Dan Carpenter <[email protected]>
ipw2x00: potential buffer overflow in libipw_wx_set_encodeext()
Ryder Lee <[email protected]>
mt76: mt7615: use ieee80211_free_txskb() in mt7615_tx_token_put()
Nathan Chancellor <[email protected]>
MIPS: generic: Update node names to avoid unit addresses
Maciej W. Rozycki <[email protected]>
MIPS: Reinstate platform `__div64_32' handler
Jan Glauber <[email protected]>
md: Fix missing unused status line of /proc/mdstat
Zhao Heming <[email protected]>
md: md_open returns -EBUSY when entering racing area
Christoph Hellwig <[email protected]>
md: factor out a mddev_find_locked helper from mddev_find
Christoph Hellwig <[email protected]>
md: split mddev_find
Heming Zhao <[email protected]>
md-cluster: fix use-after-free issue when removing rdev
Sudhakar Panneerselvam <[email protected]>
md/bitmap: wait for external bitmap writes to complete during tear down
Xiao Ni <[email protected]>
async_xor: increase src_offs when dropping destination page
Alison Schofield <[email protected]>
x86, sched: Treat Intel SNC topology as default, COD as exception
Paul Moore <[email protected]>
selinux: add proper NULL termination to the secclass_map permissions
Tetsuo Handa <[email protected]>
misc: vmw_vmci: explicitly initialize vmci_datagram payload
Tetsuo Handa <[email protected]>
misc: vmw_vmci: explicitly initialize vmci_notify_bm_set_msg struct
Kishon Vijay Abraham I <[email protected]>
phy: ti: j721e-wiz: Invoke wiz_init() before of_platform_device_create()
Hans de Goede <[email protected]>
misc: lis3lv02d: Fix false-positive WARN on various HP models
Kishon Vijay Abraham I <[email protected]>
phy: cadence: Sierra: Fix PHY power_on sequence
Annaliese McDermond <[email protected]>
sc16is7xx: Defer probe if device read fails
Gwendal Grignou <[email protected]>
iio: sx9310: Fix access to variable DT array
Jonathan Cameron <[email protected]>
iio:adc:ad7476: Fix remove handling
Jonathan Cameron <[email protected]>
iio:accel:adis16201: Fix wrong axis assignment that prevents loading
Gwendal Grignou <[email protected]>
iio: sx9310: Fix write_.._debounce()
Lars-Peter Clausen <[email protected]>
iio: inv_mpu6050: Fully validate gyro and accel scale writes
Dmitry Osipenko <[email protected]>
soc/tegra: regulators: Fix locking up when voltage-spread is out of range
Lukasz Luba <[email protected]>
PM / devfreq: Unlock mutex and free devfreq struct in error path
Kishon Vijay Abraham I <[email protected]>
PCI: keystone: Let AM65 use the pci_ops defined in pcie-designware-host.c
Dejin Zheng <[email protected]>
PCI: xgene: Fix cfg resource mapping
Sean Christopherson <[email protected]>
KVM: x86: Defer the MMU unload to the normal path on an global INVPCID
Arun Easi <[email protected]>
PCI: Allow VPD access for QLogic ISP2722
Maciej W. Rozycki <[email protected]>
FDDI: defxx: Bail out gracefully with unassigned PCI resource for CSR
Ilya Lipnitskiy <[email protected]>
MIPS: pci-rt2880: fix slot 0 configuration
Ilya Lipnitskiy <[email protected]>
MIPS: pci-mt7620: fix PLL lock check
Annaliese McDermond <[email protected]>
ASoC: tlv320aic32x4: Increase maximum register in regmap
Annaliese McDermond <[email protected]>
ASoC: tlv320aic32x4: Register clocks before registering component
Lukasz Majczak <[email protected]>
ASoC: Intel: kbl_da7219_max98927: Fix kabylake_ssp_fixup function
Pierre-Louis Bossart <[email protected]>
ASoC: samsung: tm2_wm5110: check of of_parse return value
Chunfeng Yun <[email protected]>
usb: xhci-mtk: improve bandwidth scheduling with TT
Chunfeng Yun <[email protected]>
usb: xhci-mtk: remove or operator for setting schedule parameters
Badhri Jagan Sridharan <[email protected]>
usb: typec: tcpm: update power supply once partner accepts
Badhri Jagan Sridharan <[email protected]>
usb: typec: tcpm: Address incorrect values of tcpm psy for pps supply
Badhri Jagan Sridharan <[email protected]>
usb: typec: tcpm: Address incorrect values of tcpm psy for fixed supply
Randy Dunlap <[email protected]>
drm: bridge: fix LONTIUM use of mipi_dsi_() functions
Johan Hovold <[email protected]>
staging: fwserial: fix TIOCSSERIAL permission check
Johan Hovold <[email protected]>
tty: moxa: fix TIOCSSERIAL permission check
Johan Hovold <[email protected]>
staging: fwserial: fix TIOCSSERIAL jiffies conversions
Johan Hovold <[email protected]>
USB: serial: ti_usb_3410_5052: fix TIOCSSERIAL permission check
Johan Hovold <[email protected]>
staging: greybus: uart: fix TIOCSSERIAL jiffies conversions
Johan Hovold <[email protected]>
USB: serial: usb_wwan: fix TIOCSSERIAL jiffies conversions
Johan Hovold <[email protected]>
tty: amiserial: fix TIOCSSERIAL permission check
Johan Hovold <[email protected]>
tty: moxa: fix TIOCSSERIAL jiffies conversions
Hans de Goede <[email protected]>
usb: roles: Call try_module_get() from usb_role_switch_find_by_fwnode()
Johan Hovold <[email protected]>
Revert "USB: cdc-acm: fix rounding error in TIOCSSERIAL"
Thadeu Lima de Souza Cascardo <[email protected]>
io_uring: truncate lengths larger than MAX_RW_COUNT on provide buffers
Or Cohen <[email protected]>
net/nfc: fix use-after-free llcp_sock_bind/connect
Lin Ma <[email protected]>
bluetooth: eliminate the potential race condition when removing the HCI controller
Archie Pusaka <[email protected]>
Bluetooth: verify AMP hci_chan before amp_destroy
-------------
Diffstat:
Documentation/admin-guide/kernel-parameters.txt | 15 +-
.../devicetree/bindings/serial/st,stm32-uart.yaml | 3 +-
Documentation/driver-api/xilinx/eemi.rst | 31 +-
.../userspace-api/media/v4l/subdev-formats.rst | 4 +-
Makefile | 4 +-
arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts | 4 +-
arch/arm/boot/dts/exynos4210-i9100.dts | 2 +-
arch/arm/boot/dts/exynos4412-midas.dtsi | 6 +-
arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 2 +-
arch/arm/boot/dts/exynos4412-p4note.dtsi | 4 +-
arch/arm/boot/dts/exynos5250-smdk5250.dts | 2 +-
arch/arm/boot/dts/exynos5250-snow-common.dtsi | 2 +-
.../dts/qcom-msm8974-lge-nexus5-hammerhead.dts | 2 +-
arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts | 2 +-
arch/arm/boot/dts/r8a7790-lager.dts | 3 +
arch/arm/boot/dts/r8a7791-koelsch.dts | 3 +
arch/arm/boot/dts/r8a7791-porter.dts | 2 +
arch/arm/boot/dts/r8a7793-gose.dts | 3 +
arch/arm/boot/dts/r8a7794-alt.dts | 3 +
arch/arm/boot/dts/r8a7794-silk.dts | 2 +
arch/arm/boot/dts/s5pv210-fascinate4g.dts | 2 +-
arch/arm/boot/dts/stm32mp15-pinctrl.dtsi | 21 +-
arch/arm/boot/dts/uniphier-pxs2.dtsi | 2 +-
arch/arm/crypto/poly1305-glue.c | 2 +-
arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 2 +-
arch/arm64/boot/dts/mediatek/mt8183.dtsi | 7 +
arch/arm64/boot/dts/mediatek/pumpkin-common.dtsi | 2 +-
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 35 +-
arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 4 +-
arch/arm64/boot/dts/qcom/sdm845.dtsi | 2 +-
arch/arm64/boot/dts/qcom/sm8150.dtsi | 2 +-
arch/arm64/boot/dts/qcom/sm8250.dtsi | 6 +-
arch/arm64/boot/dts/renesas/hihope-common.dtsi | 3 +
.../boot/dts/renesas/r8a774a1-beacon-rzg2m-kit.dts | 3 +
arch/arm64/boot/dts/renesas/r8a774c0-cat874.dts | 2 +
arch/arm64/boot/dts/renesas/r8a77980.dtsi | 16 +-
arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts | 3 +
arch/arm64/boot/dts/renesas/r8a779a0.dtsi | 5 +-
arch/arm64/boot/dts/renesas/salvator-common.dtsi | 3 +
arch/arm64/boot/dts/renesas/ulcb-kf.dtsi | 1 +
arch/arm64/boot/dts/renesas/ulcb.dtsi | 2 +
arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi | 2 +-
arch/arm64/boot/dts/socionext/uniphier-pxs3.dtsi | 4 +-
arch/arm64/boot/dts/ti/k3-j721e-main.dtsi | 17 +-
arch/arm64/crypto/poly1305-glue.c | 2 +-
arch/arm64/include/asm/kvm_host.h | 1 +
arch/arm64/kvm/arm.c | 6 +-
arch/arm64/kvm/debug.c | 88 ++-
arch/arm64/kvm/reset.c | 5 +
arch/arm64/kvm/vgic/vgic-kvm-device.c | 7 +-
arch/ia64/kernel/efi.c | 11 +-
arch/m68k/include/asm/mvme147hw.h | 3 +
arch/m68k/kernel/sys_m68k.c | 2 +
arch/m68k/mvme147/config.c | 14 +-
arch/m68k/mvme16x/config.c | 14 +-
arch/mips/Kconfig | 1 +
arch/mips/boot/dts/brcm/bcm3368.dtsi | 2 +-
arch/mips/boot/dts/brcm/bcm63268.dtsi | 2 +-
arch/mips/boot/dts/brcm/bcm6358.dtsi | 2 +-
arch/mips/boot/dts/brcm/bcm6362.dtsi | 2 +-
arch/mips/boot/dts/brcm/bcm6368.dtsi | 2 +-
arch/mips/crypto/poly1305-glue.c | 2 +-
arch/mips/generic/board-boston.its.S | 10 +-
arch/mips/generic/board-jaguar2.its.S | 16 +-
arch/mips/generic/board-luton.its.S | 8 +-
arch/mips/generic/board-ni169445.its.S | 10 +-
arch/mips/generic/board-ocelot.its.S | 20 +-
arch/mips/generic/board-serval.its.S | 8 +-
arch/mips/generic/board-xilfpga.its.S | 10 +-
arch/mips/generic/vmlinux.its.S | 10 +-
arch/mips/include/asm/asmmacro.h | 3 +-
arch/mips/include/asm/div64.h | 57 +-
arch/mips/loongson64/init.c | 2 +-
arch/mips/pci/pci-legacy.c | 9 +-
arch/mips/pci/pci-mt7620.c | 5 +-
arch/mips/pci/pci-rt2880.c | 37 +-
arch/powerpc/Kconfig | 2 +-
arch/powerpc/Kconfig.debug | 1 +
arch/powerpc/include/asm/book3s/64/pgtable.h | 4 +-
arch/powerpc/include/asm/book3s/64/radix.h | 6 +-
arch/powerpc/include/asm/fixmap.h | 9 +
arch/powerpc/include/asm/nohash/64/pgtable.h | 5 +-
arch/powerpc/include/asm/smp.h | 5 +
arch/powerpc/kernel/Makefile | 2 +-
arch/powerpc/kernel/fadump.c | 2 +-
arch/powerpc/kernel/{syscall_64.c => interrupt.c} | 7 +-
arch/powerpc/kernel/prom.c | 2 +-
arch/powerpc/kernel/smp.c | 39 +-
arch/powerpc/kvm/book3s_hv.c | 3 +
arch/powerpc/mm/book3s64/hash_pgtable.c | 6 +-
arch/powerpc/mm/book3s64/radix_pgtable.c | 4 +-
arch/powerpc/mm/mem.c | 2 +-
arch/powerpc/perf/isa207-common.c | 4 +-
arch/powerpc/perf/power10-events-list.h | 4 +-
arch/powerpc/platforms/52xx/lite5200_sleep.S | 2 +-
arch/powerpc/platforms/pseries/iommu.c | 2 +-
arch/powerpc/platforms/pseries/lpar.c | 4 +-
arch/powerpc/platforms/pseries/pci_dlpar.c | 4 +-
arch/powerpc/platforms/pseries/vio.c | 4 +
arch/powerpc/sysdev/xive/common.c | 35 +-
arch/s390/kernel/setup.c | 4 +-
arch/s390/kvm/gaccess.c | 30 +-
arch/s390/kvm/gaccess.h | 60 +-
arch/s390/kvm/kvm-s390.c | 4 +-
arch/s390/kvm/vsie.c | 109 +++-
arch/x86/Kconfig | 1 +
arch/x86/crypto/poly1305_glue.c | 6 +-
arch/x86/entry/vdso/vdso2c.h | 2 +-
arch/x86/events/amd/iommu.c | 6 +-
arch/x86/events/amd/uncore.c | 6 +-
arch/x86/kernel/apic/x2apic_uv_x.c | 3 +
arch/x86/kernel/cpu/microcode/core.c | 8 +-
arch/x86/kernel/e820.c | 4 +-
arch/x86/kernel/kprobes/core.c | 17 +-
arch/x86/kernel/smpboot.c | 90 +--
arch/x86/kvm/emulate.c | 80 +--
arch/x86/kvm/mmu/mmu.c | 63 ++-
arch/x86/kvm/svm/sev.c | 42 +-
arch/x86/kvm/svm/svm.c | 34 +-
arch/x86/kvm/vmx/nested.c | 17 +-
arch/x86/kvm/vmx/vmx.c | 13 +-
arch/x86/kvm/x86.c | 5 +-
arch/x86/power/hibernate.c | 89 +--
crypto/async_tx/async_xor.c | 1 +
drivers/acpi/cppc_acpi.c | 14 +-
drivers/ata/libahci_platform.c | 4 +-
drivers/ata/pata_arasan_cf.c | 15 +-
drivers/ata/pata_ixp4xx_cf.c | 6 +-
drivers/ata/sata_mv.c | 4 +
drivers/base/devtmpfs.c | 2 +-
drivers/base/node.c | 26 +-
drivers/base/regmap/regmap-debugfs.c | 1 +
drivers/block/ataflop.c | 16 +-
drivers/block/null_blk/zoned.c | 1 +
drivers/block/rnbd/rnbd-clt-sysfs.c | 6 +-
drivers/block/xen-blkback/common.h | 1 +
drivers/block/xen-blkback/xenbus.c | 38 +-
drivers/bus/qcom-ebi2.c | 4 +-
drivers/bus/ti-sysc.c | 6 +-
drivers/char/ttyprintk.c | 11 +
drivers/clk/clk-ast2600.c | 4 +-
drivers/clk/imx/clk-imx25.c | 12 +-
drivers/clk/imx/clk-imx27.c | 13 +-
drivers/clk/imx/clk-imx35.c | 10 +-
drivers/clk/imx/clk-imx5.c | 30 +-
drivers/clk/imx/clk-imx6q.c | 16 +-
drivers/clk/imx/clk-imx6sl.c | 16 +-
drivers/clk/imx/clk-imx6sll.c | 24 +-
drivers/clk/imx/clk-imx6sx.c | 16 +-
drivers/clk/imx/clk-imx7d.c | 22 +-
drivers/clk/imx/clk-imx7ulp.c | 31 +-
drivers/clk/imx/clk-imx8mm.c | 18 +-
drivers/clk/imx/clk-imx8mn.c | 18 +-
drivers/clk/imx/clk-imx8mp.c | 17 +-
drivers/clk/imx/clk-imx8mq.c | 18 +-
drivers/clk/imx/clk.c | 41 +-
drivers/clk/imx/clk.h | 4 +-
drivers/clk/mvebu/armada-37xx-periph.c | 83 +--
drivers/clk/qcom/a53-pll.c | 1 +
drivers/clk/qcom/apss-ipq-pll.c | 1 +
drivers/clk/uniphier/clk-uniphier-mux.c | 4 +-
drivers/clk/zynqmp/pll.c | 24 +-
drivers/clocksource/ingenic-ost.c | 4 +-
drivers/clocksource/timer-ti-dm-systimer.c | 13 +-
drivers/cpufreq/armada-37xx-cpufreq.c | 76 ++-
drivers/cpuidle/Kconfig.arm | 2 +-
drivers/crypto/allwinner/Kconfig | 14 +-
drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c | 9 +-
drivers/crypto/allwinner/sun8i-ss/sun8i-ss-prng.c | 4 +-
drivers/crypto/ccp/sev-dev.c | 3 +
drivers/crypto/ccp/tee-dev.c | 49 +-
drivers/crypto/ccp/tee-dev.h | 20 +-
drivers/crypto/chelsio/chcr_algo.c | 19 +-
drivers/crypto/keembay/keembay-ocs-aes-core.c | 4 +-
drivers/crypto/qat/qat_c3xxxvf/adf_drv.c | 4 +-
drivers/crypto/qat/qat_c62xvf/adf_drv.c | 4 +-
drivers/crypto/qat/qat_common/adf_isr.c | 29 +-
drivers/crypto/qat/qat_common/adf_transport.c | 1 +
drivers/crypto/qat/qat_common/adf_vf_isr.c | 17 +-
drivers/crypto/qat/qat_dh895xccvf/adf_drv.c | 4 +-
drivers/crypto/sa2ul.c | 8 +-
drivers/devfreq/devfreq.c | 5 +-
drivers/firmware/Kconfig | 1 +
drivers/firmware/qcom_scm-smc.c | 12 +-
drivers/firmware/qcom_scm.c | 88 +--
drivers/firmware/qcom_scm.h | 7 +-
drivers/firmware/xilinx/zynqmp.c | 5 +-
drivers/fpga/xilinx-spi.c | 24 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c | 19 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c | 4 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 6 +
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 1 +
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 13 +-
drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 4 +
drivers/gpu/drm/amd/amdkfd/kfd_iommu.c | 6 +
drivers/gpu/drm/amd/amdkfd/kfd_iommu.h | 9 +-
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 20 +-
drivers/gpu/drm/amd/display/dc/dce/dce_abm.c | 2 +-
drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c | 6 +-
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dccg.c | 2 +-
.../gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 26 +-
drivers/gpu/drm/amd/display/dc/hdcp/hdcp_msg.c | 9 +-
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 1 +
drivers/gpu/drm/bridge/Kconfig | 3 +
drivers/gpu/drm/bridge/analogix/Kconfig | 1 +
drivers/gpu/drm/bridge/panel.c | 12 +
drivers/gpu/drm/drm_dp_mst_topology.c | 17 +-
drivers/gpu/drm/drm_probe_helper.c | 7 +-
drivers/gpu/drm/i915/gvt/gvt.c | 8 +-
drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 11 +-
drivers/gpu/drm/mcde/mcde_dsi.c | 2 +-
drivers/gpu/drm/msm/msm_debugfs.c | 14 +-
drivers/gpu/drm/msm/msm_drv.c | 3 +
drivers/gpu/drm/msm/msm_drv.h | 9 +-
drivers/gpu/drm/msm/msm_gem.c | 14 +-
drivers/gpu/drm/msm/msm_gem.h | 12 +-
drivers/gpu/drm/panel/panel-novatek-nt35510.c | 3 +-
drivers/gpu/drm/panel/panel-samsung-s6d16d0.c | 4 +-
drivers/gpu/drm/panel/panel-samsung-s6e63m0-dsi.c | 1 -
drivers/gpu/drm/panel/panel-sony-acx424akp.c | 3 +-
drivers/gpu/drm/panfrost/panfrost_mmu.c | 13 +-
drivers/gpu/drm/qxl/qxl_cmd.c | 2 +-
drivers/gpu/drm/qxl/qxl_display.c | 4 +-
drivers/gpu/drm/qxl/qxl_drv.c | 2 -
drivers/gpu/drm/qxl/qxl_gem.c | 2 +-
drivers/gpu/drm/qxl/qxl_object.c | 5 +-
drivers/gpu/drm/qxl/qxl_object.h | 1 +
drivers/gpu/drm/qxl/qxl_release.c | 18 +-
drivers/gpu/drm/radeon/radeon_dp_mst.c | 3 +
drivers/gpu/drm/radeon/radeon_kms.c | 1 +
drivers/gpu/drm/stm/ltdc.c | 33 +-
drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 9 +
drivers/gpu/drm/xlnx/zynqmp_dp.c | 2 +-
drivers/hid/hid-ids.h | 1 +
drivers/hid/hid-lenovo.c | 47 +-
drivers/hid/hid-plantronics.c | 60 +-
drivers/hsi/hsi_core.c | 3 +-
drivers/hv/channel.c | 2 +-
drivers/hv/channel_mgmt.c | 30 +-
drivers/hv/ring_buffer.c | 1 -
drivers/hwmon/pmbus/pxe1610.c | 9 +
drivers/i2c/busses/i2c-cadence.c | 9 +-
drivers/i2c/busses/i2c-emev2.c | 5 +-
drivers/i2c/busses/i2c-img-scb.c | 4 +-
drivers/i2c/busses/i2c-imx-lpi2c.c | 2 +-
drivers/i2c/busses/i2c-imx.c | 4 +-
drivers/i2c/busses/i2c-jz4780.c | 5 +-
drivers/i2c/busses/i2c-mlxbf.c | 2 +
drivers/i2c/busses/i2c-mt65xx.c | 2 +-
drivers/i2c/busses/i2c-omap.c | 8 +-
drivers/i2c/busses/i2c-rcar.c | 64 ++-
drivers/i2c/busses/i2c-sh7760.c | 5 +-
drivers/i2c/busses/i2c-sprd.c | 4 +-
drivers/i2c/busses/i2c-stm32f7.c | 12 +-
drivers/i2c/busses/i2c-xiic.c | 4 +-
drivers/i3c/master.c | 5 +-
drivers/iio/accel/adis16201.c | 2 +-
drivers/iio/adc/Kconfig | 2 +-
drivers/iio/adc/ad7476.c | 18 +-
drivers/iio/imu/adis16480.c | 128 +++--
drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 20 +-
drivers/iio/proximity/sx9310.c | 52 +-
drivers/infiniband/core/cm.c | 3 +-
drivers/infiniband/core/cma.c | 12 +-
drivers/infiniband/hw/bnxt_re/qplib_fp.c | 1 +
drivers/infiniband/hw/bnxt_re/qplib_res.c | 1 +
drivers/infiniband/hw/cxgb4/resource.c | 2 +-
drivers/infiniband/hw/hfi1/firmware.c | 1 +
drivers/infiniband/hw/hfi1/mmu_rb.c | 2 +-
drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 1 +
drivers/infiniband/hw/i40iw/i40iw_pble.c | 6 +-
drivers/infiniband/hw/mlx5/fs.c | 9 +-
drivers/infiniband/hw/mlx5/qp.c | 15 +-
drivers/infiniband/hw/qedr/qedr_iw_cm.c | 4 +-
drivers/infiniband/sw/rxe/rxe_av.c | 2 +-
drivers/infiniband/sw/siw/siw_mem.c | 4 +-
drivers/infiniband/ulp/isert/ib_isert.c | 16 +-
drivers/infiniband/ulp/rtrs/rtrs-clt.c | 2 +-
drivers/infiniband/ulp/srpt/ib_srpt.c | 1 +
drivers/iommu/amd/init.c | 2 +-
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 2 +-
drivers/iommu/dma-iommu.c | 30 +-
drivers/iommu/intel/iommu.c | 52 +-
drivers/iommu/intel/pasid.c | 16 +
drivers/iommu/intel/pasid.h | 1 +
drivers/iommu/intel/svm.c | 18 +-
drivers/iommu/iommu.c | 24 +-
drivers/irqchip/irq-gic-v3-mbi.c | 2 +-
drivers/mailbox/sprd-mailbox.c | 43 +-
drivers/md/md-bitmap.c | 2 +
drivers/md/md.c | 73 ++-
drivers/media/common/saa7146/saa7146_core.c | 2 +-
drivers/media/common/saa7146/saa7146_video.c | 3 +-
drivers/media/dvb-frontends/m88ds3103.c | 4 +-
drivers/media/i2c/ccs/ccs-core.c | 4 +-
drivers/media/i2c/imx219.c | 49 +-
drivers/media/pci/intel/ipu3/ipu3-cio2.c | 2 +-
drivers/media/pci/saa7134/saa7134-core.c | 2 +-
drivers/media/platform/aspeed-video.c | 9 +-
drivers/media/platform/meson/ge2d/ge2d.c | 4 +-
drivers/media/platform/qcom/venus/core.c | 7 +-
.../platform/rockchip/rkisp1/rkisp1-resizer.c | 9 +-
.../media/platform/sunxi/sun6i-csi/sun6i_video.c | 4 +-
drivers/media/test-drivers/vivid/vivid-vid-out.c | 2 +-
drivers/media/tuners/m88rs6000t.c | 6 +-
drivers/media/v4l2-core/v4l2-ctrls.c | 17 +-
drivers/memory/omap-gpmc.c | 7 +-
drivers/memory/pl353-smc.c | 2 +-
drivers/memory/renesas-rpc-if.c | 2 +-
drivers/memory/samsung/exynos5422-dmc.c | 4 +-
drivers/mfd/intel_pmt.c | 11 +-
drivers/mfd/stm32-timers.c | 7 +-
drivers/mfd/stmpe.c | 14 +-
drivers/misc/lis3lv02d/lis3lv02d.c | 21 +-
drivers/misc/vmw_vmci/vmci_doorbell.c | 2 +-
drivers/misc/vmw_vmci/vmci_guest.c | 2 +-
drivers/mtd/maps/physmap-core.c | 4 +-
drivers/mtd/mtdchar.c | 8 +-
drivers/mtd/mtdcore.c | 3 +
drivers/mtd/mtdpart.c | 2 +-
drivers/mtd/nand/raw/brcmnand/brcmnand.c | 6 +
drivers/mtd/nand/raw/fsmc_nand.c | 2 +
drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 2 +-
drivers/mtd/nand/raw/qcom_nandc.c | 7 +-
drivers/net/dsa/mv88e6xxx/devlink.c | 2 +-
drivers/net/dsa/mv88e6xxx/serdes.c | 6 +-
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 10 +-
.../net/ethernet/cavium/liquidio/cn23xx_pf_regs.h | 2 +-
drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 2 +-
drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c | 22 +-
drivers/net/ethernet/freescale/Makefile | 4 +-
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 3 +-
.../net/ethernet/marvell/prestera/prestera_main.c | 3 +-
.../net/ethernet/mellanox/mlx5/core/fpga/ipsec.c | 2 +-
drivers/net/ethernet/netronome/nfp/nfp_devlink.c | 1 +
drivers/net/ethernet/qualcomm/emac/emac-mac.c | 4 +-
drivers/net/ethernet/renesas/ravb_main.c | 35 +-
drivers/net/ethernet/sfc/ef10.c | 3 +-
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 12 +-
drivers/net/ethernet/ti/davinci_emac.c | 4 +-
drivers/net/ethernet/xscale/ixp4xx_eth.c | 5 +-
drivers/net/fddi/Kconfig | 15 +-
drivers/net/fddi/defxx.c | 47 +-
drivers/net/geneve.c | 4 +-
drivers/net/phy/intel-xway.c | 21 +
drivers/net/phy/marvell.c | 52 +-
drivers/net/phy/smsc.c | 7 +-
drivers/net/wan/hdlc_fr.c | 5 +-
drivers/net/wan/lapbether.c | 32 +-
drivers/net/wireless/ath/ath10k/htc.c | 2 +-
drivers/net/wireless/ath/ath10k/wmi-tlv.c | 3 +
drivers/net/wireless/ath/ath9k/htc_drv_init.c | 2 +-
drivers/net/wireless/ath/ath9k/hw.c | 2 +-
drivers/net/wireless/intel/ipw2x00/libipw_wx.c | 6 +-
drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c | 5 +-
drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c | 20 +-
drivers/net/wireless/marvell/mwl8k.c | 1 +
drivers/net/wireless/mediatek/mt76/dma.c | 2 +-
drivers/net/wireless/mediatek/mt76/mt76.h | 1 +
drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 44 +-
drivers/net/wireless/mediatek/mt76/mt7615/main.c | 12 +-
drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h | 10 +-
.../net/wireless/mediatek/mt76/mt7615/pci_init.c | 3 +-
.../net/wireless/mediatek/mt76/mt7615/sdio_txrx.c | 11 +-
.../net/wireless/mediatek/mt76/mt7915/debugfs.c | 2 +-
drivers/net/wireless/mediatek/mt76/mt7915/dma.c | 8 +
drivers/net/wireless/mediatek/mt76/mt7915/init.c | 3 +-
drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 52 +-
drivers/net/wireless/mediatek/mt76/mt7915/main.c | 11 +-
drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 85 +--
drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h | 11 +-
drivers/net/wireless/mediatek/mt76/mt7915/pci.c | 4 +
drivers/net/wireless/mediatek/mt76/mt7915/regs.h | 3 +-
drivers/net/wireless/mediatek/mt76/sdio.c | 3 +
drivers/net/wireless/mediatek/mt76/tx.c | 28 +-
drivers/net/wireless/mediatek/mt7601u/eeprom.c | 2 +-
drivers/net/wireless/microchip/wilc1000/sdio.c | 2 +-
.../net/wireless/realtek/rtlwifi/rtl8821ae/table.c | 500 ++++++++++++-----
drivers/net/wireless/realtek/rtw88/debug.c | 2 +-
drivers/net/wireless/realtek/rtw88/phy.c | 5 +-
drivers/net/wireless/ti/wlcore/boot.c | 13 +-
drivers/net/wireless/ti/wlcore/debugfs.h | 7 +-
drivers/nfc/pn533/pn533.c | 3 +
drivers/nvme/host/multipath.c | 4 +
drivers/nvme/host/pci.c | 2 +-
drivers/nvme/host/tcp.c | 4 +-
drivers/nvme/target/tcp.c | 43 +-
drivers/nvmem/qfprom.c | 21 +
drivers/of/overlay.c | 1 +
drivers/pci/controller/dwc/pci-keystone.c | 3 +-
drivers/pci/controller/pci-xgene.c | 3 +-
drivers/pci/vpd.c | 1 -
drivers/phy/cadence/phy-cadence-sierra.c | 7 +-
drivers/phy/ingenic/phy-ingenic-usb.c | 4 +-
drivers/phy/marvell/Kconfig | 4 +-
drivers/phy/ralink/phy-mt7621-pci.c | 6 +-
drivers/phy/ti/phy-j721e-wiz.c | 23 +-
drivers/pinctrl/pinctrl-single.c | 63 ++-
drivers/platform/x86/dell-wmi-sysman/sysman.c | 32 +-
drivers/platform/x86/pmc_atom.c | 28 +-
drivers/power/supply/bq25980_charger.c | 40 +-
drivers/regulator/bd9576-regulator.c | 11 +-
drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 6 +-
drivers/scsi/ibmvscsi/ibmvfc.c | 57 +-
drivers/scsi/jazz_esp.c | 4 +-
drivers/scsi/lpfc/lpfc_els.c | 50 +-
drivers/scsi/pm8001/pm8001_hwi.c | 2 +-
drivers/scsi/pm8001/pm80xx_hwi.c | 4 +-
drivers/scsi/sni_53c710.c | 5 +-
drivers/scsi/sun3x_esp.c | 4 +-
drivers/scsi/ufs/ufshcd-pltfrm.c | 2 +-
drivers/soc/aspeed/aspeed-lpc-snoop.c | 4 +-
drivers/soc/qcom/mdt_loader.c | 17 +
drivers/soc/qcom/pdr_interface.c | 2 +-
drivers/soc/tegra/regulators-tegra30.c | 2 +-
drivers/soundwire/bus.c | 3 +-
drivers/soundwire/stream.c | 10 +-
drivers/spi/spi-fsl-lpspi.c | 2 +-
drivers/spi/spi-fsl-spi.c | 23 +-
drivers/spi/spi-rockchip.c | 13 +-
drivers/spi/spi-stm32.c | 27 +-
drivers/spi/spi-zynqmp-gqspi.c | 154 +++---
drivers/spi/spi.c | 9 +-
.../staging/comedi/drivers/tests/ni_routes_test.c | 6 +-
drivers/staging/fwserial/fwserial.c | 19 +-
drivers/staging/greybus/uart.c | 13 +-
drivers/staging/media/atomisp/i2c/atomisp-lm3554.c | 19 +-
drivers/staging/media/atomisp/pci/atomisp_ioctl.c | 4 +-
drivers/staging/media/atomisp/pci/hmm/hmm_bo.c | 13 +-
drivers/staging/media/omap4iss/iss.c | 4 +-
drivers/staging/media/rkvdec/rkvdec.c | 48 +-
drivers/staging/media/rkvdec/rkvdec.h | 1 -
drivers/staging/media/sunxi/cedrus/cedrus_regs.h | 17 +-
drivers/staging/rtl8192u/r8192U_core.c | 2 +-
drivers/tty/amiserial.c | 1 +
drivers/tty/moxa.c | 18 +-
drivers/tty/serial/liteuart.c | 4 +-
drivers/tty/serial/omap-serial.c | 51 +-
drivers/tty/serial/sc16is7xx.c | 2 +-
drivers/tty/serial/serial_core.c | 6 +-
drivers/tty/serial/stm32-usart.c | 610 +++++++++++----------
drivers/tty/serial/stm32-usart.h | 5 +-
drivers/tty/tty_io.c | 8 +-
drivers/tty/tty_ioctl.c | 4 +-
drivers/usb/class/cdc-acm.c | 16 +-
drivers/usb/dwc2/core_intr.c | 154 +++---
drivers/usb/dwc2/hcd.c | 10 +-
drivers/usb/gadget/udc/aspeed-vhub/core.c | 3 +-
drivers/usb/gadget/udc/aspeed-vhub/epn.c | 2 +-
drivers/usb/gadget/udc/fotg210-udc.c | 26 +-
drivers/usb/gadget/udc/pch_udc.c | 123 +++--
drivers/usb/gadget/udc/r8a66597-udc.c | 2 +
drivers/usb/gadget/udc/s3c2410_udc.c | 24 +-
drivers/usb/gadget/udc/snps_udc_plat.c | 4 +-
drivers/usb/host/xhci-mtk-sch.c | 80 ++-
drivers/usb/host/xhci-mtk.h | 6 +-
drivers/usb/roles/class.c | 2 +
drivers/usb/serial/ti_usb_3410_5052.c | 9 +-
drivers/usb/serial/usb_wwan.c | 9 +-
drivers/usb/typec/stusb160x.c | 4 +-
drivers/usb/typec/tcpm/tcpci.c | 21 +-
drivers/usb/typec/tcpm/tcpm.c | 116 ++--
drivers/usb/typec/tps6598x.c | 4 +-
drivers/usb/usbip/vudc_sysfs.c | 2 +
drivers/vfio/fsl-mc/vfio_fsl_mc.c | 74 ++-
drivers/vfio/mdev/mdev_sysfs.c | 2 +-
drivers/vfio/pci/vfio_pci.c | 131 +++--
fs/afs/dir.c | 7 +
fs/afs/dir_silly.c | 3 +
fs/afs/fs_operation.c | 6 +
fs/afs/inode.c | 12 +-
fs/afs/internal.h | 2 +
fs/afs/write.c | 1 +
fs/dlm/lowcomms.c | 1 +
fs/io_uring.c | 14 +-
fs/nfsd/nfs4proc.c | 4 +-
fs/overlayfs/copy_up.c | 3 +-
fs/overlayfs/overlayfs.h | 30 +-
fs/overlayfs/readdir.c | 12 -
fs/overlayfs/super.c | 2 +
fs/overlayfs/util.c | 31 +-
fs/proc/array.c | 2 +
fs/xfs/libxfs/xfs_attr.c | 1 +
include/crypto/internal/poly1305.h | 3 +-
include/crypto/poly1305.h | 6 +-
include/keys/trusted-type.h | 1 +
include/linux/dma-iommu.h | 2 +
include/linux/firmware/xlnx-zynqmp.h | 5 -
include/linux/gpio/driver.h | 9 +
include/linux/hid.h | 2 +
include/linux/intel-iommu.h | 3 +
include/linux/iommu.h | 2 +-
include/linux/kvm_host.h | 4 +-
include/linux/platform_device.h | 3 +
include/linux/pm_runtime.h | 2 +-
include/linux/smp.h | 2 +-
include/linux/spi/spi.h | 3 +
include/linux/tty_driver.h | 2 +-
include/linux/udp.h | 16 +-
include/net/addrconf.h | 1 -
include/net/bluetooth/hci_core.h | 1 +
include/net/netfilter/nf_tables_offload.h | 12 +-
include/uapi/linux/tty_flags.h | 4 +-
init/init_task.c | 2 +-
kernel/bpf/ringbuf.c | 24 +-
kernel/bpf/verifier.c | 30 +-
kernel/kthread.c | 33 +-
kernel/printk/printk.c | 9 +-
kernel/rcu/tree.c | 1 -
kernel/sched/core.c | 2 +-
kernel/sched/debug.c | 42 +-
kernel/sched/fair.c | 5 +-
kernel/sched/sched.h | 7 +
kernel/smp.c | 20 +-
kernel/up.c | 2 +-
lib/bug.c | 33 +-
lib/crypto/poly1305-donna32.c | 3 +-
lib/crypto/poly1305-donna64.c | 3 +-
lib/crypto/poly1305.c | 3 +-
mm/memcontrol.c | 10 +-
mm/memory-failure.c | 2 +-
mm/slab.c | 3 +-
mm/slab.h | 6 +-
mm/slab_common.c | 2 +-
mm/slub.c | 18 +-
mm/sparse.c | 1 +
net/bluetooth/hci_conn.c | 4 -
net/bluetooth/hci_event.c | 3 +-
net/bluetooth/hci_request.c | 12 +-
net/bridge/br_multicast.c | 33 +-
net/core/dev.c | 8 +-
net/ipv4/route.c | 42 +-
net/ipv4/tcp_cong.c | 4 +
net/ipv4/udp.c | 3 +
net/ipv6/mcast_snoop.c | 12 +-
net/mac80211/main.c | 7 +-
net/mptcp/protocol.c | 4 +-
net/netfilter/nf_tables_offload.c | 44 ++
net/netfilter/nft_cmp.c | 41 +-
net/netfilter/nft_payload.c | 13 +-
net/nfc/digital_dep.c | 2 +
net/nfc/llcp_sock.c | 4 +
net/packet/af_packet.c | 15 +-
net/packet/internal.h | 2 +-
net/sctp/socket.c | 38 +-
net/tipc/crypto.c | 2 +
net/vmw_vsock/virtio_transport_common.c | 28 +-
net/vmw_vsock/vmci_transport.c | 3 +-
net/wireless/scan.c | 2 +
net/xdp/xsk.c | 8 +-
samples/kfifo/bytestream-example.c | 8 +-
samples/kfifo/inttype-example.c | 8 +-
samples/kfifo/record-example.c | 8 +-
security/integrity/ima/ima_template.c | 4 +-
security/keys/trusted-keys/trusted_tpm1.c | 32 +-
security/keys/trusted-keys/trusted_tpm2.c | 10 +-
security/selinux/include/classmap.h | 5 +-
sound/core/init.c | 2 -
sound/pci/hda/patch_realtek.c | 162 +++---
sound/soc/codecs/ak5558.c | 4 +-
sound/soc/codecs/tlv320aic32x4.c | 12 +-
sound/soc/codecs/wm8960.c | 12 +-
sound/soc/generic/audio-graph-card.c | 2 +-
sound/soc/generic/simple-card.c | 2 +-
sound/soc/intel/Makefile | 2 +-
sound/soc/intel/boards/kbl_da7219_max98927.c | 38 +-
sound/soc/intel/boards/sof_wm8804.c | 6 +-
sound/soc/intel/skylake/Makefile | 2 +-
sound/soc/qcom/qdsp6/q6afe-clocks.c | 209 +++----
sound/soc/qcom/qdsp6/q6afe.c | 2 +-
sound/soc/qcom/qdsp6/q6afe.h | 2 +-
sound/soc/samsung/tm2_wm5110.c | 2 +-
sound/usb/card.c | 14 +-
sound/usb/midi.c | 2 +-
sound/usb/quirks.c | 16 +-
sound/usb/usbaudio.h | 2 +
tools/bpf/bpftool/btf.c | 3 +
tools/bpf/bpftool/main.c | 3 +-
tools/bpf/bpftool/map.c | 2 +-
tools/lib/bpf/bpf_core_read.h | 16 +-
tools/lib/bpf/bpf_tracing.h | 40 +-
tools/lib/bpf/btf.h | 1 +
tools/lib/bpf/libbpf.h | 1 +
tools/lib/perf/include/perf/event.h | 7 +-
tools/perf/pmu-events/arch/x86/amdzen1/cache.json | 2 +-
.../pmu-events/arch/x86/amdzen1/recommended.json | 6 +-
tools/perf/pmu-events/arch/x86/amdzen2/cache.json | 2 +-
.../pmu-events/arch/x86/amdzen2/recommended.json | 6 +-
tools/perf/trace/beauty/fsconfig.sh | 7 +-
tools/perf/util/jitdump.c | 30 +-
tools/perf/util/session.c | 15 +-
tools/perf/util/symbol_fprintf.c | 2 +-
tools/power/x86/turbostat/turbostat.c | 62 ++-
tools/testing/selftests/bpf/Makefile | 5 +-
.../testing/selftests/bpf/prog_tests/core_reloc.c | 51 +-
...tf__core_reloc_existence___err_wrong_arr_kind.c | 3 -
...re_reloc_existence___err_wrong_arr_value_type.c | 3 -
...tf__core_reloc_existence___err_wrong_int_kind.c | 3 -
.../btf__core_reloc_existence___err_wrong_int_sz.c | 3 -
...tf__core_reloc_existence___err_wrong_int_type.c | 3 -
..._core_reloc_existence___err_wrong_struct_type.c | 3 -
.../btf__core_reloc_existence___wrong_field_defs.c | 3 +
.../testing/selftests/bpf/progs/core_reloc_types.h | 20 +-
.../testing/selftests/bpf/verifier/array_access.c | 2 +-
.../selftests/drivers/net/mlxsw/tc_flower_scale.sh | 6 +-
tools/testing/selftests/kvm/dirty_log_test.c | 69 ++-
tools/testing/selftests/lib.mk | 3 +-
.../net/forwarding/mirror_gre_vlan_bridge_1q.sh | 2 +-
tools/testing/selftests/x86/thunks_32.S | 2 +
virt/kvm/coalesced_mmio.c | 19 +-
virt/kvm/kvm_main.c | 20 +-
611 files changed, 5655 insertions(+), 3605 deletions(-)Greg Kroah-Hartman
maintainerPATCH 1/601 Bluetooth: verify AMP hci_chan before amp_destroy
From: Archie Pusaka <[email protected]>
commit 5c4c8c9544099bb9043a10a5318130a943e32fc3 upstream.
hci_chan can be created in 2 places: hci_loglink_complete_evt() if it is an AMP hci_chan, or l2cap_conn_add() otherwise. In theory, Only AMP hci_chan should be removed by a call to hci_disconn_loglink_complete_evt(). However, the controller might mess up, call that function, and destroy an hci_chan which is not initiated by hci_loglink_complete_evt().
This patch adds a verification that the destroyed hci_chan must have been init'd by hci_loglink_complete_evt().
Example crash call trace:
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0xe3/0x144 lib/dump_stack.c:118
print_address_description+0x67/0x22a mm/kasan/report.c:256
kasan_report_error mm/kasan/report.c:354 [inline]
kasan_report mm/kasan/report.c:412 [inline]
kasan_report+0x251/0x28f mm/kasan/report.c:396
hci_send_acl+0x3b/0x56e net/bluetooth/hci_core.c:4072
l2cap_send_cmd+0x5af/0x5c2 net/bluetooth/l2cap_core.c:877
l2cap_send_move_chan_cfm_icid+0x8e/0xb1 net/bluetooth/l2cap_core.c:4661
l2cap_move_fail net/bluetooth/l2cap_core.c:5146 [inline]
l2cap_move_channel_rsp net/bluetooth/l2cap_core.c:5185 [inline]
l2cap_bredr_sig_cmd net/bluetooth/l2cap_core.c:5464 [inline]
l2cap_sig_channel net/bluetooth/l2cap_core.c:5799 [inline]
l2cap_recv_frame+0x1d12/0x51aa net/bluetooth/l2cap_core.c:7023
l2cap_recv_acldata+0x2ea/0x693 net/bluetooth/l2cap_core.c:7596
hci_acldata_packet net/bluetooth/hci_core.c:4606 [inline]
hci_rx_work+0x2bd/0x45e net/bluetooth/hci_core.c:4796
process_one_work+0x6f8/0xb50 kernel/workqueue.c:2175
worker_thread+0x4fc/0x670 kernel/workqueue.c:2321
kthread+0x2f0/0x304 kernel/kthread.c:253
ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:415
Allocated by task 38:
set_track mm/kasan/kasan.c:460 [inline]
kasan_kmalloc+0x8d/0x9a mm/kasan/kasan.c:553
kmem_cache_alloc_trace+0x102/0x129 mm/slub.c:2787
kmalloc include/linux/slab.h:515 [inline]
kzalloc include/linux/slab.h:709 [inline]
hci_chan_create+0x86/0x26d net/bluetooth/hci_conn.c:1674
l2cap_conn_add.part.0+0x1c/0x814 net/bluetooth/l2cap_core.c:7062
l2cap_conn_add net/bluetooth/l2cap_core.c:7059 [inline]
l2cap_connect_cfm+0x134/0x852 net/bluetooth/l2cap_core.c:7381
hci_connect_cfm+0x9d/0x122 include/net/bluetooth/hci_core.h:1404
hci_remote_ext_features_evt net/bluetooth/hci_event.c:4161 [inline]
hci_event_packet+0x463f/0x72fa net/bluetooth/hci_event.c:5981
hci_rx_work+0x197/0x45e net/bluetooth/hci_core.c:4791
process_one_work+0x6f8/0xb50 kernel/workqueue.c:2175
worker_thread+0x4fc/0x670 kernel/workqueue.c:2321
kthread+0x2f0/0x304 kernel/kthread.c:253
ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:415
Freed by task 1732:
set_track mm/kasan/kasan.c:460 [inline]
__kasan_slab_free mm/kasan/kasan.c:521 [inline]
__kasan_slab_free+0x106/0x128 mm/kasan/kasan.c:493
slab_free_hook mm/slub.c:1409 [inline]
slab_free_freelist_hook+0xaa/0xf6 mm/slub.c:1436
slab_free mm/slub.c:3009 [inline]
kfree+0x182/0x21e mm/slub.c:3972
hci_disconn_loglink_complete_evt net/bluetooth/hci_event.c:4891 [inline]
hci_event_packet+0x6a1c/0x72fa net/bluetooth/hci_event.c:6050
hci_rx_work+0x197/0x45e net/bluetooth/hci_core.c:4791
process_one_work+0x6f8/0xb50 kernel/workqueue.c:2175
worker_thread+0x4fc/0x670 kernel/workqueue.c:2321
kthread+0x2f0/0x304 kernel/kthread.c:253
ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:415
The buggy address belongs to the object at ffff8881d7af9180
which belongs to the cache kmalloc-128 of size 128
The buggy address is located 24 bytes inside of
128-byte region [ffff8881d7af9180, ffff8881d7af9200)
The buggy address belongs to the page:
page:ffffea00075ebe40 count:1 mapcount:0 mapping:ffff8881da403200 index:0x0
flags: 0x8000000000000200(slab)
raw: 8000000000000200 dead000000000100 dead000000000200 ffff8881da403200
raw: 0000000000000000 0000000080150015 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff8881d7af9080: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb
ffff8881d7af9100: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
>ffff8881d7af9180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff8881d7af9200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff8881d7af9280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc--- include/net/bluetooth/hci_core.h | 1 + net/bluetooth/hci_event.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-)
include/net/bluetooth/hci_core.h +1 -0
@@ -686,6 +686,7 @@ struct hci_chan {struct sk_buff_head data_q;unsigned int sent;__u8 state; +bool amp; };struct hci_conn_params {
net/bluetooth/hci_event.c +2 -1
@@ -5005,6 +5005,7 @@ static void hci_loglink_complete_evt(strreturn ; hchan->handle =le16_to_cpu (ev->handle); + hchan->amp = true;BT_DBG ("hcon %p mgr %p hchan %p" , hcon, hcon->amp_mgr, hchan);
@@ -5037,7 +5038,7 @@ static void hci_disconn_loglink_completehci_dev_lock (hdev); hchan =hci_chan_lookup_handle (hdev,le16_to_cpu (ev->handle)); -if (!hchan) +if (!hchan || !hchan->amp) goto unlock;amp_destroy_logical_link (hchan, ev->reason);
Greg Kroah-Hartman
maintainerPATCH 2/601 bluetooth: eliminate the potential race condition when removing the HCI controller
In reply to Greg Kroah-HartmanFrom: Lin Ma <[email protected]>
commit e2cb6b891ad2b8caa9131e3be70f45243df82a80 upstream.
There is a possible race condition vulnerability between issuing a HCI command and removing the cont. Specifically, functions hci_req_sync() and hci_dev_do_close() can race each other like below:
thread-A in hci_req_sync() | thread-B in hci_dev_do_close()
| hci_req_sync_lock(hdev);
test_bit(HCI_UP, &hdev->flags); |
... | test_and_clear_bit(HCI_UP, &hdev->flags)
hci_req_sync_lock(hdev); |
|In this commit we alter the sequence in function hci_req_sync(). Hence, the thread-A cannot issue th.
--- net/bluetooth/hci_request.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
net/bluetooth/hci_request.c +8 -4
@@ -271,12 +271,16 @@ int hci_req_sync(struct hci_dev *hdev, i {int ret; -if (!test_bit (HCI_UP , &hdev->flags)) -return -ENETDOWN ; -/* Serialize all requests */ hci_req_sync_lock (hdev); - ret =__hci_req_sync (hdev, req, opt, timeout, hci_status); +/* check the state after obtaing the lock to protect the HCI_UP +* against any races from hci_dev_do_close when the controller +* gets removed. +*/ +if (test_bit (HCI_UP , &hdev->flags)) + ret =__hci_req_sync (hdev, req, opt, timeout, hci_status); +else + ret = -ENETDOWN ;hci_req_sync_unlock (hdev);return ret;
Greg Kroah-Hartman
maintainerPATCH 3/601 net/nfc: fix use-after-free llcp_sock_bind/connect
In reply to Greg Kroah-HartmanFrom: Or Cohen <[email protected]>
commit c61760e6940dd4039a7f5e84a6afc9cdbf4d82b6 upstream.
Commits 8a4cd82d ("nfc: fix refcount leak in llcp_sock_connect()") and c33b1cc62 ("nfc: fix refcount leak in llcp_sock_bind()") fixed a refcount leak bug in bind/connect but introduced a use-after-free if the same local is assigned to 2 different sockets.
This can be triggered by the following simple program:
int sock1 = socket( AF_NFC, SOCK_STREAM, NFC_SOCKPROTO_LLCP );
int sock2 = socket( AF_NFC, SOCK_STREAM, NFC_SOCKPROTO_LLCP );
memset( &addr, 0, sizeof(struct sockaddr_nfc_llcp) );
addr.sa_family = AF_NFC;
addr.nfc_protocol = NFC_PROTO_NFC_DEP;
bind( sock1, (struct sockaddr*) &addr, sizeof(struct sockaddr_nfc_llcp) )
bind( sock2, (struct sockaddr*) &addr, sizeof(struct sockaddr_nfc_llcp) )
close(sock1);
close(sock2);Fix this by assigning NULL to llcp_sock->local after calling nfc_llcp_local_put.
This addresses CVE-2021-23134.
--- net/nfc/llcp_sock.c | 4 ++++ 1 file changed, 4 insertions(+)
net/nfc/llcp_sock.c +4 -0
@@ -109,12 +109,14 @@ static int llcp_sock_bind(struct socket GFP_KERNEL);if (!llcp_sock->service_name) {nfc_llcp_local_put (llcp_sock->local); + llcp_sock->local =NULL ; ret = -ENOMEM ; goto put_dev; } llcp_sock->ssap =nfc_llcp_get_sdp_ssap (local, llcp_sock);if (llcp_sock->ssap ==LLCP_SAP_MAX ) {nfc_llcp_local_put (llcp_sock->local); + llcp_sock->local =NULL ;kfree (llcp_sock->service_name); llcp_sock->service_name =NULL ; ret = -EADDRINUSE ;
@@ -709,6 +711,7 @@ static int llcp_sock_connect(struct sock llcp_sock->ssap =nfc_llcp_get_local_ssap (local);if (llcp_sock->ssap ==LLCP_SAP_MAX ) {nfc_llcp_local_put (llcp_sock->local); + llcp_sock->local =NULL ; ret = -ENOMEM ; goto put_dev; }
@@ -756,6 +759,7 @@ sock_unlink: sock_llcp_release:nfc_llcp_put_ssap (local, llcp_sock->ssap);nfc_llcp_local_put (llcp_sock->local); + llcp_sock->local =NULL ; put_dev:nfc_put_device (dev);
Greg Kroah-Hartman
maintainerPATCH 4/601 io_uring: truncate lengths larger than MAX_RW_COUNT on provide buffers
In reply to Greg Kroah-HartmanFrom: Thadeu Lima de Souza Cascardo <[email protected]>
commit d1f82808877bb10d3deee7cf3374a4eb3fb582db upstream.
Read and write operations are capped to MAX_RW_COUNT. Some read ops rely on that limit, and that is not guaranteed by the IORING_OP_PROVIDE_BUFFERS.
Truncate those lengths when doing io_add_buffers, so buffer addresses still use the uncapped length.
Also, take the chance and change struct io_buffer len member to __u32, so it matches struct io_provide_buffer len member.
This fixes CVE-2021-3491, also reported as ZDI-CAN-13546.
--- fs/io_uring.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
fs/io_uring.c +2 -2
@@ -222,7 +222,7 @@ struct fixed_file_data {struct io_buffer {struct list_head list;__u64 addr; -__s32 len; +__u32 len;__u16 bid; };
@@ -4252,7 +4252,7 @@ static int io_add_buffers(struct io_provbreak ; buf->addr = addr; - buf->len = pbuf->len; + buf->len =min_t (__u32, pbuf->len,MAX_RW_COUNT ); buf->bid = bid; addr += pbuf->len; bid++;
Greg Kroah-Hartman
maintainerPATCH 5/601 Revert "USB: cdc-acm: fix rounding error in TIOCSSERIAL"
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
commit 729f7955cb987c5b7d7e54c87c5ad71c789934f7 upstream.
This reverts commit b401f8c4f492cbf74f3f59c9141e5be3071071bb.
The offending commit claimed that trying to set the values reported back by TIOCGSERIAL as a regular user could result in an -EPERM error when HZ is 250, but that was never the case.
With HZ=250, the default 0.5 second value of close_delay is converted to 125 jiffies when set and is converted back to 50 centiseconds by TIOCGSERIAL as expected (not 12 cs as was claimed, even if that was the case before an earlier fix).
Comparing the internal current and new jiffies values is just fine to determine if the value is about to change so drop the bogus workaround (which was also backported to stable).
For completeness: With different default values for these parameters or with a HZ value not divisible by two, the lack of rounding when setting the default values in tty_port_init() could result in an -EPERM being returned, but this is hardly something we need to worry about.
--- drivers/usb/class/cdc-acm.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-)
drivers/usb/class/cdc-acm.c +2 -9
@@ -942,7 +942,6 @@ static int set_serial_info(struct tty_st {struct acm *acm = tty->driver_data;unsigned int closing_wait, close_delay; -unsigned int old_closing_wait, old_close_delay;int retval =0 ; close_delay =msecs_to_jiffies (ss->close_delay *10 );
@@ -950,17 +949,11 @@ static int set_serial_info(struct tty_st ASYNC_CLOSING_WAIT_NONE :msecs_to_jiffies (ss->closing_wait *10 ); -/* we must redo the rounding here, so that the values match */ - old_close_delay =jiffies_to_msecs (acm->port.close_delay) /10 ; - old_closing_wait = acm->port.closing_wait ==ASYNC_CLOSING_WAIT_NONE ? -ASYNC_CLOSING_WAIT_NONE : -jiffies_to_msecs (acm->port.closing_wait) /10 ; -mutex_lock (&acm->port.mutex);if (!capable (CAP_SYS_ADMIN )) { -if ((ss->close_delay != old_close_delay) || - (ss->closing_wait != old_closing_wait)) +if ((close_delay != acm->port.close_delay) || + (closing_wait != acm->port.closing_wait)) retval = -EPERM ;else retval = -EOPNOTSUPP ;
Greg Kroah-Hartman
maintainerPATCH 6/601 usb: roles: Call try_module_get() from usb_role_switch_find_by_fwnode()
In reply to Greg Kroah-HartmanFrom: Hans de Goede <[email protected]>
commit 3a2a91a2d51761557843996a66098eb7182b48b4 upstream.
usb_role_switch_find_by_fwnode() returns a reference to the role-switch which must be put by calling usb_role_switch_put().
usb_role_switch_put() calls module_put(sw->dev.parent->driver->owner), add a matching try_module_get() to usb_role_switch_find_by_fwnode(), making it behave the same as the other usb_role_switch functions which return a reference.
This avoids a WARN_ON being hit at kernel/module.c:1158 due to the module-refcount going below 0.
--- drivers/usb/roles/class.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/usb/roles/class.c +2 -0
@@ -189,6 +189,8 @@ usb_role_switch_find_by_fwnode(const strreturn NULL ; dev =class_find_device_by_fwnode (role_class, fwnode); +if (dev) +WARN_ON (!try_module_get (dev->parent->driver->owner));return dev ?to_role_switch (dev) :NULL ; }
Greg Kroah-Hartman
maintainerPATCH 7/601 tty: moxa: fix TIOCSSERIAL jiffies conversions
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
commit 6e70b73ca5240c0059a1fbf8ccd4276d6cf71956 upstream.
The port close_delay parameter set by TIOCSSERIAL is specified in jiffies, while the value returned by TIOCGSERIAL is specified in centiseconds.
Add the missing conversions so that TIOCGSERIAL works as expected also when HZ is not 100.
--- drivers/tty/moxa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/tty/moxa.c +2 -2
@@ -2040,7 +2040,7 @@ static int moxa_get_serial_info(struct t ss->line = info->port.tty->index, ss->flags = info->port.flags, ss->baud_base =921600 , - ss->close_delay = info->port.close_delay; + ss->close_delay =jiffies_to_msecs (info->port.close_delay) /10 ;mutex_unlock (&info->port.mutex);return 0 ; }
@@ -2069,7 +2069,7 @@ static int moxa_set_serial_info(struct treturn -EPERM ; } } - info->port.close_delay = ss->close_delay *HZ /100 ; + info->port.close_delay =msecs_to_jiffies (ss->close_delay *10 );MoxaSetFifo (info, ss->type ==PORT_16550A );
Greg Kroah-Hartman
maintainerPATCH 8/601 tty: amiserial: fix TIOCSSERIAL permission check
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
commit 1d31a831cc04f5f942de3e7d91edaa52310d3c99 upstream.
Changing the port closing_wait parameter is a privileged operation.
Add the missing check to TIOCSSERIAL so that -EPERM is returned in case an unprivileged user tries to change the closing-wait setting.
--- drivers/tty/amiserial.c | 1 + 1 file changed, 1 insertion(+)
drivers/tty/amiserial.c +1 -0
@@ -970,6 +970,7 @@ static int set_serial_info(struct tty_stif (!serial_isroot ()) {if ((ss->baud_base != state->baud_base) || (ss->close_delay != port->close_delay) || + (ss->closing_wait != port->closing_wait) || (ss->xmit_fifo_size != state->xmit_fifo_size) || ((ss->flags & ~ASYNC_USR_MASK ) != (port->flags & ~ASYNC_USR_MASK ))) {
Greg Kroah-Hartman
maintainerPATCH 9/601 USB: serial: usb_wwan: fix TIOCSSERIAL jiffies conversions
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
commit 3d732690d2267f4d0e19077b178dffbedafdf0c9 upstream.
The port close_delay and closing_wait parameters set by TIOCSSERIAL are specified in jiffies and not milliseconds.
Add the missing conversions so that the TIOCSSERIAL works as expected also when HZ is not 1000.
--- drivers/usb/serial/usb_wwan.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/usb/serial/usb_wwan.c +5 -4
@@ -140,10 +140,10 @@ int usb_wwan_get_serial_info(struct tty_ ss->line = port->minor; ss->port = port->port_number; ss->baud_base =tty_get_baud_rate (port->port.tty); - ss->close_delay = port->port.close_delay /10 ; + ss->close_delay =jiffies_to_msecs (port->port.close_delay) /10 ; ss->closing_wait = port->port.closing_wait ==ASYNC_CLOSING_WAIT_NONE ?ASYNC_CLOSING_WAIT_NONE : - port->port.closing_wait /10 ; +jiffies_to_msecs (port->port.closing_wait) /10 ;return 0 ; }EXPORT_SYMBOL (usb_wwan_get_serial_info);
@@ -155,9 +155,10 @@ int usb_wwan_set_serial_info(struct tty_unsigned int closing_wait, close_delay;int retval =0 ; - close_delay = ss->close_delay *10 ; + close_delay =msecs_to_jiffies (ss->close_delay *10 ); closing_wait = ss->closing_wait ==ASYNC_CLOSING_WAIT_NONE ? -ASYNC_CLOSING_WAIT_NONE : ss->closing_wait *10 ; +ASYNC_CLOSING_WAIT_NONE : +msecs_to_jiffies (ss->closing_wait *10 );mutex_lock (&port->port.mutex);
Greg Kroah-Hartman
maintainerPATCH 10/601 staging: greybus: uart: fix TIOCSSERIAL jiffies conversions
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
commit b71e571adaa58be4fd289abebc8997e05b4c6b40 upstream.
The port close_delay and closing_wait parameters set by TIOCSSERIAL are specified in jiffies and not milliseconds.
Add the missing conversions so that TIOCSSERIAL works as expected also when HZ is not 1000.
--- drivers/staging/greybus/uart.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
drivers/staging/greybus/uart.c +7 -4
@@ -614,10 +614,12 @@ static int get_serial_info(struct tty_st ss->line = gb_tty->minor; ss->xmit_fifo_size =16 ; ss->baud_base =9600 ; - ss->close_delay = gb_tty->port.close_delay /10 ; + ss->close_delay =jiffies_to_msecs (gb_tty->port.close_delay) /10 ; ss->closing_wait = gb_tty->port.closing_wait ==ASYNC_CLOSING_WAIT_NONE ? -ASYNC_CLOSING_WAIT_NONE : gb_tty->port.closing_wait /10 ; +ASYNC_CLOSING_WAIT_NONE : +jiffies_to_msecs (gb_tty->port.closing_wait) /10 ; +return 0 ; }
@@ -629,9 +631,10 @@ static int set_serial_info(struct tty_stunsigned int close_delay;int retval =0 ; - close_delay = ss->close_delay *10 ; + close_delay =msecs_to_jiffies (ss->close_delay *10 ); closing_wait = ss->closing_wait ==ASYNC_CLOSING_WAIT_NONE ? -ASYNC_CLOSING_WAIT_NONE : ss->closing_wait *10 ; +ASYNC_CLOSING_WAIT_NONE : +msecs_to_jiffies (ss->closing_wait *10 );mutex_lock (&gb_tty->port.mutex);if (!capable (CAP_SYS_ADMIN )) {
Greg Kroah-Hartman
maintainerPATCH 11/601 USB: serial: ti_usb_3410_5052: fix TIOCSSERIAL permission check
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
commit d370c90dcd64e427a79a093a070117a1571d4cd8 upstream.
Changing the port closing-wait parameter is a privileged operation so make sure to return -EPERM if a regular user tries to change it.
--- drivers/usb/serial/ti_usb_3410_5052.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/usb/serial/ti_usb_3410_5052.c +7 -2
@@ -1420,14 +1420,19 @@ static int ti_set_serial_info(struct tty struct serial_struct *ss) {struct usb_serial_port *port = tty->driver_data; -struct ti_port *tport =usb_get_serial_port_data (port); +struct tty_port *tport = &port->port;unsigned cwait; cwait = ss->closing_wait;if (cwait !=ASYNC_CLOSING_WAIT_NONE ) cwait =msecs_to_jiffies (10 * ss->closing_wait); - tport->tp_port->port.closing_wait = cwait; +if (!capable (CAP_SYS_ADMIN )) { +if (cwait != tport->closing_wait) +return -EPERM ; + } + + tport->closing_wait = cwait;return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 12/601 staging: fwserial: fix TIOCSSERIAL jiffies conversions
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
commit 7a3791afdbd5a951b09a7689bba856bd9f6c6a9f upstream.
The port close_delay parameter set by TIOCSSERIAL is specified in jiffies, while the value returned by TIOCGSERIAL is specified in centiseconds.
Add the missing conversions so that TIOCGSERIAL works as expected also when HZ is not 100.
--- drivers/staging/fwserial/fwserial.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/fwserial/fwserial.c +2 -2
@@ -1223,7 +1223,7 @@ static int get_serial_info(struct tty_st ss->flags = port->port.flags; ss->xmit_fifo_size =FWTTY_PORT_TXFIFO_LEN ; ss->baud_base =400000000 ; - ss->close_delay = port->port.close_delay; + ss->close_delay =jiffies_to_msecs (port->port.close_delay) /10 ;mutex_unlock (&port->port.mutex);return 0 ; }
@@ -1245,7 +1245,7 @@ static int set_serial_info(struct tty_streturn -EPERM ; } } - port->port.close_delay = ss->close_delay *HZ /100 ; + port->port.close_delay =msecs_to_jiffies (ss->close_delay *10 );mutex_unlock (&port->port.mutex);return 0 ;
Greg Kroah-Hartman
maintainerPATCH 13/601 tty: moxa: fix TIOCSSERIAL permission check
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
commit dc8c8437658667be9b11ec25c4b5482ed2becdaa upstream.
Changing the port close delay or type are privileged operations so make sure to return -EPERM if a regular user tries to change them.
--- drivers/tty/moxa.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-)
drivers/tty/moxa.c +11 -5
@@ -2050,6 +2050,7 @@ static int moxa_set_serial_info(struct t struct serial_struct *ss) {struct moxa_port *info = tty->driver_data; +unsigned int close_delay;if (tty->index ==MAX_PORTS )return -EINVAL ;
@@ -2061,19 +2062,24 @@ static int moxa_set_serial_info(struct t ss->baud_base != 921600)return -EPERM ; + close_delay =msecs_to_jiffies (ss->close_delay *10 ); +mutex_lock (&info->port.mutex);if (!capable (CAP_SYS_ADMIN )) { -if (((ss->flags & ~ASYNC_USR_MASK ) != +if (close_delay != info->port.close_delay || + ss->type != info->type || + ((ss->flags & ~ASYNC_USR_MASK ) != (info->port.flags & ~ASYNC_USR_MASK ))) {mutex_unlock (&info->port.mutex);return -EPERM ; } - } - info->port.close_delay =msecs_to_jiffies (ss->close_delay *10 ); + }else { + info->port.close_delay = close_delay; -MoxaSetFifo (info, ss->type ==PORT_16550A ); +MoxaSetFifo (info, ss->type ==PORT_16550A ); - info->type = ss->type; + info->type = ss->type; + }mutex_unlock (&info->port.mutex);return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 14/601 staging: fwserial: fix TIOCSSERIAL permission check
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
commit 2104eb283df66a482b60254299acbe3c68c03412 upstream.
Changing the port close-delay parameter is a privileged operation so make sure to return -EPERM if a regular user tries to change it.
--- drivers/staging/fwserial/fwserial.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/staging/fwserial/fwserial.c +6 -2
@@ -1232,20 +1232,24 @@ static int set_serial_info(struct tty_st struct serial_struct *ss) {struct fwtty_port *port = tty->driver_data; +unsigned int cdelay;if (ss->irq !=0 || ss->port !=0 || ss->custom_divisor !=0 || ss->baud_base !=400000000 )return -EPERM ; + cdelay =msecs_to_jiffies (ss->close_delay *10 ); +mutex_lock (&port->port.mutex);if (!capable (CAP_SYS_ADMIN )) { -if (((ss->flags & ~ASYNC_USR_MASK ) != +if (cdelay != port->port.close_delay || + ((ss->flags & ~ASYNC_USR_MASK ) != (port->port.flags & ~ASYNC_USR_MASK ))) {mutex_unlock (&port->port.mutex);return -EPERM ; } } - port->port.close_delay =msecs_to_jiffies (ss->close_delay *10 ); + port->port.close_delay = cdelay;mutex_unlock (&port->port.mutex);return 0 ;
Greg Kroah-Hartman
maintainerPATCH 15/601 drm: bridge: fix LONTIUM use of mipi_dsi_() functions
In reply to Greg Kroah-HartmanFrom: Randy Dunlap <[email protected]>
commit ad085b3a712a89e4a48472121b231add7a8362e4 upstream.
The Lontium DRM bridge drivers use mipi_dsi_() function interfaces so they need to select DRM_MIPI_DSI to prevent build errors.
ERROR: modpost: "mipi_dsi_attach" [drivers/gpu/drm/bridge/lontium-lt9611uxc.ko] undefined!
ERROR: modpost: "mipi_dsi_device_register_full" [drivers/gpu/drm/bridge/lontium-lt9611uxc.ko] undefined!
ERROR: modpost: "of_find_mipi_dsi_host_by_node" [drivers/gpu/drm/bridge/lontium-lt9611uxc.ko] undefined!
ERROR: modpost: "mipi_dsi_device_unregister" [drivers/gpu/drm/bridge/lontium-lt9611uxc.ko] undefined!
ERROR: modpost: "mipi_dsi_detach" [drivers/gpu/drm/bridge/lontium-lt9611uxc.ko] undefined!
ERROR: modpost: "mipi_dsi_attach" [drivers/gpu/drm/bridge/lontium-lt9611.ko] undefined!
ERROR: modpost: "mipi_dsi_device_register_full" [drivers/gpu/drm/bridge/lontium-lt9611.ko] undefined!
ERROR: modpost: "of_find_mipi_dsi_host_by_node" [drivers/gpu/drm/bridge/lontium-lt9611.ko] undefined!
ERROR: modpost: "mipi_dsi_device_unregister" [drivers/gpu/drm/bridge/lontium-lt9611.ko] undefined!
ERROR: modpost: "mipi_dsi_detach" [drivers/gpu/drm/bridge/lontium-lt9611.ko] undefined!
WARNING: modpost: suppressed 5 unresolved symbol warnings because there were too many)
--- drivers/gpu/drm/bridge/Kconfig | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/bridge/Kconfig +3 -0
@@ -67,6 +67,7 @@ config DRM_LONTIUM_LT9611UXC depends on OF select DRM_PANEL_BRIDGE select DRM_KMS_HELPER + select DRM_MIPI_DSI select REGMAP_I2C help Driver for Lontium LT9611UXC DSI to HDMI bridge
@@ -151,6 +152,7 @@ config DRM_SII902X tristate "Silicon Image sii902x RGB/HDMI bridge" depends on OF select DRM_KMS_HELPER + select DRM_MIPI_DSI select REGMAP_I2C select I2C_MUX select SND_SOC_HDMI_CODEC if SND_SOC
@@ -200,6 +202,7 @@ config DRM_TOSHIBA_TC358767 tristate "Toshiba TC358767 eDP bridge" depends on OF select DRM_KMS_HELPER + select DRM_MIPI_DSI select REGMAP_I2C select DRM_PANEL help
Greg Kroah-Hartman
maintainerPATCH 16/601 usb: typec: tcpm: Address incorrect values of tcpm psy for fixed supply
In reply to Greg Kroah-HartmanFrom: Badhri Jagan Sridharan <[email protected]>
commit f3dedafb8263ca4791a92a23f5230068f5bde008 upstream.
tcpm_pd_build_request overwrites current_limit and supply_voltage even before port partner accepts the requests. This leaves stale values in current_limit and supply_voltage that get exported by "tcpm-source-psy-". Solving this problem by caching the request values of current limit/supply voltage in req_current_limit and req_supply_voltage. current_limit/supply_voltage gets updated once the port partner accepts the request.
--- drivers/usb/typec/tcpm/tcpm.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-)
drivers/usb/typec/tcpm/tcpm.c +10 -7
@@ -338,7 +338,10 @@ struct tcpm_port {unsigned int operating_snk_mw;bool update_sink_caps; -/* Requested current / voltage */ +/* Requested current / voltage to the port partner */ +u32 req_current_limit; +u32 req_supply_voltage; +/* Actual current / voltage limit of the local port */ u32 current_limit;u32 supply_voltage;
@@ -1904,8 +1907,8 @@ static void tcpm_pd_ctrl_request(structcase SNK_TRANSITION_SINK :if (port->vbus_present) {tcpm_set_current_limit (port, - port->current_limit, - port->supply_voltage); + port->req_current_limit, + port->req_supply_voltage); port->explicit_contract = true; tcpm_set_auto_vbus_discharge_threshold(port, TYPEC_PWR_MODE_PD,
@@ -1991,8 +1994,8 @@ static void tcpm_pd_ctrl_request(structbreak ;case SNK_NEGOTIATE_PPS_CAPABILITIES : port->pps_data.active = true; - port->supply_voltage = port->pps_data.out_volt; - port->current_limit = port->pps_data.op_curr; + port->req_supply_voltage = port->pps_data.out_volt; + port->req_current_limit = port->pps_data.op_curr;tcpm_set_state (port,SNK_TRANSITION_SINK ,0 );break ;case SOFT_RESET_SEND :
@@ -2609,8 +2612,8 @@ static int tcpm_pd_build_request(struct flags & RDO_CAP_MISMATCH ? " [mismatch]" : ""); } - port->current_limit = ma; - port->supply_voltage = mv; + port->req_current_limit = ma; + port->req_supply_voltage = mv;return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 17/601 usb: typec: tcpm: Address incorrect values of tcpm psy for pps supply
In reply to Greg Kroah-HartmanFrom: Badhri Jagan Sridharan <[email protected]>
commit e3a0720224873587954b55d193d5b4abb14f0443 upstream.
tcpm_pd_select_pps_apdo overwrites port->pps_data.min_volt, port->pps_data.max_volt, port->pps_data.max_curr even before port partner accepts the requests. This leaves incorrect values in current_limit and supply_voltage that get exported by "tcpm-source-psy-". Solving this problem by caching the request values in req_min_volt, req_max_volt, req_max_curr, req_out_volt, req_op_curr. min_volt, max_volt, max_curr gets updated once the partner accepts the request. current_limit, supply_voltage gets updated once local port's tcpm enters SNK_TRANSITION_SINK when the accepted current_limit and supply_voltage is enforced.
--- drivers/usb/typec/tcpm/tcpm.c | 88 +++++++++++++++++++++++++----------------- 1 file changed, 53 insertions(+), 35 deletions(-)
drivers/usb/typec/tcpm/tcpm.c +53 -35
@@ -218,12 +218,27 @@ struct pd_mode_data {struct typec_altmode_desc altmode_desc[ALTMODE_DISCOVERY_MAX ]; }; +/* +* @min_volt: Actual min voltage at the local port +* @req_min_volt: Requested min voltage to the port partner +* @max_volt: Actual max voltage at the local port +* @req_max_volt: Requested max voltage to the port partner +* @max_curr: Actual max current at the local port +* @req_max_curr: Requested max current of the port partner +* @req_out_volt: Requested output voltage to the port partner +* @req_op_curr: Requested operating current to the port partner +* @supported: Parter has atleast one APDO hence supports PPS +* @active: PPS mode is active +*/ struct pd_pps_data {u32 min_volt; +u32 req_min_volt;u32 max_volt; +u32 req_max_volt;u32 max_curr; -u32 out_volt; -u32 op_curr; +u32 req_max_curr; +u32 req_out_volt; +u32 req_op_curr;bool supported;bool active; };
@@ -1954,8 +1969,8 @@ static void tcpm_pd_ctrl_request(structbreak ;case SNK_NEGOTIATE_PPS_CAPABILITIES :/* Revert data back from any requested PPS updates */ - port->pps_data.out_volt = port->supply_voltage; - port->pps_data.op_curr = port->current_limit; + port->pps_data.req_out_volt = port->supply_voltage; + port->pps_data.req_op_curr = port->current_limit; port->pps_status = (type ==PD_CTRL_WAIT ? -EAGAIN : -EOPNOTSUPP );tcpm_set_state (port,SNK_READY ,0 );
@@ -1994,8 +2009,11 @@ static void tcpm_pd_ctrl_request(structbreak ;case SNK_NEGOTIATE_PPS_CAPABILITIES : port->pps_data.active = true; - port->req_supply_voltage = port->pps_data.out_volt; - port->req_current_limit = port->pps_data.op_curr; + port->pps_data.min_volt = port->pps_data.req_min_volt; + port->pps_data.max_volt = port->pps_data.req_max_volt; + port->pps_data.max_curr = port->pps_data.req_max_curr; + port->req_supply_voltage = port->pps_data.req_out_volt; + port->req_current_limit = port->pps_data.req_op_curr;tcpm_set_state (port,SNK_TRANSITION_SINK ,0 );break ;case SOFT_RESET_SEND :
@@ -2522,16 +2540,16 @@ static unsigned int tcpm_pd_select_pps_a src = port->source_caps[src_pdo]; snk = port->snk_pdo[snk_pdo]; - port->pps_data.min_volt =max (pdo_pps_apdo_min_voltage (src), -pdo_pps_apdo_min_voltage (snk)); - port->pps_data.max_volt =min (pdo_pps_apdo_max_voltage (src), -pdo_pps_apdo_max_voltage (snk)); - port->pps_data.max_curr =min_pps_apdo_current (src, snk); - port->pps_data.out_volt =min (port->pps_data.max_volt, -max (port->pps_data.min_volt, - port->pps_data.out_volt)); - port->pps_data.op_curr =min (port->pps_data.max_curr, - port->pps_data.op_curr); + port->pps_data.req_min_volt =max (pdo_pps_apdo_min_voltage (src), +pdo_pps_apdo_min_voltage (snk)); + port->pps_data.req_max_volt =min (pdo_pps_apdo_max_voltage (src), +pdo_pps_apdo_max_voltage (snk)); + port->pps_data.req_max_curr =min_pps_apdo_current (src, snk); + port->pps_data.req_out_volt =min (port->pps_data.max_volt, +max (port->pps_data.min_volt, + port->pps_data.req_out_volt)); + port->pps_data.req_op_curr =min (port->pps_data.max_curr, + port->pps_data.req_op_curr);power_supply_changed (port->psy); }
@@ -2659,10 +2677,10 @@ static int tcpm_pd_build_pps_request(strtcpm_log (port,"Invalid APDO selected!" );return -EINVAL ; } - max_mv = port->pps_data.max_volt; - max_ma = port->pps_data.max_curr; - out_mv = port->pps_data.out_volt; - op_ma = port->pps_data.op_curr; + max_mv = port->pps_data.req_max_volt; + max_ma = port->pps_data.req_max_curr; + out_mv = port->pps_data.req_out_volt; + op_ma = port->pps_data.req_op_curr;break ;default :tcpm_log (port,"Invalid PDO selected!" );
@@ -2709,8 +2727,8 @@ static int tcpm_pd_build_pps_request(strtcpm_log (port,"Requesting APDO %d: %u mV, %u mA" , src_pdo_index, out_mv, op_ma); - port->pps_data.op_curr = op_ma; - port->pps_data.out_volt = out_mv; + port->pps_data.req_op_curr = op_ma; + port->pps_data.req_out_volt = out_mv;return 0 ; }
@@ -4634,7 +4652,7 @@ static int tcpm_try_role(struct typec_poreturn ret; } -static int tcpm_pps_set_op_curr (struct tcpm_port *port,u16 op_curr) +static int tcpm_pps_set_op_curr (struct tcpm_port *port,u16 req_op_curr) {unsigned int target_mw;int ret;
@@ -4652,22 +4670,22 @@ static int tcpm_pps_set_op_curr(struct t goto port_unlock; } -if (op_curr > port->pps_data.max_curr) { +if (req_op_curr > port->pps_data.max_curr) { ret = -EINVAL ; goto port_unlock; } - target_mw = (op_curr * port->pps_data.out_volt) /1000 ; + target_mw = (req_op_curr * port->supply_voltage) /1000 ;if (target_mw < port->operating_snk_mw) { ret = -EINVAL ; goto port_unlock; }/* Round down operating current to align with PPS valid steps */ - op_curr = op_curr - (op_curr %RDO_PROG_CURR_MA_STEP ); + req_op_curr = req_op_curr - (req_op_curr %RDO_PROG_CURR_MA_STEP );reinit_completion (&port->pps_complete); - port->pps_data.op_curr = op_curr; + port->pps_data.req_op_curr = req_op_curr; port->pps_status =0 ; port->pps_pending = true;tcpm_set_state (port,SNK_NEGOTIATE_PPS_CAPABILITIES ,0 );
@@ -4689,7 +4707,7 @@ swap_unlock:return ret; } -static int tcpm_pps_set_out_volt (struct tcpm_port *port,u16 out_volt) +static int tcpm_pps_set_out_volt (struct tcpm_port *port,u16 req_out_volt) {unsigned int target_mw;int ret;
@@ -4707,23 +4725,23 @@ static int tcpm_pps_set_out_volt(struct goto port_unlock; } -if (out_volt < port->pps_data.min_volt || - out_volt > port->pps_data.max_volt) { +if (req_out_volt < port->pps_data.min_volt || + req_out_volt > port->pps_data.max_volt) { ret = -EINVAL ; goto port_unlock; } - target_mw = (port->pps_data.op_curr * out_volt) /1000 ; + target_mw = (port->current_limit * req_out_volt) /1000 ;if (target_mw < port->operating_snk_mw) { ret = -EINVAL ; goto port_unlock; }/* Round down output voltage to align with PPS valid steps */ - out_volt = out_volt - (out_volt %RDO_PROG_VOLT_MV_STEP ); + req_out_volt = req_out_volt - (req_out_volt %RDO_PROG_VOLT_MV_STEP );reinit_completion (&port->pps_complete); - port->pps_data.out_volt = out_volt; + port->pps_data.req_out_volt = req_out_volt; port->pps_status =0 ; port->pps_pending = true;tcpm_set_state (port,SNK_NEGOTIATE_PPS_CAPABILITIES ,0 );
@@ -4772,8 +4790,8 @@ static int tcpm_pps_activate(struct tcpm/* Trigger PPS request or move back to standard PDO contract */ if (activate) { - port->pps_data.out_volt = port->supply_voltage; - port->pps_data.op_curr = port->current_limit; + port->pps_data.req_out_volt = port->supply_voltage; + port->pps_data.req_op_curr = port->current_limit;tcpm_set_state (port,SNK_NEGOTIATE_PPS_CAPABILITIES ,0 ); }else {tcpm_set_state (port,SNK_NEGOTIATE_CAPABILITIES ,0 );
Greg Kroah-Hartman
maintainerPATCH 18/601 usb: typec: tcpm: update power supply once partner accepts
In reply to Greg Kroah-HartmanFrom: Badhri Jagan Sridharan <[email protected]>
commit 4050f2683f2c3151dc3dd1501ac88c57caf810ff upstream.
power_supply_changed needs to be called to notify clients after the partner accepts the requested values for the pps case.
Also, remove the redundant power_supply_changed at the end of the tcpm_reset_port as power_supply_changed is already called right after usb_type is changed.
--- drivers/usb/typec/tcpm/tcpm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/usb/typec/tcpm/tcpm.c +1 -3
@@ -2014,6 +2014,7 @@ static void tcpm_pd_ctrl_request(struct port->pps_data.max_curr = port->pps_data.req_max_curr; port->req_supply_voltage = port->pps_data.req_out_volt; port->req_current_limit = port->pps_data.req_op_curr; +power_supply_changed (port->psy);tcpm_set_state (port,SNK_TRANSITION_SINK ,0 );break ;case SOFT_RESET_SEND :
@@ -2550,7 +2551,6 @@ static unsigned int tcpm_pd_select_pps_a port->pps_data.req_out_volt)); port->pps_data.req_op_curr =min (port->pps_data.max_curr, port->pps_data.req_op_curr); -power_supply_changed (port->psy); }return src_pdo;
@@ -2966,8 +2966,6 @@ static void tcpm_reset_port(struct tcpm_ port->sink_cap_done = false;if (port->tcpc->enable_frs) port->tcpc->enable_frs (port->tcpc, false); - -power_supply_changed (port->psy); }static void tcpm_detach (struct tcpm_port *port)
Greg Kroah-Hartman
maintainerPATCH 19/601 usb: xhci-mtk: remove or operator for setting schedule parameters
In reply to Greg Kroah-HartmanFrom: Chunfeng Yun <[email protected]>
commit 5fa5827566e3affa1657ccf9b22706c06a5d021a upstream.
Side effect may happen if use or operator to set schedule parameters when the parameters are already set before. Set them directly due to other bits are reserved.
--- drivers/usb/host/xhci-mtk-sch.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/usb/host/xhci-mtk-sch.c +3 -3
@@ -643,7 +643,7 @@ int xhci_mtk_add_ep_quirk(struct usb_hcd*/ if (usb_endpoint_xfer_int (&ep->desc) ||usb_endpoint_xfer_isoc (&ep->desc)) - ep_ctx->reserved[0 ] |=cpu_to_le32 (EP_BPKTS (1 )); + ep_ctx->reserved[0 ] =cpu_to_le32 (EP_BPKTS (1 ));return 0 ; }
@@ -730,10 +730,10 @@ int xhci_mtk_check_bandwidth(struct usb_list_move_tail (&sch_ep->endpoint, &sch_bw->bw_ep_list); ep_ctx =xhci_get_ep_ctx (xhci, virt_dev->in_ctx, ep_index); - ep_ctx->reserved[0 ] |=cpu_to_le32 (EP_BPKTS (sch_ep->pkts) + ep_ctx->reserved[0 ] =cpu_to_le32 (EP_BPKTS (sch_ep->pkts) |EP_BCSCOUNT (sch_ep->cs_count) |EP_BBM (sch_ep->burst_mode)); - ep_ctx->reserved[1 ] |=cpu_to_le32 (EP_BOFFSET (sch_ep->offset) + ep_ctx->reserved[1 ] =cpu_to_le32 (EP_BOFFSET (sch_ep->offset) |EP_BREPEAT (sch_ep->repeat)); xhci_dbg(xhci, " PKTS:%x, CSCOUNT:%x, BM:%x, OFFSET:%x, REPEAT:%x\n",
Greg Kroah-Hartman
maintainerPATCH 20/601 usb: xhci-mtk: improve bandwidth scheduling with TT
In reply to Greg Kroah-HartmanFrom: Chunfeng Yun <[email protected]>
commit e19ee44a3d07c232f9241024dab1ebd0748cdf5f upstream.
When the USB headset is plug into an external hub, sometimes can't set config due to not enough bandwidth, so need improve LS/FS INT/ISOC bandwidth scheduling with TT.
--- drivers/usb/host/xhci-mtk-sch.c | 74 ++++++++++++++++++++++++++++++++-------- drivers/usb/host/xhci-mtk.h | 6 ++- 2 files changed, 64 insertions(+), 16 deletions(-)
drivers/usb/host/xhci-mtk-sch.c +60 -14
@@ -378,6 +378,31 @@ static void update_bus_bw(struct mu3h_sc sch_ep->allocated = used; } +static int check_fs_bus_bw (struct mu3h_sch_ep_info *sch_ep,int offset) +{ +struct mu3h_sch_tt *tt = sch_ep->sch_tt; +u32 num_esit, tmp; +int base; +int i, j; + + num_esit =XHCI_MTK_MAX_ESIT / sch_ep->esit; +for (i =0 ; i < num_esit; i++) { + base = offset + i * sch_ep->esit; + +/* +* Compared with hs bus, no matter what ep type, +* the hub will always delay one uframe to send data +*/ +for (j =0 ; j < sch_ep->cs_count; j++) { + tmp = tt->fs_bus_bw[base + j] + sch_ep->bw_cost_per_microframe; +if (tmp >FS_PAYLOAD_MAX ) +return -ERANGE ; + } + } + +return 0 ; +} +static int check_sch_tt (struct usb_device *udev,struct mu3h_sch_ep_info *sch_ep,u32 offset) {
@@ -402,7 +427,7 @@ static int check_sch_tt(struct usb_devicreturn -ERANGE ;for (i =0 ; i < sch_ep->cs_count; i++) -if (test_bit (offset + i, tt->split_bit_map)) +if (test_bit (offset + i, tt->ss_bit_map))return -ERANGE ; }else {
@@ -432,7 +457,7 @@ static int check_sch_tt(struct usb_devic cs_count =7 ;/* HW limit */ for (i =0 ; i < cs_count +2 ; i++) { -if (test_bit (offset + i, tt->split_bit_map)) +if (test_bit (offset + i, tt->ss_bit_map))return -ERANGE ; }
@@ -448,24 +473,44 @@ static int check_sch_tt(struct usb_devic sch_ep->num_budget_microframes = sch_ep->esit; } -return 0 ; +return check_fs_bus_bw (sch_ep, offset); }static void update_sch_tt (struct usb_device *udev, -struct mu3h_sch_ep_info *sch_ep) +struct mu3h_sch_ep_info *sch_ep,bool used) {struct mu3h_sch_tt *tt = sch_ep->sch_tt;u32 base, num_esit; +int bw_updated; +int bits;int i, j; num_esit =XHCI_MTK_MAX_ESIT / sch_ep->esit; + bits = (sch_ep->ep_type ==ISOC_OUT_EP ) ? sch_ep->cs_count :1 ; + +if (used) + bw_updated = sch_ep->bw_cost_per_microframe; +else + bw_updated = -sch_ep->bw_cost_per_microframe; +for (i =0 ; i < num_esit; i++) { base = sch_ep->offset + i * sch_ep->esit; -for (j =0 ; j < sch_ep->num_budget_microframes; j++) -set_bit (base + j, tt->split_bit_map); + +for (j =0 ; j < bits; j++) { +if (used) +set_bit (base + j, tt->ss_bit_map); +else +clear_bit (base + j, tt->ss_bit_map); + } + +for (j =0 ; j < sch_ep->cs_count; j++) + tt->fs_bus_bw[base + j] += bw_updated; } -list_add_tail (&sch_ep->tt_endpoint, &tt->ep_list); +if (used) +list_add_tail (&sch_ep->tt_endpoint, &tt->ep_list); +else +list_del (&sch_ep->tt_endpoint); } static int check_sch_bw(struct usb_device *udev,
@@ -535,7 +580,7 @@ static int check_sch_bw(struct usb_devicif (!tt_offset_ok)return -ERANGE ; -update_sch_tt (udev, sch_ep); +update_sch_tt (udev, sch_ep,1 ); }/* update bus bandwidth info */
@@ -548,15 +593,16 @@ static void destroy_sch_ep(struct usb_de struct mu3h_sch_bw_info *sch_bw, struct mu3h_sch_ep_info *sch_ep) {/* only release ep bw check passed by check_sch_bw() */ -if (sch_ep->allocated) +if (sch_ep->allocated) {update_bus_bw (sch_bw, sch_ep,0 ); +if (sch_ep->sch_tt) +update_sch_tt (udev, sch_ep,0 ); + } -list_del (&sch_ep->endpoint); - -if (sch_ep->sch_tt) { -list_del (&sch_ep->tt_endpoint); +if (sch_ep->sch_tt)drop_tt (udev); - } + +list_del (&sch_ep->endpoint);kfree (sch_ep); }
drivers/usb/host/xhci-mtk.h +4 -2
@@ -20,13 +20,15 @@#define XHCI_MTK_MAX_ESIT 64/** -* @split_bit_map: used to avoid split microframes overlay +* @ss_bit_map: used to avoid start split microframes overlay +* @fs_bus_bw: array to keep track of bandwidth already used for FS * @ep_list: Endpoints using this TT * @usb_tt: usb TT related * @tt_port: TT port number */ struct mu3h_sch_tt { - DECLARE_BITMAP(split_bit_map, XHCI_MTK_MAX_ESIT); + DECLARE_BITMAP(ss_bit_map, XHCI_MTK_MAX_ESIT); +u32 fs_bus_bw[XHCI_MTK_MAX_ESIT ];struct list_head ep_list;struct usb_tt *usb_tt;int tt_port;
Greg Kroah-Hartman
maintainerPATCH 21/601 ASoC: samsung: tm2_wm5110: check of of_parse return value
In reply to Greg Kroah-HartmanFrom: Pierre-Louis Bossart <[email protected]>
commit d58970da324732686529655c21791cef0ee547c4 upstream.
cppcheck warning:
sound/soc/samsung/tm2_wm5110.c:605:6: style: Variable 'ret' is reassigned a value before the old one has been
used. [redundantAssignment]
ret = devm_snd_soc_register_component(dev, &tm2_component,
^
sound/soc/samsung/tm2_wm5110.c:554:7: note: ret is assigned
ret = of_parse_phandle_with_args(dev->of_node, "i2s-controller",
^
sound/soc/samsung/tm2_wm5110.c:605:6: note: ret is overwritten
ret = devm_snd_soc_register_component(dev, &tm2_component,
^The args is a stack variable, so it could have junk (uninitialized) therefore args.np could have a non-NULL and random value even though property was missing. Later could trigger invalid pointer dereference.
There's no need to check for args.np because args.np won't be initialized on errors.
--- sound/soc/samsung/tm2_wm5110.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/samsung/tm2_wm5110.c +1 -1
@@ -553,7 +553,7 @@ static int tm2_probe(struct platform_dev ret =of_parse_phandle_with_args (dev->of_node,"i2s-controller" , cells_name, i, &args); -if (!args.np) { +if (ret) {dev_err (dev,"i2s-controller property parse error: %d\n" , i); ret = -EINVAL ; goto dai_node_put;
Greg Kroah-Hartman
maintainerPATCH 22/601 ASoC: Intel: kbl_da7219_max98927: Fix kabylake_ssp_fixup function
In reply to Greg Kroah-HartmanFrom: Lukasz Majczak <[email protected]>
commit a523ef731ac6674dc07574f31bf44cc5bfa14e4d upstream.
kabylake_ssp_fixup function uses snd_soc_dpcm to identify the codecs DAIs. The HW parameters are changed based on the codec DAI of the stream. The earlier approach to get snd_soc_dpcm was using container_of() macro on snd_pcm_hw_params.
The structures have been modified over time and snd_soc_dpcm does not have snd_pcm_hw_params as a reference but as a copy. This causes the current driver to crash when used.
This patch changes the way snd_soc_dpcm is extracted. snd_soc_pcm_runtime holds 2 dpcm instances (one for playback and one for capture). 2 codecs on the SSP are dmic (capture) and speakers (playback). Based on the stream direction, snd_soc_dpcm is extracted from snd_soc_pcm_runtime.
Tested for all use cases of the driver.
Based on similar fix in kbl_rt5663_rt5514_max98927.c from Harsha Priya <[email protected]> and Vamshi Krishna Gopal <[email protected]>
--- sound/soc/intel/boards/kbl_da7219_max98927.c | 38 +++++++++++++++++++++------ 1 file changed, 30 insertions(+), 8 deletions(-)
sound/soc/intel/boards/kbl_da7219_max98927.c +30 -8
@@ -282,12 +282,34 @@ static int kabylake_ssp_fixup(struct sndstruct snd_interval *chan =hw_param_interval (params,SNDRV_PCM_HW_PARAM_CHANNELS );struct snd_mask *fmt =hw_param_mask (params,SNDRV_PCM_HW_PARAM_FORMAT ); -struct snd_soc_dpcm *dpcm =container_of ( - params, struct snd_soc_dpcm, hw_params); -struct snd_soc_dai_link *fe_dai_link = dpcm->fe->dai_link; -struct snd_soc_dai_link *be_dai_link = dpcm->be->dai_link; +struct snd_soc_dpcm *dpcm, *rtd_dpcm =NULL ;/* +* The following loop will be called only for playback stream +* In this platform, there is only one playback device on every SSP +*/ +for_each_dpcm_fe (rtd,SNDRV_PCM_STREAM_PLAYBACK , dpcm) { + rtd_dpcm = dpcm; +break ; + } + +/* +* This following loop will be called only for capture stream +* In this platform, there is only one capture device on every SSP +*/ +for_each_dpcm_fe (rtd,SNDRV_PCM_STREAM_CAPTURE , dpcm) { + rtd_dpcm = dpcm; +break ; + } + +if (!rtd_dpcm) +return -EINVAL ; + +/* +* The above 2 loops are mutually exclusive based on the stream direction, +* thus rtd_dpcm variable will never be overwritten +*/ +/* * Topology for kblda7219m98373 & kblmax98373 supports only S24_LE, * where as kblda7219m98927 & kblmax98927 supports S16_LE by default. * Skipping the port wise FE and BE configuration for kblda7219m98373 &
@@ -309,9 +331,9 @@ static int kabylake_ssp_fixup(struct snd/* * The ADSP will convert the FE rate to 48k, stereo, 24 bit */ -if (!strcmp (fe_dai_link->name,"Kbl Audio Port" ) || - !strcmp (fe_dai_link->name,"Kbl Audio Headset Playback" ) || - !strcmp (fe_dai_link->name,"Kbl Audio Capture Port" )) { +if (!strcmp (rtd_dpcm->fe->dai_link->name,"Kbl Audio Port" ) || + !strcmp (rtd_dpcm->fe->dai_link->name,"Kbl Audio Headset Playback" ) || + !strcmp (rtd_dpcm->fe->dai_link->name,"Kbl Audio Capture Port" )) { rate->min = rate->max =48000 ; chan->min = chan->max =2 ;snd_mask_none (fmt);
@@ -322,7 +344,7 @@ static int kabylake_ssp_fixup(struct snd* The speaker on the SSP0 supports S16_LE and not S24_LE. * thus changing the mask here */ -if (!strcmp (be_dai_link->name,"SSP0-Codec" )) +if (!strcmp (rtd_dpcm->be->dai_link->name,"SSP0-Codec" ))snd_mask_set_format (fmt,SNDRV_PCM_FORMAT_S16_LE );return 0 ;
Greg Kroah-Hartman
maintainerPATCH 23/601 ASoC: tlv320aic32x4: Register clocks before registering component
In reply to Greg Kroah-HartmanFrom: Annaliese McDermond <[email protected]>
commit 1ca1156cfd69530e6b7cb99943baf90c8bd871a5 upstream.
Clock registration must be performed before the component is registered. aic32x4_component_probe attempts to get all the clocks right off the bat. If the component is registered before the clocks there is a race condition where the clocks may not be registered by the time aic32x4_componet_probe actually runs.
--- sound/soc/codecs/tlv320aic32x4.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
sound/soc/codecs/tlv320aic32x4.c +4 -4
@@ -1243,6 +1243,10 @@ int aic32x4_probe(struct device *dev, stif (ret) goto err_disable_regulators; + ret =aic32x4_register_clocks (dev, aic32x4->mclk_name); +if (ret) + goto err_disable_regulators; + ret =devm_snd_soc_register_component (dev, &soc_component_dev_aic32x4, &aic32x4_dai,1 );if (ret) {
@@ -1250,10 +1254,6 @@ int aic32x4_probe(struct device *dev, st goto err_disable_regulators; } - ret =aic32x4_register_clocks (dev, aic32x4->mclk_name); -if (ret) - goto err_disable_regulators; -return 0 ; err_disable_regulators:
Greg Kroah-Hartman
maintainerPATCH 24/601 ASoC: tlv320aic32x4: Increase maximum register in regmap
In reply to Greg Kroah-HartmanFrom: Annaliese McDermond <[email protected]>
commit 29654ed8384e9dbaf4cfba689dbcb664a6ab4bb7 upstream.
AIC32X4_REFPOWERUP was added as a register, but the maximum register value in the regmap and regmap range was not correspondingly increased. This caused an error when this register was attempted to be written.
--- sound/soc/codecs/tlv320aic32x4.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/tlv320aic32x4.c +2 -2
@@ -577,12 +577,12 @@ static const struct regmap_range_cfg aic .window_start = 0, .window_len = 128, .range_min = 0, - .range_max = AIC32X4_RMICPGAVOL, + .range_max = AIC32X4_REFPOWERUP, }, };const struct regmap_config aic32x4_regmap_config = { - .max_register =AIC32X4_RMICPGAVOL , + .max_register =AIC32X4_REFPOWERUP , .ranges = aic32x4_regmap_pages, .num_ranges =ARRAY_SIZE (aic32x4_regmap_pages), };
Greg Kroah-Hartman
maintainerPATCH 25/601 MIPS: pci-mt7620: fix PLL lock check
In reply to Greg Kroah-HartmanFrom: Ilya Lipnitskiy <[email protected]>
commit c15b99ae2ba9ea30da3c7cd4765b8a4707e530a6 upstream.
Upstream a long-standing OpenWrt patch [0] that fixes MT7620 PCIe PLL lock check. The existing code checks the wrong register bit: PPLL_SW_SET is not defined in PPLL_CFG1 and bit 31 of PPLL_CFG1 is marked as reserved in the MT7620 Programming Guide. The correct bit to check for PLL lock is PPLL_LD (bit 23).
Also reword the error message for clarity.
Without this change it is unlikely that this driver ever worked with mainline kernel.
[0]: https://lists.infradead.org/pipermail/lede-commits/2017-July/004441.html
--- arch/mips/pci/pci-mt7620.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
arch/mips/pci/pci-mt7620.c +3 -2
@@ -30,6 +30,7 @@#define RALINK_GPIOMODE 0x60#define PPLL_CFG1 0x9c +#define PPLL_LD BIT(23)#define PPLL_DRV 0xa0#define PDRV_SW_SET BIT(31)
@@ -239,8 +240,8 @@ static int mt7620_pci_hw_init(struct plart_sysc_m32 (0 ,RALINK_PCIE0_CLK_EN ,RALINK_CLKCFG1 );mdelay (100 ); -if (!(rt_sysc_r32 (PPLL_CFG1 ) &PDRV_SW_SET )) { -dev_err (&pdev->dev,"MT7620 PPLL unlock\n" ); +if (!(rt_sysc_r32 (PPLL_CFG1 ) &PPLL_LD )) { +dev_err (&pdev->dev,"pcie PLL not locked, aborting init\n" );reset_control_assert (rstpcie0);rt_sysc_m32 (RALINK_PCIE0_CLK_EN ,0 ,RALINK_CLKCFG1 );return -1 ;
_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek
Greg Kroah-Hartman
maintainerPATCH 26/601 MIPS: pci-rt2880: fix slot 0 configuration
In reply to Greg Kroah-HartmanFrom: Ilya Lipnitskiy <[email protected]>
commit 8e98b697006d749d745d3b174168a877bb96c500 upstream.
pci_fixup_irqs() used to call pcibios_map_irq on every PCI device, which for RT2880 included bus 0 slot 0. After pci_fixup_irqs() got removed, only slots/funcs with devices attached would be called. While arguably the right thing, that left no chance for this driver to ever initialize slot 0, effectively bricking PCI and USB on RT2880 devices such as the Belkin F5D8235-4 v1.
Slot 0 configuration needs to happen after PCI bus enumeration, but before any device at slot 0x11 (func 0 or 1) is talked to. That was determined empirically by testing on a Belkin F5D8235-4 v1 device. A minimal BAR 0 config write followed by read, then setting slot 0 PCI_COMMAND to MASTER | IO | MEMORY is all that seems to be required for proper functionality.
Tested by ensuring that full- and high-speed USB devices get enumerated on the Belkin F5D8235-4 v1 (with an out of tree DTS file from OpenWrt).
--- arch/mips/pci/pci-rt2880.c | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-)
arch/mips/pci/pci-rt2880.c +24 -13
@@ -180,7 +180,6 @@ static inline void rt2880_pci_write_u32(int pcibios_map_irq (const struct pci_dev *dev,u8 slot,u8 pin) { -u16 cmd;int irq =-1 ;if (dev->bus->number !=0 )
@@ -188,8 +187,6 @@ int pcibios_map_irq(const struct pci_devswitch (PCI_SLOT (dev->devfn)) {case 0x00 : -rt2880_pci_write_u32 (PCI_BASE_ADDRESS_0 ,0x08000000 ); - (void )rt2880_pci_read_u32 (PCI_BASE_ADDRESS_0 );break ;case 0x11 : irq =RT288X_CPU_IRQ_PCI ;
@@ -201,16 +198,6 @@ int pcibios_map_irq(const struct pci_devbreak ; } -pci_write_config_byte ((struct pci_dev *) dev, -PCI_CACHE_LINE_SIZE ,0x14 ); -pci_write_config_byte ((struct pci_dev *) dev,PCI_LATENCY_TIMER ,0xFF ); -pci_read_config_word ((struct pci_dev *) dev,PCI_COMMAND , &cmd); - cmd |=PCI_COMMAND_MASTER |PCI_COMMAND_IO |PCI_COMMAND_MEMORY | -PCI_COMMAND_INVALIDATE |PCI_COMMAND_FAST_BACK | -PCI_COMMAND_SERR |PCI_COMMAND_WAIT |PCI_COMMAND_PARITY ; -pci_write_config_word ((struct pci_dev *) dev,PCI_COMMAND , cmd); -pci_write_config_byte ((struct pci_dev *) dev,PCI_INTERRUPT_LINE , - dev->irq);return irq; }
@@ -251,6 +238,30 @@ static int rt288x_pci_probe(struct platfint pcibios_plat_dev_init (struct pci_dev *dev) { +static bool slot0_init; + +/* +* Nobody seems to initialize slot 0, but this platform requires it, so +* do it once when some other slot is being enabled. The PCI subsystem +* should configure other slots properly, so no need to do anything +* special for those. +*/ +if (!slot0_init && dev->bus->number ==0 ) { +u16 cmd; +u32 bar0; + + slot0_init = true; + +pci_bus_write_config_dword (dev->bus,0 ,PCI_BASE_ADDRESS_0 , +0x08000000 ); +pci_bus_read_config_dword (dev->bus,0 ,PCI_BASE_ADDRESS_0 , + &bar0); + +pci_bus_read_config_word (dev->bus,0 ,PCI_COMMAND , &cmd); + cmd |=PCI_COMMAND_MASTER |PCI_COMMAND_IO |PCI_COMMAND_MEMORY ; +pci_bus_write_config_word (dev->bus,0 ,PCI_COMMAND , cmd); + } +return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 27/601 FDDI: defxx: Bail out gracefully with unassigned PCI resource for CSR
In reply to Greg Kroah-HartmanFrom: Maciej W. Rozycki <[email protected]>
commit f626ca682912fab55dff15469ce893ae16b65c7e upstream.
Recent versions of the PCI Express specification have deprecated support for I/O transactions and actually some PCIe host bridges, such as Power Systems Host Bridge 4 (PHB4), do not implement them.
For those systems the PCI BARs that request a mapping in the I/O space have the length recorded in the corresponding PCI resource set to zero, which makes it unassigned:
# lspci -s 0031:02:04.0 -v 0031:02:04.0 FDDI network controller: Digital Equipment Corporation PCI-to-PDQ Interface Chip [PFI] FDDI (DEFPA) (rev 02) Subsystem: Digital Equipment Corporation FDDIcontroller/PCI (DEFPA) Flags: bus master, medium devsel, latency 136, IRQ 57, NUMA node 8 Memory at 620c080020000 (32-bit, non-prefetchable) [size=128] I/O ports at <unassigned> [disabled] Memory at 620c080030000 (32-bit, non-prefetchable) [size=64K] Capabilities: [50] Power Management version 2 Kernel driver in use: defxx Kernel modules: defxx
#
Regardless the driver goes ahead and requests it (here observed with a Raptor Talos II POWER9 system), resulting in an odd /proc/ioport entry:
# cat /proc/ioports 00000000-ffffffffffffffff : 0031:02:04.0 #
Furthermore, the system gets confused as the driver actually continues and pokes at those locations, causing a flood of messages being output to the system console by the underlying system firmware, like:
defxx: v1.11 2014/07/01 Lawrence V. Stefani and others defxx 0031:02:04.0: enabling device (0140 -> 0142) LPC[000]: Got SYNC no-response error. Error address reg: 0xd0010000
IPMI: dropping non severe PEL event
LPC[000]: Got SYNC no-response error. Error address reg: 0xd0010014
IPMI: dropping non severe PEL event
LPC[000]: Got SYNC no-response error. Error address reg: 0xd0010014
IPMI: dropping non severe PEL event
and so on and so on (possibly intermixed actually, as there's no locking between the kernel and the firmware in console port access with this particular system, but cleaned up above for clarity), and once some 10k of such pairs of the latter two messages have been produced an interace eventually shows up in a useless state:
0031:02:04.0: DEFPA at I/O addr = 0x0, IRQ = 57, Hardware addr = 00-00-00-00-00-00
This was not expected to happen as resource handling was added to the driver a while ago, because it was not known at that time that a PCI system would be possible that cannot assign port I/O resources, and oddly enough `request_region' does not fail, which would have caught it.
Correct the problem then by checking for the length of zero for the CSR resource and bail out gracefully refusing to register an interface if that turns out to be the case, producing messages like:
defxx: v1.11 2014/07/01 Lawrence V. Stefani and others 0031:02:04.0: Cannot use I/O, no address set, aborting 0031:02:04.0: Recompile driver with "CONFIG_DEFXX_MMIO=y"
Keep the original check for the EISA MMIO resource as implemented, because in that case the length is hardwired to 0x400 as a consequence of how the compare/mask address decoding works in the ESIC chip and it is only the base address that is set to zero if MMIO has been disabled for the adapter in EISA configuration, which in turn could be a valid bus address in a legacy-free system implementing PCI, especially for port I/O.
Where the EISA MMIO resource has been disabled for the adapter in EISA configuration this arrangement keeps producing messages like:
eisa 00:05: EISA: slot 5: DEC3002 detected
defxx: v1.11 2014/07/01 Lawrence V. Stefani and others 00:05: Cannot use MMIO, no address set, aborting 00:05: Recompile driver with "CONFIG_DEFXX_MMIO=n" 00:05: Or run ECU and set adapter's MMIO location
with the last two lines now swapped for easier handling in the driver.
There is no need to check for and catch the case of a port I/O resource not having been assigned for EISA as the adapter uses the slot-specific I/O space, which gets assigned by how EISA has been specified and maps directly to the particular slot an option card has been placed in. And the EISA variant of the adapter has additional registers that are only accessible via the port I/O space anyway.
While at it factor out the error message calls into helpers and fix an argument order bug with the pr_err' call now in dfx_register_res_err'.
--- drivers/net/fddi/defxx.c | 47 ++++++++++++++++++++++++++++++----------------- 1 file changed, 30 insertions(+), 17 deletions(-)
drivers/net/fddi/defxx.c +30 -17
@@ -495,6 +495,25 @@ static const struct net_device_ops dfx_n .ndo_set_mac_address = dfx_ctl_set_mac_address, }; +static void dfx_register_res_alloc_err (const char *print_name,bool mmio, +bool eisa) +{ +pr_err ("%s: Cannot use %s, no address set, aborting\n" , + print_name, mmio ?"MMIO" :"I/O" ); +pr_err ("%s: Recompile driver with \"CONFIG_DEFXX_MMIO=%c\"\n" , + print_name, mmio ?'n' :'y' ); +if (eisa && mmio) +pr_err ("%s: Or run ECU and set adapter's MMIO location\n" , + print_name); +} + +static void dfx_register_res_err (const char *print_name,bool mmio, +unsigned long start,unsigned long len) +{ +pr_err ("%s: Cannot reserve %s resource 0x%lx @ 0x%lx, aborting\n" , + print_name, mmio ?"MMIO" :"I/O" , len, start); +} +/* * ================ * = dfx_register =
@@ -568,15 +587,12 @@ static int dfx_register(struct device *bdev_set_drvdata (bdev, dev);dfx_get_bars (bdev, bar_start, bar_len); -if (dfx_bus_eisa && dfx_use_mmio && bar_start[0 ] ==0 ) { -pr_err ("%s: Cannot use MMIO, no address set, aborting\n" , - print_name); -pr_err ("%s: Run ECU and set adapter's MMIO location\n" , - print_name); -pr_err ("%s: Or recompile driver with \"CONFIG_DEFXX_MMIO=n\"" -"\n" , print_name); +if (bar_len[0 ] ==0 || + (dfx_bus_eisa && dfx_use_mmio && bar_start[0 ] ==0 )) { +dfx_register_res_alloc_err (print_name, dfx_use_mmio, + dfx_bus_eisa); err = -ENXIO ; - goto err_out; + goto err_out_disable; }if (dfx_use_mmio)
@@ -585,18 +601,16 @@ static int dfx_register(struct device *belse region =request_region (bar_start[0 ], bar_len[0 ], print_name);if (!region) { -pr_err ("%s: Cannot reserve %s resource 0x%lx @ 0x%lx, " -"aborting\n" , dfx_use_mmio ?"MMIO" :"I/O" , print_name, - (long )bar_len[0 ], (long )bar_start[0 ]); +dfx_register_res_err (print_name, dfx_use_mmio, + bar_start[0 ], bar_len[0 ]); err = -EBUSY ; goto err_out_disable; }if (bar_start[1 ] !=0 ) { region =request_region (bar_start[1 ], bar_len[1 ], print_name);if (!region) { -pr_err ("%s: Cannot reserve I/O resource " -"0x%lx @ 0x%lx, aborting\n" , print_name, - (long )bar_len[1 ], (long )bar_start[1 ]); +dfx_register_res_err (print_name,0 , + bar_start[1 ], bar_len[1 ]); err = -EBUSY ; goto err_out_csr_region; }
@@ -604,9 +618,8 @@ static int dfx_register(struct device *bif (bar_start[2 ] !=0 ) { region =request_region (bar_start[2 ], bar_len[2 ], print_name);if (!region) { -pr_err ("%s: Cannot reserve I/O resource " -"0x%lx @ 0x%lx, aborting\n" , print_name, - (long )bar_len[2 ], (long )bar_start[2 ]); +dfx_register_res_err (print_name,0 , + bar_start[2 ], bar_len[2 ]); err = -EBUSY ; goto err_out_bh_region; }
Greg Kroah-Hartman
maintainerPATCH 28/601 PCI: Allow VPD access for QLogic ISP2722
In reply to Greg Kroah-HartmanFrom: Arun Easi <[email protected]>
commit e00dc69b5f17c444a38cd9745a0f76bc989b3af4 upstream.
0d5370d1d852 ("PCI: Prevent VPD access for QLogic ISP2722") disabled access to VPD of the ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter because reading past the end of the VPD caused NMIs.
104daa71b396 ("PCI: Determine actual VPD size on first access") limits reads to the actual size of VPD, which should prevent these NMIs.
104daa71b396 was merged *before* 0d5370d1d852, but we think the testing that prompted 0d5370d1d852 ("PCI: Prevent VPD access for QLogic ISP2722") was done with a kernel that lacked 104daa71b396. See [1, 2].
Remove the quirk added by 0d5370d1d852 ("PCI: Prevent VPD access for QLogic ISP2722") so customers can read the HBA VPD.
[1] https://lore.kernel.org/linux-pci/alpine.LRH.2.21.9999.2012161641230.28924@irv1user01.caveonetworks.com/
[2] https://lore.kernel.org/linux-pci/alpine.LRH.2.21.9999.2104071535110.13940@irv1user01.caveonetworks.com/
--- drivers/pci/vpd.c | 1 - 1 file changed, 1 deletion(-)
drivers/pci/vpd.c +0 -1
@@ -570,7 +570,6 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_LSDECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_LSI_LOGIC ,0x005f , quirk_blacklist_vpd);DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_ATTANSIC ,PCI_ANY_ID , quirk_blacklist_vpd); -DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_QLOGIC ,0x2261 , quirk_blacklist_vpd);/* * The Amazon Annapurna Labs 0x0031 device id is reused for other non Root Port * device types, so the quirk is registered for the PCI_CLASS_BRIDGE_PCI class.
Greg Kroah-Hartman
maintainerPATCH 29/601 KVM: x86: Defer the MMU unload to the normal path on an global INVPCID
In reply to Greg Kroah-HartmanFrom: Sean Christopherson <[email protected]>
commit f66c53b3b94f658590e1012bf6d922f8b7e01bda upstream.
Defer unloading the MMU after a INVPCID until the instruction emulation has completed, i.e. until after RIP has been updated.
On VMX, this is a benign bug as VMX doesn't touch the MMU when skipping an emulated instruction. However, on SVM, if nrip is disabled, the emulator is used to skip an instruction, which would lead to fireworks if the emulator were invoked without a valid MMU.
Message-Id: <[email protected]>
--- arch/x86/kvm/x86.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kvm/x86.c +1 -1
@@ -11407,7 +11407,7 @@ int kvm_handle_invpcid(struct kvm_vcpu * fallthrough;case INVPCID_TYPE_ALL_INCL_GLOBAL : -kvm_mmu_unload (vcpu); +kvm_make_request (KVM_REQ_MMU_RELOAD , vcpu);return kvm_skip_emulated_instruction (vcpu);default :
Greg Kroah-Hartman
maintainerPATCH 30/601 PCI: xgene: Fix cfg resource mapping
In reply to Greg Kroah-HartmanFrom: Dejin Zheng <[email protected]>
commit d4707d79fae08c8996a1ba45965a491045a22dda upstream.
In commit e2dcd20b1645 a change was made to use devm_platform_ioremap_resource_byname() to simplify code and remove the res variable; this was wrong since the res variable is still needed and as an outcome the port->cfg_addr gets an erroneous address.
Revert the change going back to original behaviour.
--- drivers/pci/controller/pci-xgene.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/pci/controller/pci-xgene.c +2 -1
@@ -353,7 +353,8 @@ static int xgene_pcie_map_reg(struct xgeif (IS_ERR (port->csr_base))return PTR_ERR (port->csr_base); - port->cfg_base =devm_platform_ioremap_resource_byname (pdev,"cfg" ); + res =platform_get_resource_byname (pdev,IORESOURCE_MEM ,"cfg" ); + port->cfg_base =devm_ioremap_resource (dev, res);if (IS_ERR (port->cfg_base))return PTR_ERR (port->cfg_base); port->cfg_addr = res->start;
Greg Kroah-Hartman
maintainerPATCH 31/601 PCI: keystone: Let AM65 use the pci_ops defined in pcie-designware-host.c
In reply to Greg Kroah-HartmanFrom: Kishon Vijay Abraham I <[email protected]>
commit 3d0b2a3a87ce5ae85de46c4241afd52ab8b566fe upstream.
Both TI's AM65x (K3) and TI's K2 PCIe driver are implemented in pci-keystone. However Only K2 PCIe driver should use it's own pci_ops for configuration space accesses. But commit 10a797c6e54a ("PCI: dwc: keystone: Use pci_ops for config space accessors") used custom pci_ops for both AM65x and K2. This breaks configuration space access for AM65x platform. Fix it here.
--- drivers/pci/controller/dwc/pci-keystone.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/pci/controller/dwc/pci-keystone.c +2 -1
@@ -798,7 +798,8 @@ static int __init ks_pcie_host_init(struint ret; pp->bridge->ops = &ks_pcie_ops; - pp->bridge->child_ops = &ks_child_pcie_ops; +if (!ks_pcie->is_am6) + pp->bridge->child_ops = &ks_child_pcie_ops; ret =ks_pcie_config_legacy_irq (ks_pcie);if (ret)
Greg Kroah-Hartman
maintainerPATCH 32/601 PM / devfreq: Unlock mutex and free devfreq struct in error path
In reply to Greg Kroah-HartmanFrom: Lukasz Luba <[email protected]>
commit 8b50a7995770d41a2e8d9c422cd2882aca0dedd2 upstream.
The devfreq->lock is held for time of setup. Release the lock in the error path, before jumping to the end of the function.
Change the goto destination which frees the allocated memory.
--- drivers/devfreq/devfreq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/devfreq/devfreq.c +2 -1
@@ -818,7 +818,8 @@ struct devfreq *devfreq_add_device(strucif (devfreq->profile->timer <0 || devfreq->profile->timer >=DEVFREQ_TIMER_NUM ) { - goto err_out; +mutex_unlock (&devfreq->lock); + goto err_dev; }if (!devfreq->profile->max_state && !devfreq->profile->freq_table) {
Greg Kroah-Hartman
maintainerPATCH 33/601 soc/tegra: regulators: Fix locking up when voltage-spread is out of range
In reply to Greg Kroah-HartmanFrom: Dmitry Osipenko <[email protected]>
commit ef85bb582c41524e9e68dfdbde48e519dac4ab3d upstream.
Fix voltage coupler lockup which happens when voltage-spread is out of range due to a bug in the code. The max-spread requirement shall be accounted when CPU regulator doesn't have consumers. This problem is observed on Tegra30 Ouya game console once system-wide DVFS is enabled in a device-tree.
--- drivers/soc/tegra/regulators-tegra30.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/tegra/regulators-tegra30.c +1 -1
@@ -178,7 +178,7 @@ static int tegra30_voltage_update(struct* survive the voltage drop if it's running on a higher frequency. */ if (!cpu_min_uV_consumers) - cpu_min_uV = cpu_uV; + cpu_min_uV =max (cpu_uV, cpu_min_uV);/* * Bootloader shall set up voltages correctly, but if it
Greg Kroah-Hartman
maintainerPATCH 34/601 iio: inv_mpu6050: Fully validate gyro and accel scale writes
In reply to Greg Kroah-HartmanFrom: Lars-Peter Clausen <[email protected]>
commit e09fe9135399807b8397798a53160e055dc6c29f upstream.
When setting the gyro or accelerometer scale the inv_mpu6050 driver ignores the integer part of the value. As a result e.g. all of 0.13309, 1.13309, 12345.13309, ... are accepted as a valid gyro scale and 0.13309 is the scale that gets set in all those cases.
Make sure to check that the integer part of the scale value is 0 and reject it otherwise.
--- drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-)
drivers/iio/imu/inv_mpu6050/inv_mpu_core.c +14 -6
@@ -723,12 +723,16 @@ inv_mpu6050_read_raw(struct iio_dev *ind } } -static int inv_mpu6050_write_gyro_scale (struct inv_mpu6050_state *st,int val) +static int inv_mpu6050_write_gyro_scale (struct inv_mpu6050_state *st,int val, +int val2) {int result, i; +if (val !=0 ) +return -EINVAL ; +for (i =0 ; i <ARRAY_SIZE (gyro_scale_6050); ++i) { -if (gyro_scale_6050[i] == val) { +if (gyro_scale_6050[i] == val2) { result =inv_mpu6050_set_gyro_fsr (st, i);if (result)return result;
@@ -759,13 +763,17 @@ static int inv_write_raw_get_fmt(structreturn -EINVAL ; } -static int inv_mpu6050_write_accel_scale (struct inv_mpu6050_state *st,int val) +static int inv_mpu6050_write_accel_scale (struct inv_mpu6050_state *st,int val, +int val2) {int result, i;u8 d; +if (val !=0 ) +return -EINVAL ; +for (i =0 ; i <ARRAY_SIZE (accel_scale); ++i) { -if (accel_scale[i] == val) { +if (accel_scale[i] == val2) { d = (i <<INV_MPU6050_ACCL_CONFIG_FSR_SHIFT ); result =regmap_write (st->map, st->reg->accl_config, d);if (result)
@@ -806,10 +814,10 @@ static int inv_mpu6050_write_raw(structcase IIO_CHAN_INFO_SCALE :switch (chan->type) {case IIO_ANGL_VEL : - result =inv_mpu6050_write_gyro_scale (st, val2); + result =inv_mpu6050_write_gyro_scale (st, val, val2);break ;case IIO_ACCEL : - result =inv_mpu6050_write_accel_scale (st, val2); + result =inv_mpu6050_write_accel_scale (st, val, val2);break ;default : result = -EINVAL ;
Greg Kroah-Hartman
maintainerPATCH 35/601 iio: sx9310: Fix write_.._debounce()
In reply to Greg Kroah-HartmanFrom: Gwendal Grignou <[email protected]>
commit fc948409ccc1e8afe8655cee77c686eedbfbee60 upstream.
Check input to be sure it matches Semtech sx9310 specification and can fit into debounce register.
Compare argument writen to thresh_.._period with read from same sysfs attribute:
Before: Afer: write | read write | read -1 | 8 -1 fails: -EINVAL 0 | 8 0 | 0 1 | 0 1 | 0 2..15 | 2^log2(N) 2..15 | 2^log2(N) 16 | 0 >= 16 fails: -EINVAL
--- drivers/iio/proximity/sx9310.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
drivers/iio/proximity/sx9310.c +10 -2
@@ -763,7 +763,11 @@ static int sx9310_write_far_debounce(strint ret;unsigned int regval; - val =ilog2 (val); +if (val >0 ) + val =ilog2 (val); +if (!FIELD_FIT (SX9310_REG_PROX_CTRL10_FAR_DEBOUNCE_MASK , val)) +return -EINVAL ; + regval =FIELD_PREP (SX9310_REG_PROX_CTRL10_FAR_DEBOUNCE_MASK , val);mutex_lock (&data->mutex);
@@ -780,7 +784,11 @@ static int sx9310_write_close_debounce(sint ret;unsigned int regval; - val =ilog2 (val); +if (val >0 ) + val =ilog2 (val); +if (!FIELD_FIT (SX9310_REG_PROX_CTRL10_CLOSE_DEBOUNCE_MASK , val)) +return -EINVAL ; + regval =FIELD_PREP (SX9310_REG_PROX_CTRL10_CLOSE_DEBOUNCE_MASK , val);mutex_lock (&data->mutex);
Greg Kroah-Hartman
maintainerPATCH 36/601 iio:accel:adis16201: Fix wrong axis assignment that prevents loading
In reply to Greg Kroah-HartmanFrom: Jonathan Cameron <[email protected]>
commit 4e102429f3dc62dce546f6107e34a4284634196d upstream.
Whilst running some basic tests as part of writing up the dt-bindings for this driver (to follow), it became clear it doesn't actually load currently.
iio iio:device1: tried to double register : in_incli_x_index adis16201 spi0.0: Failed to create buffer sysfs interfaces
adis16201: probe of spi0.0 failed with error -16
Looks like a cut and paste / update bug. Fixes tag obviously not accurate but we don't want to bother carry thing back to before the driver moved out of staging.
--- drivers/iio/accel/adis16201.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/accel/adis16201.c +1 -1
@@ -215,7 +215,7 @@ static const struct iio_chan_spec adis16ADIS_AUX_ADC_CHAN (ADIS16201_AUX_ADC_REG ,ADIS16201_SCAN_AUX_ADC ,0 ,12 ),ADIS_INCLI_CHAN (X ,ADIS16201_XINCL_OUT_REG ,ADIS16201_SCAN_INCLI_X ,BIT (IIO_CHAN_INFO_CALIBBIAS ),0 ,14 ), -ADIS_INCLI_CHAN (X ,ADIS16201_YINCL_OUT_REG ,ADIS16201_SCAN_INCLI_Y , +ADIS_INCLI_CHAN (Y ,ADIS16201_YINCL_OUT_REG ,ADIS16201_SCAN_INCLI_Y ,BIT (IIO_CHAN_INFO_CALIBBIAS ),0 ,14 ), IIO_CHAN_SOFT_TIMESTAMP(7) };
Greg Kroah-Hartman
maintainerPATCH 37/601 iio:adc:ad7476: Fix remove handling
In reply to Greg Kroah-HartmanFrom: Jonathan Cameron <[email protected]>
commit 6baee4bd63f5fdf1716f88e95c21a683e94fe30d upstream.
This driver was in an odd half way state between devm based cleanup and manual cleanup (most of which was missing).
I would guess something went wrong with a rebase or similar. Anyhow, this basically finishes the job as a precursor to improving the regulator handling.
--- drivers/iio/adc/ad7476.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-)
drivers/iio/adc/ad7476.c +4 -14
@@ -316,25 +316,15 @@ static int ad7476_probe(struct spi_devicspi_message_init (&st->msg);spi_message_add_tail (&st->xfer, &st->msg); - ret =iio_triggered_buffer_setup (indio_dev,NULL , - &ad7476_trigger_handler,NULL ); + ret =devm_iio_triggered_buffer_setup (&spi->dev, indio_dev,NULL , + &ad7476_trigger_handler,NULL );if (ret) - goto error_disable_reg; +return ret;if (st->chip_info->reset) st->chip_info->reset (st); - ret =iio_device_register (indio_dev); -if (ret) - goto error_ring_unregister; -return 0 ; - -error_ring_unregister: -iio_triggered_buffer_cleanup (indio_dev); -error_disable_reg: -regulator_disable (st->reg); - -return ret; +return devm_iio_device_register (&spi->dev, indio_dev); }static const struct spi_device_id ad7476_id[] = {
Greg Kroah-Hartman
maintainerPATCH 38/601 iio: sx9310: Fix access to variable DT array
In reply to Greg Kroah-HartmanFrom: Gwendal Grignou <[email protected]>
commit 6f0078ae704d94b1a93e5f3d0a44cf3d8090fa91 upstream.
With the current code, we want to read 4 entries from DT array "semtech,combined-sensors". If there are less, we silently fail as of_property_read_u32_array() returns -EOVERFLOW.
First count the number of entries and if between 1 and 4, collect the content of the array.
--- drivers/iio/proximity/sx9310.c | 40 ++++++++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 12 deletions(-)
drivers/iio/proximity/sx9310.c +28 -12
@@ -1221,17 +1221,17 @@ static int sx9310_init_compensation(stru }static const struct sx9310_reg_default * -sx9310_get_default_reg (struct sx9310_data *data,int i, +sx9310_get_default_reg (struct sx9310_data *data,int idx,struct sx9310_reg_default *reg_def) { -int ret;const struct device_node *np = data->client->dev.of_node; -u32 combined[SX9310_NUM_CHANNELS ] = {4 ,4 ,4 ,4 }; +u32 combined[SX9310_NUM_CHANNELS ]; +u32 start =0 , raw =0 , pos =0 ;unsigned long comb_mask =0 ; +int ret, i, count;const char *res; -u32 start =0 , raw =0 , pos =0 ; -memcpy (reg_def, &sx9310_default_regs[i],sizeof (*reg_def)); +memcpy (reg_def, &sx9310_default_regs[idx],sizeof (*reg_def));if (!np)return reg_def;
@@ -1242,15 +1242,31 @@ sx9310_get_default_reg(struct sx9310_dat reg_def->def |=SX9310_REG_PROX_CTRL2_SHIELDEN_GROUND ; } - reg_def->def &= ~SX9310_REG_PROX_CTRL2_COMBMODE_MASK ; -of_property_read_u32_array (np,"semtech,combined-sensors" , - combined,ARRAY_SIZE (combined)); -for (i =0 ; i <ARRAY_SIZE (combined); i++) { -if (combined[i] <=SX9310_NUM_CHANNELS ) - comb_mask |=BIT (combined[i]); + count =of_property_count_elems_of_size (np,"semtech,combined-sensors" , +sizeof (u32)); +if (count >0 && count <=ARRAY_SIZE (combined)) { + ret =of_property_read_u32_array (np,"semtech,combined-sensors" , + combined, count); +if (ret) +break ; + }else { +/* +* Either the property does not exist in the DT or the +* number of entries is incorrect. +*/ +break ; } +for (i =0 ; i < count; i++) { +if (combined[i] >=SX9310_NUM_CHANNELS ) { +/* Invalid sensor (invalid DT). */ +break ; + } + comb_mask |=BIT (combined[i]); + } +if (i < count) +break ; - comb_mask &=0xf ; + reg_def->def &= ~SX9310_REG_PROX_CTRL2_COMBMODE_MASK ;if (comb_mask == (BIT (3 ) |BIT (2 ) |BIT (1 ) |BIT (0 ))) reg_def->def |=SX9310_REG_PROX_CTRL2_COMBMODE_CS0_CS1_CS2_CS3 ;else if (comb_mask == (BIT (1 ) |BIT (2 )))
Greg Kroah-Hartman
maintainerPATCH 39/601 sc16is7xx: Defer probe if device read fails
In reply to Greg Kroah-HartmanFrom: Annaliese McDermond <[email protected]>
commit 158e800e0fde91014812f5cdfb92ce812e3a33b4 upstream.
A test was added to the probe function to ensure the device was actually connected and working before successfully completing a probe. If the device was actually there, but the I2C bus was not ready yet for whatever reason, the probe fails permanently.
Change the probe so that we defer the probe on a regmap read failure so that we try the probe again when the dependent drivers are potentially loaded. This should not affect the case where the device truly isn't present because the probe will never successfully complete.
--- drivers/tty/serial/sc16is7xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/sc16is7xx.c +1 -1
@@ -1196,7 +1196,7 @@ static int sc16is7xx_probe(struct device ret =regmap_read (regmap,SC16IS7XX_LSR_REG <<SC16IS7XX_REG_SHIFT , &val);if (ret <0 ) -return ret; +return -EPROBE_DEFER ;/* Alloc port structure */ s =devm_kzalloc (dev,struct_size (s, p, devtype->nr_uart),GFP_KERNEL );
Greg Kroah-Hartman
maintainerPATCH 40/601 phy: cadence: Sierra: Fix PHY power_on sequence
In reply to Greg Kroah-HartmanFrom: Kishon Vijay Abraham I <[email protected]>
commit 5b4f5757f83be34d1428a1ffbb68d4a1966e9aae upstream.
Commit 44d30d622821d ("phy: cadence: Add driver for Sierra PHY") de-asserts PHY_RESET even before the configurations are loaded in phy_init(). However PHY_RESET should be de-asserted only after all the configurations has been initialized, instead of de-asserting in probe. Fix it here.
--- drivers/phy/cadence/phy-cadence-sierra.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/phy/cadence/phy-cadence-sierra.c +6 -1
@@ -319,6 +319,12 @@ static int cdns_sierra_phy_on(struct phyu32 val;int ret; + ret =reset_control_deassert (sp->phy_rst); +if (ret) { +dev_err (dev,"Failed to take the PHY out of reset\n" ); +return ret; + } +/* Take the PHY lane group out of reset */ ret =reset_control_deassert (ins->lnk_rst);if (ret) {
@@ -616,7 +622,6 @@ static int cdns_sierra_phy_probe(structpm_runtime_enable (dev); phy_provider =devm_of_phy_provider_register (dev, of_phy_simple_xlate); -reset_control_deassert (sp->phy_rst);return PTR_ERR_OR_ZERO (phy_provider); put_child:
Greg Kroah-Hartman
maintainerPATCH 41/601 misc: lis3lv02d: Fix false-positive WARN on various HP models
In reply to Greg Kroah-HartmanFrom: Hans de Goede <[email protected]>
commit 3641762c1c9c7cfd84a7061a0a73054f09b412e3 upstream.
Before this commit lis3lv02d_get_pwron_wait() had a WARN_ONCE() to catch a potential divide by 0. WARN macros should only be used to catch internal kernel bugs and that is not the case here. We have been receiving a lot of bug reports about kernel backtraces caused by this WARN.
The div value being checked comes from the lis3->odrs[] array. Which is sized to be a power-of-2 matching the number of bits in lis3->odr_mask.
The only lis3 model where this array is not entirely filled with non zero values. IOW the only model where we can hit the div == 0 check is the 3dc ("8 bits 3DC sensor") model:
int lis3_3dc_rates[16] = {0, 1, 10, 25, 50, 100, 200, 400, 1600, 5000};
Note the 0 value at index 0, according to the datasheet an odr index of 0 means "Power-down mode". HP typically uses a lis3 accelerometer for HDD fall protection. What I believe is happening here is that on newer HP devices, which only contain a SDD, the BIOS is leaving the lis3 device powered-down since it is not used for HDD fall protection.
Note that the lis3_3dc_rates array initializer only specifies 10 values, which matches the datasheet. So it also contains 6 zero values at the end.
Replace the WARN with a normal check, which treats an odr index of 0 as power-down and uses a normal dev_err() to report the error in case odr index point past the initialized part of the array.
--- drivers/misc/lis3lv02d/lis3lv02d.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-)
drivers/misc/lis3lv02d/lis3lv02d.c +16 -5
@@ -208,7 +208,7 @@ static int lis3_3dc_rates[16] = {0, 1, 1static int lis3_3dlh_rates[4 ] = {50 ,100 ,400 ,1000 };/* ODR is Output Data Rate */ -static int lis3lv02d_get_odr (struct lis3lv02d *lis3) +static int lis3lv02d_get_odr_index (struct lis3lv02d *lis3) {u8 ctrl;int shift;
@@ -216,15 +216,23 @@ static int lis3lv02d_get_odr(struct lis3 lis3->read (lis3,CTRL_REG1 , &ctrl); ctrl &= lis3->odr_mask; shift =ffs (lis3->odr_mask) -1 ; -return lis3->odrs[(ctrl >> shift)]; +return (ctrl >> shift); }static int lis3lv02d_get_pwron_wait (struct lis3lv02d *lis3) { -int div =lis3lv02d_get_odr (lis3); +int odr_idx =lis3lv02d_get_odr_index (lis3); +int div = lis3->odrs[odr_idx]; -if (WARN_ONCE (div ==0 ,"device returned spurious data" )) +if (div ==0 ) { +if (odr_idx ==0 ) { +/* Power-down mode, not sampling no need to sleep */ +return 0 ; + } + +dev_err (&lis3->pdev->dev,"Error unknown odrs-index: %d\n" , odr_idx);return -ENXIO ; + }/* LIS3 power on delay is quite long */ msleep (lis3->pwron_delay / div);
@@ -816,9 +824,12 @@ static ssize_t lis3lv02d_rate_show(struc struct device_attribute *attr, char *buf) { struct lis3lv02d *lis3 = dev_get_drvdata(dev); +int odr_idx;lis3lv02d_sysfs_poweron (lis3); -return sprintf (buf,"%d\n" ,lis3lv02d_get_odr (lis3)); + + odr_idx =lis3lv02d_get_odr_index (lis3); +return sprintf (buf,"%d\n" , lis3->odrs[odr_idx]); } static ssize_t lis3lv02d_rate_set(struct device *dev,
Greg Kroah-Hartman
maintainerPATCH 42/601 phy: ti: j721e-wiz: Invoke wiz_init() before of_platform_device_create()
In reply to Greg Kroah-HartmanFrom: Kishon Vijay Abraham I <[email protected]>
commit f7eb147d306ad2efae6837e20d2944f03be42eb4 upstream.
Invoke wiz_init() before configuring anything else in Sierra/Torrent (invoked as part of of_platform_device_create()). wiz_init() resets the SERDES device and any configuration done in the probe() of Sierra/Torrent will be lost. In order to prevent SERDES configuration from getting reset, invoke wiz_init() immediately before invoking of_platform_device_create().
--- drivers/phy/ti/phy-j721e-wiz.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-)
drivers/phy/ti/phy-j721e-wiz.c +7 -10
@@ -947,27 +947,24 @@ static int wiz_probe(struct platform_dev goto err_get_sync; } + ret =wiz_init (wiz); +if (ret) { +dev_err (dev,"WIZ initialization failed\n" ); + goto err_wiz_init; + } + serdes_pdev =of_platform_device_create (child_node,NULL , dev);if (!serdes_pdev) {dev_WARN (dev,"Unable to create SERDES platform device\n" ); ret = -ENOMEM ; - goto err_pdev_create; - } - wiz->serdes_pdev = serdes_pdev; - - ret =wiz_init (wiz); -if (ret) { -dev_err (dev,"WIZ initialization failed\n" ); goto err_wiz_init; } + wiz->serdes_pdev = serdes_pdev;of_node_put (child_node);return 0 ; err_wiz_init: -of_platform_device_destroy (&serdes_pdev->dev,NULL ); - -err_pdev_create:wiz_clock_cleanup (wiz, node); err_get_sync:
Greg Kroah-Hartman
maintainerPATCH 43/601 misc: vmw_vmci: explicitly initialize vmci_notify_bm_set_msg struct
In reply to Greg Kroah-HartmanFrom: Tetsuo Handa <[email protected]>
commit 376565b9717c30cd58ad33860fa42697615fa2e4 upstream.
KMSAN complains that the vmci_use_ppn64() == false path in vmci_dbell_register_notification_bitmap() left upper 32bits of bitmap_set_msg.bitmap_ppn64 member uninitialized.
=====================================================
BUG: KMSAN: uninit-value in kmsan_check_memory+0xd/0x10 CPU: 1 PID: 1 Comm: swapper/0 Not tainted 5.11.0-rc7+ #4 Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 02/27/2020 Call Trace: dump_stack+0x21c/0x280 kmsan_report+0xfb/0x1e0 kmsan_internal_check_memory+0x484/0x520 kmsan_check_memory+0xd/0x10 iowrite8_rep+0x86/0x380 vmci_send_datagram+0x150/0x280 vmci_dbell_register_notification_bitmap+0x133/0x1e0 vmci_guest_probe_device+0xcab/0x1e70 pci_device_probe+0xab3/0xe70 really_probe+0xd16/0x24d0 driver_probe_device+0x29d/0x3a0 device_driver_attach+0x25a/0x490 __driver_attach+0x78c/0x840 bus_for_each_dev+0x210/0x340 driver_attach+0x89/0xb0 bus_add_driver+0x677/0xc40 driver_register+0x485/0x8e0 __pci_register_driver+0x1ff/0x350 vmci_guest_init+0x3e/0x41 vmci_drv_init+0x1d6/0x43f do_one_initcall+0x39c/0x9a0 do_initcall_level+0x1d7/0x259 do_initcalls+0x127/0x1cb do_basic_setup+0x33/0x36 kernel_init_freeable+0x29a/0x3ed kernel_init+0x1f/0x840 ret_from_fork+0x1f/0x30
Local variable ----bitmap_set_msg@vmci_dbell_register_notification_bitmap created at:
vmci_dbell_register_notification_bitmap+0x50/0x1e0 vmci_dbell_register_notification_bitmap+0x50/0x1e0
Bytes 28-31 of 32 are uninitialized
Memory access of size 32 starts at ffff88810098f570
=====================================================
--- drivers/misc/vmw_vmci/vmci_doorbell.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/vmw_vmci/vmci_doorbell.c +1 -1
@@ -326,7 +326,7 @@ int vmci_dbell_host_context_notify(u32 sbool vmci_dbell_register_notification_bitmap (u64 bitmap_ppn) {int result; -struct vmci_notify_bm_set_msg bitmap_set_msg; +struct vmci_notify_bm_set_msg bitmap_set_msg = { }; bitmap_set_msg.hdr.dst =vmci_make_handle (VMCI_HYPERVISOR_CONTEXT_ID ,VMCI_SET_NOTIFY_BITMAP );
Greg Kroah-Hartman
maintainerPATCH 44/601 misc: vmw_vmci: explicitly initialize vmci_datagram payload
In reply to Greg Kroah-HartmanFrom: Tetsuo Handa <[email protected]>
commit b2192cfeba8481224da0a4ec3b4a7ccd80b1623b upstream.
KMSAN complains that vmci_check_host_caps() left the payload part of check_msg uninitialized.
=====================================================
BUG: KMSAN: uninit-value in kmsan_check_memory+0xd/0x10 CPU: 1 PID: 1 Comm: swapper/0 Tainted: G B 5.11.0-rc7+ #4 Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 02/27/2020 Call Trace: dump_stack+0x21c/0x280 kmsan_report+0xfb/0x1e0 kmsan_internal_check_memory+0x202/0x520 kmsan_check_memory+0xd/0x10 iowrite8_rep+0x86/0x380 vmci_guest_probe_device+0xf0b/0x1e70 pci_device_probe+0xab3/0xe70 really_probe+0xd16/0x24d0 driver_probe_device+0x29d/0x3a0 device_driver_attach+0x25a/0x490 __driver_attach+0x78c/0x840 bus_for_each_dev+0x210/0x340 driver_attach+0x89/0xb0 bus_add_driver+0x677/0xc40 driver_register+0x485/0x8e0 __pci_register_driver+0x1ff/0x350 vmci_guest_init+0x3e/0x41 vmci_drv_init+0x1d6/0x43f do_one_initcall+0x39c/0x9a0 do_initcall_level+0x1d7/0x259 do_initcalls+0x127/0x1cb do_basic_setup+0x33/0x36 kernel_init_freeable+0x29a/0x3ed kernel_init+0x1f/0x840 ret_from_fork+0x1f/0x30
Uninit was created at:
kmsan_internal_poison_shadow+0x5c/0xf0 kmsan_slab_alloc+0x8d/0xe0 kmem_cache_alloc+0x84f/0xe30 vmci_guest_probe_device+0xd11/0x1e70 pci_device_probe+0xab3/0xe70 really_probe+0xd16/0x24d0 driver_probe_device+0x29d/0x3a0 device_driver_attach+0x25a/0x490 __driver_attach+0x78c/0x840 bus_for_each_dev+0x210/0x340 driver_attach+0x89/0xb0 bus_add_driver+0x677/0xc40 driver_register+0x485/0x8e0 __pci_register_driver+0x1ff/0x350 vmci_guest_init+0x3e/0x41 vmci_drv_init+0x1d6/0x43f do_one_initcall+0x39c/0x9a0 do_initcall_level+0x1d7/0x259 do_initcalls+0x127/0x1cb do_basic_setup+0x33/0x36 kernel_init_freeable+0x29a/0x3ed kernel_init+0x1f/0x840 ret_from_fork+0x1f/0x30
Bytes 28-31 of 36 are uninitialized
Memory access of size 36 starts at ffff8881675e5f00
=====================================================
--- drivers/misc/vmw_vmci/vmci_guest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/vmw_vmci/vmci_guest.c +1 -1
@@ -168,7 +168,7 @@ static int vmci_check_host_caps(struct p VMCI_UTIL_NUM_RESOURCES * sizeof(u32);struct vmci_datagram *check_msg; - check_msg =kmalloc (msg_size,GFP_KERNEL ); + check_msg =kzalloc (msg_size,GFP_KERNEL );if (!check_msg) {dev_err (&pdev->dev,"%s: Insufficient memory\n" , __func__);return -ENOMEM ;
Greg Kroah-Hartman
maintainerPATCH 45/601 selinux: add proper NULL termination to the secclass_map permissions
In reply to Greg Kroah-HartmanFrom: Paul Moore <[email protected]>
commit e4c82eafb609c2badc56f4e11bc50fcf44b8e9eb upstream.
This patch adds the missing NULL termination to the "bpf" and "perf_event" object class permission lists.
This missing NULL termination should really only affect the tools under scripts/selinux, with the most important being genheaders.c, although in practice this has not been an issue on any of my dev/test systems. If the problem were to manifest itself it would likely result in bogus permissions added to the end of the object class; thankfully with no access control checks using these bogus permissions and no policies defining these permissions the impact would likely be limited to some noise about undefined permissions during policy load.
--- security/selinux/include/classmap.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
security/selinux/include/classmap.h +3 -2
@@ -242,11 +242,12 @@ struct security_class_mapping secclass_m {"infiniband_endport" , { "manage_subnet", NULL } }, {"bpf" , - {"map_create", "map_read", "map_write", "prog_load", "prog_run"} }, + { "map_create", "map_read", "map_write", "prog_load", "prog_run", + NULL } }, { "xdp_socket", { COMMON_SOCK_PERMS, NULL } }, { "perf_event", - {"open", "cpu", "kernel", "tracepoint", "read", "write"} }, + { "open", "cpu", "kernel", "tracepoint", "read", "write", NULL } }, { "lockdown", { "integrity", "confidentiality", NULL } }, { NULL }
Greg Kroah-Hartman
maintainerPATCH 46/601 x86, sched: Treat Intel SNC topology as default, COD as exception
In reply to Greg Kroah-HartmanFrom: Alison Schofield <[email protected]>
commit 2c88d45edbb89029c1190bb3b136d2602f057c98 upstream.
Commit 1340ccfa9a9a ("x86,sched: Allow topologies where NUMA nodes share an LLC") added a vendor and model specific check to never call topology_sane() for Intel Skylake Server systems where NUMA nodes share an LLC.
Intel Ice Lake and Sapphire Rapids CPUs also enumerate an LLC that is shared by multiple NUMA nodes. The LLC on these CPUs is shared for off-package data access but private to the NUMA node for on-package access. Rather than managing a list of allowable SNC topologies, make this SNC topology the default, and treat Intel's Cluster-On-Die (COD) topology as the exception.
In SNC mode, Sky Lake, Ice Lake, and Sapphire Rapids servers do not emit this warning:
sched: CPU #3's llc-sibling CPU #0 is not on the same node! [node: 1 != 0]. Ignoring dependency.
--- arch/x86/kernel/smpboot.c | 90 +++++++++++++++++++++++----------------------- 1 file changed, 46 insertions(+), 44 deletions(-)
arch/x86/kernel/smpboot.c +46 -44
@@ -458,29 +458,52 @@ static bool match_smt(struct cpuinfo_x86return false; } +static bool match_die (struct cpuinfo_x86 *c,struct cpuinfo_x86 *o) +{ +if (c->phys_proc_id == o->phys_proc_id && + c->cpu_die_id == o->cpu_die_id) +return true; +return false; +} +/* -* Define snc_cpu[] for SNC (Sub-NUMA Cluster) CPUs. +* Unlike the other levels, we do not enforce keeping a +* multicore group inside a NUMA node. If this happens, we will +* discard the MC level of the topology later. +*/ +static bool match_pkg (struct cpuinfo_x86 *c,struct cpuinfo_x86 *o) +{ +if (c->phys_proc_id == o->phys_proc_id) +return true; +return false; +} + +/* +* Define intel_cod_cpu[] for Intel COD (Cluster-on-Die) CPUs. * -* These are Intel CPUs that enumerate an LLC that is shared by -* multiple NUMA nodes. The LLC on these systems is shared for -* off-package data access but private to the NUMA node (half -* of the package) for on-package access. +* Any Intel CPU that has multiple nodes per package and does not +* match intel_cod_cpu[] has the SNC (Sub-NUMA Cluster) topology. * -* CPUID (the source of the information about the LLC) can only -* enumerate the cache as being shared *or* unshared, but not -* this particular configuration. The CPU in this case enumerates -* the cache to be shared across the entire package (spanning both -* NUMA nodes). +* When in SNC mode, these CPUs enumerate an LLC that is shared +* by multiple NUMA nodes. The LLC is shared for off-package data +* access but private to the NUMA node (half of the package) for +* on-package access. CPUID (the source of the information about +* the LLC) can only enumerate the cache as shared or unshared, +* but not this particular configuration. */ -static const struct x86_cpu_id snc_cpu[] = { -X86_MATCH_INTEL_FAM6_MODEL (SKYLAKE_X ,NULL ), +static const struct x86_cpu_id intel_cod_cpu[] = { +X86_MATCH_INTEL_FAM6_MODEL (HASWELL_X ,0 ),/* COD */ +X86_MATCH_INTEL_FAM6_MODEL (BROADWELL_X ,0 ),/* COD */ +X86_MATCH_INTEL_FAM6_MODEL (ANY ,1 ),/* SNC */ {} };static bool match_llc (struct cpuinfo_x86 *c,struct cpuinfo_x86 *o) { +const struct x86_cpu_id *id =x86_match_cpu (intel_cod_cpu);int cpu1 = c->cpu_index, cpu2 = o->cpu_index; +bool intel_snc = id && id->driver_data;/* Do not match if we do not have a valid APICID for cpu: */ if (per_cpu (cpu_llc_id, cpu1) ==BAD_APICID )
@@ -495,32 +518,12 @@ static bool match_llc(struct cpuinfo_x86* means 'c' does not share the LLC of 'o'. This will be * reflected to userspace. */ -if (!topology_same_node (c, o) &&x86_match_cpu (snc_cpu)) +if (match_pkg (c, o) && !topology_same_node (c, o) && intel_snc)return false;return topology_sane (c, o,"llc" ); } -/* -* Unlike the other levels, we do not enforce keeping a -* multicore group inside a NUMA node. If this happens, we will -* discard the MC level of the topology later. -*/ -static bool match_pkg (struct cpuinfo_x86 *c,struct cpuinfo_x86 *o) -{ -if (c->phys_proc_id == o->phys_proc_id) -return true; -return false; -} - -static bool match_die (struct cpuinfo_x86 *c,struct cpuinfo_x86 *o) -{ -if ((c->phys_proc_id == o->phys_proc_id) && - (c->cpu_die_id == o->cpu_die_id)) -return true; -return false; -} -#if defined(CONFIG_SCHED_SMT ) || defined(CONFIG_SCHED_MC )static inline int x86_sched_itmt_flags (void )
@@ -592,14 +595,23 @@ void set_cpu_sibling_map(int cpu)for_each_cpu (i, cpu_sibling_setup_mask) { o = &cpu_data (i); +if (match_pkg (c, o) && !topology_same_node (c, o)) + x86_has_numa_in_package = true; +if ((i == cpu) || (has_smt &&match_smt (c, o)))link_mask (topology_sibling_cpumask, cpu, i);if ((i == cpu) || (has_mp &&match_llc (c, o)))link_mask (cpu_llc_shared_mask, cpu, i); +if ((i == cpu) || (has_mp &&match_die (c, o))) +link_mask (topology_die_cpumask, cpu, i); } + threads =cpumask_weight (topology_sibling_cpumask (cpu)); +if (threads > __max_smt_threads) + __max_smt_threads = threads; +/* * This needs a separate iteration over the cpus because we rely on all * topology_sibling_cpumask links to be set-up.
@@ -613,8 +625,7 @@ void set_cpu_sibling_map(int cpu)/* * Does this new cpu bringup a new core? */ -if (cpumask_weight ( -topology_sibling_cpumask (cpu)) ==1 ) { +if (threads ==1 ) {/* * for each core in package, increment * the booted_cores for this new cpu
@@ -631,16 +642,7 @@ void set_cpu_sibling_map(int cpu) }else if (i != cpu && !c->booted_cores) c->booted_cores =cpu_data (i).booted_cores; } -if (match_pkg (c, o) && !topology_same_node (c, o)) - x86_has_numa_in_package = true; - -if ((i == cpu) || (has_mp &&match_die (c, o))) -link_mask (topology_die_cpumask, cpu, i); } - - threads =cpumask_weight (topology_sibling_cpumask (cpu)); -if (threads > __max_smt_threads) - __max_smt_threads = threads; }/* maps the cpu to the sched domain representing multi-core */
Greg Kroah-Hartman
maintainerPATCH 47/601 async_xor: increase src_offs when dropping destination page
In reply to Greg Kroah-HartmanFrom: Xiao Ni <[email protected]>
commit ceaf2966ab082bbc4d26516f97b3ca8a676e2af8 upstream.
Now we support sharing one page if PAGE_SIZE is not equal stripe size. To support this, it needs to support calculating xor value with different offsets for each r5dev. One offset array is used to record those offsets.
In RMW mode, parity page is used as a source page. It sets ASYNC_TX_XOR_DROP_DST before calculating xor value in ops_run_prexor5. So it needs to add src_list and src_offs at the same time. Now it only needs src_list. So the xor value which is calculated is wrong. It can cause data corruption problem.
I can reproduce this problem 100% on a POWER8 machine. The steps are:
mdadm -CR /dev/md0 -l5 -n3 /dev/sdb1 /dev/sdc1 /dev/sdd1 --size=3G mkfs.xfs /dev/md0
mount /dev/md0 /mnt/test
mount: /mnt/test: mount(2) system call failed: Structure needs cleaning.
--- crypto/async_tx/async_xor.c | 1 + 1 file changed, 1 insertion(+)
crypto/async_tx/async_xor.c +1 -0
@@ -233,6 +233,7 @@ async_xor_offs(struct page *dest, unsignif (submit->flags &ASYNC_TX_XOR_DROP_DST ) { src_cnt--; src_list++; + src_offs++; }/* wait for any prerequisite operations */
Greg Kroah-Hartman
maintainerPATCH 48/601 md/bitmap: wait for external bitmap writes to complete during tear down
In reply to Greg Kroah-HartmanFrom: Sudhakar Panneerselvam <[email protected]>
commit 404a8ef512587b2460107d3272c17a89aef75edf upstream.
NULL pointer dereference was observed in super_written() when it tries to access the mddev structure.
[The below stack trace is from an older kernel, but the problem described in this patch applies to the mainline kernel.]
[ 1194.474861] task: ffff8fdd20858000 task.stack: ffffb99d40790000 [ 1194.488000] RIP: 0010:super_written+0x29/0xe1 [ 1194.499688] RSP: 0018:ffff8ffb7fcc3c78 EFLAGS: 00010046 [ 1194.512477] RAX: 0000000000000000 RBX: ffff8ffb7bf4a000 RCX: ffff8ffb78991048 [ 1194.527325] RDX: 0000000000000001 RSI: 0000000000000000 RDI: ffff8ffb56b8a200 [ 1194.542576] RBP: ffff8ffb7fcc3c90 R08: 000000000000000b R09: 0000000000000000 [ 1194.558001] R10: ffff8ffb56b8a298 R11: 0000000000000000 R12: ffff8ffb56b8a200 [ 1194.573070] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 1194.588117] FS: 0000000000000000(0000) GS:ffff8ffb7fcc0000(0000) knlGS:0000000000000000 [ 1194.604264] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1194.617375] CR2: 00000000000002b8 CR3: 00000021e040a002 CR4: 00000000007606e0 [ 1194.632327] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 1194.647865] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 1194.663316] PKRU: 55555554 [ 1194.674090] Call Trace: [ 1194.683735] <IRQ> [ 1194.692948] bio_endio+0xae/0x135 [ 1194.703580] blk_update_request+0xad/0x2fa [ 1194.714990] blk_update_bidi_request+0x20/0x72 [ 1194.726578] __blk_end_bidi_request+0x2c/0x4d [ 1194.738373] __blk_end_request_all+0x31/0x49 [ 1194.749344] blk_flush_complete_seq+0x377/0x383 [ 1194.761550] flush_end_io+0x1dd/0x2a7 [ 1194.772910] blk_finish_request+0x9f/0x13c [ 1194.784544] scsi_end_request+0x180/0x25c [ 1194.796149] scsi_io_completion+0xc8/0x610 [ 1194.807503] scsi_finish_command+0xdc/0x125 [ 1194.818897] scsi_softirq_done+0x81/0xde [ 1194.830062] blk_done_softirq+0xa4/0xcc [ 1194.841008] __do_softirq+0xd9/0x29f [ 1194.851257] irq_exit+0xe6/0xeb [ 1194.861290] do_IRQ+0x59/0xe3 [ 1194.871060] common_interrupt+0x1c6/0x382 [ 1194.881988] </IRQ> [ 1194.890646] RIP: 0010:cpuidle_enter_state+0xdd/0x2a5 [ 1194.902532] RSP: 0018:ffffb99d40793e68 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff43 [ 1194.917317] RAX: ffff8ffb7fce27c0 RBX: ffff8ffb7fced800 RCX: 000000000000001f [ 1194.932056] RDX: 0000000000000000 RSI: 0000000000000004 RDI: 0000000000000000 [ 1194.946428] RBP: ffffb99d40793ea0 R08: 0000000000000004 R09: 0000000000002ed2 [ 1194.960508] R10: 0000000000002664 R11: 0000000000000018 R12: 0000000000000003 [ 1194.974454] R13: 000000000000000b R14: ffffffff925715a0 R15: 0000011610120d5a [ 1194.988607] ? cpuidle_enter_state+0xcc/0x2a5 [ 1194.999077] cpuidle_enter+0x17/0x19 [ 1195.008395] call_cpuidle+0x23/0x3a [ 1195.017718] do_idle+0x172/0x1d5 [ 1195.026358] cpu_startup_entry+0x73/0x75 [ 1195.035769] start_secondary+0x1b9/0x20b [ 1195.044894] secondary_startup_64+0xa5/0xa5 [ 1195.084921] RIP: super_written+0x29/0xe1 RSP: ffff8ffb7fcc3c78 [ 1195.096354] CR2: 00000000000002b8
bio in the above stack is a bitmap write whose completion is invoked after the tear down sequence sets the mddev structure to NULL in rdev.
During tear down, there is an attempt to flush the bitmap writes, but for external bitmaps, there is no explicit wait for all the bitmap writes to complete. For instance, md_bitmap_flush() is called to flush the bitmap writes, but the last call to md_bitmap_daemon_work() in md_bitmap_flush() could generate new bitmap writes for which there is no explicit wait to complete those writes. The call to md_bitmap_update_sb() will return simply for external bitmaps and the follow-up call to md_update_sb() is conditional and may not get called for external bitmaps. This results in a kernel panic when the completion routine, super_written() is called which tries to reference mddev in the rdev that has been set to NULL(in unbind_rdev_from_array() by tear down sequence).
The solution is to call md_super_wait() for external bitmaps after the last call to md_bitmap_daemon_work() in md_bitmap_flush() to ensure there are no pending bitmap writes before proceeding with the tear down.
--- drivers/md/md-bitmap.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/md/md-bitmap.c +2 -0
@@ -1722,6 +1722,8 @@ void md_bitmap_flush(struct mddev *mddevmd_bitmap_daemon_work (mddev); bitmap->daemon_lastrun -= sleep;md_bitmap_daemon_work (mddev); +if (mddev->bitmap_info.external) +md_super_wait (mddev);md_bitmap_update_sb (bitmap); }
Greg Kroah-Hartman
maintainerPATCH 49/601 md-cluster: fix use-after-free issue when removing rdev
In reply to Greg Kroah-HartmanFrom: Heming Zhao <[email protected]>
commit f7c7a2f9a23e5b6e0f5251f29648d0238bb7757e upstream.
md_kick_rdev_from_array will remove rdev, so we should use rdev_for_each_safe to search list.
How to trigger:
env: Two nodes on kvm-qemu x86_64 VMs (2C2G with 2 iscsi luns).
```
node2=192.168.0.3
for i in {1..20}; do
echo ==== $i `date` ====;
mdadm -Ss && ssh ${node2} "mdadm -Ss"
wipefs -a /dev/sda /dev/sdb
mdadm -CR /dev/md0 -b clustered -e 1.2 -n 2 -l 1 /dev/sda \
/dev/sdb --assume-clean
ssh ${node2} "mdadm -A /dev/md0 /dev/sda /dev/sdb"
mdadm --wait /dev/md0
ssh ${node2} "mdadm --wait /dev/md0"
mdadm --manage /dev/md0 --fail /dev/sda --remove /dev/sda
sleep 1
done
```Crash stack:
``` stack segment: 0000 [#1] SMP ... ... RIP: 0010:md_check_recovery+0x1e8/0x570 [md_mod] ... ... RSP: 0018:ffffb149807a7d68 EFLAGS: 00010207 RAX: 0000000000000000 RBX: ffff9d494c180800 RCX: ffff9d490fc01e50 RDX: fffff047c0ed8308 RSI: 0000000000000246 RDI: 0000000000000246 RBP: 6b6b6b6b6b6b6b6b R08: ffff9d490fc01e40 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000000 R13: ffff9d494c180818 R14: ffff9d493399ef38 R15: ffff9d4933a1d800 FS: 0000000000000000(0000) GS:ffff9d494f700000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fe68cab9010 CR3: 000000004c6be001 CR4: 00000000003706e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: raid1d+0x5c/0xd40 [raid1] ? finish_task_switch+0x75/0x2a0 ? lock_timer_base+0x67/0x80 ? try_to_del_timer_sync+0x4d/0x80 ? del_timer_sync+0x41/0x50 ? schedule_timeout+0x254/0x2d0 ? md_start_sync+0xe0/0xe0 [md_mod] ? md_thread+0x127/0x160 [md_mod] md_thread+0x127/0x160 [md_mod] ? wait_woken+0x80/0x80 kthread+0x10d/0x130 ? kthread_park+0xa0/0xa0 ret_from_fork+0x1f/0x40 ```
--- drivers/md/md.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/md/md.c +4 -4
@@ -9266,11 +9266,11 @@ void md_check_recovery(struct mddev *mdd }if (mddev_is_clustered (mddev)) { -struct md_rdev *rdev; +struct md_rdev *rdev, *tmp;/* kick the device if another node issued a * remove disk. */ -rdev_for_each (rdev, mddev) { +rdev_for_each_safe (rdev, tmp, mddev) {if (test_and_clear_bit (ClusterRemove, &rdev->flags) && rdev->raid_disk <0 )md_kick_rdev_from_array (rdev);
@@ -9584,7 +9584,7 @@ err_wq:static void check_sb_changes (struct mddev *mddev,struct md_rdev *rdev) {struct mdp_superblock_1 *sb =page_address (rdev->sb_page); -struct md_rdev *rdev2; +struct md_rdev *rdev2, *tmp;int role, ret;char b[BDEVNAME_SIZE ];
@@ -9601,7 +9601,7 @@ static void check_sb_changes(struct mdde }/* Check for change of roles in the active devices */ -rdev_for_each (rdev2, mddev) { +rdev_for_each_safe (rdev2, tmp, mddev) {if (test_bit (Faulty, &rdev2->flags))continue ;
Greg Kroah-Hartman
maintainerPATCH 50/601 md: split mddev_find
In reply to Greg Kroah-HartmanFrom: Christoph Hellwig <[email protected]>
commit 65aa97c4d2bfd76677c211b9d03ef05a98c6d68e upstream.
Split mddev_find into a simple mddev_find that just finds an existing mddev by the unit number, and a more complicated mddev_find that deals with find or allocating a mddev.
This turns out to fix this bug reported by Zhao Heming.
----------------------------- snip ------------------------------ commit d3374825ce57 ("md: make devices disappear when they are no longer needed.") introduced protection between mddev creating & removing. The md_open shouldn't create mddev when all_mddevs list doesn't contain mddev. With currently code logic, there will be very easy to trigger soft lockup in non-preempt env.
--- drivers/md/md.c | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-)
drivers/md/md.c +19 -5
@@ -754,6 +754,22 @@ EXPORT_SYMBOL_GPL(mddev_init);static struct mddev *mddev_find (dev_t unit) { +struct mddev *mddev; + +if (MAJOR (unit) !=MD_MAJOR ) + unit &= ~((1 << MdpMinorShift) -1 ); + +spin_lock (&all_mddevs_lock); + mddev =mddev_find_locked (unit); +if (mddev) +mddev_get (mddev); +spin_unlock (&all_mddevs_lock); + +return mddev; +} + +static struct mddev *mddev_find_or_alloc (dev_t unit) +{struct mddev *mddev, *new =NULL ;if (unit &&MAJOR (unit) !=MD_MAJOR )
@@ -5657,7 +5673,7 @@ static int md_alloc(dev_t dev, char *nam* writing to /sys/module/md_mod/parameters/new_array. */ static DEFINE_MUTEX (disks_mutex); -struct mddev *mddev =mddev_find (dev); +struct mddev *mddev =mddev_find_or_alloc (dev);struct gendisk *disk;int partitioned;int shift;
@@ -6539,11 +6555,9 @@ static void autorun_devices(int part)md_probe (dev); mddev =mddev_find (dev); -if (!mddev || !mddev->gendisk) { -if (mddev) -mddev_put (mddev); +if (!mddev)break ; - } +if (mddev_lock (mddev))pr_warn ("md: %s locked, cannot run\n" ,mdname (mddev)); else if (mddev->raid_disks || mddev->major_version
Greg Kroah-Hartman
maintainerPATCH 51/601 md: factor out a mddev_find_locked helper from mddev_find
In reply to Greg Kroah-HartmanFrom: Christoph Hellwig <[email protected]>
commit 8b57251f9a91f5e5a599de7549915d2d226cc3af upstream.
Factor out a self-contained helper to just lookup a mddev by the dev_t "unit".
--- drivers/md/md.c | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-)
drivers/md/md.c +19 -13
@@ -752,6 +752,17 @@ void mddev_init(struct mddev *mddev) }EXPORT_SYMBOL_GPL (mddev_init); +static struct mddev *mddev_find_locked (dev_t unit) +{ +struct mddev *mddev; + +list_for_each_entry (mddev, &all_mddevs, all_mddevs) +if (mddev->unit == unit) +return mddev; + +return NULL ; +} +static struct mddev *mddev_find (dev_t unit) {struct mddev *mddev;
@@ -779,13 +790,13 @@ static struct mddev *mddev_find_or_allocspin_lock (&all_mddevs_lock);if (unit) { -list_for_each_entry (mddev, &all_mddevs, all_mddevs) -if (mddev->unit == unit) { -mddev_get (mddev); -spin_unlock (&all_mddevs_lock); -kfree (new); -return mddev; - } + mddev =mddev_find_locked (unit); +if (mddev) { +mddev_get (mddev); +spin_unlock (&all_mddevs_lock); +kfree (new); +return mddev; + }if (new) {list_add (&new->all_mddevs, &all_mddevs);
@@ -811,12 +822,7 @@ static struct mddev *mddev_find_or_allocreturn NULL ; } - is_free =1 ; -list_for_each_entry (mddev, &all_mddevs, all_mddevs) -if (mddev->unit == dev) { - is_free =0 ; -break ; - } + is_free = !mddev_find_locked (dev); } new->unit = dev; new->md_minor =MINOR (dev);
Greg Kroah-Hartman
maintainerPATCH 52/601 md: md_open returns -EBUSY when entering racing area
In reply to Greg Kroah-HartmanFrom: Zhao Heming <[email protected]>
commit 6a4db2a60306eb65bfb14ccc9fde035b74a4b4e7 upstream.
commit d3374825ce57 ("md: make devices disappear when they are no longer needed.") introduced protection between mddev creating & removing. The md_open shouldn't create mddev when all_mddevs list doesn't contain mddev. With currently code logic, there will be very easy to trigger soft lockup in non-preempt env.
This patch changes md_open returning from -ERESTARTSYS to -EBUSY, which will break the infinitely retry when md_open enter racing area.
This patch is partly fix soft lockup issue, full fix needs mddev_find is split into two functions: mddev_find & mddev_find_or_alloc. And md_open should call new mddev_find (it only does searching job).
For more detail, please refer with Christoph's "split mddev_find" patch in later commits.
--- drivers/md/md.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/md/md.c +1 -2
@@ -7856,8 +7856,7 @@ static int md_open(struct block_device */* Wait until bdev->bd_disk is definitely gone */ if (work_pending (&mddev->del_work))flush_workqueue (md_misc_wq); -/* Then retry the open from the top */ -return -ERESTARTSYS ; +return -EBUSY ; }BUG_ON (mddev != bdev->bd_disk->private_data);
Greg Kroah-Hartman
maintainerPATCH 53/601 md: Fix missing unused status line of /proc/mdstat
In reply to Greg Kroah-HartmanFrom: Jan Glauber <[email protected]>
commit 7abfabaf5f805f5171d133ce6af9b65ab766e76a upstream.
Reading /proc/mdstat with a read buffer size that would not fit the unused status line in the first read will skip this line from the output.
So 'dd if=/proc/mdstat bs=64 2>/dev/null' will not print something
like: unused devices: <none>
Don't return NULL immediately in start() for v=2 but call show() once to print the status line also for multiple reads.
--- drivers/md/md.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/md/md.c +5 -1
@@ -8187,7 +8187,11 @@ static void *md_seq_start(struct seq_filloff_t l = *pos;struct mddev *mddev; -if (l >=0x10000 ) +if (l ==0x10000 ) { + ++*pos; +return (void *)2 ; + } +if (l >0x10000 )return NULL ;if (!l--)/* header */
Greg Kroah-Hartman
maintainerPATCH 54/601 MIPS: Reinstate platform `__div64_32 handler
In reply to Greg Kroah-HartmanFrom: Maciej W. Rozycki <[email protected]>
commit c49f71f60754acbff37505e1d16ca796bf8a8140 upstream.
Our current MIPS platform __div64_32' handler is inactive, because it is incorrectly only enabled for 64-bit configurations, for which generic do_div' code does not call it anyway.
The handler is not suitable for being called from there though as it only calculates 32 bits of the quotient under the assumption the 64-bit divident has been suitably reduced. Code for such reduction used to be there, however it has been incorrectly removed with commit c21004cd5b4c ("MIPS: Rewrite <asm/div64.h> to work with gcc 4.4.0."), which should have only updated an obsoleted constraint for an inline asm involving $hi and $lo register outputs, while possibly wiring the original MIPS variant of the do_div' macro as __div64_32' handler for the generic `do_div' implementation
Correct the handler as follows then:
- Revert most of the commit referred, however retaining the current formatting, except for the final two instructions of the inline asm sequence, which the original commit missed. Omit the original 64-bit parts though.
- Rename the original do_div' macro to __div64_32'. Use the combined x' constraint referring to the MD accumulator as a whole, replacing the original individual h' and l' constraints used for $hi and $lo registers respectively, of which h' has been obsoleted with GCC 4.4. Update surrounding code accordingly.
We have since removed support for GCC versions before 4.9, so no need for a special arrangement here; GCC has supported the `x' constraint since forever anyway, or at least going back to 1991.
- Rename the __base' local variable in __div64_32' to __radix' to avoid a conflict with a local variable in do_div'.
- Actually enable this code for 32-bit rather than 64-bit configurations by qualifying it with BITS_PER_LONG being 32 instead of 64. Include <asm/bitsperlong.h> for this macro rather than <linux/types.h> as we don't need anything else.
- Finally include <asm-generic/div64.h> last rather than first.
This has passed correctness verification with test_div64 and reduced the module's average execution time down to 1.0668s and 0.2629s from 2.1529s and 0.5647s respectively for an R3400 CPU @40MHz and a 5Kc CPU @160MHz. For a reference 64-bit `do_div' code where we have the DDIVU instruction available to do the whole calculation right away averages at 0.0660s for the latter CPU.
--- arch/mips/include/asm/div64.h | 57 ++++++++++++++++++++++++++++++------------ 1 file changed, 41 insertions(+), 16 deletions(-)
arch/mips/include/asm/div64.h +41 -16
@@ -1,5 +1,5 @@/* -* Copyright (C) 2000, 2004 Maciej W. Rozycki +* Copyright (C) 2000, 2004, 2021 Maciej W. Rozycki * Copyright (C) 2003, 07 Ralf Baechle ([email protected]) * * This file is subject to the terms and conditions of the GNU General Public
@@ -9,25 +9,18 @@#ifndef __ASM_DIV64_H#define __ASM_DIV64_H -#include <asm-generic/div64.h> - -#if BITS_PER_LONG ==64 +#include <asm/bitsperlong.h> -#include <linux/types.h> +#if BITS_PER_LONG ==32 /* * No traps on overflows for any of these... */ -#define __div64_32 (n, base) \ -({ \ +#define do_div64_32 (res, high, low, base) ({ \ unsigned long __cf, __tmp, __tmp2, __i; \ unsigned long __quot32, __mod32; \ - unsigned long __high, __low; \ - unsigned long long __n; \ \ - __high = *__n >> 32; \ - __low = __n; \ __asm__( \ " .set push \n" \ " .set noat \n" \
@@ -51,18 +44,50 @@" subu %0, %0, %z6 \n" \" addiu %2, %2, 1 \n" \"3: \n" \ - " bnez %4, 0b\n\t" \ - " srl %5, %1, 0x1f\n\t" \ +" bnez %4, 0b \n" \ +" srl %5, %1, 0x1f \n" \" .set pop" \ : "=&r" (__mod32), "=&r" (__tmp), \ "=&r" (__quot32), "=&r" (__cf), \ "=&r" (__i), "=&r" (__tmp2) \ - : "Jr" (base), "0" (__high), "1" (__low)); \ + : "Jr" (base), "0" (high), "1" (low)); \ \ - (__n) = __quot32; \ + (res) = __quot32; \ __mod32; \ }) -#endif /* BITS_PER_LONG == 64 */ +#define __div64_32(n, base) ({ \ +unsigned long __upper, __low, __high, __radix; \ +unsigned long long __modquot; \ +unsigned long long __quot; \ +unsigned long long __div; \ +unsigned long __mod; \ + \ + __div = (*n); \ + __radix = (base); \ + \ + __high = __div >>32 ; \ + __low = __div; \ + __upper = __high; \ + \ +if (__high) { \ + __asm__("divu $0, %z1, %z2" \ + :"=x" (__modquot) \ + :"Jr" (__high),"Jr" (__radix)); \ + __upper = __modquot >>32 ; \ + __high = __modquot; \ + } \ + \ + __mod =do_div64_32 (__low, __upper, __low, __radix); \ + \ + __quot = __high; \ + __quot = __quot <<32 | __low; \ + (*n) = __quot; \ + __mod; \ +}) + +#endif /* BITS_PER_LONG == 32 */ + +#include <asm-generic/div64.h> #endif /* __ASM_DIV64_H */
Greg Kroah-Hartman
maintainerPATCH 55/601 MIPS: generic: Update node names to avoid unit addresses
In reply to Greg Kroah-HartmanFrom: Nathan Chancellor <[email protected]>
commit e607ff630c6053ecc67502677c0e50053d7892d4 upstream.
With the latest mkimage from U-Boot 2021.04, the generic defconfigs no longer build, failing with:
/usr/bin/mkimage: verify_header failed for FIT Image support with exit code 1
This is expected after the linked U-Boot commits because '@' is forbidden in the node names due to the way that libfdt treats nodes with the same prefix but different unit addresses.
Switch the '@' in the node name to '-'. Drop the unit addresses from the hash and kernel child nodes because there is only one node so they do not need to have a number to differentiate them.
--- arch/mips/generic/board-boston.its.S | 10 +++++----- arch/mips/generic/board-jaguar2.its.S | 16 ++++++++-------- arch/mips/generic/board-luton.its.S | 8 ++++---- arch/mips/generic/board-ni169445.its.S | 10 +++++----- arch/mips/generic/board-ocelot.its.S | 20 ++++++++++---------- arch/mips/generic/board-serval.its.S | 8 ++++---- arch/mips/generic/board-xilfpga.its.S | 10 +++++----- arch/mips/generic/vmlinux.its.S | 10 +++++----- 8 files changed, 46 insertions(+), 46 deletions(-)
arch/mips/generic/board-boston.its.S +5 -5
@@ -1,22 +1,22 @@ / { images { - fdt@boston { + fdt-boston { description = "img,boston Device Tree"; data = /incbin/("boot/dts/img/boston.dtb"); type = "flat_dt"; arch = "mips"; compression = "none"; - hash@0 { + hash { algo = "sha1"; }; }; }; configurations { - conf@boston { + conf-boston { description = "Boston Linux kernel"; - kernel = "kernel@0"; - fdt = "fdt@boston"; + kernel = "kernel"; + fdt = "fdt-boston"; }; }; };
arch/mips/generic/board-jaguar2.its.S +8 -8
@@ -1,23 +1,23 @@ /* SPDX-License-Identifier: (GPL-2.0 OR MIT) */ / { images { - fdt@jaguar2_pcb110 { + fdt-jaguar2_pcb110 { description = "MSCC Jaguar2 PCB110 Device Tree"; data = /incbin/("boot/dts/mscc/jaguar2_pcb110.dtb"); type = "flat_dt"; arch = "mips"; compression = "none"; - hash@0 { + hash { algo = "sha1"; }; }; - fdt@jaguar2_pcb111 { + fdt-jaguar2_pcb111 { description = "MSCC Jaguar2 PCB111 Device Tree"; data = /incbin/("boot/dts/mscc/jaguar2_pcb111.dtb"); type = "flat_dt"; arch = "mips"; compression = "none"; - hash@0 { + hash { algo = "sha1"; }; };
@@ -26,14 +26,14 @@ configurations { pcb110 { description = "Jaguar2 Linux kernel"; - kernel = "kernel@0"; - fdt = "fdt@jaguar2_pcb110"; + kernel = "kernel"; + fdt = "fdt-jaguar2_pcb110"; ramdisk = "ramdisk"; }; pcb111 { description = "Jaguar2 Linux kernel"; - kernel = "kernel@0"; - fdt = "fdt@jaguar2_pcb111"; + kernel = "kernel"; + fdt = "fdt-jaguar2_pcb111"; ramdisk = "ramdisk"; }; };
arch/mips/generic/board-luton.its.S +4 -4
@@ -1,13 +1,13 @@ /* SPDX-License-Identifier: (GPL-2.0 OR MIT) */ / { images { - fdt@luton_pcb091 { + fdt-luton_pcb091 { description = "MSCC Luton PCB091 Device Tree"; data = /incbin/("boot/dts/mscc/luton_pcb091.dtb"); type = "flat_dt"; arch = "mips"; compression = "none"; - hash@0 { + hash { algo = "sha1"; }; };
@@ -16,8 +16,8 @@ configurations { pcb091 { description = "Luton Linux kernel"; - kernel = "kernel@0"; - fdt = "fdt@luton_pcb091"; + kernel = "kernel"; + fdt = "fdt-luton_pcb091"; }; }; };
arch/mips/generic/board-ni169445.its.S +5 -5
@@ -1,22 +1,22 @@ / { images { - fdt@ni169445 { + fdt-ni169445 { description = "NI 169445 device tree"; data = /incbin/("boot/dts/ni/169445.dtb"); type = "flat_dt"; arch = "mips"; compression = "none"; - hash@0 { + hash { algo = "sha1"; }; }; }; configurations { - conf@ni169445 { + conf-ni169445 { description = "NI 169445 Linux Kernel"; - kernel = "kernel@0"; - fdt = "fdt@ni169445"; + kernel = "kernel"; + fdt = "fdt-ni169445"; }; }; };
arch/mips/generic/board-ocelot.its.S +10 -10
@@ -1,40 +1,40 @@ /* SPDX-License-Identifier: (GPL-2.0 OR MIT) */ / { images { - fdt@ocelot_pcb123 { + fdt-ocelot_pcb123 { description = "MSCC Ocelot PCB123 Device Tree"; data = /incbin/("boot/dts/mscc/ocelot_pcb123.dtb"); type = "flat_dt"; arch = "mips"; compression = "none"; - hash@0 { + hash { algo = "sha1"; }; }; - fdt@ocelot_pcb120 { + fdt-ocelot_pcb120 { description = "MSCC Ocelot PCB120 Device Tree"; data = /incbin/("boot/dts/mscc/ocelot_pcb120.dtb"); type = "flat_dt"; arch = "mips"; compression = "none"; - hash@0 { + hash { algo = "sha1"; }; }; }; configurations { - conf@ocelot_pcb123 { + conf-ocelot_pcb123 { description = "Ocelot Linux kernel"; - kernel = "kernel@0"; - fdt = "fdt@ocelot_pcb123"; + kernel = "kernel"; + fdt = "fdt-ocelot_pcb123"; }; - conf@ocelot_pcb120 { + conf-ocelot_pcb120 { description = "Ocelot Linux kernel"; - kernel = "kernel@0"; - fdt = "fdt@ocelot_pcb120"; + kernel = "kernel"; + fdt = "fdt-ocelot_pcb120"; }; }; };
arch/mips/generic/board-serval.its.S +4 -4
@@ -1,13 +1,13 @@ /* SPDX-License-Identifier: (GPL-2.0 OR MIT) */ / { images { - fdt@serval_pcb105 { + fdt-serval_pcb105 { description = "MSCC Serval PCB105 Device Tree"; data = /incbin/("boot/dts/mscc/serval_pcb105.dtb"); type = "flat_dt"; arch = "mips"; compression = "none"; - hash@0 { + hash { algo = "sha1"; }; };
@@ -16,8 +16,8 @@ configurations { pcb105 { description = "Serval Linux kernel"; - kernel = "kernel@0"; - fdt = "fdt@serval_pcb105"; + kernel = "kernel"; + fdt = "fdt-serval_pcb105"; ramdisk = "ramdisk"; }; };
arch/mips/generic/board-xilfpga.its.S +5 -5
@@ -1,22 +1,22 @@ / { images { - fdt@xilfpga { + fdt-xilfpga { description = "MIPSfpga (xilfpga) Device Tree"; data = /incbin/("boot/dts/xilfpga/nexys4ddr.dtb"); type = "flat_dt"; arch = "mips"; compression = "none"; - hash@0 { + hash { algo = "sha1"; }; }; }; configurations { - conf@xilfpga { + conf-xilfpga { description = "MIPSfpga Linux kernel"; - kernel = "kernel@0"; - fdt = "fdt@xilfpga"; + kernel = "kernel"; + fdt = "fdt-xilfpga"; }; }; };
arch/mips/generic/vmlinux.its.S +5 -5
@@ -6,7 +6,7 @@ #address-cells = <ADDR_CELLS>; images { - kernel@0 { + kernel { description = KERNEL_NAME; data = /incbin/(VMLINUX_BINARY); type = "kernel";
@@ -15,18 +15,18 @@ compression = VMLINUX_COMPRESSION; load = /bits/ ADDR_BITS <VMLINUX_LOAD_ADDRESS>; entry = /bits/ ADDR_BITS <VMLINUX_ENTRY_ADDRESS>; - hash@0 { + hash { algo = "sha1"; }; }; }; configurations { - default = "conf@default"; + default = "conf-default"; - conf@default { + conf-default { description = "Generic Linux kernel"; - kernel = "kernel@0"; + kernel = "kernel"; }; }; };
Greg Kroah-Hartman
maintainerPATCH 56/601 mt76: mt7615: use ieee80211_free_txskb() in mt7615_tx_token_put()
In reply to Greg Kroah-HartmanFrom: Ryder Lee <[email protected]>
commit 06991d1f73a9bdbc5f234ee96737b9102705b89c upstream.
We should use ieee80211_free_txskb() to report skb status avoid wrong aql accounting after reset.
--- drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7615/mac.c +6 -2
@@ -2066,8 +2066,12 @@ void mt7615_tx_token_put(struct mt7615_dspin_lock_bh (&dev->token_lock);idr_for_each_entry (&dev->token, txwi, id) {mt7615_txp_skb_unmap (&dev->mt76, txwi); -if (txwi->skb) -dev_kfree_skb_any (txwi->skb); +if (txwi->skb) { +struct ieee80211_hw *hw; + + hw =mt76_tx_status_get_hw (&dev->mt76, txwi->skb); +ieee80211_free_txskb (hw, txwi->skb); + }mt76_put_txwi (&dev->mt76, txwi); }spin_unlock_bh (&dev->token_lock);
Greg Kroah-Hartman
maintainerPATCH 57/601 ipw2x00: potential buffer overflow in libipw_wx_set_encodeext()
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
commit 260a9ad9446723d4063ed802989758852809714d upstream.
The "ext->key_len" is a u16 that comes from the user. If it's over SCM_KEY_LEN (32) that could lead to memory corruption.
--- drivers/net/wireless/intel/ipw2x00/libipw_wx.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/net/wireless/intel/ipw2x00/libipw_wx.c +4 -2
@@ -633,8 +633,10 @@ int libipw_wx_set_encodeext(struct libip }if (ext->alg !=IW_ENCODE_ALG_NONE ) { -memcpy (sec.keys[idx], ext->key, ext->key_len); - sec.key_sizes[idx] = ext->key_len; +int key_len =clamp_val (ext->key_len,0 ,SCM_KEY_LEN ); + +memcpy (sec.keys[idx], ext->key, key_len); + sec.key_sizes[idx] = key_len; sec.flags |= (1 << idx);if (ext->alg ==IW_ENCODE_ALG_WEP ) { sec.encode_alg[idx] =SEC_ALG_WEP ;
Greg Kroah-Hartman
maintainerPATCH 58/601 cfg80211: scan: drop entry from hidden_list on overflow
In reply to Greg Kroah-HartmanFrom: Johannes Berg <[email protected]>
commit 010bfbe768f7ecc876ffba92db30432de4997e2a upstream.
If we overflow the maximum number of BSS entries and free the new entry, drop it from any hidden_list that it may have been added to in the code above or in cfg80211_combine_bsses().
--- net/wireless/scan.c | 2 ++ 1 file changed, 2 insertions(+)
net/wireless/scan.c +2 -0
@@ -1751,6 +1751,8 @@ cfg80211_bss_update(struct cfg80211_regiif (rdev->bss_entries >= bss_entries_limit && !cfg80211_bss_expire_oldest (rdev)) { +if (!list_empty (&new->hidden_list)) +list_del (&new->hidden_list);kfree (new); goto drop; }
Greg Kroah-Hartman
maintainerPATCH 59/601 rtw88: Fix array overrun in rtw_get_tx_power_params()
In reply to Greg Kroah-HartmanFrom: Ping-Ke Shih <[email protected]>
commit 2ff25985ea9ccc6c9af2c77b0b49045adcc62e0e upstream.
Using a kernel with the Undefined Behaviour Sanity Checker (UBSAN) enabled, the following array overrun is logged:
================================================================================
UBSAN: array-index-out-of-bounds in /home/finger/wireless-drivers-next/drivers/net/wireless/realtek/rtw88/phy.c:1789:34 index 5 is out of range for type 'u8 [5]' CPU: 2 PID: 84 Comm: kworker/u16:3 Tainted: G O 5.12.0-rc5-00086-gd88bba47038e-dirty #651 Hardware name: TOSHIBA TECRA A50-A/TECRA A50-A, BIOS Version 4.50 09/29/2014 Workqueue: phy0 ieee80211_scan_work [mac80211] Call Trace: dump_stack+0x64/0x7c ubsan_epilogue+0x5/0x40 __ubsan_handle_out_of_bounds.cold+0x43/0x48 rtw_get_tx_power_params+0x83a/drivers/net/wireless/realtek/rtw88/0xad0 [rtw_core] ? rtw_pci_read16+0x20/0x20 [rtw_pci] ? check_hw_ready+0x50/0x90 [rtw_core] rtw_phy_get_tx_power_index+0x4d/0xd0 [rtw_core] rtw_phy_set_tx_power_level+0xee/0x1b0 [rtw_core] rtw_set_channel+0xab/0x110 [rtw_core] rtw_ops_config+0x87/0xc0 [rtw_core] ieee80211_hw_config+0x9d/0x130 [mac80211] ieee80211_scan_state_set_channel+0x81/0x170 [mac80211] ieee80211_scan_work+0x19f/0x2a0 [mac80211] process_one_work+0x1dd/0x3a0 worker_thread+0x49/0x330 ? rescuer_thread+0x3a0/0x3a0 kthread+0x134/0x150 ? kthread_create_worker_on_cpu+0x70/0x70 ret_from_fork+0x22/0x30 ================================================================================
The statement where an array is being overrun is shown in the following snippet:
if (rate <= DESC_RATE11M) tx_power = pwr_idx_2g->cck_base[group]; else
====> tx_power = pwr_idx_2g->bw40_base[group];
The associated arrays are defined in main.h as follows:
struct rtw_2g_txpwr_idx {
u8 cck_base[6];
u8 bw40_base[5];
struct rtw_2g_1s_pwr_idx_diff ht_1s_diff;
struct rtw_2g_ns_pwr_idx_diff ht_2s_diff;
struct rtw_2g_ns_pwr_idx_diff ht_3s_diff;
struct rtw_2g_ns_pwr_idx_diff ht_4s_diff;
};The problem arises because the value of group is 5 for channel 14. The trivial increase in the dimension of bw40_base fails as this struct must match the layout of efuse. The fix is to add the rate as an argument to rtw_get_channel_group() and set the group for channel 14 to 4 if rate <= DESC_RATE11M.
This patch fixes commit fa6dfe6bff24 ("rtw88: resolve order of tx power setting routines")
--- drivers/net/wireless/realtek/rtw88/phy.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/wireless/realtek/rtw88/phy.c +3 -2
@@ -1524,7 +1524,7 @@ void rtw_phy_load_tables(struct rtw_dev }EXPORT_SYMBOL (rtw_phy_load_tables); -static u8 rtw_get_channel_group (u8 channel) +static u8 rtw_get_channel_group (u8 channel,u8 rate) {switch (channel) {default :
@@ -1568,6 +1568,7 @@ static u8 rtw_get_channel_group(u8 channcase 106 :return 4 ;case 14 : +return rate <=DESC_RATE11M ?5 :4 ;case 108 :case 110 :case 112 :
@@ -1819,7 +1820,7 @@ void rtw_get_tx_power_params(struct rtw_s8 *remnant = &pwr_param->pwr_remnant; pwr_idx = &rtwdev->efuse.txpwr_idx_table[path]; - group =rtw_get_channel_group (ch); + group =rtw_get_channel_group (ch, rate);/* base power index for 2.4G/5G */ if (IS_CH_2G_BAND (ch)) {
Greg Kroah-Hartman
maintainerPATCH 60/601 mt76: fix potential DMA mapping leak
In reply to Greg Kroah-HartmanFrom: Felix Fietkau <[email protected]>
commit b4403cee6400c5f679e9c4a82b91d61aa961eccf upstream.
With buf uninitialized in mt76_dma_tx_queue_skb_raw, its field skip_unmap could potentially inherit a non-zero value from stack garbage. If this happens, it will cause DMA mappings for MCU command frames to not be unmapped after completion
--- drivers/net/wireless/mediatek/mt76/dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/dma.c +1 -1
@@ -309,7 +309,7 @@ static int mt76_dma_tx_queue_skb_raw(struct mt76_dev *dev, struct mt76_queue *q, struct sk_buff *skb, u32 tx_info) { - struct mt76_queue_buf buf; + struct mt76_queue_buf buf = {};dma_addr_t addr;if (q->queued +1 >= q->ndesc -1 )
Greg Kroah-Hartman
maintainerPATCH 61/601 FDDI: defxx: Make MMIO the configuration default except for EISA
In reply to Greg Kroah-HartmanFrom: Maciej W. Rozycki <[email protected]>
commit 193ced4a79599352d63cb8c9e2f0c6043106eb6a upstream.
Recent versions of the PCI Express specification have deprecated support for I/O transactions and actually some PCIe host bridges, such as Power Systems Host Bridge 4 (PHB4), do not implement them.
The default kernel configuration choice for the defxx driver is the use of I/O ports rather than MMIO for PCI and EISA systems. It may have made sense as a conservative backwards compatible choice back when MMIO operation support was added to the driver as a part of TURBOchannel bus support. However nowadays this configuration choice makes the driver unusable with systems that do not implement I/O transactions for PCIe.
Make DEFXX_MMIO the configuration default then, except where configured for EISA. This exception is because an EISA adapter can have its MMIO decoding disabled with ECU (EISA Configuration Utility) and therefore not available with the resource allocation infrastructure we implement, while port I/O is always readily available as it uses slot-specific addressing, directly mapped to the slot an option card has been placed in and handled with our EISA bus support core. Conversely a kernel that supports modern systems which may not have I/O transactions implemented for PCIe will usually not be expected to handle legacy EISA systems.
The change of the default will make it easier for people, including but not limited to distribution packagers, to make a working choice for the driver.
Update the option description accordingly and while at it replace the potentially ambiguous PIO acronym with IOP for "port I/O" vs "I/O ports" according to our nomenclature used elsewhere.
--- drivers/net/fddi/Kconfig | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-)
drivers/net/fddi/Kconfig +9 -6
@@ -40,17 +40,20 @@ config DEFXX config DEFXX_MMIO bool - prompt "Use MMIO instead of PIO" if PCI || EISA + prompt "Use MMIO instead of IOP" if PCI || EISA depends on DEFXX - default n if PCI || EISA + default n if EISA default y help This instructs the driver to use EISA or PCI memory-mapped I/O - (MMIO) as appropriate instead of programmed I/O ports (PIO). + (MMIO) as appropriate instead of programmed I/O ports (IOP). Enabling this gives an improvement in processing time in parts - of the driver, but it may cause problems with EISA (DEFEA) - adapters. TURBOchannel does not have the concept of I/O ports, - so MMIO is always used for these (DEFTA) adapters. + of the driver, but it requires a memory window to be configured + for EISA (DEFEA) adapters that may not always be available. + Conversely some PCIe host bridges do not support IOP, so MMIO + may be required to access PCI (DEFPA) adapters on downstream PCI + buses with some systems. TURBOchannel does not have the concept + of I/O ports, so MMIO is always used for these (DEFTA) adapters. If unsure, say N.
Greg Kroah-Hartman
maintainerPATCH 62/601 drm/qxl: use ttm bo priorities
In reply to Greg Kroah-HartmanFrom: Gerd Hoffmann <[email protected]>
commit 4fff19ae427548d8c37260c975a4b20d3c040ec6 upstream.
Allow to set priorities for buffer objects. Use priority 1 for surface and cursor command releases. Use priority 0 for drawing command releases. That way the short-living drawing commands are first in line when it comes to eviction, making it *much* less likely that ttm_bo_mem_force_space() picks something which can't be evicted and throws an error after waiting a while without success.
--- drivers/gpu/drm/qxl/qxl_cmd.c | 2 +- drivers/gpu/drm/qxl/qxl_display.c | 4 ++-- drivers/gpu/drm/qxl/qxl_gem.c | 2 +- drivers/gpu/drm/qxl/qxl_object.c | 5 +++-- drivers/gpu/drm/qxl/qxl_object.h | 1 + drivers/gpu/drm/qxl/qxl_release.c | 18 ++++++++++++------ 6 files changed, 20 insertions(+), 12 deletions(-)
drivers/gpu/drm/qxl/qxl_cmd.c +1 -1
@@ -268,7 +268,7 @@ int qxl_alloc_bo_reserved(struct qxl_devint ret; ret =qxl_bo_create (qdev, size, false/* not kernel - device */ , - false,QXL_GEM_DOMAIN_VRAM ,NULL , &bo); + false,QXL_GEM_DOMAIN_VRAM ,0 ,NULL , &bo);if (ret) {DRM_ERROR ("failed to allocate VRAM BO\n" );return ret;
drivers/gpu/drm/qxl/qxl_display.c +2 -2
@@ -798,8 +798,8 @@ static int qxl_plane_prepare_fb(struct d qdev->dumb_shadow_bo =NULL ; }qxl_bo_create (qdev, surf.height * surf.stride, - true, true,QXL_GEM_DOMAIN_SURFACE , &surf, - &qdev->dumb_shadow_bo); + true, true,QXL_GEM_DOMAIN_SURFACE ,0 , + &surf, &qdev->dumb_shadow_bo); }if (user_bo->shadow != qdev->dumb_shadow_bo) {if (user_bo->shadow) {
drivers/gpu/drm/qxl/qxl_gem.c +1 -1
@@ -55,7 +55,7 @@ int qxl_gem_object_create(struct qxl_dev/* At least align on page size */ if (alignment <PAGE_SIZE ) alignment =PAGE_SIZE ; - r =qxl_bo_create (qdev, size, kernel, false, initial_domain, surf, &qbo); + r =qxl_bo_create (qdev, size, kernel, false, initial_domain,0 , surf, &qbo);if (r) {if (r != -ERESTARTSYS ) DRM_ERROR(
drivers/gpu/drm/qxl/qxl_object.c +3 -2
@@ -103,8 +103,8 @@ static const struct drm_gem_object_funcs .print_info = drm_gem_ttm_print_info, }; -int qxl_bo_create (struct qxl_device *qdev, -unsigned long size,bool kernel,bool pinned,u32 domain, +int qxl_bo_create (struct qxl_device *qdev,unsigned long size, +bool kernel,bool pinned,u32 domain,u32 priority,struct qxl_surface *surf,struct qxl_bo **bo_ptr) {
@@ -137,6 +137,7 @@ int qxl_bo_create(struct qxl_device *qdeqxl_ttm_placement_from_domain (bo, domain); + bo->tbo.priority = priority; r =ttm_bo_init_reserved (&qdev->mman.bdev, &bo->tbo, size, type, &bo->placement,0 , &ctx, size,NULL ,NULL , &qxl_ttm_bo_destroy);
drivers/gpu/drm/qxl/qxl_object.h +1 -0
@@ -61,6 +61,7 @@ static inline u64 qxl_bo_mmap_offset(strextern int qxl_bo_create (struct qxl_device *qdev,unsigned long size,bool kernel,bool pinned,u32 domain, +u32 priority,struct qxl_surface *surf,struct qxl_bo **bo_ptr);extern int qxl_bo_kmap (struct qxl_bo *bo,struct dma_buf_map *map);
drivers/gpu/drm/qxl/qxl_release.c +12 -6
@@ -199,11 +199,12 @@ qxl_release_free(struct qxl_device *qdev }static int qxl_release_bo_alloc (struct qxl_device *qdev, -struct qxl_bo **bo) +struct qxl_bo **bo, +u32 priority) {/* pin releases bo's they are too messy to evict */ return qxl_bo_create (qdev,PAGE_SIZE , false, true, -QXL_GEM_DOMAIN_VRAM ,NULL , bo); +QXL_GEM_DOMAIN_VRAM , priority,NULL , bo); }int qxl_release_list_add (struct qxl_release *release,struct qxl_bo *bo)
@@ -326,13 +327,18 @@ int qxl_alloc_release_reserved(struct qxint ret =0 ;union qxl_release_info *info;int cur_idx; +u32 priority; -if (type ==QXL_RELEASE_DRAWABLE ) +if (type ==QXL_RELEASE_DRAWABLE ) { cur_idx =0 ; -else if (type ==QXL_RELEASE_SURFACE_CMD ) + priority =0 ; + }else if (type ==QXL_RELEASE_SURFACE_CMD ) { cur_idx =1 ; -else if (type ==QXL_RELEASE_CURSOR_CMD ) + priority =1 ; + }else if (type ==QXL_RELEASE_CURSOR_CMD ) { cur_idx =2 ; + priority =1 ; + }else {DRM_ERROR ("got illegal type: %d\n" , type);return -EINVAL ;
@@ -352,7 +358,7 @@ int qxl_alloc_release_reserved(struct qx qdev->current_release_bo[cur_idx] =NULL ; }if (!qdev->current_release_bo[cur_idx]) { - ret =qxl_release_bo_alloc (qdev, &qdev->current_release_bo[cur_idx]); + ret =qxl_release_bo_alloc (qdev, &qdev->current_release_bo[cur_idx], priority);if (ret) {mutex_unlock (&qdev->release_mutex);qxl_release_free (qdev, *release);
Greg Kroah-Hartman
maintainerPATCH 63/601 drm/ingenic: Fix non-OSD mode
In reply to Greg Kroah-HartmanFrom: Paul Cercueil <[email protected]>
commit 7b4957684e5d813fcbdc98144e3cc5c4467b3e2e upstream.
Even though the JZ4740 did not have the OSD mode, it had (according to the documentation) two DMA channels, but there is absolutely no information about how to select the second DMA channel.
Make the ingenic-drm driver work in non-OSD mode by using the foreground0 plane (which is bound to the DMA0 channel) as the primary plane, instead of the foreground1 plane, which is the primary plane when in OSD mode.
--- drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
drivers/gpu/drm/ingenic/ingenic-drm-drv.c +7 -4
@@ -553,7 +553,7 @@ static void ingenic_drm_plane_atomic_upd height = state->src_h >>16 ; cpp = state->fb->format->cpp[0 ]; -if (priv->soc_info->has_osd && plane->type ==DRM_PLANE_TYPE_OVERLAY ) +if (!priv->soc_info->has_osd || plane->type ==DRM_PLANE_TYPE_OVERLAY ) hwdesc = &priv->dma_hwdescs->hwdesc_f0;else hwdesc = &priv->dma_hwdescs->hwdesc_f1;
@@ -809,6 +809,7 @@ static int ingenic_drm_bind(struct devicconst struct jz_soc_info *soc_info;struct ingenic_drm *priv;struct clk *parent_clk; +struct drm_plane *primary;struct drm_bridge *bridge;struct drm_panel *panel;struct drm_encoder *encoder;
@@ -923,9 +924,11 @@ static int ingenic_drm_bind(struct devicif (soc_info->has_osd) priv->ipu_plane =drm_plane_from_index (drm,0 ); -drm_plane_helper_add (&priv->f1, &ingenic_drm_plane_helper_funcs); + primary = priv->soc_info->has_osd ? &priv->f1 : &priv->f0; - ret = drm_universal_plane_init(drm, &priv->f1, 1, +drm_plane_helper_add (primary, &ingenic_drm_plane_helper_funcs); + + ret = drm_universal_plane_init(drm, primary, 1, &ingenic_drm_primary_plane_funcs, priv->soc_info->formats_f1, priv->soc_info->num_formats_f1,
@@ -937,7 +940,7 @@ static int ingenic_drm_bind(struct devicdrm_crtc_helper_add (&priv->crtc, &ingenic_drm_crtc_helper_funcs); - ret =drm_crtc_init_with_planes (drm, &priv->crtc, &priv->f1, + ret =drm_crtc_init_with_planes (drm, &priv->crtc, primary,NULL , &ingenic_drm_crtc_funcs,NULL );if (ret) {dev_err (dev,"Failed to init CRTC: %i\n" , ret);
Greg Kroah-Hartman
maintainerPATCH 64/601 drm/panfrost: Clear MMU irqs before handling the fault
In reply to Greg Kroah-HartmanFrom: Boris Brezillon <[email protected]>
commit 3aa0a80fc692c9959c261f4c5bfe9c23ddd90562 upstream.
When a fault is handled it will unblock the GPU which will continue executing its shader and might fault almost immediately on a different page. If we clear interrupts after handling the fault we might miss new faults, so clear them before.
--- drivers/gpu/drm/panfrost/panfrost_mmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/panfrost/panfrost_mmu.c +2 -2
@@ -593,6 +593,8 @@ static irqreturn_t panfrost_mmu_irq_hand access_type = (fault_status >>8 ) &0x3 ; source_id = (fault_status >>16 ); +mmu_write (pfdev,MMU_INT_CLEAR , mask); +/* Page fault only */ ret =-1 ;if ((status & mask) ==BIT (i) && (exception_type &0xF8 ) ==0xC0 )
@@ -616,8 +618,6 @@ static irqreturn_t panfrost_mmu_irq_hand access_type,access_type_name (pfdev, fault_status), source_id); -mmu_write (pfdev,MMU_INT_CLEAR , mask); - status &= ~mask; }
Greg Kroah-Hartman
maintainerPATCH 65/601 drm/panfrost: Dont try to map pages that are already mapped
In reply to Greg Kroah-HartmanFrom: Boris Brezillon <[email protected]>
commit f45da8204ff1707c529a8769f5467ff16f504b26 upstream.
We allocate 2MB chunks at a time, so it might appear that a page fault has already been handled by a previous page fault when we reach panfrost_mmu_map_fault_addr(). Bail out in that case to avoid mapping the same area twice.
--- drivers/gpu/drm/panfrost/panfrost_mmu.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/gpu/drm/panfrost/panfrost_mmu.c +8 -1
@@ -488,8 +488,14 @@ static int panfrost_mmu_map_fault_addr(s } bo->base.pages = pages; bo->base.pages_use_count =1 ; - }else + }else { pages = bo->base.pages; +if (pages[page_offset]) { +/* Pages are already mapped, bail out. */ +mutex_unlock (&bo->base.pages_lock); + goto out; + } + } mapping = bo->base.base.filp->f_mapping;mapping_set_unevictable (mapping);
@@ -522,6 +528,7 @@ static int panfrost_mmu_map_fault_addr(sdev_dbg (pfdev->dev,"mapped page fault @ AS%d %llx" , as, addr); +out:panfrost_gem_mapping_put (bomapping);return 0 ;
Greg Kroah-Hartman
maintainerPATCH 66/601 drm/radeon: fix copy of uninitialized variable back to userspace
In reply to Greg Kroah-HartmanFrom: Colin Ian King <[email protected]>
commit 8dbc2ccac5a65c5b57e3070e36a3dc97c7970d96 upstream.
Currently the ioctl command RADEON_INFO_SI_BACKEND_ENABLED_MASK can copy back uninitialised data in value_tmp that pointer *value points to. This can occur when rdev->family is less than CHIP_BONAIRE and less than CHIP_TAHITI. Fix this by adding in a missing -EINVAL so that no invalid value is copied back to userspace.
Addresses-Coverity: ("Uninitialized scalar variable)
--- drivers/gpu/drm/radeon/radeon_kms.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/radeon/radeon_kms.c +1 -0
@@ -514,6 +514,7 @@ int radeon_info_ioctl(struct drm_device *value = rdev->config.si.backend_enable_mask; }else {DRM_DEBUG_KMS ("BACKEND_ENABLED_MASK is si+ only!\n" ); +return -EINVAL ; }break ;case RADEON_INFO_MAX_SCLK :
Greg Kroah-Hartman
maintainerPATCH 67/601 drm/dp_mst: Revise broadcast msg lct & lcr
In reply to Greg Kroah-HartmanFrom: Wayne Lin <[email protected]>
commit 419e91ea3143bf26991442465ac64d9461e98d96 upstream.
[Why & How]
According to DP spec, broadcast message LCT equals to 1 and LCR equals to 6. Current implementation is incorrect. Fix it.
In addition, revise a bit the hdr->rad handling to include broadcast case.
--- drivers/gpu/drm/drm_dp_mst_topology.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)
drivers/gpu/drm/drm_dp_mst_topology.c +9 -4
@@ -2829,10 +2829,15 @@ static int set_hdr_from_dst_qlock(structelse hdr->broadcast =0 ; hdr->path_msg = txmsg->path_msg; - hdr->lct = mstb->lct; - hdr->lcr = mstb->lct -1 ; -if (mstb->lct >1 ) -memcpy (hdr->rad, mstb->rad, mstb->lct /2 ); +if (hdr->broadcast) { + hdr->lct =1 ; + hdr->lcr =6 ; + }else { + hdr->lct = mstb->lct; + hdr->lcr = mstb->lct -1 ; + } + +memcpy (hdr->rad, mstb->rad, hdr->lct /2 );return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 68/601 drm/dp_mst: Set CLEAR_PAYLOAD_ID_TABLE as broadcast
In reply to Greg Kroah-HartmanFrom: Wayne Lin <[email protected]>
commit d919d3d6cdb31d0f9fe06c880f683a24f2838813 upstream.
[Why & How]
According to DP spec, CLEAR_PAYLOAD_ID_TABLE is a path broadcast request message and current implementation is incorrect. Fix it.
--- drivers/gpu/drm/drm_dp_mst_topology.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/drm_dp_mst_topology.c +3 -1
@@ -1154,6 +1154,7 @@ static void build_clear_payload_id_table req.req_type =DP_CLEAR_PAYLOAD_ID_TABLE ;drm_dp_encode_sideband_req (&req, msg); + msg->path_msg = true; } static int build_enum_path_resources(struct drm_dp_sideband_msg_tx *msg,
@@ -2824,7 +2825,8 @@ static int set_hdr_from_dst_qlock(struct req_type = txmsg->msg[0 ] &0x7f ;if (req_type ==DP_CONNECTION_STATUS_NOTIFY || - req_type ==DP_RESOURCE_STATUS_NOTIFY ) + req_type ==DP_RESOURCE_STATUS_NOTIFY || + req_type ==DP_CLEAR_PAYLOAD_ID_TABLE ) hdr->broadcast =1 ;else hdr->broadcast =0 ;
Greg Kroah-Hartman
maintainerPATCH 69/601 drm: bridge: fix ANX7625 use of mipi_dsi_() functions
In reply to Greg Kroah-HartmanFrom: Randy Dunlap <[email protected]>
commit ed01fca38717169fcb61bd45ad1c3750d9c40d59 upstream.
The Analogix DRM ANX7625 bridge driver uses mips_dsi_() function interfaces so it should select DRM_MIPI_DSI to prevent build errors.
ERROR: modpost: "mipi_dsi_attach" [drivers/gpu/drm/bridge/analogix/anx7625.ko] undefined!
ERROR: modpost: "mipi_dsi_device_register_full" [drivers/gpu/drm/bridge/analogix/anx7625.ko] undefined!
ERROR: modpost: "of_find_mipi_dsi_host_by_node" [drivers/gpu/drm/bridge/analogix/anx7625.ko] undefined!
ERROR: modpost: "mipi_dsi_device_unregister" [drivers/gpu/drm/bridge/analogix/anx7625.ko] undefined!
ERROR: modpost: "mipi_dsi_detach" [drivers/gpu/drm/bridge/analogix/anx7625.ko] undefined!
--- drivers/gpu/drm/bridge/analogix/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/bridge/analogix/Kconfig +1 -0
@@ -30,6 +30,7 @@ config DRM_ANALOGIX_ANX7625 tristate "Analogix Anx7625 MIPI to DP interface support" depends on DRM depends on OF + select DRM_MIPI_DSI help ANX7625 is an ultra-low power 4K mobile HD transmitter designed for portable devices. It converts MIPI/DPI to
Greg Kroah-Hartman
maintainerPATCH 70/601 drm: bridge/panel: Cleanup connector on bridge detach
In reply to Greg Kroah-HartmanFrom: Paul Cercueil <[email protected]>
commit 4d906839d321c2efbf3fed4bc31ffd9ff55b75c0 upstream.
If we don't call drm_connector_cleanup() manually in panel_bridge_detach(), the connector will be cleaned up with the other DRM objects in the call to drm_mode_config_cleanup(). However, since our drm_connector is devm-allocated, by the time drm_mode_config_cleanup() will be called, our connector will be long gone. Therefore, the connector must be cleaned up when the bridge is detached to avoid use-after-free conditions.
v2: Cleanup connector only if it was created
v3: Add FIXME
v4: (Use connector->dev) directly in if() block
--- drivers/gpu/drm/bridge/panel.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
drivers/gpu/drm/bridge/panel.c +12 -0
@@ -87,6 +87,18 @@ static int panel_bridge_attach(struct drstatic void panel_bridge_detach (struct drm_bridge *bridge) { +struct panel_bridge *panel_bridge =drm_bridge_to_panel_bridge (bridge); +struct drm_connector *connector = &panel_bridge->connector; + +/* +* Cleanup the connector if we know it was initialized. +* +* FIXME: This wouldn't be needed if the panel_bridge structure was +* allocated with drmm_kzalloc(). This might be tricky since the +* drm_device pointer can only be retrieved when the bridge is attached. +*/ +if (connector->dev) +drm_connector_cleanup (connector); }static void panel_bridge_pre_enable (struct drm_bridge *bridge)
Greg Kroah-Hartman
maintainerPATCH 71/601 drm/amd/display: Reject non-zero src_y and src_x for video planes
In reply to Greg Kroah-HartmanFrom: Harry Wentland <[email protected]>
commit d89f6048bdcb6a56abb396c584747d5eeae650db upstream.
[Why]
This hasn't been well tested and leads to complete system hangs on DCN1 based systems, possibly others.
The system hang can be reproduced by gesturing the video on the YouTube Android app on ChromeOS into full screen.
[How]
Reject atomic commits with non-zero drm_plane_state.src_x or src_y values.
v2:
- Add code comment describing the reason we're rejecting non-zero src_x and src_y
- Drop gerrit Change-Id
- Add stable CC
- Based on amd-staging-drm-next
v3: removed trailing whitespace
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +17 -0
@@ -3740,6 +3740,23 @@ static int fill_dc_scaling_info(const st scaling_info->src_rect.x = state->src_x >>16 ; scaling_info->src_rect.y = state->src_y >>16 ; +/* +* For reasons we don't (yet) fully understand a non-zero +* src_y coordinate into an NV12 buffer can cause a +* system hang. To avoid hangs (and maybe be overly cautious) +* let's reject both non-zero src_x and src_y. +* +* We currently know of only one use-case to reproduce a +* scenario with non-zero src_x and src_y for NV12, which +* is to gesture the YouTube Android app into full screen +* on ChromeOS. +*/ +if (state->fb && + state->fb->format->format ==DRM_FORMAT_NV12 && + (scaling_info->src_rect.x !=0 || + scaling_info->src_rect.y !=0 )) +return -EINVAL ; + scaling_info->src_rect.width = state->src_w >>16 ;if (scaling_info->src_rect.width ==0 )return -EINVAL ;
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Greg Kroah-Hartman
maintainerPATCH 72/601 drm/amdgpu: fix concurrent VM flushes on Vega/Navi v2
In reply to Greg Kroah-HartmanFrom: Christian König <[email protected]>
commit 20a5f5a98e1bb3d40acd97e89299e8c2d22784be upstream.
Starting with Vega the hardware supports concurrent flushes of VMID which can be used to implement per process VMID allocation.
But concurrent flushes are mutual exclusive with back to back VMID allocations, fix this to avoid a VMID used in two ways at the same time.
v2: don't set ring to NULL
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c | 19 +++++++++++-------- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 6 ++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 1 + 3 files changed, 18 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c +11 -8
@@ -215,7 +215,11 @@ static int amdgpu_vmid_grab_idle(struct/* Check if we have an idle VMID */ i =0 ;list_for_each_entry ((*idle), &id_mgr->ids_lru, list) { - fences[i] =amdgpu_sync_peek_fence (&(*idle)->active, ring); +/* Don't use per engine and per process VMID at the same time */ +struct amdgpu_ring *r = adev->vm_manager.concurrent_flush ? +NULL : ring; + + fences[i] =amdgpu_sync_peek_fence (&(*idle)->active, r);if (!fences[i])break ; ++i;
@@ -281,7 +285,7 @@ static int amdgpu_vmid_grab_reserved(strif (updates && (*id)->flushed_updates && updates->context == (*id)->flushed_updates->context && !dma_fence_is_later (updates, (*id)->flushed_updates)) - updates =NULL ; + updates =NULL ; if ((*id)->owner != vm->immediate.fence_context || job->vm_pd_addr != (*id)->pd_gpu_addr ||
@@ -290,6 +294,10 @@ static int amdgpu_vmid_grab_reserved(str !dma_fence_is_signaled((*id)->last_flush))) {struct dma_fence *tmp; +/* Don't use per engine and per process VMID at the same time */ +if (adev->vm_manager.concurrent_flush) + ring =NULL ; +/* to prevent one context starved by another context */ (*id)->pd_gpu_addr =0 ; tmp =amdgpu_sync_peek_fence (&(*id)->active, ring);
@@ -365,12 +373,7 @@ static int amdgpu_vmid_grab_used(structif (updates && (!flushed ||dma_fence_is_later (updates, flushed))) needs_flush = true; -/* Concurrent flushes are only possible starting with Vega10 and -* are broken on Navi10 and Navi14. -*/ -if (needs_flush && (adev->asic_type <CHIP_VEGA10 || - adev->asic_type ==CHIP_NAVI10 || - adev->asic_type ==CHIP_NAVI14 )) +if (needs_flush && !adev->vm_manager.concurrent_flush)continue ;/* Good, we can use this VMID. Remember this submission as
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +6 -0
@@ -3145,6 +3145,12 @@ void amdgpu_vm_manager_init(struct amdgp {unsigned i; +/* Concurrent flushes are only possible starting with Vega10 and +* are broken on Navi10 and Navi14. +*/ + adev->vm_manager.concurrent_flush = !(adev->asic_type <CHIP_VEGA10 || + adev->asic_type ==CHIP_NAVI10 || + adev->asic_type ==CHIP_NAVI14 );amdgpu_vmid_mgr_init (adev); adev->vm_manager.fence_context =
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h +1 -0
@@ -331,6 +331,7 @@ struct amdgpu_vm_manager {/* Handling of VMIDs */ struct amdgpu_vmid_mgr id_mgr[AMDGPU_MAX_VMHUBS ];unsigned int first_kfd_vmid; +bool concurrent_flush;/* Handling of VM fences */ u64 fence_context;
Greg Kroah-Hartman
maintainerPATCH 73/601 drm/amdgpu: add new MC firmware for Polaris12 32bit ASIC
In reply to Greg Kroah-HartmanFrom: Evan Quan <[email protected]>
commit c83c4e1912446db697a120eb30126cd80cbf6349 upstream.
Polaris12 32bit ASIC needs a special MC firmware.
--- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c +10 -3
@@ -59,6 +59,7 @@ MODULE_FIRMWARE("amdgpu/tonga_mc.bin");MODULE_FIRMWARE ("amdgpu/polaris11_mc.bin" );MODULE_FIRMWARE ("amdgpu/polaris10_mc.bin" );MODULE_FIRMWARE ("amdgpu/polaris12_mc.bin" ); +MODULE_FIRMWARE ("amdgpu/polaris12_32_mc.bin" );MODULE_FIRMWARE ("amdgpu/polaris11_k_mc.bin" );MODULE_FIRMWARE ("amdgpu/polaris10_k_mc.bin" );MODULE_FIRMWARE ("amdgpu/polaris12_k_mc.bin" );
@@ -243,10 +244,16 @@ static int gmc_v8_0_init_microcode(struc chip_name ="polaris10" ;break ;case CHIP_POLARIS12 : -if (ASICID_IS_P23 (adev->pdev->device, adev->pdev->revision)) +if (ASICID_IS_P23 (adev->pdev->device, adev->pdev->revision)) { chip_name ="polaris12_k" ; -else - chip_name ="polaris12" ; + }else { +WREG32 (mmMC_SEQ_IO_DEBUG_INDEX, ixMC_IO_DEBUG_UP_159); +/* Polaris12 32bit ASIC needs a special MC firmware */ +if (RREG32 (mmMC_SEQ_IO_DEBUG_DATA) ==0x05b4dc40 ) + chip_name ="polaris12_32" ; +else + chip_name ="polaris12" ; + }break ;case CHIP_FIJI :case CHIP_CARRIZO :
Greg Kroah-Hartman
maintainerPATCH 74/601 drm/amdgpu: Init GFX10_ADDR_CONFIG for VCN v3 in DPG mode.
In reply to Greg Kroah-HartmanFrom: Bas Nieuwenhuizen <[email protected]>
commit 8bf073ca9235fe38d7b74a0b4e779cfa7cc70fc9 upstream.
Otherwise tiling modes that require the values form this field (In particular _*_X) would be corrupted upon video decode.
Copied from the VCN v2 code.
Reviewed-and-Tested by: Leo Liu <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c +4 -0
@@ -584,6 +584,10 @@ static void vcn_v3_0_mc_resume_dpg_mode(WREG32_SOC15_DPG_MODE (inst_idx,SOC15_DPG_MODE_OFFSET (VCN , inst_idx, mmUVD_VCPU_NONCACHE_SIZE0),AMDGPU_GPU_PAGE_ALIGN (sizeof (struct amdgpu_fw_shared )),0 , indirect); + +/* VCN global tiling registers */ +WREG32_SOC15_DPG_MODE (0 ,SOC15_DPG_MODE_OFFSET ( +UVD ,0 , mmUVD_GFX10_ADDR_CONFIG), adev->gfx.config.gb_addr_config,0 , indirect); }static void vcn_v3_0_disable_static_power_gating (struct amdgpu_device *adev,int inst)
Greg Kroah-Hartman
maintainerPATCH 75/601 ALSA: hda/realtek: Re-order ALC882 Acer quirk table entries
In reply to Greg Kroah-HartmanFrom: Takashi Iwai <[email protected]>
commit b265047ac56bad8c4f3d0c8bf9cb4e828ee0d28e upstream.
Just re-order the alc882_fixup_tbl[] entries for Acer devices for avoiding the oversight of the duplicated or unapplied item in future. No functional changes.
Also Cc-to-stable for the further patch applications.
--- sound/pci/hda/patch_realtek.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
sound/pci/hda/patch_realtek.c +3 -3
@@ -2470,13 +2470,13 @@ static const struct snd_pci_quirk alc882 ALC882_FIXUP_ACER_ASPIRE_8930G),SND_PCI_QUIRK (0x1025 ,0x0146 ,"Acer Aspire 6935G" ,ALC882_FIXUP_ACER_ASPIRE_8930G ), +SND_PCI_QUIRK (0x1025 ,0x0142 ,"Acer Aspire 7730G" , +ALC882_FIXUP_ACER_ASPIRE_4930G ), +SND_PCI_QUIRK (0x1025 ,0x0155 ,"Packard-Bell M5120" ,ALC882_FIXUP_PB_M5210 ),SND_PCI_QUIRK (0x1025 ,0x015e ,"Acer Aspire 6930G" ,ALC882_FIXUP_ACER_ASPIRE_4930G ),SND_PCI_QUIRK (0x1025 ,0x0166 ,"Acer Aspire 6530G" ,ALC882_FIXUP_ACER_ASPIRE_4930G ), -SND_PCI_QUIRK (0x1025 ,0x0142 ,"Acer Aspire 7730G" , -ALC882_FIXUP_ACER_ASPIRE_4930G ), -SND_PCI_QUIRK (0x1025 ,0x0155 ,"Packard-Bell M5120" ,ALC882_FIXUP_PB_M5210 ),SND_PCI_QUIRK (0x1025 ,0x021e ,"Acer Aspire 5739G" ,ALC882_FIXUP_ACER_ASPIRE_4930G ), SND_PCI_QUIRK(0x1025, 0x0259, "Acer Aspire 5935", ALC889_FIXUP_DAC_ROUTE),
Greg Kroah-Hartman
maintainerPATCH 76/601 ALSA: hda/realtek: Re-order ALC882 Sony quirk table entries
In reply to Greg Kroah-HartmanFrom: Takashi Iwai <[email protected]>
commit b7529c18feecb1af92f9db08c8e7fe446a82d96d upstream.
Just re-order the alc882_fixup_tbl[] entries for Sony devices for avoiding the oversight of the duplicated or unapplied item in future. No functional changes.
Also Cc-to-stable for the further patch applications.
--- sound/pci/hda/patch_realtek.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/pci/hda/patch_realtek.c +2 -2
@@ -2489,11 +2489,11 @@ static const struct snd_pci_quirk alc882SND_PCI_QUIRK (0x1043 ,0x835f ,"Asus Eee 1601" ,ALC888_FIXUP_EEE1601 ),SND_PCI_QUIRK (0x1043 ,0x84bc ,"ASUS ET2700" ,ALC887_FIXUP_ASUS_BASS ),SND_PCI_QUIRK (0x1043 ,0x8691 ,"ASUS ROG Ranger VIII" ,ALC882_FIXUP_GPIO3 ), +SND_PCI_QUIRK (0x104d ,0x9043 ,"Sony Vaio VGC-LN51JGB" ,ALC882_FIXUP_NO_PRIMARY_HP ), +SND_PCI_QUIRK (0x104d ,0x9044 ,"Sony VAIO AiO" ,ALC882_FIXUP_NO_PRIMARY_HP ),SND_PCI_QUIRK (0x104d ,0x9047 ,"Sony Vaio TT" ,ALC889_FIXUP_VAIO_TT ),SND_PCI_QUIRK (0x104d ,0x905a ,"Sony Vaio Z" ,ALC882_FIXUP_NO_PRIMARY_HP ),SND_PCI_QUIRK (0x104d ,0x9060 ,"Sony Vaio VPCL14M1R" ,ALC882_FIXUP_NO_PRIMARY_HP ), -SND_PCI_QUIRK (0x104d ,0x9043 ,"Sony Vaio VGC-LN51JGB" ,ALC882_FIXUP_NO_PRIMARY_HP ), -SND_PCI_QUIRK (0x104d ,0x9044 ,"Sony VAIO AiO" ,ALC882_FIXUP_NO_PRIMARY_HP ),/* All Apple entries are in codec SSIDs */ SND_PCI_QUIRK(0x106b, 0x00a0, "MacBookPro 3,1", ALC889_FIXUP_MBP_VREF),
Greg Kroah-Hartman
maintainerPATCH 77/601 ALSA: hda/realtek: Re-order ALC882 Clevo quirk table entries
In reply to Greg Kroah-HartmanFrom: Takashi Iwai <[email protected]>
commit 13e1a4cd490b959a4c72c9f4fb502ef56b190062 upstream.
Just re-order the alc882_fixup_tbl[] entries for Clevo devices for avoiding the oversight of the duplicated or unapplied item in future. No functional changes.
Also, user lower hex letters in the entry.
Also Cc-to-stable for the further patch applications.
--- sound/pci/hda/patch_realtek.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)
sound/pci/hda/patch_realtek.c +11 -11
@@ -2536,9 +2536,19 @@ static const struct snd_pci_quirk alc882SND_PCI_QUIRK (0x1462 ,0xda57 ,"MSI Z270-Gaming" ,ALC1220_FIXUP_GB_DUAL_CODECS ),SND_PCI_QUIRK_VENDOR (0x1462 ,"MSI" ,ALC882_FIXUP_GPIO3 ),SND_PCI_QUIRK (0x147b ,0x107a ,"Abit AW9D-MAX" ,ALC882_FIXUP_ABIT_AW9D_MAX ), +SND_PCI_QUIRK (0x1558 ,0x50d3 ,"Clevo PC50[ER][CDF]" ,ALC1220_FIXUP_CLEVO_PB51ED_PINS ), +SND_PCI_QUIRK (0x1558 ,0x65d1 ,"Clevo PB51[ER][CDF]" ,ALC1220_FIXUP_CLEVO_PB51ED_PINS ), +SND_PCI_QUIRK (0x1558 ,0x65d2 ,"Clevo PB51R[CDF]" ,ALC1220_FIXUP_CLEVO_PB51ED_PINS ), +SND_PCI_QUIRK (0x1558 ,0x65e1 ,"Clevo PB51[ED][DF]" ,ALC1220_FIXUP_CLEVO_PB51ED_PINS ), +SND_PCI_QUIRK (0x1558 ,0x65e5 ,"Clevo PC50D[PRS](?:-D|-G)?" ,ALC1220_FIXUP_CLEVO_PB51ED_PINS ), +SND_PCI_QUIRK (0x1558 ,0x67d1 ,"Clevo PB71[ER][CDF]" ,ALC1220_FIXUP_CLEVO_PB51ED_PINS ), +SND_PCI_QUIRK (0x1558 ,0x67e1 ,"Clevo PB71[DE][CDF]" ,ALC1220_FIXUP_CLEVO_PB51ED_PINS ), +SND_PCI_QUIRK (0x1558 ,0x67e5 ,"Clevo PC70D[PRS](?:-D|-G)?" ,ALC1220_FIXUP_CLEVO_PB51ED_PINS ), +SND_PCI_QUIRK (0x1558 ,0x70d1 ,"Clevo PC70[ER][CDF]" ,ALC1220_FIXUP_CLEVO_PB51ED_PINS ), +SND_PCI_QUIRK (0x1558 ,0x7714 ,"Clevo X170" ,ALC1220_FIXUP_CLEVO_PB51ED_PINS ),SND_PCI_QUIRK (0x1558 ,0x9501 ,"Clevo P950HR" ,ALC1220_FIXUP_CLEVO_P950 ),SND_PCI_QUIRK (0x1558 ,0x9506 ,"Clevo P955HQ" ,ALC1220_FIXUP_CLEVO_P950 ), -SND_PCI_QUIRK (0x1558 ,0x950A ,"Clevo P955H[PR]" ,ALC1220_FIXUP_CLEVO_P950 ), +SND_PCI_QUIRK (0x1558 ,0x950a ,"Clevo P955H[PR]" ,ALC1220_FIXUP_CLEVO_P950 ),SND_PCI_QUIRK (0x1558 ,0x95e1 ,"Clevo P95xER" ,ALC1220_FIXUP_CLEVO_P950 ),SND_PCI_QUIRK (0x1558 ,0x95e2 ,"Clevo P950ER" ,ALC1220_FIXUP_CLEVO_P950 ), SND_PCI_QUIRK(0x1558, 0x95e3, "Clevo P955[ER]T", ALC1220_FIXUP_CLEVO_P950),
@@ -2548,16 +2558,6 @@ static const struct snd_pci_quirk alc882SND_PCI_QUIRK (0x1558 ,0x96e1 ,"Clevo P960[ER][CDFN]-K" ,ALC1220_FIXUP_CLEVO_P950 ),SND_PCI_QUIRK (0x1558 ,0x97e1 ,"Clevo P970[ER][CDFN]" ,ALC1220_FIXUP_CLEVO_P950 ),SND_PCI_QUIRK (0x1558 ,0x97e2 ,"Clevo P970RC-M" ,ALC1220_FIXUP_CLEVO_P950 ), -SND_PCI_QUIRK (0x1558 ,0x50d3 ,"Clevo PC50[ER][CDF]" ,ALC1220_FIXUP_CLEVO_PB51ED_PINS ), -SND_PCI_QUIRK (0x1558 ,0x65d1 ,"Clevo PB51[ER][CDF]" ,ALC1220_FIXUP_CLEVO_PB51ED_PINS ), -SND_PCI_QUIRK (0x1558 ,0x65d2 ,"Clevo PB51R[CDF]" ,ALC1220_FIXUP_CLEVO_PB51ED_PINS ), -SND_PCI_QUIRK (0x1558 ,0x65e1 ,"Clevo PB51[ED][DF]" ,ALC1220_FIXUP_CLEVO_PB51ED_PINS ), -SND_PCI_QUIRK (0x1558 ,0x65e5 ,"Clevo PC50D[PRS](?:-D|-G)?" ,ALC1220_FIXUP_CLEVO_PB51ED_PINS ), -SND_PCI_QUIRK (0x1558 ,0x67d1 ,"Clevo PB71[ER][CDF]" ,ALC1220_FIXUP_CLEVO_PB51ED_PINS ), -SND_PCI_QUIRK (0x1558 ,0x67e1 ,"Clevo PB71[DE][CDF]" ,ALC1220_FIXUP_CLEVO_PB51ED_PINS ), -SND_PCI_QUIRK (0x1558 ,0x67e5 ,"Clevo PC70D[PRS](?:-D|-G)?" ,ALC1220_FIXUP_CLEVO_PB51ED_PINS ), -SND_PCI_QUIRK (0x1558 ,0x70d1 ,"Clevo PC70[ER][CDF]" ,ALC1220_FIXUP_CLEVO_PB51ED_PINS ), -SND_PCI_QUIRK (0x1558 ,0x7714 ,"Clevo X170" ,ALC1220_FIXUP_CLEVO_PB51ED_PINS ),SND_PCI_QUIRK_VENDOR (0x1558 ,"Clevo laptop" ,ALC882_FIXUP_EAPD ),SND_PCI_QUIRK (0x161f ,0x2054 ,"Medion laptop" ,ALC883_FIXUP_EAPD ), SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Y530", ALC882_FIXUP_LENOVO_Y530),
Greg Kroah-Hartman
maintainerPATCH 78/601 ALSA: hda/realtek: Re-order ALC269 HP quirk table entries
In reply to Greg Kroah-HartmanFrom: Takashi Iwai <[email protected]>
commit 45461e3b554c75ddff9703539f3711cc3dfb0422 upstream.
Just re-order the alc269_fixup_tbl[] entries for HP devices for avoiding the oversight of the duplicated or unapplied item in future. No functional changes.
Formerly, some entries were grouped for the actual codec, but this doesn't seem reasonable to keep in that way. So now we simply keep the PCI SSID order for the whole.
Also Cc-to-stable for the further patch applications.
--- sound/pci/hda/patch_realtek.c | 44 ++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 23 deletions(-)
sound/pci/hda/patch_realtek.c +21 -23
@@ -8031,35 +8031,18 @@ static const struct snd_pci_quirk alc269SND_PCI_QUIRK (0x103c ,0x1586 ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC2 ),SND_PCI_QUIRK (0x103c ,0x18e6 ,"HP" ,ALC269_FIXUP_HP_GPIO_LED ),SND_PCI_QUIRK (0x103c ,0x218b ,"HP" ,ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED ), -SND_PCI_QUIRK (0x103c ,0x225f ,"HP" ,ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY ), -/* ALC282 */ SND_PCI_QUIRK (0x103c ,0x21f9 ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ),SND_PCI_QUIRK (0x103c ,0x2210 ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ),SND_PCI_QUIRK (0x103c ,0x2214 ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ), +SND_PCI_QUIRK (0x103c ,0x221b ,"HP" ,ALC269_FIXUP_HP_GPIO_MIC1_LED ), +SND_PCI_QUIRK (0x103c ,0x221c ,"HP EliteBook 755 G2" ,ALC280_FIXUP_HP_HEADSET_MIC ), +SND_PCI_QUIRK (0x103c ,0x2221 ,"HP" ,ALC269_FIXUP_HP_GPIO_MIC1_LED ), +SND_PCI_QUIRK (0x103c ,0x2225 ,"HP" ,ALC269_FIXUP_HP_GPIO_MIC1_LED ),SND_PCI_QUIRK (0x103c ,0x2236 ,"HP" ,ALC269_FIXUP_HP_LINE1_MIC1_LED ),SND_PCI_QUIRK (0x103c ,0x2237 ,"HP" ,ALC269_FIXUP_HP_LINE1_MIC1_LED ),SND_PCI_QUIRK (0x103c ,0x2238 ,"HP" ,ALC269_FIXUP_HP_LINE1_MIC1_LED ),SND_PCI_QUIRK (0x103c ,0x2239 ,"HP" ,ALC269_FIXUP_HP_LINE1_MIC1_LED ),SND_PCI_QUIRK (0x103c ,0x224b ,"HP" ,ALC269_FIXUP_HP_LINE1_MIC1_LED ), -SND_PCI_QUIRK (0x103c ,0x2268 ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ), -SND_PCI_QUIRK (0x103c ,0x226a ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ), -SND_PCI_QUIRK (0x103c ,0x226b ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ), -SND_PCI_QUIRK (0x103c ,0x226e ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ), -SND_PCI_QUIRK (0x103c ,0x2271 ,"HP" ,ALC286_FIXUP_HP_GPIO_LED ), -SND_PCI_QUIRK (0x103c ,0x2272 ,"HP" ,ALC280_FIXUP_HP_DOCK_PINS ), -SND_PCI_QUIRK (0x103c ,0x2273 ,"HP" ,ALC280_FIXUP_HP_DOCK_PINS ), -SND_PCI_QUIRK (0x103c ,0x229e ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ), -SND_PCI_QUIRK (0x103c ,0x22b2 ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ), -SND_PCI_QUIRK (0x103c ,0x22b7 ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ), -SND_PCI_QUIRK (0x103c ,0x22bf ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ), -SND_PCI_QUIRK (0x103c ,0x22cf ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ), -SND_PCI_QUIRK (0x103c ,0x22db ,"HP" ,ALC280_FIXUP_HP_9480M ), -SND_PCI_QUIRK (0x103c ,0x22dc ,"HP" ,ALC269_FIXUP_HP_GPIO_MIC1_LED ), -SND_PCI_QUIRK (0x103c ,0x22fb ,"HP" ,ALC269_FIXUP_HP_GPIO_MIC1_LED ), -/* ALC290 */ -SND_PCI_QUIRK (0x103c ,0x221b ,"HP" ,ALC269_FIXUP_HP_GPIO_MIC1_LED ), -SND_PCI_QUIRK (0x103c ,0x2221 ,"HP" ,ALC269_FIXUP_HP_GPIO_MIC1_LED ), -SND_PCI_QUIRK (0x103c ,0x2225 ,"HP" ,ALC269_FIXUP_HP_GPIO_MIC1_LED ),SND_PCI_QUIRK (0x103c ,0x2253 ,"HP" ,ALC269_FIXUP_HP_GPIO_MIC1_LED ),SND_PCI_QUIRK (0x103c ,0x2254 ,"HP" ,ALC269_FIXUP_HP_GPIO_MIC1_LED ), SND_PCI_QUIRK(0x103c, 0x2255, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
@@ -8067,26 +8050,41 @@ static const struct snd_pci_quirk alc269SND_PCI_QUIRK (0x103c ,0x2257 ,"HP" ,ALC269_FIXUP_HP_GPIO_MIC1_LED ),SND_PCI_QUIRK (0x103c ,0x2259 ,"HP" ,ALC269_FIXUP_HP_GPIO_MIC1_LED ),SND_PCI_QUIRK (0x103c ,0x225a ,"HP" ,ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED ), +SND_PCI_QUIRK (0x103c ,0x225f ,"HP" ,ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY ),SND_PCI_QUIRK (0x103c ,0x2260 ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ),SND_PCI_QUIRK (0x103c ,0x2263 ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ),SND_PCI_QUIRK (0x103c ,0x2264 ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ),SND_PCI_QUIRK (0x103c ,0x2265 ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ), +SND_PCI_QUIRK (0x103c ,0x2268 ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ), +SND_PCI_QUIRK (0x103c ,0x226a ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ), +SND_PCI_QUIRK (0x103c ,0x226b ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ), +SND_PCI_QUIRK (0x103c ,0x226e ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ), +SND_PCI_QUIRK (0x103c ,0x2271 ,"HP" ,ALC286_FIXUP_HP_GPIO_LED ),SND_PCI_QUIRK (0x103c ,0x2272 ,"HP" ,ALC269_FIXUP_HP_GPIO_MIC1_LED ), +SND_PCI_QUIRK (0x103c ,0x2272 ,"HP" ,ALC280_FIXUP_HP_DOCK_PINS ),SND_PCI_QUIRK (0x103c ,0x2273 ,"HP" ,ALC269_FIXUP_HP_GPIO_MIC1_LED ), +SND_PCI_QUIRK (0x103c ,0x2273 ,"HP" ,ALC280_FIXUP_HP_DOCK_PINS ),SND_PCI_QUIRK (0x103c ,0x2278 ,"HP" ,ALC269_FIXUP_HP_GPIO_MIC1_LED ),SND_PCI_QUIRK (0x103c ,0x227f ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ),SND_PCI_QUIRK (0x103c ,0x2282 ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ),SND_PCI_QUIRK (0x103c ,0x228b ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ),SND_PCI_QUIRK (0x103c ,0x228e ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ), +SND_PCI_QUIRK (0x103c ,0x229e ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ), +SND_PCI_QUIRK (0x103c ,0x22b2 ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ), +SND_PCI_QUIRK (0x103c ,0x22b7 ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ), +SND_PCI_QUIRK (0x103c ,0x22bf ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ), +SND_PCI_QUIRK (0x103c ,0x22c4 ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ),SND_PCI_QUIRK (0x103c ,0x22c5 ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ),SND_PCI_QUIRK (0x103c ,0x22c7 ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ),SND_PCI_QUIRK (0x103c ,0x22c8 ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ), -SND_PCI_QUIRK (0x103c ,0x22c4 ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ), +SND_PCI_QUIRK (0x103c ,0x22cf ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ), +SND_PCI_QUIRK (0x103c ,0x22db ,"HP" ,ALC280_FIXUP_HP_9480M ), +SND_PCI_QUIRK (0x103c ,0x22dc ,"HP" ,ALC269_FIXUP_HP_GPIO_MIC1_LED ), +SND_PCI_QUIRK (0x103c ,0x22fb ,"HP" ,ALC269_FIXUP_HP_GPIO_MIC1_LED ),SND_PCI_QUIRK (0x103c ,0x2334 ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ),SND_PCI_QUIRK (0x103c ,0x2335 ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ),SND_PCI_QUIRK (0x103c ,0x2336 ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ),SND_PCI_QUIRK (0x103c ,0x2337 ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ), -SND_PCI_QUIRK (0x103c ,0x221c ,"HP EliteBook 755 G2" ,ALC280_FIXUP_HP_HEADSET_MIC ),SND_PCI_QUIRK (0x103c ,0x802e ,"HP Z240 SFF" ,ALC221_FIXUP_HP_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x103c ,0x802f ,"HP Z240" ,ALC221_FIXUP_HP_MIC_NO_PRESENCE ), SND_PCI_QUIRK(0x103c, 0x8077, "HP", ALC256_FIXUP_HP_HEADSET_MIC),
Greg Kroah-Hartman
maintainerPATCH 79/601 ALSA: hda/realtek: Re-order ALC269 Acer quirk table entries
In reply to Greg Kroah-HartmanFrom: Takashi Iwai <[email protected]>
commit 433f894ec7fbd3b4bf1f3187b2ddd566078c4aef upstream.
Just re-order the alc269_fixup_tbl[] entries for Acer devices for avoiding the oversight of the duplicated or unapplied item in future. No functional changes.
Also Cc-to-stable for the further patch applications.
--- sound/pci/hda/patch_realtek.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/pci/hda/patch_realtek.c +1 -1
@@ -7947,12 +7947,12 @@ static const struct snd_pci_quirk alc269SND_PCI_QUIRK (0x1025 ,0x0349 ,"Acer AOD260" ,ALC269_FIXUP_INV_DMIC ),SND_PCI_QUIRK (0x1025 ,0x047c ,"Acer AC700" ,ALC269_FIXUP_ACER_AC700 ),SND_PCI_QUIRK (0x1025 ,0x072d ,"Acer Aspire V5-571G" ,ALC269_FIXUP_ASPIRE_HEADSET_MIC ), -SND_PCI_QUIRK (0x1025 ,0x080d ,"Acer Aspire V5-122P" ,ALC269_FIXUP_ASPIRE_HEADSET_MIC ),SND_PCI_QUIRK (0x1025 ,0x0740 ,"Acer AO725" ,ALC271_FIXUP_HP_GATE_MIC_JACK ),SND_PCI_QUIRK (0x1025 ,0x0742 ,"Acer AO756" ,ALC271_FIXUP_HP_GATE_MIC_JACK ),SND_PCI_QUIRK (0x1025 ,0x0762 ,"Acer Aspire E1-472" ,ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572 ),SND_PCI_QUIRK (0x1025 ,0x0775 ,"Acer Aspire E1-572" ,ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572 ),SND_PCI_QUIRK (0x1025 ,0x079b ,"Acer Aspire V5-573G" ,ALC282_FIXUP_ASPIRE_V5_PINS ), +SND_PCI_QUIRK (0x1025 ,0x080d ,"Acer Aspire V5-122P" ,ALC269_FIXUP_ASPIRE_HEADSET_MIC ),SND_PCI_QUIRK (0x1025 ,0x0840 ,"Acer Aspire E1" ,ALC269VB_FIXUP_ASPIRE_E1_COEF ),SND_PCI_QUIRK (0x1025 ,0x101c ,"Acer Veriton N2510G" ,ALC269_FIXUP_LIFEBOOK ), SND_PCI_QUIRK(0x1025, 0x102b, "Acer Aspire C24-860", ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE),
Greg Kroah-Hartman
maintainerPATCH 80/601 ALSA: hda/realtek: Re-order ALC269 Dell quirk table entries
In reply to Greg Kroah-HartmanFrom: Takashi Iwai <[email protected]>
commit aa143ad39a52d968ac69e426d329bb74f270e6ca upstream.
Just re-order the alc269_fixup_tbl[] entries for Dell devices for avoiding the oversight of the duplicated or unapplied item in future. No functional changes.
Also Cc-to-stable for the further patch applications.
--- sound/pci/hda/patch_realtek.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/pci/hda/patch_realtek.c +2 -2
@@ -8008,8 +8008,8 @@ static const struct snd_pci_quirk alc269SND_PCI_QUIRK (0x1028 ,0x0738 ,"Dell Precision 5820" ,ALC269_FIXUP_NO_SHUTUP ),SND_PCI_QUIRK (0x1028 ,0x075c ,"Dell XPS 27 7760" ,ALC298_FIXUP_SPK_VOLUME ),SND_PCI_QUIRK (0x1028 ,0x075d ,"Dell AIO" ,ALC298_FIXUP_SPK_VOLUME ), -SND_PCI_QUIRK (0x1028 ,0x07b0 ,"Dell Precision 7520" ,ALC295_FIXUP_DISABLE_DAC3 ),SND_PCI_QUIRK (0x1028 ,0x0798 ,"Dell Inspiron 17 7000 Gaming" ,ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER ), +SND_PCI_QUIRK (0x1028 ,0x07b0 ,"Dell Precision 7520" ,ALC295_FIXUP_DISABLE_DAC3 ),SND_PCI_QUIRK (0x1028 ,0x080c ,"Dell WYSE" ,ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x1028 ,0x084b ,"Dell" ,ALC274_FIXUP_DELL_AIO_LINEOUT_VERB ), SND_PCI_QUIRK(0x1028, 0x084e, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB),
@@ -8019,8 +8019,8 @@ static const struct snd_pci_quirk alc269SND_PCI_QUIRK (0x1028 ,0x08ad ,"Dell WYSE AIO" ,ALC225_FIXUP_DELL_WYSE_AIO_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x1028 ,0x08ae ,"Dell WYSE NB" ,ALC225_FIXUP_DELL1_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x1028 ,0x0935 ,"Dell" ,ALC274_FIXUP_DELL_AIO_LINEOUT_VERB ), -SND_PCI_QUIRK (0x1028 ,0x097e ,"Dell Precision" ,ALC289_FIXUP_DUAL_SPK ),SND_PCI_QUIRK (0x1028 ,0x097d ,"Dell Precision" ,ALC289_FIXUP_DUAL_SPK ), +SND_PCI_QUIRK (0x1028 ,0x097e ,"Dell Precision" ,ALC289_FIXUP_DUAL_SPK ),SND_PCI_QUIRK (0x1028 ,0x098d ,"Dell Precision" ,ALC233_FIXUP_ASUS_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x1028 ,0x09bf ,"Dell Precision" ,ALC233_FIXUP_ASUS_MIC_NO_PRESENCE ), SND_PCI_QUIRK(0x1028, 0x0a2e, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC),
Greg Kroah-Hartman
maintainerPATCH 81/601 ALSA: hda/realtek: Re-order ALC269 ASUS quirk table entries
In reply to Greg Kroah-HartmanFrom: Takashi Iwai <[email protected]>
commit 3cd0ed636dd19e7fbe3ebe8de8476e1718d5a8f1 upstream.
Just re-order the alc269_fixup_tbl[] entries for ASUS devices for avoiding the oversight of the duplicated or unapplied item in future. No functional changes.
Also Cc-to-stable for the further patch applications.
--- sound/pci/hda/patch_realtek.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
sound/pci/hda/patch_realtek.c +3 -3
@@ -8126,16 +8126,18 @@ static const struct snd_pci_quirk alc269SND_PCI_QUIRK (0x1043 ,0x10d0 ,"ASUS X540LA/X540LJ" ,ALC255_FIXUP_ASUS_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x1043 ,0x115d ,"Asus 1015E" ,ALC269_FIXUP_LIMIT_INT_MIC_BOOST ),SND_PCI_QUIRK (0x1043 ,0x11c0 ,"ASUS X556UR" ,ALC255_FIXUP_ASUS_MIC_NO_PRESENCE ), +SND_PCI_QUIRK (0x1043 ,0x125e ,"ASUS Q524UQK" ,ALC255_FIXUP_ASUS_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x1043 ,0x1271 ,"ASUS X430UN" ,ALC256_FIXUP_ASUS_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x1043 ,0x1290 ,"ASUS X441SA" ,ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x1043 ,0x12a0 ,"ASUS X441UV" ,ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE ), -SND_PCI_QUIRK (0x1043 ,0x12f0 ,"ASUS X541UV" ,ALC256_FIXUP_ASUS_MIC ),SND_PCI_QUIRK (0x1043 ,0x12e0 ,"ASUS X541SA" ,ALC256_FIXUP_ASUS_MIC ), +SND_PCI_QUIRK (0x1043 ,0x12f0 ,"ASUS X541UV" ,ALC256_FIXUP_ASUS_MIC ),SND_PCI_QUIRK (0x1043 ,0x13b0 ,"ASUS Z550SA" ,ALC256_FIXUP_ASUS_MIC ),SND_PCI_QUIRK (0x1043 ,0x1427 ,"Asus Zenbook UX31E" ,ALC269VB_FIXUP_ASUS_ZENBOOK ),SND_PCI_QUIRK (0x1043 ,0x1517 ,"Asus Zenbook UX31A" ,ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A ),SND_PCI_QUIRK (0x1043 ,0x16e3 ,"ASUS UX50" ,ALC269_FIXUP_STEREO_DMIC ),SND_PCI_QUIRK (0x1043 ,0x17d1 ,"ASUS UX431FL" ,ALC294_FIXUP_ASUS_DUAL_SPK ), +SND_PCI_QUIRK (0x1043 ,0x1881 ,"ASUS Zephyrus S/M" ,ALC294_FIXUP_ASUS_GX502_PINS ),SND_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),
@@ -8148,13 +8150,11 @@ static const struct snd_pci_quirk alc269SND_PCI_QUIRK (0x1043 ,0x1b13 ,"Asus U41SV" ,ALC269_FIXUP_INV_DMIC ),SND_PCI_QUIRK (0x1043 ,0x1bbd ,"ASUS Z550MA" ,ALC255_FIXUP_ASUS_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x1043 ,0x1c23 ,"Asus X55U" ,ALC269_FIXUP_LIMIT_INT_MIC_BOOST ), -SND_PCI_QUIRK (0x1043 ,0x125e ,"ASUS Q524UQK" ,ALC255_FIXUP_ASUS_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x1043 ,0x1ccd ,"ASUS X555UB" ,ALC256_FIXUP_ASUS_MIC ),SND_PCI_QUIRK (0x1043 ,0x1d4e ,"ASUS TM420" ,ALC256_FIXUP_ASUS_HPE ),SND_PCI_QUIRK (0x1043 ,0x1e11 ,"ASUS Zephyrus G15" ,ALC289_FIXUP_ASUS_GA502 ),SND_PCI_QUIRK (0x1043 ,0x1e8e ,"ASUS Zephyrus G15" ,ALC289_FIXUP_ASUS_GA401 ),SND_PCI_QUIRK (0x1043 ,0x1f11 ,"ASUS Zephyrus G14" ,ALC289_FIXUP_ASUS_GA401 ), -SND_PCI_QUIRK (0x1043 ,0x1881 ,"ASUS Zephyrus S/M" ,ALC294_FIXUP_ASUS_GX502_PINS ),SND_PCI_QUIRK (0x1043 ,0x3030 ,"ASUS ZN270IE" ,ALC256_FIXUP_ASUS_AIO_GPIO2 ),SND_PCI_QUIRK (0x1043 ,0x831a ,"ASUS P901" ,ALC269_FIXUP_STEREO_DMIC ), SND_PCI_QUIRK(0x1043, 0x834a, "ASUS S101", ALC269_FIXUP_STEREO_DMIC),
Greg Kroah-Hartman
maintainerPATCH 82/601 ALSA: hda/realtek: Re-order ALC269 Sony quirk table entries
In reply to Greg Kroah-HartmanFrom: Takashi Iwai <[email protected]>
commit cab561f8d4bc9b196ae20c960aa5da89fd786ab5 upstream.
Just re-order the alc269_fixup_tbl[] entries for Sony devices for avoiding the oversight of the duplicated or unapplied item in future. No functional changes.
Also Cc-to-stable for the further patch applications.
--- sound/pci/hda/patch_realtek.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/pci/hda/patch_realtek.c +2 -2
@@ -8161,12 +8161,12 @@ static const struct snd_pci_quirk alc269SND_PCI_QUIRK (0x1043 ,0x8398 ,"ASUS P1005" ,ALC269_FIXUP_STEREO_DMIC ),SND_PCI_QUIRK (0x1043 ,0x83ce ,"ASUS P1005" ,ALC269_FIXUP_STEREO_DMIC ),SND_PCI_QUIRK (0x1043 ,0x8516 ,"ASUS X101CH" ,ALC269_FIXUP_ASUS_X101 ), -SND_PCI_QUIRK (0x104d ,0x90b5 ,"Sony VAIO Pro 11" ,ALC286_FIXUP_SONY_MIC_NO_PRESENCE ), -SND_PCI_QUIRK (0x104d ,0x90b6 ,"Sony VAIO Pro 13" ,ALC286_FIXUP_SONY_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x104d ,0x9073 ,"Sony VAIO" ,ALC275_FIXUP_SONY_VAIO_GPIO2 ),SND_PCI_QUIRK (0x104d ,0x907b ,"Sony VAIO" ,ALC275_FIXUP_SONY_HWEQ ),SND_PCI_QUIRK (0x104d ,0x9084 ,"Sony VAIO" ,ALC275_FIXUP_SONY_HWEQ ),SND_PCI_QUIRK (0x104d ,0x9099 ,"Sony VAIO S13" ,ALC275_FIXUP_SONY_DISABLE_AAMIX ), +SND_PCI_QUIRK (0x104d ,0x90b5 ,"Sony VAIO Pro 11" ,ALC286_FIXUP_SONY_MIC_NO_PRESENCE ), +SND_PCI_QUIRK (0x104d ,0x90b6 ,"Sony VAIO Pro 13" ,ALC286_FIXUP_SONY_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x10cf ,0x1475 ,"Lifebook" ,ALC269_FIXUP_LIFEBOOK ),SND_PCI_QUIRK (0x10cf ,0x159f ,"Lifebook E780" ,ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT ), SND_PCI_QUIRK(0x10cf, 0x15dc, "Lifebook T731", ALC269_FIXUP_LIFEBOOK_HP_PIN),
Greg Kroah-Hartman
maintainerPATCH 83/601 ALSA: hda/realtek: Re-order ALC269 Lenovo quirk table entries
In reply to Greg Kroah-HartmanFrom: Takashi Iwai <[email protected]>
commit f552ff54c2a700616a02b038e4bf3cbf859f65b7 upstream.
Just re-order the alc269_fixup_tbl[] entries for Lenovo devices for avoiding the oversight of the duplicated or unapplied item in future. No functional changes.
Also Cc-to-stable for the further patch applications.
--- sound/pci/hda/patch_realtek.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/pci/hda/patch_realtek.c +2 -2
@@ -8241,9 +8241,9 @@ static const struct snd_pci_quirk alc269SND_PCI_QUIRK (0x17aa ,0x21b8 ,"Thinkpad Edge 14" ,ALC269_FIXUP_SKU_IGNORE ),SND_PCI_QUIRK (0x17aa ,0x21ca ,"Thinkpad L412" ,ALC269_FIXUP_SKU_IGNORE ),SND_PCI_QUIRK (0x17aa ,0x21e9 ,"Thinkpad Edge 15" ,ALC269_FIXUP_SKU_IGNORE ), +SND_PCI_QUIRK (0x17aa ,0x21f3 ,"Thinkpad T430" ,ALC269_FIXUP_LENOVO_DOCK ),SND_PCI_QUIRK (0x17aa ,0x21f6 ,"Thinkpad T530" ,ALC269_FIXUP_LENOVO_DOCK_LIMIT_BOOST ),SND_PCI_QUIRK (0x17aa ,0x21fa ,"Thinkpad X230" ,ALC269_FIXUP_LENOVO_DOCK ), -SND_PCI_QUIRK (0x17aa ,0x21f3 ,"Thinkpad T430" ,ALC269_FIXUP_LENOVO_DOCK ),SND_PCI_QUIRK (0x17aa ,0x21fb ,"Thinkpad T430s" ,ALC269_FIXUP_LENOVO_DOCK ),SND_PCI_QUIRK (0x17aa ,0x2203 ,"Thinkpad X230 Tablet" ,ALC269_FIXUP_LENOVO_DOCK ), SND_PCI_QUIRK(0x17aa, 0x2208, "Thinkpad T431s", ALC269_FIXUP_LENOVO_DOCK),
@@ -8287,6 +8287,7 @@ static const struct snd_pci_quirk alc269SND_PCI_QUIRK (0x17aa ,0x3902 ,"Lenovo E50-80" ,ALC269_FIXUP_DMIC_THINKPAD_ACPI ),SND_PCI_QUIRK (0x17aa ,0x3977 ,"IdeaPad S210" ,ALC283_FIXUP_INT_MIC ),SND_PCI_QUIRK (0x17aa ,0x3978 ,"Lenovo B50-70" ,ALC269_FIXUP_DMIC_THINKPAD_ACPI ), +SND_PCI_QUIRK (0x17aa ,0x3bf8 ,"Quanta FL1" ,ALC269_FIXUP_PCM_44K ),SND_PCI_QUIRK (0x17aa ,0x5013 ,"Thinkpad" ,ALC269_FIXUP_LIMIT_INT_MIC_BOOST ),SND_PCI_QUIRK (0x17aa ,0x501a ,"Thinkpad" ,ALC283_FIXUP_INT_MIC ), SND_PCI_QUIRK(0x17aa, 0x501e, "Thinkpad L440", ALC292_FIXUP_TPT440_DOCK),
@@ -8305,7 +8306,6 @@ static const struct snd_pci_quirk alc269SND_PCI_QUIRK (0x17aa ,0x5109 ,"Thinkpad" ,ALC269_FIXUP_LIMIT_INT_MIC_BOOST ),SND_PCI_QUIRK (0x17aa ,0x511e ,"Thinkpad" ,ALC298_FIXUP_TPT470_DOCK ),SND_PCI_QUIRK (0x17aa ,0x511f ,"Thinkpad" ,ALC298_FIXUP_TPT470_DOCK ), -SND_PCI_QUIRK (0x17aa ,0x3bf8 ,"Quanta FL1" ,ALC269_FIXUP_PCM_44K ),SND_PCI_QUIRK (0x17aa ,0x9e54 ,"LENOVO NB" ,ALC269_FIXUP_LENOVO_EAPD ),SND_PCI_QUIRK (0x19e5 ,0x3204 ,"Huawei MACH-WX9" ,ALC256_FIXUP_HUAWEI_MACH_WX9_PINS ), SND_PCI_QUIRK(0x1b35, 0x1235, "CZC B20", ALC269_FIXUP_CZC_B20),
Greg Kroah-Hartman
maintainerPATCH 84/601 ALSA: hda/realtek: Re-order remaining ALC269 quirk table entries
In reply to Greg Kroah-HartmanFrom: Takashi Iwai <[email protected]>
commit c656f747df151a0a89756a5312f4ca2116758ba4 upstream.
Just re-order the alc269_fixup_tbl[] entries for FSC, Medion, Samsung and Lemote devices for avoiding the oversight of the duplicated or unapplied item in future.
No functional changes.
Also Cc-to-stable for the further patch applications.
--- sound/pci/hda/patch_realtek.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
sound/pci/hda/patch_realtek.c +5 -5
@@ -8170,10 +8170,11 @@ static const struct snd_pci_quirk alc269SND_PCI_QUIRK (0x10cf ,0x1475 ,"Lifebook" ,ALC269_FIXUP_LIFEBOOK ),SND_PCI_QUIRK (0x10cf ,0x159f ,"Lifebook E780" ,ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT ),SND_PCI_QUIRK (0x10cf ,0x15dc ,"Lifebook T731" ,ALC269_FIXUP_LIFEBOOK_HP_PIN ), -SND_PCI_QUIRK (0x10cf ,0x1757 ,"Lifebook E752" ,ALC269_FIXUP_LIFEBOOK_HP_PIN ),SND_PCI_QUIRK (0x10cf ,0x1629 ,"Lifebook U7x7" , ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC), +SND_PCI_QUIRK (0x10cf ,0x1757 ,"Lifebook E752" ,ALC269_FIXUP_LIFEBOOK_HP_PIN ),SND_PCI_QUIRK (0x10cf ,0x1845 ,"Lifebook U904" ,ALC269_FIXUP_LIFEBOOK_EXTMIC ),SND_PCI_QUIRK (0x10ec ,0x10f2 ,"Intel Reference board" ,ALC700_FIXUP_INTEL_REFERENCE ), +SND_PCI_QUIRK (0x10ec ,0x118c ,"Medion EE4254 MD62100" ,ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE ),SND_PCI_QUIRK (0x10ec ,0x1230 ,"Intel Reference board" ,ALC295_FIXUP_CHROME_BOOK ),SND_PCI_QUIRK (0x10ec ,0x1252 ,"Intel Reference board" ,ALC295_FIXUP_CHROME_BOOK ), SND_PCI_QUIRK(0x10ec, 0x1254, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
@@ -8183,9 +8184,9 @@ static const struct snd_pci_quirk alc269SND_PCI_QUIRK (0x144d ,0xc176 ,"Samsung Notebook 9 Pro (NP930MBE-K04US)" ,ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET ),SND_PCI_QUIRK (0x144d ,0xc189 ,"Samsung Galaxy Flex Book (NT950QCG-X716)" ,ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET ),SND_PCI_QUIRK (0x144d ,0xc18a ,"Samsung Galaxy Book Ion (NP930XCJ-K01US)" ,ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET ), -SND_PCI_QUIRK (0x144d ,0xc830 ,"Samsung Galaxy Book Ion (NT950XCJ-X716A)" ,ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET ),SND_PCI_QUIRK (0x144d ,0xc740 ,"Samsung Ativ book 8 (NP870Z5G)" ,ALC269_FIXUP_ATIV_BOOK_8 ),SND_PCI_QUIRK (0x144d ,0xc812 ,"Samsung Notebook Pen S (NT950SBE-X58)" ,ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET ), +SND_PCI_QUIRK (0x144d ,0xc830 ,"Samsung Galaxy Book Ion (NT950XCJ-X716A)" ,ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET ),SND_PCI_QUIRK (0x1458 ,0xfa53 ,"Gigabyte BXBT-2807" ,ALC283_FIXUP_HEADSET_MIC ),SND_PCI_QUIRK (0x1462 ,0xb120 ,"MSI Cubi MS-B120" ,ALC283_FIXUP_HEADSET_MIC ), SND_PCI_QUIRK(0x1462, 0xb171, "Cubi N 8GL (MS-B171)", ALC283_FIXUP_HEADSET_MIC),
@@ -8312,13 +8313,12 @@ static const struct snd_pci_quirk alc269SND_PCI_QUIRK (0x1b35 ,0x1236 ,"CZC TMI" ,ALC269_FIXUP_CZC_TMI ),SND_PCI_QUIRK (0x1b35 ,0x1237 ,"CZC L101" ,ALC269_FIXUP_CZC_L101 ),SND_PCI_QUIRK (0x1b7d ,0xa831 ,"Ordissimo EVE2 " ,ALC269VB_FIXUP_ORDISSIMO_EVE2 ),/* Also known as Malata PC-B1303 */ +SND_PCI_QUIRK (0x1c06 ,0x2013 ,"Lemote A1802" ,ALC269_FIXUP_LEMOTE_A1802 ), +SND_PCI_QUIRK (0x1c06 ,0x2015 ,"Lemote A190X" ,ALC269_FIXUP_LEMOTE_A190X ),SND_PCI_QUIRK (0x1d72 ,0x1602 ,"RedmiBook" ,ALC255_FIXUP_XIAOMI_HEADSET_MIC ),SND_PCI_QUIRK (0x1d72 ,0x1701 ,"XiaomiNotebook Pro" ,ALC298_FIXUP_DELL1_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x1d72 ,0x1901 ,"RedmiBook 14" ,ALC256_FIXUP_ASUS_HEADSET_MIC ),SND_PCI_QUIRK (0x1d72 ,0x1947 ,"RedmiBook Air" ,ALC255_FIXUP_XIAOMI_HEADSET_MIC ), -SND_PCI_QUIRK (0x10ec ,0x118c ,"Medion EE4254 MD62100" ,ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE ), -SND_PCI_QUIRK (0x1c06 ,0x2013 ,"Lemote A1802" ,ALC269_FIXUP_LEMOTE_A1802 ), -SND_PCI_QUIRK (0x1c06 ,0x2015 ,"Lemote A190X" ,ALC269_FIXUP_LEMOTE_A190X ),SND_PCI_QUIRK (0x8086 ,0x2074 ,"Intel NUC 8" ,ALC233_FIXUP_INTEL_NUC8_DMIC ),SND_PCI_QUIRK (0x8086 ,0x2080 ,"Intel NUC 8 Rugged" ,ALC256_FIXUP_INTEL_NUC8_RUGGED ), SND_PCI_QUIRK(0x8086, 0x2081, "Intel NUC 10", ALC256_FIXUP_INTEL_NUC10),
Greg Kroah-Hartman
maintainerPATCH 85/601 ALSA: hda/realtek: Re-order ALC662 quirk table entries
In reply to Greg Kroah-HartmanFrom: Takashi Iwai <[email protected]>
commit 9edeb1109d05953b2f0e24e5b2341a98c3fa78d5 upstream.
Just re-order the alc662_fixup_tbl[] entries for Acer and ASUS devices for avoiding the oversight of the duplicated or unapplied item in future.
No functional changes.
Also Cc-to-stable for the further patch applications.
--- sound/pci/hda/patch_realtek.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/pci/hda/patch_realtek.c +2 -2
@@ -10060,6 +10060,7 @@ static const struct snd_pci_quirk alc662SND_PCI_QUIRK (0x1025 ,0x0349 ,"eMachines eM250" ,ALC662_FIXUP_INV_DMIC ),SND_PCI_QUIRK (0x1025 ,0x034a ,"Gateway LT27" ,ALC662_FIXUP_INV_DMIC ),SND_PCI_QUIRK (0x1025 ,0x038b ,"Acer Aspire 8943G" ,ALC662_FIXUP_ASPIRE ), +SND_PCI_QUIRK (0x1025 ,0x0566 ,"Acer Aspire Ethos 8951G" ,ALC669_FIXUP_ACER_ASPIRE_ETHOS ),SND_PCI_QUIRK (0x1025 ,0x123c ,"Acer Nitro N50-600" ,ALC662_FIXUP_ACER_NITRO_HEADSET_MODE ),SND_PCI_QUIRK (0x1025 ,0x124e ,"Acer 2660G" ,ALC662_FIXUP_ACER_X2660G_HEADSET_MODE ), SND_PCI_QUIRK(0x1028, 0x05d8, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
@@ -10076,9 +10077,9 @@ static const struct snd_pci_quirk alc662SND_PCI_QUIRK (0x103c ,0x873e ,"HP" ,ALC671_FIXUP_HP_HEADSET_MIC2 ),SND_PCI_QUIRK (0x1043 ,0x1080 ,"Asus UX501VW" ,ALC668_FIXUP_HEADSET_MODE ),SND_PCI_QUIRK (0x1043 ,0x11cd ,"Asus N550" , ALC662_FIXUP_ASUS_Nx50), -SND_PCI_QUIRK (0x1043 ,0x13df ,"Asus N550JX" ,ALC662_FIXUP_BASS_1A ),SND_PCI_QUIRK (0x1043 ,0x129d ,"Asus N750" , ALC662_FIXUP_ASUS_Nx50),SND_PCI_QUIRK (0x1043 ,0x12ff ,"ASUS G751" ,ALC668_FIXUP_ASUS_G751 ), +SND_PCI_QUIRK (0x1043 ,0x13df ,"Asus N550JX" ,ALC662_FIXUP_BASS_1A ),SND_PCI_QUIRK (0x1043 ,0x1477 ,"ASUS N56VZ" ,ALC662_FIXUP_BASS_MODE4_CHMAP ),SND_PCI_QUIRK (0x1043 ,0x15a7 ,"ASUS UX51VZH" ,ALC662_FIXUP_BASS_16 ), SND_PCI_QUIRK(0x1043, 0x177d, "ASUS N551", ALC668_FIXUP_ASUS_Nx51),
@@ -10098,7 +10099,6 @@ static const struct snd_pci_quirk alc662SND_PCI_QUIRK (0x1b0a ,0x01b8 ,"ACER Veriton" ,ALC662_FIXUP_ACER_VERITON ),SND_PCI_QUIRK (0x1b35 ,0x1234 ,"CZC ET26" ,ALC662_FIXUP_CZC_ET26 ),SND_PCI_QUIRK (0x1b35 ,0x2206 ,"CZC P10T" ,ALC662_FIXUP_CZC_P10T ), -SND_PCI_QUIRK (0x1025 ,0x0566 ,"Acer Aspire Ethos 8951G" ,ALC669_FIXUP_ACER_ASPIRE_ETHOS ), #if 0/* Below is a quirk table taken from the old code.
Greg Kroah-Hartman
maintainerPATCH 86/601 ALSA: hda/realtek: Remove redundant entry for ALC861 Haier/Uniwill devices
In reply to Greg Kroah-HartmanFrom: Takashi Iwai <[email protected]>
commit defce244b01ee12534910a4544e11be5eb927d25 upstream.
The quirk entry for Uniwill ECS M31EI is with the PCI SSID device 0, which means matching with all. That is, it's essentially equivalent with SND_PCI_QUIRK_VENDOR(0x1584), which also matches with the previous entry for Haier W18 applying the very same quirk.
Let's unify them with the single vendor-quirk entry.
--- sound/pci/hda/patch_realtek.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
sound/pci/hda/patch_realtek.c +1 -2
@@ -9264,8 +9264,7 @@ static const struct snd_pci_quirk alc861SND_PCI_QUIRK (0x1043 ,0x1393 ,"ASUS A6Rp" ,ALC861_FIXUP_ASUS_A6RP ),SND_PCI_QUIRK_VENDOR (0x1043 ,"ASUS laptop" ,ALC861_FIXUP_AMP_VREF_0F ),SND_PCI_QUIRK (0x1462 ,0x7254 ,"HP DX2200" ,ALC861_FIXUP_NO_JACK_DETECT ), -SND_PCI_QUIRK (0x1584 ,0x2b01 ,"Haier W18" ,ALC861_FIXUP_AMP_VREF_0F ), -SND_PCI_QUIRK (0x1584 ,0x0000 ,"Uniwill ECS M31EI" ,ALC861_FIXUP_AMP_VREF_0F ), +SND_PCI_QUIRK_VENDOR (0x1584 ,"Haier/Uniwill" ,ALC861_FIXUP_AMP_VREF_0F ), SND_PCI_QUIRK(0x1734, 0x10c7, "FSC Amilo Pi1505", ALC861_FIXUP_FSC_AMILO_PI1505), {} };
Greg Kroah-Hartman
maintainerPATCH 87/601 ALSA: hda/realtek: ALC285 Thinkpad jack pin quirk is unreachable
In reply to Greg Kroah-HartmanFrom: Sami Loone <[email protected]>
commit 266fd994b2b0ab7ba3e5541868838ce30775964b upstream.
In 9bbb94e57df1 ("ALSA: hda/realtek: fix static noise on ALC285 Lenovo laptops") an existing Lenovo quirk was made more generic by removing a 0x12 pin requirement from the entry. This made the second chance table Thinkpad jack entry unreachable as the pin configurations became identical.
Revert the 0x12 pin requirement removal and move Thinkpad jack pin quirk back to the primary pin table as they can co-exist when more specific configurations come first.
Add a more targeted pin quirk for Lenovo devices that have 0x12 as 0x40000000.
Tested on Yoga 6 (AMD) laptop.
[ Corrected the commit ID -- tiwai ]
--- sound/pci/hda/patch_realtek.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)
sound/pci/hda/patch_realtek.c +10 -4
@@ -8775,6 +8775,16 @@ static const struct snd_hda_pin_quirk al {0x19, 0x03a11020}, {0x21, 0x0321101f}),SND_HDA_PIN_QUIRK (0x10ec0285 ,0x17aa ,"Lenovo" ,ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE , + {0x12, 0x90a60130}, + {0x14, 0x90170110}, + {0x19, 0x04a11040}, + {0x21, 0x04211020}), +SND_HDA_PIN_QUIRK (0x10ec0285 ,0x17aa ,"Lenovo" ,ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE , + {0x14, 0x90170110}, + {0x19, 0x04a11040}, + {0x1d, 0x40600001}, + {0x21, 0x04211020}), +SND_HDA_PIN_QUIRK (0x10ec0285 ,0x17aa ,"Lenovo" ,ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK , {0x14, 0x90170110}, {0x19, 0x04a11040}, {0x21, 0x04211020}),
@@ -8945,10 +8955,6 @@ static const struct snd_hda_pin_quirk al SND_HDA_PIN_QUIRK(0x10ec0274, 0x1028, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB, {0x19, 0x40000000}, {0x1a, 0x40000000}), -SND_HDA_PIN_QUIRK (0x10ec0285 ,0x17aa ,"Lenovo" ,ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK , - {0x14, 0x90170110}, - {0x19, 0x04a11040}, - {0x21, 0x04211020}), {} };
Greg Kroah-Hartman
maintainerPATCH 88/601 ALSA: hda/realtek: Fix speaker amp on HP Envy AiO 32
In reply to Greg Kroah-HartmanFrom: Takashi Iwai <[email protected]>
commit 622464c893142f7beac89f5ba8c9773bca5e5004 upstream.
HP Envy AiO 32-a12xxx has an external amp that is controlled via GPIO bit 0x04. However, unlike other devices, this amp seems to shut down itself after the certain period, hence the OS needs to up/down the bit dynamically only during the actual playback.
This patch adds the control of the GPIO bit via the existing pcm_hook mechanism. Ideally it should be triggered at the actual stream start, but we have only the state change at prepare/cleanup, so use those for switching the GPIO bit on/off. This should be good enough for the purpose, and was actually confirmed to work fine.
--- sound/pci/hda/patch_realtek.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+)
sound/pci/hda/patch_realtek.c +35 -0
@@ -4331,6 +4331,35 @@ static void alc245_fixup_hp_x360_amp(str } } +/* toggle GPIO2 at each time stream is started; we use PREPARE state instead */ +static void alc274_hp_envy_pcm_hook (struct hda_pcm_stream *hinfo, +struct hda_codec *codec, +struct snd_pcm_substream *substream, +int action) +{ +switch (action) { +case HDA_GEN_PCM_ACT_PREPARE : +alc_update_gpio_data (codec,0x04 , true); +break ; +case HDA_GEN_PCM_ACT_CLEANUP : +alc_update_gpio_data (codec,0x04 , false); +break ; + } +} + +static void alc274_fixup_hp_envy_gpio (struct hda_codec *codec, +const struct hda_fixup *fix, +int action) +{ +struct alc_spec *spec = codec->spec; + +if (action ==HDA_FIXUP_ACT_PROBE ) { + spec->gpio_mask |=0x04 ; + spec->gpio_dir |=0x04 ; + spec->gen.pcm_playback_hook = alc274_hp_envy_pcm_hook; + } +} +static void alc_update_coef_led (struct hda_codec *codec,struct alc_coef_led *led,bool polarity,bool on)
@@ -6443,6 +6472,7 @@ enum {ALC255_FIXUP_XIAOMI_HEADSET_MIC ,ALC274_FIXUP_HP_MIC ,ALC274_FIXUP_HP_HEADSET_MIC , +ALC274_FIXUP_HP_ENVY_GPIO ,ALC256_FIXUP_ASUS_HPE ,ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK , ALC287_FIXUP_HP_GPIO_LED,
@@ -7882,6 +7912,10 @@ static const struct hda_fixup alc269_fix .chained = true, .chain_id =ALC274_FIXUP_HP_MIC }, + [ALC274_FIXUP_HP_ENVY_GPIO] = { + .type = HDA_FIXUP_FUNC, + .v.func = alc274_fixup_hp_envy_gpio, + }, [ALC256_FIXUP_ASUS_HPE] = { .type = HDA_FIXUP_VERBS, .v.verbs = (const struct hda_verb []) {
@@ -8099,6 +8133,7 @@ static const struct snd_pci_quirk alc269SND_PCI_QUIRK (0x103c ,0x8497 ,"HP Envy x360" ,ALC269_FIXUP_HP_MUTE_LED_MIC3 ),SND_PCI_QUIRK (0x103c ,0x84e7 ,"HP Pavilion 15" ,ALC269_FIXUP_HP_MUTE_LED_MIC3 ),SND_PCI_QUIRK (0x103c ,0x869d ,"HP" ,ALC236_FIXUP_HP_MUTE_LED ), +SND_PCI_QUIRK (0x103c ,0x86c7 ,"HP Envy AiO 32" ,ALC274_FIXUP_HP_ENVY_GPIO ),SND_PCI_QUIRK (0x103c ,0x8724 ,"HP EliteBook 850 G7" ,ALC285_FIXUP_HP_GPIO_LED ),SND_PCI_QUIRK (0x103c ,0x8729 ,"HP" ,ALC285_FIXUP_HP_GPIO_LED ), SND_PCI_QUIRK(0x103c, 0x8730, "HP ProBook 445 G7", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
Greg Kroah-Hartman
maintainerPATCH 89/601 KVM: s390: VSIE: correctly handle MVPG when in VSIE
In reply to Greg Kroah-HartmanFrom: Claudio Imbrenda <[email protected]>
commit bdf7509bbefa20855d5f6bacdc5b62a8489477c9 upstream.
Correctly handle the MVPG instruction when issued by a VSIE guest.
--- arch/s390/kvm/vsie.c | 98 ++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 93 insertions(+), 5 deletions(-)
arch/s390/kvm/vsie.c +93 -5
@@ -416,11 +416,6 @@ static void unshadow_scb(struct kvm_vcpumemcpy ((void *)((u64 )scb_o +0xc0 ), (void *)((u64 )scb_s +0xc0 ),0xf0 -0xc0 );break ; -case ICPT_PARTEXEC : -/* MVPG only */ -memcpy ((void *)((u64 )scb_o +0xc0 ), - (void *)((u64 )scb_s +0xc0 ),0xd0 -0xc0 ); -break ; }if (scb_s->ihcpu !=0xffffU )
@@ -983,6 +978,95 @@ static int handle_stfle(struct kvm_vcpu }/* +* Get a register for a nested guest. +* @vcpu the vcpu of the guest +* @vsie_page the vsie_page for the nested guest +* @reg the register number, the upper 4 bits are ignored. +* returns: the value of the register. +*/ +static u64 vsie_get_register (struct kvm_vcpu *vcpu,struct vsie_page *vsie_page,u8 reg) +{ +/* no need to validate the parameter and/or perform error handling */ + reg &=0xf ; +switch (reg) { +case 15 : +return vsie_page->scb_s.gg15; +case 14 : +return vsie_page->scb_s.gg14; +default : +return vcpu->run->s.regs.gprs[reg]; + } +} + +static int vsie_handle_mvpg (struct kvm_vcpu *vcpu,struct vsie_page *vsie_page) +{ +struct kvm_s390_sie_block *scb_s = &vsie_page->scb_s; +unsigned long pei_dest, pei_src, src, dest, mask; +u64 *pei_block = &vsie_page->scb_o->mcic; +int edat, rc_dest, rc_src; +union ctlreg0 cr0; + + cr0.val = vcpu->arch.sie_block->gcr[0 ]; + edat = cr0.edat &&test_kvm_facility (vcpu->kvm,8 ); + mask =_kvm_s390_logical_to_effective (&scb_s->gpsw,PAGE_MASK ); + + dest =vsie_get_register (vcpu, vsie_page, scb_s->ipb >>20 ) & mask; + src =vsie_get_register (vcpu, vsie_page, scb_s->ipb >>16 ) & mask; + + rc_dest =kvm_s390_shadow_fault (vcpu, vsie_page->gmap, dest, &pei_dest); + rc_src =kvm_s390_shadow_fault (vcpu, vsie_page->gmap, src, &pei_src); +/* +* Either everything went well, or something non-critical went wrong +* e.g. because of a race. In either case, simply retry. +*/ +if (rc_dest == -EAGAIN || rc_src == -EAGAIN || (!rc_dest && !rc_src)) { +retry_vsie_icpt (vsie_page); +return -EAGAIN ; + } +/* Something more serious went wrong, propagate the error */ +if (rc_dest <0 ) +return rc_dest; +if (rc_src <0 ) +return rc_src; + +/* The only possible suppressing exception: just deliver it */ +if (rc_dest ==PGM_TRANSLATION_SPEC || rc_src ==PGM_TRANSLATION_SPEC ) { +clear_vsie_icpt (vsie_page); + rc_dest =kvm_s390_inject_program_int (vcpu,PGM_TRANSLATION_SPEC ); +WARN_ON_ONCE (rc_dest); +return 1 ; + } + +/* +* Forward the PEI intercept to the guest if it was a page fault, or +* also for segment and region table faults if EDAT applies. +*/ +if (edat) { + rc_dest = rc_dest ==PGM_ASCE_TYPE ? rc_dest :0 ; + rc_src = rc_src ==PGM_ASCE_TYPE ? rc_src :0 ; + }else { + rc_dest = rc_dest !=PGM_PAGE_TRANSLATION ? rc_dest :0 ; + rc_src = rc_src !=PGM_PAGE_TRANSLATION ? rc_src :0 ; + } +if (!rc_dest && !rc_src) { + pei_block[0 ] = pei_dest; + pei_block[1 ] = pei_src; +return 1 ; + } + +retry_vsie_icpt (vsie_page); + +/* +* The host has edat, and the guest does not, or it was an ASCE type +* exception. The host needs to inject the appropriate DAT interrupts +* into the guest. +*/ +if (rc_dest) +return inject_fault (vcpu, rc_dest, dest,1 ); +return inject_fault (vcpu, rc_src, src,0 ); +} + +/* * Run the vsie on a shadow scb and a shadow gmap, without any further * sanity checks, handling SIE faults. *
@@ -1068,6 +1152,10 @@ static int do_vsie_run(struct kvm_vcpu *if ((scb_s->ipa &0xf000 ) !=0xf000 ) scb_s->ipa +=0x1000 ;break ; +case ICPT_PARTEXEC : +if (scb_s->ipa ==0xb254 ) + rc =vsie_handle_mvpg (vcpu, vsie_page); +break ; }return rc; }
Greg Kroah-Hartman
maintainerPATCH 90/601 KVM: s390: split kvm_s390_logical_to_effective
In reply to Greg Kroah-HartmanFrom: Claudio Imbrenda <[email protected]>
commit f85f1baaa18932a041fd2b1c2ca6cfd9898c7d2b upstream.
Split kvm_s390_logical_to_effective to a generic function called _kvm_s390_logical_to_effective. The new function takes a PSW and an address and returns the address with the appropriate bits masked off. The old function now calls the new function with the appropriate PSW from the vCPU.
This is needed to avoid code duplication for vSIE.
--- arch/s390/kvm/gaccess.h | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-)
arch/s390/kvm/gaccess.h +24 -7
@@ -37,6 +37,29 @@ static inline unsigned long kvm_s390_rea }/** +* _kvm_s390_logical_to_effective - convert guest logical to effective address +* @psw: psw of the guest +* @ga: guest logical address +* +* Convert a guest logical address to an effective address by applying the +* rules of the addressing mode defined by bits 31 and 32 of the given PSW +* (extendended/basic addressing mode). +* +* Depending on the addressing mode, the upper 40 bits (24 bit addressing +* mode), 33 bits (31 bit addressing mode) or no bits (64 bit addressing +* mode) of @ga will be zeroed and the remaining bits will be returned. +*/ +static inline unsigned long _kvm_s390_logical_to_effective (psw_t *psw, +unsigned long ga) +{ +if (psw_bits (*psw).eaba ==PSW_BITS_AMODE_64BIT ) +return ga; +if (psw_bits (*psw).eaba ==PSW_BITS_AMODE_31BIT ) +return ga & ((1UL <<31 ) -1 ); +return ga & ((1UL <<24 ) -1 ); +} + +/** * kvm_s390_logical_to_effective - convert guest logical to effective address * @vcpu: guest virtual cpu * @ga: guest logical address
@@ -52,13 +75,7 @@ static inline unsigned long kvm_s390_reastatic inline unsigned long kvm_s390_logical_to_effective (struct kvm_vcpu *vcpu,unsigned long ga) { -psw_t *psw = &vcpu->arch.sie_block->gpsw; - -if (psw_bits (*psw).eaba ==PSW_BITS_AMODE_64BIT ) -return ga; -if (psw_bits (*psw).eaba ==PSW_BITS_AMODE_31BIT ) -return ga & ((1UL <<31 ) -1 ); -return ga & ((1UL <<24 ) -1 ); +return _kvm_s390_logical_to_effective (&vcpu->arch.sie_block->gpsw, ga); }/*
Greg Kroah-Hartman
maintainerPATCH 91/601 KVM: s390: fix guarded storage control register handling
In reply to Greg Kroah-HartmanFrom: Heiko Carstens <[email protected]>
commit 44bada28219031f9e8e86b84460606efa57b871e upstream.
store_regs_fmt2() has an ordering problem: first the guarded storage facility is enabled on the local cpu, then preemption disabled, and then the STGSC (store guarded storage controls) instruction is executed.
If the process gets scheduled away between enabling the guarded storage facility and before preemption is disabled, this might lead to a special operation exception and therefore kernel crash as soon as the process is scheduled back and the STGSC instruction is executed.
--- arch/s390/kvm/kvm-s390.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/s390/kvm/kvm-s390.c +2 -2
@@ -4310,16 +4310,16 @@ static void store_regs_fmt2(struct kvm_v kvm_run->s.regs.bpbc = (vcpu->arch.sie_block->fpf &FPF_BPBC ) ==FPF_BPBC ; kvm_run->s.regs.diag318 = vcpu->arch.diag318_info.val;if (MACHINE_HAS_GS ) { +preempt_disable ();__ctl_set_bit (2 ,4 );if (vcpu->arch.gs_enabled)save_gs_cb (current->thread.gs_cb); -preempt_disable (); current->thread.gs_cb = vcpu->arch.host_gscb;restore_gs_cb (vcpu->arch.host_gscb); -preempt_enable ();if (!vcpu->arch.host_gscb)__ctl_clear_bit (2 ,4 ); vcpu->arch.host_gscb =NULL ; +preempt_enable (); }/* SIE will save etoken directly into SDNX and therefore kvm_run */ }
Greg Kroah-Hartman
maintainerPATCH 92/601 s390: fix detection of vector enhancements facility 1 vs. vector packed decimal facility
In reply to Greg Kroah-HartmanFrom: David Hildenbrand <[email protected]>
commit b208108638c4bd3215792415944467c36f5dfd97 upstream.
The PoP documents:
134: The vector packed decimal facility is installed in the
z/Architecture architectural mode. When bit 134 is one, bit 129 is also one.
135: The vector enhancements facility 1 is installed in
the z/Architecture architectural mode. When bit 135 is one, bit 129 is also one.
Looks like we confuse the vector enhancements facility 1 ("EXT") with the Vector packed decimal facility ("BCD"). Let's fix the facility checks.
Detected while working on QEMU/tcg z14 support and only unlocking the vector enhancements facility 1, but not the vector packed decimal facility.
--- arch/s390/kernel/setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/s390/kernel/setup.c +2 -2
@@ -924,9 +924,9 @@ static int __init setup_hwcaps(void)if (MACHINE_HAS_VX ) { elf_hwcap |=HWCAP_S390_VXRS ;if (test_facility (134 )) - elf_hwcap |=HWCAP_S390_VXRS_EXT ; -if (test_facility (135 )) elf_hwcap |=HWCAP_S390_VXRS_BCD ; +if (test_facility (135 )) + elf_hwcap |=HWCAP_S390_VXRS_EXT ;if (test_facility (148 )) elf_hwcap |=HWCAP_S390_VXRS_EXT2 ;if (test_facility (152 ))
Greg Kroah-Hartman
maintainerPATCH 93/601 KVM: s390: VSIE: fix MVPG handling for prefixing and MSO
In reply to Greg Kroah-HartmanFrom: Claudio Imbrenda <[email protected]>
commit c3171e94cc1cdcc3229565244112e869f052b8d9 upstream.
Prefixing needs to be applied to the guest real address to translate it into a guest absolute address.
The value of MSO needs to be added to a guest-absolute address in order to obtain the host-virtual.
--- arch/s390/kvm/vsie.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
arch/s390/kvm/vsie.c +4 -1
@@ -1001,7 +1001,7 @@ static u64 vsie_get_register(struct kvm_static int vsie_handle_mvpg (struct kvm_vcpu *vcpu,struct vsie_page *vsie_page) {struct kvm_s390_sie_block *scb_s = &vsie_page->scb_s; -unsigned long pei_dest, pei_src, src, dest, mask; +unsigned long pei_dest, pei_src, src, dest, mask, prefix;u64 *pei_block = &vsie_page->scb_o->mcic;int edat, rc_dest, rc_src;union ctlreg0 cr0;
@@ -1009,9 +1009,12 @@ static int vsie_handle_mvpg(struct kvm_v cr0.val = vcpu->arch.sie_block->gcr[0 ]; edat = cr0.edat &&test_kvm_facility (vcpu->kvm,8 ); mask =_kvm_s390_logical_to_effective (&scb_s->gpsw,PAGE_MASK ); + prefix = scb_s->prefix <<GUEST_PREFIX_SHIFT ; dest =vsie_get_register (vcpu, vsie_page, scb_s->ipb >>20 ) & mask; + dest =_kvm_s390_real_to_abs (prefix, dest) + scb_s->mso; src =vsie_get_register (vcpu, vsie_page, scb_s->ipb >>16 ) & mask; + src =_kvm_s390_real_to_abs (prefix, src) + scb_s->mso; rc_dest =kvm_s390_shadow_fault (vcpu, vsie_page->gmap, dest, &pei_dest); rc_src =kvm_s390_shadow_fault (vcpu, vsie_page->gmap, src, &pei_src);
Greg Kroah-Hartman
maintainerPATCH 94/601 KVM: s390: split kvm_s390_real_to_abs
In reply to Greg Kroah-HartmanFrom: Claudio Imbrenda <[email protected]>
commit c5d1f6b531e68888cbe6718b3f77a60115d58b9c upstream.
A new function _kvm_s390_real_to_abs will apply prefixing to a real address with a given prefix value.
The old kvm_s390_real_to_abs becomes now a wrapper around the new function.
This is needed to avoid code duplication in vSIE.
--- arch/s390/kvm/gaccess.h | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-)
arch/s390/kvm/gaccess.h +17 -6
@@ -18,17 +18,14 @@/** * kvm_s390_real_to_abs - convert guest real address to guest absolute address -* @vcpu - guest virtual cpu +* @prefix - guest prefix * @gra - guest real address * * Returns the guest absolute address that corresponds to the passed guest real -* address @gra of a virtual guest cpu by applying its prefix. +* address @gra of by applying the given prefix. */ -static inline unsigned long kvm_s390_real_to_abs (struct kvm_vcpu *vcpu, -unsigned long gra) +static inline unsigned long _kvm_s390_real_to_abs (u32 prefix,unsigned long gra) { -unsigned long prefix =kvm_s390_get_prefix (vcpu); -if (gra <2 *PAGE_SIZE ) gra += prefix;else if (gra >= prefix && gra < prefix +2 *PAGE_SIZE )
@@ -37,6 +34,20 @@ static inline unsigned long kvm_s390_rea }/** +* kvm_s390_real_to_abs - convert guest real address to guest absolute address +* @vcpu - guest virtual cpu +* @gra - guest real address +* +* Returns the guest absolute address that corresponds to the passed guest real +* address @gra of a virtual guest cpu by applying its prefix. +*/ +static inline unsigned long kvm_s390_real_to_abs (struct kvm_vcpu *vcpu, +unsigned long gra) +{ +return _kvm_s390_real_to_abs (kvm_s390_get_prefix (vcpu), gra); +} + +/** * _kvm_s390_logical_to_effective - convert guest logical to effective address * @psw: psw of the guest * @ga: guest logical address
Greg Kroah-Hartman
maintainerPATCH 95/601 KVM: s390: extend kvm_s390_shadow_fault to return entry pointer
In reply to Greg Kroah-HartmanFrom: Claudio Imbrenda <[email protected]>
commit 5ac14bac08ae827b619f21bcceaaac3b8c497e31 upstream.
Extend kvm_s390_shadow_fault to return the pointer to the valid leaf DAT table entry, or to the invalid entry.
Also return some flags in the lower bits of the address:PEI_DAT_PROT: indicates that DAT protection applies because of the
protection bit in the segment (or, if EDAT, region) tables.PEI_NOT_PTE: indicates that the address of the DAT table entry returned
does not refer to a PTE, but to a segment or region table.
--- arch/s390/kvm/gaccess.c | 30 +++++++++++++++++++++++++----- arch/s390/kvm/gaccess.h | 6 +++++- arch/s390/kvm/vsie.c | 8 ++++---- 3 files changed, 34 insertions(+), 10 deletions(-)
arch/s390/kvm/gaccess.c +25 -5
@@ -976,7 +976,9 @@ int kvm_s390_check_low_addr_prot_real(st* kvm_s390_shadow_tables - walk the guest page table and create shadow tables * @sg: pointer to the shadow guest address space structure * @saddr: faulting address in the shadow gmap -* @pgt: pointer to the page table address result +* @pgt: pointer to the beginning of the page table for the given address if +* successful (return value 0), or to the first invalid DAT entry in +* case of exceptions (return value > 0) * @fake: pgt references contiguous guest memory block, not a pgtable */ static int kvm_s390_shadow_tables(struct gmap *sg, unsigned long saddr,
@@ -1034,6 +1036,7 @@ static int kvm_s390_shadow_tables(struct rfte.val = ptr; goto shadow_r2t; } + *pgt = ptr + vaddr.rfx *8 ; rc =gmap_read_table (parent, ptr + vaddr.rfx *8 , &rfte.val);if (rc)return rc;
@@ -1060,6 +1063,7 @@ shadow_r2t: rste.val = ptr; goto shadow_r3t; } + *pgt = ptr + vaddr.rsx *8 ; rc =gmap_read_table (parent, ptr + vaddr.rsx *8 , &rste.val);if (rc)return rc;
@@ -1087,6 +1091,7 @@ shadow_r3t: rtte.val = ptr; goto shadow_sgt; } + *pgt = ptr + vaddr.rtx *8 ; rc =gmap_read_table (parent, ptr + vaddr.rtx *8 , &rtte.val);if (rc)return rc;
@@ -1123,6 +1128,7 @@ shadow_sgt: ste.val = ptr; goto shadow_pgt; } + *pgt = ptr + vaddr.sx *8 ; rc =gmap_read_table (parent, ptr + vaddr.sx *8 , &ste.val);if (rc)return rc;
@@ -1157,6 +1163,8 @@ shadow_pgt:* @vcpu: virtual cpu * @sg: pointer to the shadow guest address space structure * @saddr: faulting address in the shadow gmap +* @datptr: will contain the address of the faulting DAT table entry, or of +* the valid leaf, plus some flags * * Returns: - 0 if the shadow fault was successfully resolved * - > 0 (pgm exception code) on exceptions while faulting
@@ -1165,11 +1173,11 @@ shadow_pgt:* - -ENOMEM if out of memory */ int kvm_s390_shadow_fault (struct kvm_vcpu *vcpu,struct gmap *sg, -unsigned long saddr) +unsigned long saddr,unsigned long *datptr) {union vaddress vaddr;union page_table_entry pte; -unsigned long pgt; +unsigned long pgt =0 ;int dat_protection, fake;int rc;
@@ -1191,8 +1199,20 @@ int kvm_s390_shadow_fault(struct kvm_vcp pte.val = pgt + vaddr.px *PAGE_SIZE ; goto shadow_page; } -if (!rc) - rc =gmap_read_table (sg->parent, pgt + vaddr.px *8 , &pte.val); + +switch (rc) { +case PGM_SEGMENT_TRANSLATION : +case PGM_REGION_THIRD_TRANS : +case PGM_REGION_SECOND_TRANS : +case PGM_REGION_FIRST_TRANS : + pgt |=PEI_NOT_PTE ; +break ; +case 0 : + pgt += vaddr.px *8 ; + rc =gmap_read_table (sg->parent, pgt, &pte.val); + } +if (datptr) + *datptr = pgt | dat_protection *PEI_DAT_PROT ;if (!rc && pte.i) rc =PGM_PAGE_TRANSLATION ;if (!rc && pte.z)
arch/s390/kvm/gaccess.h +5 -1
@@ -387,7 +387,11 @@ void ipte_unlock(struct kvm_vcpu *vcpu);int ipte_lock_held (struct kvm_vcpu *vcpu);int kvm_s390_check_low_addr_prot_real (struct kvm_vcpu *vcpu,unsigned long gra); +/* MVPG PEI indication bits */ +#define PEI_DAT_PROT 2 +#define PEI_NOT_PTE 4 +int kvm_s390_shadow_fault (struct kvm_vcpu *vcpu,struct gmap *shadow, -unsigned long saddr); +unsigned long saddr,unsigned long *datptr);#endif /* __KVM_S390_GACCESS_H */
arch/s390/kvm/vsie.c +4 -4
@@ -614,10 +614,10 @@ static int map_prefix(struct kvm_vcpu *v/* with mso/msl, the prefix lies at offset *mso* */ prefix += scb_s->mso; - rc =kvm_s390_shadow_fault (vcpu, vsie_page->gmap, prefix); + rc =kvm_s390_shadow_fault (vcpu, vsie_page->gmap, prefix,NULL );if (!rc && (scb_s->ecb &ECB_TE )) rc =kvm_s390_shadow_fault (vcpu, vsie_page->gmap, - prefix +PAGE_SIZE ); + prefix +PAGE_SIZE ,NULL );/* * We don't have to mprotect, we will be called for all unshadows. * SIE will detect if protection applies and trigger a validity.
@@ -908,7 +908,7 @@ static int handle_fault(struct kvm_vcpu current->thread.gmap_addr, 1); rc =kvm_s390_shadow_fault (vcpu, vsie_page->gmap, - current->thread.gmap_addr); + current->thread.gmap_addr,NULL );if (rc >0 ) { rc = inject_fault(vcpu, rc, current->thread.gmap_addr,
@@ -930,7 +930,7 @@ static void handle_last_fault(struct kvm {if (vsie_page->fault_addr)kvm_s390_shadow_fault (vcpu, vsie_page->gmap, - vsie_page->fault_addr); + vsie_page->fault_addr,NULL ); vsie_page->fault_addr =0 ; }
Greg Kroah-Hartman
maintainerPATCH 96/601 KVM: x86/mmu: Alloc page for PDPTEs when shadowing 32-bit NPT with 64-bit
In reply to Greg Kroah-HartmanFrom: Sean Christopherson <[email protected]>
commit 04d45551a1eefbea42655da52f56e846c0af721a upstream.
Allocate the so called pae_root page on-demand, along with the lm_root page, when shadowing 32-bit NPT with 64-bit NPT, i.e. when running a 32-bit L1. KVM currently only allocates the page when NPT is disabled, or when L0 is 32-bit (using PAE paging).
Note, there is an existing memory leak involving the MMU roots, as KVM fails to free the PAE roots on failure. This will be addressed in a future commit.
Message-Id: <[email protected]>
--- arch/x86/kvm/mmu/mmu.c | 44 +++++++++++++++++++++++++++++--------------- 1 file changed, 29 insertions(+), 15 deletions(-)
arch/x86/kvm/mmu/mmu.c +29 -15
@@ -3203,14 +3203,14 @@ void kvm_mmu_free_roots(struct kvm_vcpuif (mmu->shadow_root_level >=PT64_ROOT_4LEVEL && (mmu->root_level >=PT64_ROOT_4LEVEL || mmu->direct_map)) {mmu_free_root_page (kvm, &mmu->root_hpa, &invalid_list); - }else { + }else if (mmu->pae_root) {for (i =0 ; i <4 ; ++i)if (mmu->pae_root[i] !=0 )mmu_free_root_page (kvm, &mmu->pae_root[i], &invalid_list); - mmu->root_hpa =INVALID_PAGE ; } + mmu->root_hpa =INVALID_PAGE ; mmu->root_pgd =0 ; }
@@ -3322,9 +3322,23 @@ static int mmu_alloc_shadow_roots(struct* the shadow page table may be a PAE or a long mode page table. */ pm_mask =PT_PRESENT_MASK ; -if (vcpu->arch.mmu->shadow_root_level ==PT64_ROOT_4LEVEL ) +if (vcpu->arch.mmu->shadow_root_level ==PT64_ROOT_4LEVEL ) { pm_mask |=PT_ACCESSED_MASK |PT_WRITABLE_MASK |PT_USER_MASK ; +/* +* Allocate the page for the PDPTEs when shadowing 32-bit NPT +* with 64-bit only when needed. Unlike 32-bit NPT, it doesn't +* need to be in low mem. See also lm_root below. +*/ +if (!vcpu->arch.mmu->pae_root) { +WARN_ON_ONCE (!tdp_enabled); + + vcpu->arch.mmu->pae_root = (void *)get_zeroed_page (GFP_KERNEL_ACCOUNT ); +if (!vcpu->arch.mmu->pae_root) +return -ENOMEM ; + } + } +for (i =0 ; i <4 ; ++i) {MMU_WARN_ON (VALID_PAGE (vcpu->arch.mmu->pae_root[i]));if (vcpu->arch.mmu->root_level ==PT32E_ROOT_LEVEL ) {
@@ -3347,21 +3361,19 @@ static int mmu_alloc_shadow_roots(struct vcpu->arch.mmu->root_hpa =__pa (vcpu->arch.mmu->pae_root);/* -* If we shadow a 32 bit page table with a long mode page -* table we enter this path. +* When shadowing 32-bit or PAE NPT with 64-bit NPT, the PML4 and PDP +* tables are allocated and initialized at MMU creation as there is no +* equivalent level in the guest's NPT to shadow. Allocate the tables +* on demand, as running a 32-bit L1 VMM is very rare. The PDP is +* handled above (to share logic with PAE), deal with the PML4 here. */ if (vcpu->arch.mmu->shadow_root_level ==PT64_ROOT_4LEVEL ) {if (vcpu->arch.mmu->lm_root ==NULL ) { -/* -* The additional page necessary for this is only -* allocated on demand. -*/ -u64 *lm_root; lm_root = (void *)get_zeroed_page (GFP_KERNEL_ACCOUNT ); -if (lm_root ==NULL ) -return 1 ; +if (!lm_root) +return -ENOMEM ; lm_root[0 ] =__pa (vcpu->arch.mmu->pae_root) | pm_mask;
@@ -5310,9 +5322,11 @@ static int __kvm_mmu_create(struct kvm_v* while the PDP table is a per-vCPU construct that's allocated at MMU * creation. When emulating 32-bit mode, cr3 is only 32 bits even on * x86_64. Therefore we need to allocate the PDP table in the first -* 4GB of memory, which happens to fit the DMA32 zone. Except for -* SVM's 32-bit NPT support, TDP paging doesn't use PAE paging and can -* skip allocating the PDP table. +* 4GB of memory, which happens to fit the DMA32 zone. TDP paging +* generally doesn't use PAE paging and can skip allocating the PDP +* table. The main exception, handled here, is SVM's 32-bit NPT. The +* other exception is for shadowing L1's 32-bit or PAE NPT on 64-bit +* KVM; that horror is handled on-demand by mmu_alloc_shadow_roots(). */ if (tdp_enabled &&kvm_mmu_get_tdp_level (vcpu) >PT32E_ROOT_LEVEL )return 0 ;
Greg Kroah-Hartman
maintainerPATCH 97/601 KVM: X86: Fix failure to boost kernel lock holder candidate in SEV-ES guests
In reply to Greg Kroah-HartmanFrom: Wanpeng Li <[email protected]>
commit b86bb11e3a79ac0db9a6786b1fe80f74321cb076 upstream.
Commit f1c6366e3043 ("KVM: SVM: Add required changes to support intercepts under SEV-ES") prevents hypervisor accesses guest register state when the guest is running under SEV-ES. The initial value of vcpu->arch.guest_state_protected is false, it will not be updated in preemption notifiers after this commit which means that the kernel spinlock lock holder will always be skipped to boost. Let's fix it by always treating preempted is in the guest kernel mode, false positive is better than skip completely.
Message-Id: <[email protected]>
--- arch/x86/kvm/x86.c | 3 +++ 1 file changed, 3 insertions(+)
arch/x86/kvm/x86.c +3 -0
@@ -10888,6 +10888,9 @@ bool kvm_arch_dy_runnable(struct kvm_vcpbool kvm_arch_vcpu_in_kernel (struct kvm_vcpu *vcpu) { +if (vcpu->arch.guest_state_protected) +return true; +return vcpu->arch.preempted_in_kernel; }
Greg Kroah-Hartman
maintainerPATCH 98/601 KVM: x86: Remove emulators broken checks on CR0/CR3/CR4 loads
In reply to Greg Kroah-HartmanFrom: Sean Christopherson <[email protected]>
commit d0fe7b6404408835ed60232cb3bf28324b2f95db upstream.
Remove the emulator's checks for illegal CR0, CR3, and CR4 values, as the checks are redundant, outdated, and in the case of SEV's C-bit, broken. The emulator manually calculates MAXPHYADDR from CPUID and neglects to mask off the C-bit. For all other checks, kvm_set_cr*() are a superset of the emulator checks, e.g. see CR4.LA57.
Message-Id: <[email protected]>
--- arch/x86/kvm/emulate.c | 80 +------------------------------------------------ 1 file changed, 3 insertions(+), 77 deletions(-)
arch/x86/kvm/emulate.c +3 -77
@@ -4220,7 +4220,7 @@ static bool valid_cr(int nr) } } -static int check_cr_read (struct x86_emulate_ctxt *ctxt) +static int check_cr_access (struct x86_emulate_ctxt *ctxt) {if (!valid_cr (ctxt->modrm_reg))return emulate_ud (ctxt);
@@ -4228,80 +4228,6 @@ static int check_cr_read(struct x86_emulreturn X86EMUL_CONTINUE ; } -static int check_cr_write (struct x86_emulate_ctxt *ctxt) -{ -u64 new_val = ctxt->src.val64; -int cr = ctxt->modrm_reg; -u64 efer =0 ; - -static u64 cr_reserved_bits[] = { -0xffffffff00000000ULL , -0 ,0 ,0 ,/* CR3 checked later */ -CR4_RESERVED_BITS , -0 ,0 ,0 , -CR8_RESERVED_BITS , - }; - -if (!valid_cr (cr)) -return emulate_ud (ctxt); - -if (new_val & cr_reserved_bits[cr]) -return emulate_gp (ctxt,0 ); - -switch (cr) { -case 0 : { -u64 cr4; -if (((new_val &X86_CR0_PG ) && !(new_val &X86_CR0_PE )) || - ((new_val &X86_CR0_NW ) && !(new_val &X86_CR0_CD ))) -return emulate_gp (ctxt,0 ); - - cr4 = ctxt->ops->get_cr (ctxt,4 ); - ctxt->ops->get_msr (ctxt,MSR_EFER , &efer); - -if ((new_val &X86_CR0_PG ) && (efer &EFER_LME ) && - !(cr4 &X86_CR4_PAE )) -return emulate_gp (ctxt,0 ); - -break ; - } -case 3 : { -u64 rsvd =0 ; - - ctxt->ops->get_msr (ctxt,MSR_EFER , &efer); -if (efer &EFER_LMA ) { -u64 maxphyaddr; -u32 eax, ebx, ecx, edx; - - eax =0x80000008 ; - ecx =0 ; -if (ctxt->ops->get_cpuid (ctxt, &eax, &ebx, &ecx, - &edx, true)) - maxphyaddr = eax &0xff ; -else - maxphyaddr =36 ; - rsvd =rsvd_bits (maxphyaddr,63 ); -if (ctxt->ops->get_cr (ctxt,4 ) &X86_CR4_PCIDE ) - rsvd &= ~X86_CR3_PCID_NOFLUSH ; - } - -if (new_val & rsvd) -return emulate_gp (ctxt,0 ); - -break ; - } -case 4 : { - ctxt->ops->get_msr (ctxt,MSR_EFER , &efer); - -if ((efer &EFER_LMA ) && !(new_val &X86_CR4_PAE )) -return emulate_gp (ctxt,0 ); - -break ; - } - } - -return X86EMUL_CONTINUE ; -} -static int check_dr7_gd (struct x86_emulate_ctxt *ctxt) {unsigned long dr7;
@@ -4841,10 +4767,10 @@ static const struct opcode twobyte_tableD (ImplicitOps | ModRM | SrcMem | NoAccess),/* 8 * reserved NOP */ D (ImplicitOps | ModRM | SrcMem | NoAccess),/* NOP + 7 * reserved NOP */ /* 0x20 - 0x2F */ -DIP (ModRM | DstMem | Priv | Op3264 | NoMod, cr_read, check_cr_read), +DIP (ModRM | DstMem | Priv | Op3264 | NoMod, cr_read, check_cr_access),DIP (ModRM | DstMem | Priv | Op3264 | NoMod, dr_read, check_dr_read),IIP (ModRM | SrcMem | Priv | Op3264 | NoMod, em_cr_write, cr_write, - check_cr_write), + check_cr_access),IIP (ModRM | SrcMem | Priv | Op3264 | NoMod, em_dr_write, dr_write, check_dr_write), N, N, N, N,
Greg Kroah-Hartman
maintainerPATCH 99/601 KVM: nSVM: Set the shadow root level to the TDP level for nested NPT
In reply to Greg Kroah-HartmanFrom: Sean Christopherson <[email protected]>
commit a3322d5cd87fef5ec0037fd1b14068a533f9a60f upstream.
Override the shadow root level in the MMU context when configuring NPT for shadowing nested NPT. The level is always tied to the TDP level of the host, not whatever level the guest happens to be using.
Message-Id: <[email protected]>
--- arch/x86/kvm/mmu/mmu.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
arch/x86/kvm/mmu/mmu.c +8 -3
@@ -4630,12 +4630,17 @@ void kvm_init_shadow_npt_mmu(struct kvm_struct kvm_mmu *context = &vcpu->arch.guest_mmu;union kvm_mmu_role new_role =kvm_calc_shadow_npt_root_page_role (vcpu); - context->shadow_root_level = new_role.base.level; -__kvm_mmu_new_pgd (vcpu, nested_cr3, new_role.base, false, false); -if (new_role.as_u64 != context->mmu_role.as_u64) +if (new_role.as_u64 != context->mmu_role.as_u64) {shadow_mmu_init_context (vcpu, context, cr0, cr4, efer, new_role); + +/* +* Override the level set by the common init helper, nested TDP +* always uses the host's TDP configuration. +*/ + context->shadow_root_level = new_role.base.level; + } }EXPORT_SYMBOL_GPL (kvm_init_shadow_npt_mmu);
Greg Kroah-Hartman
maintainerPATCH 100/601 KVM: SVM: Dont strip the C-bit from CR2 on #PF interception
In reply to Greg Kroah-HartmanFrom: Sean Christopherson <[email protected]>
commit 6d1b867d045699d6ce0dfa0ef35d1b87dd36db56 upstream.
Don't strip the C-bit from the faulting address on an intercepted #PF, the address is a virtual address, not a physical address.
Message-Id: <[email protected]>
--- arch/x86/kvm/svm/svm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kvm/svm/svm.c +1 -1
@@ -1888,7 +1888,7 @@ static void svm_set_dr7(struct kvm_vcpustatic int pf_interception (struct vcpu_svm *svm) { -u64 fault_address =__sme_clr (svm->vmcb->control.exit_info_2); +u64 fault_address = svm->vmcb->control.exit_info_2;u64 error_code = svm->vmcb->control.exit_info_1; return kvm_handle_page_fault(&svm->vcpu, error_code, fault_address,
Greg Kroah-Hartman
maintainerPATCH 101/601 KVM: SVM: Use online_vcpus, not created_vcpus, to iterate over vCPUs
In reply to Greg Kroah-HartmanFrom: Sean Christopherson <[email protected]>
commit c36b16d29f3af5f32fc1b2a3401bf48f71cabee1 upstream.
Use the kvm_for_each_vcpu() helper to iterate over vCPUs when encrypting VMSAs for SEV, which effectively switches to use online_vcpus instead of created_vcpus. This fixes a possible null-pointer dereference as created_vcpus does not guarantee a vCPU exists, since it is updated at the very beginning of KVM_CREATE_VCPU. created_vcpus exists to allow the bulk of vCPU creation to run in parallel, while still correctly restricting the max number of max vCPUs.
Message-Id: <[email protected]>
--- arch/x86/kvm/svm/sev.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
arch/x86/kvm/svm/sev.c +3 -2
@@ -563,6 +563,7 @@ static int sev_launch_update_vmsa(struct {struct kvm_sev_info *sev = &to_kvm_svm (kvm)->sev_info;struct sev_data_launch_update_vmsa *vmsa; +struct kvm_vcpu *vcpu;int i, ret;if (!sev_es_guest (kvm))
@@ -572,8 +573,8 @@ static int sev_launch_update_vmsa(structif (!vmsa)return -ENOMEM ; -for (i =0 ; i < kvm->created_vcpus; i++) { -struct vcpu_svm *svm =to_svm (kvm->vcpus[i]); +kvm_for_each_vcpu (i, vcpu, kvm) { +struct vcpu_svm *svm =to_svm (vcpu);/* Perform some pre-encryption checks against the VMSA */ ret =sev_es_sync_vmsa (svm);
Greg Kroah-Hartman
maintainerPATCH 102/601 KVM: SVM: Do not set sev->es_active until KVM_SEV_ES_INIT completes
In reply to Greg Kroah-HartmanFrom: Sean Christopherson <[email protected]>
commit 9fa1521daafb58d878d03d75f6863a11312fae22 upstream.
Set sev->es_active only after the guts of KVM_SEV_ES_INIT succeeds. If the command fails, e.g. because SEV is already active or there are no available ASIDs, then es_active will be left set even though the VM is not fully SEV-ES capable.
Refactor the code so that "es_active" is passed on the stack instead of being prematurely shoved into sev_info, both to avoid having to unwind sev_info and so that it's more obvious what actually consumes es_active in sev_guest_init() and its helpers.
Message-Id: <[email protected]>
--- arch/x86/kvm/svm/sev.c | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-)
arch/x86/kvm/svm/sev.c +12 -17
@@ -86,7 +86,7 @@ static bool __sev_recycle_asids(int min_return true; } -static int sev_asid_new (struct kvm_sev_info *sev) +static int sev_asid_new (bool es_active) {int pos, min_asid, max_asid;bool retry = true;
@@ -97,8 +97,8 @@ static int sev_asid_new(struct kvm_sev_i* SEV-enabled guests must use asid from min_sev_asid to max_sev_asid. * SEV-ES-enabled guest can use from 1 to min_sev_asid - 1. */ - min_asid = sev->es_active ?0 : min_sev_asid -1 ; - max_asid = sev->es_active ? min_sev_asid -1 : max_sev_asid; + min_asid = es_active ?0 : min_sev_asid -1 ; + max_asid = es_active ? min_sev_asid -1 : max_sev_asid; again: pos =find_next_zero_bit (sev_asid_bitmap, max_sev_asid, min_asid);if (pos >= max_asid) {
@@ -178,13 +178,14 @@ static void sev_unbind_asid(struct kvm *static int sev_guest_init (struct kvm *kvm,struct kvm_sev_cmd *argp) {struct kvm_sev_info *sev = &to_kvm_svm (kvm)->sev_info; +bool es_active = argp->id ==KVM_SEV_ES_INIT ;int asid, ret; ret = -EBUSY ;if (unlikely (sev->active))return ret; - asid =sev_asid_new (sev); + asid =sev_asid_new (es_active);if (asid <0 )return ret;
@@ -193,6 +194,7 @@ static int sev_guest_init(struct kvm *kv goto e_free; sev->active = true; + sev->es_active = es_active; sev->asid = asid;INIT_LIST_HEAD (&sev->regions_list);
@@ -203,16 +205,6 @@ e_free:return ret; } -static int sev_es_guest_init (struct kvm *kvm,struct kvm_sev_cmd *argp) -{ -if (!sev_es) -return -ENOTTY ; - -to_kvm_svm (kvm)->sev_info.es_active = true; - -return sev_guest_init (kvm, argp); -} -static int sev_bind_asid (struct kvm *kvm,unsigned int handle,int *error) {struct sev_data_activate *data;
@@ -1059,12 +1051,15 @@ int svm_mem_enc_op(struct kvm *kvm, voidmutex_lock (&kvm->lock);switch (sev_cmd.id) { +case KVM_SEV_ES_INIT : +if (!sev_es) { + r = -ENOTTY ; + goto out; + } + fallthrough;case KVM_SEV_INIT : r =sev_guest_init (kvm, &sev_cmd);break ; -case KVM_SEV_ES_INIT : - r =sev_es_guest_init (kvm, &sev_cmd); -break ;case KVM_SEV_LAUNCH_START : r =sev_launch_start (kvm, &sev_cmd);break ;
Greg Kroah-Hartman
maintainerPATCH 103/601 KVM: SVM: Do not allow SEV/SEV-ES initialization after vCPUs are created
In reply to Greg Kroah-HartmanFrom: Sean Christopherson <[email protected]>
commit 8727906fde6ea665b52e68ddc58833772537f40a upstream.
Reject KVM_SEV_INIT and KVM_SEV_ES_INIT if they are attempted after one or more vCPUs have been created. KVM assumes a VM is tagged SEV/SEV-ES prior to vCPU creation, e.g. init_vmcb() needs to mark the VMCB as SEV enabled, and svm_create_vcpu() needs to allocate the VMSA. At best, creating vCPUs before SEV/SEV-ES init will lead to unexpected errors and/or behavior, and at worst it will crash the host, e.g. sev_launch_update_vmsa() will dereference a null svm->vmsa pointer.
Message-Id: <[email protected]>
--- arch/x86/kvm/svm/sev.c | 3 +++ 1 file changed, 3 insertions(+)
arch/x86/kvm/svm/sev.c +3 -0
@@ -181,6 +181,9 @@ static int sev_guest_init(struct kvm *kvbool es_active = argp->id ==KVM_SEV_ES_INIT ;int asid, ret; +if (kvm->created_vcpus) +return -EINVAL ; + ret = -EBUSY ;if (unlikely (sev->active))return ret;
Greg Kroah-Hartman
maintainerPATCH 104/601 KVM: SVM: Inject #GP on guest MSR_TSC_AUX accesses if RDTSCP unsupported
In reply to Greg Kroah-HartmanFrom: Sean Christopherson <[email protected]>
commit 6f2b296aa6432d8274e258cc3220047ca04f5de0 upstream.
Inject #GP on guest accesses to MSR_TSC_AUX if RDTSCP is unsupported in the guest's CPUID model.
Message-Id: <[email protected]>
--- arch/x86/kvm/svm/svm.c | 7 +++++++ 1 file changed, 7 insertions(+)
arch/x86/kvm/svm/svm.c +7 -0
@@ -2651,6 +2651,9 @@ static int svm_get_msr(struct kvm_vcpu *case MSR_TSC_AUX :if (!boot_cpu_has (X86_FEATURE_RDTSCP ))return 1 ; +if (!msr_info->host_initiated && + !guest_cpuid_has (vcpu,X86_FEATURE_RDTSCP )) +return 1 ; msr_info->data = svm->tsc_aux;break ;/*
@@ -2859,6 +2862,10 @@ static int svm_set_msr(struct kvm_vcpu *if (!boot_cpu_has (X86_FEATURE_RDTSCP ))return 1 ; +if (!msr->host_initiated && + !guest_cpuid_has (vcpu,X86_FEATURE_RDTSCP )) +return 1 ; +/* * This is rare, so we update the MSR here instead of using * direct_access_msrs. Doing that would require a rdmsr in
Greg Kroah-Hartman
maintainerPATCH 105/601 KVM: nVMX: Defer the MMU reload to the normal path on an EPTP switch
In reply to Greg Kroah-HartmanFrom: Sean Christopherson <[email protected]>
commit c805f5d5585ab5e0cdac6b1ccf7086eb120fb7db upstream.
Defer reloading the MMU after a EPTP successful EPTP switch. The VMFUNC instruction itself is executed in the previous EPTP context, any side effects, e.g. updating RIP, should occur in the old context. Practically speaking, this bug is benign as VMX doesn't touch the MMU when skipping an emulated instruction, nor does queuing a single-step #DB. No other post-switch side effects exist.
Message-Id: <[email protected]>
--- arch/x86/kvm/vmx/nested.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)
arch/x86/kvm/vmx/nested.c +2 -7
@@ -5517,16 +5517,11 @@ static int nested_vmx_eptp_switching(strif (!nested_vmx_check_eptp (vcpu, new_eptp))return 1 ; -kvm_mmu_unload (vcpu); mmu->ept_ad = accessed_dirty; mmu->mmu_role.base.ad_disabled = !accessed_dirty; vmcs12->ept_pointer = new_eptp; -/* -* TODO: Check what's the correct approach in case -* mmu reload fails. Currently, we just let the next -* reload potentially fail -*/ -kvm_mmu_reload (vcpu); + +kvm_make_request (KVM_REQ_MMU_RELOAD , vcpu); }return 0 ;
Greg Kroah-Hartman
maintainerPATCH 106/601 KVM: nVMX: Truncate bits 63:32 of VMCS field on nested check in !64-bit
In reply to Greg Kroah-HartmanFrom: Sean Christopherson <[email protected]>
commit ee050a577523dfd5fac95e6cc182ebe0293ead59 upstream.
Drop bits 63:32 of the VMCS field encoding when checking for a nested VM-Exit on VMREAD/VMWRITE in !64-bit mode. VMREAD and VMWRITE always use 32-bit operands outside of 64-bit mode.
The actual emulation of VMREAD/VMWRITE does the right thing, this bug is purely limited to incorrectly causing a nested VM-Exit if a GPR happens to have bits 63:32 set outside of 64-bit mode.
Message-Id: <[email protected]>
--- arch/x86/kvm/vmx/nested.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kvm/vmx/nested.c +1 -1
@@ -5750,7 +5750,7 @@ static bool nested_vmx_exit_handled_vmcs/* Decode instruction info and find the field to access */ vmx_instruction_info =vmcs_read32 (VMX_INSTRUCTION_INFO ); - field =kvm_register_read (vcpu, (((vmx_instruction_info) >>28 ) &0xf )); + field =kvm_register_readl (vcpu, (((vmx_instruction_info) >>28 ) &0xf ));/* Out-of-range fields always cause a VM exit from L2 to L1 */ if (field >>15 )
Greg Kroah-Hartman
maintainerPATCH 107/601 KVM: nVMX: Truncate base/index GPR value on address calc in !64-bit
In reply to Greg Kroah-HartmanFrom: Sean Christopherson <[email protected]>
commit 82277eeed65eed6c6ee5b8f97bd978763eab148f upstream.
Drop bits 63:32 of the base and/or index GPRs when calculating the effective address of a VMX instruction memory operand. Outside of 64-bit mode, memory encodings are strictly limited to E*X and below.
Message-Id: <[email protected]>
--- arch/x86/kvm/vmx/nested.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/kvm/vmx/nested.c +2 -2
@@ -4639,9 +4639,9 @@ int get_vmx_mem_address(struct kvm_vcpuelse if (addr_size ==0 ) off = (gva_t )sign_extend64 (off,15 );if (base_is_valid) - off +=kvm_register_read (vcpu, base_reg); + off +=kvm_register_readl (vcpu, base_reg);if (index_is_valid) - off +=kvm_register_read (vcpu, index_reg) << scaling; + off +=kvm_register_readl (vcpu, index_reg) << scaling;vmx_get_segment (vcpu, &s, seg_reg);/*
Greg Kroah-Hartman
maintainerPATCH 108/601 KVM: arm/arm64: Fix KVM_VGIC_V3_ADDR_TYPE_REDIST read
In reply to Greg Kroah-HartmanFrom: Eric Auger <[email protected]>
commit 94ac0835391efc1a30feda6fc908913ec012951e upstream.
When reading the base address of the a REDIST region through KVM_VGIC_V3_ADDR_TYPE_REDIST we expect the redistributor region list to be populated with a single element.
However list_first_entry() expects the list to be non empty. Instead we should use list_first_entry_or_null which effectively returns NULL if the list is empty.
--- arch/arm64/kvm/vgic/vgic-kvm-device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/kvm/vgic/vgic-kvm-device.c +2 -2
@@ -87,8 +87,8 @@ int kvm_vgic_addr(struct kvm *kvm, unsig r =vgic_v3_set_redist_base (kvm,0 , *addr,0 ); goto out; } - rdreg =list_first_entry (&vgic->rd_regions, - struct vgic_redist_region, list); + rdreg =list_first_entry_or_null (&vgic->rd_regions, + struct vgic_redist_region, list);if (!rdreg) addr_ptr = &undef_value;else
Greg Kroah-Hartman
maintainerPATCH 109/601 KVM: Destroy I/O bus devices on unregister failure _after_ syncing SRCU
In reply to Greg Kroah-HartmanFrom: Sean Christopherson <[email protected]>
commit 2ee3757424be7c1cd1d0bbfa6db29a7edd82a250 upstream.
If allocating a new instance of an I/O bus fails when unregistering a device, wait to destroy the device until after all readers are guaranteed to see the new null bus. Destroying devices before the bus is nullified could lead to use-after-free since readers expect the devices on their reference of the bus to remain valid.
Message-Id: <[email protected]>
--- virt/kvm/kvm_main.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
virt/kvm/kvm_main.c +7 -3
@@ -4487,7 +4487,13 @@ void kvm_io_bus_unregister_dev(struct kv new_bus->dev_count--;memcpy (new_bus->range + i, bus->range + i +1 ,flex_array_size (new_bus, range, new_bus->dev_count - i)); - }else { + } + +rcu_assign_pointer (kvm->buses[bus_idx], new_bus); +synchronize_srcu_expedited (&kvm->srcu); + +/* Destroy the old bus _after_ installing the (null) bus. */ +if (!new_bus) {pr_err ("kvm: failed to shrink bus, removing it completely\n" );for (j =0 ; j < bus->dev_count; j++) {if (j == i)
@@ -4496,8 +4502,6 @@ void kvm_io_bus_unregister_dev(struct kv } } -rcu_assign_pointer (kvm->buses[bus_idx], new_bus); -synchronize_srcu_expedited (&kvm->srcu);kfree (bus);return ; }
Greg Kroah-Hartman
maintainerPATCH 110/601 KVM: Stop looking for coalesced MMIO zones if the bus is destroyed
In reply to Greg Kroah-HartmanFrom: Sean Christopherson <[email protected]>
commit 5d3c4c79384af06e3c8e25b7770b6247496b4417 upstream.
Abort the walk of coalesced MMIO zones if kvm_io_bus_unregister_dev() fails to allocate memory for the new instance of the bus. If it can't instantiate a new bus, unregister_dev() destroys all devices _except_ the
target device. But, it doesn't tell the caller that it obliterated the
bus and invoked the destructor for all devices that were on the bus. In the coalesced MMIO case, this can result in a deleted list entry dereference due to attempting to continue iterating on coalesced_zones after future entries (in the walk) have been deleted.
Opportunistically add curly braces to the for-loop, which encompasses many lines but sneaks by without braces due to the guts being a single if statement.
Message-Id: <[email protected]>
--- include/linux/kvm_host.h | 4 ++-- virt/kvm/coalesced_mmio.c | 19 +++++++++++++++++-- virt/kvm/kvm_main.c | 10 +++++----- 3 files changed, 24 insertions(+), 9 deletions(-)
include/linux/kvm_host.h +2 -2
@@ -191,8 +191,8 @@ int kvm_io_bus_read(struct kvm_vcpu *vcp int len, void *val);int kvm_io_bus_register_dev (struct kvm *kvm,enum kvm_bus bus_idx,gpa_t addr,int len,struct kvm_io_device *dev); -void kvm_io_bus_unregister_dev (struct kvm *kvm,enum kvm_bus bus_idx, -struct kvm_io_device *dev); +int kvm_io_bus_unregister_dev (struct kvm *kvm,enum kvm_bus bus_idx, +struct kvm_io_device *dev);struct kvm_io_device *kvm_io_bus_get_dev (struct kvm *kvm,enum kvm_bus bus_idx,gpa_t addr);
virt/kvm/coalesced_mmio.c +17 -2
@@ -174,21 +174,36 @@ int kvm_vm_ioctl_unregister_coalesced_mm struct kvm_coalesced_mmio_zone *zone) {struct kvm_coalesced_mmio_dev *dev, *tmp; +int r;if (zone->pio !=1 && zone->pio !=0 )return -EINVAL ;mutex_lock (&kvm->slots_lock); -list_for_each_entry_safe (dev, tmp, &kvm->coalesced_zones, list) +list_for_each_entry_safe (dev, tmp, &kvm->coalesced_zones, list) {if (zone->pio == dev->zone.pio &&coalesced_mmio_in_range (dev, zone->addr, zone->size)) { -kvm_io_bus_unregister_dev (kvm, + r =kvm_io_bus_unregister_dev (kvm, zone->pio ?KVM_PIO_BUS :KVM_MMIO_BUS , &dev->dev);kvm_iodevice_destructor (&dev->dev); + +/* +* On failure, unregister destroys all devices on the +* bus _except_ the target device, i.e. coalesced_zones +* has been modified. No need to restart the walk as +* there aren't any zones left. +*/ +if (r) +break ; } + }mutex_unlock (&kvm->slots_lock); +/* +* Ignore the result of kvm_io_bus_unregister_dev(), from userspace's +* perspective, the coalesced MMIO is most definitely unregistered. +*/ return 0 ; }
virt/kvm/kvm_main.c +5 -5
@@ -4462,15 +4462,15 @@ int kvm_io_bus_register_dev(struct kvm * }/* Caller must hold slots_lock. */ -void kvm_io_bus_unregister_dev (struct kvm *kvm,enum kvm_bus bus_idx, -struct kvm_io_device *dev) +int kvm_io_bus_unregister_dev (struct kvm *kvm,enum kvm_bus bus_idx, +struct kvm_io_device *dev) {int i, j;struct kvm_io_bus *new_bus, *bus; bus =kvm_get_bus (kvm, bus_idx);if (!bus) -return ; +return 0 ;for (i =0 ; i < bus->dev_count; i++)if (bus->range[i].dev == dev) {
@@ -4478,7 +4478,7 @@ void kvm_io_bus_unregister_dev(struct kv }if (i == bus->dev_count) -return ; +return 0 ; new_bus =kmalloc (struct_size (bus, range, bus->dev_count -1 ),GFP_KERNEL_ACCOUNT );
@@ -4503,7 +4503,7 @@ void kvm_io_bus_unregister_dev(struct kv }kfree (bus); -return ; +return new_bus ?0 : -ENOMEM ; } struct kvm_io_device *kvm_io_bus_get_dev(struct kvm *kvm, enum kvm_bus bus_idx,
Greg Kroah-Hartman
maintainerPATCH 111/601 KVM: arm64: Fully zero the vcpu state on reset
In reply to Greg Kroah-HartmanFrom: Marc Zyngier <[email protected]>
commit 85d703746154cdc6794b6654b587b0b0354c97e9 upstream.
On vcpu reset, we expect all the registers to be brought back to their initial state, which happens to be a bunch of zeroes.
However, some recent commit broke this, and is now leaving a bunch of registers (such as the FP state) with whatever was left by the guest. My bad.
Zero the reset of the state (32bit SPSRs and FPSIMD state).
--- arch/arm64/kvm/reset.c | 5 +++++ 1 file changed, 5 insertions(+)
arch/arm64/kvm/reset.c +5 -0
@@ -242,6 +242,11 @@ int kvm_reset_vcpu(struct kvm_vcpu *vcpu/* Reset core registers */ memset (vcpu_gp_regs (vcpu),0 ,sizeof (*vcpu_gp_regs (vcpu))); +memset (&vcpu->arch.ctxt.fp_regs,0 ,sizeof (vcpu->arch.ctxt.fp_regs)); + vcpu->arch.ctxt.spsr_abt =0 ; + vcpu->arch.ctxt.spsr_und =0 ; + vcpu->arch.ctxt.spsr_irq =0 ; + vcpu->arch.ctxt.spsr_fiq =0 ;vcpu_gp_regs (vcpu)->pstate = pstate;/* Reset system registers */
Greg Kroah-Hartman
maintainerPATCH 112/601 KVM: arm64: Fix KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION read
In reply to Greg Kroah-HartmanFrom: Eric Auger <[email protected]>
commit 53b16dd6ba5cf64ed147ac3523ec34651d553cb0 upstream.
The doc says:
"The characteristics of a specific redistributor region can
be read by presetting the index field in the attr data. Only valid for KVM_DEV_TYPE_ARM_VGIC_V3"
Unfortunately the existing code fails to read the input attr data.
--- arch/arm64/kvm/vgic/vgic-kvm-device.c | 3 +++ 1 file changed, 3 insertions(+)
arch/arm64/kvm/vgic/vgic-kvm-device.c +3 -0
@@ -226,6 +226,9 @@ static int vgic_get_common_attr(struct ku64 addr;unsigned long type = (unsigned long )attr->attr; +if (copy_from_user (&addr, uaddr,sizeof (addr))) +return -EFAULT ; + r =kvm_vgic_addr (dev->kvm, type, &addr, false);if (r)return (r == -ENODEV ) ? -ENXIO : r;
Greg Kroah-Hartman
maintainerPATCH 113/601 KVM: selftests: Sync data verify of dirty logging with guest sync
In reply to Greg Kroah-HartmanFrom: Peter Xu <[email protected]>
commit 016ff1a442d9a8f36dcb3beca0bcdfc35e281e18 upstream.
This fixes a bug that can trigger with e.g. "taskset -c 0 ./dirty_log_test" or when the testing host is very busy.
A similar previous attempt is done [1] but that is not enough, the reason is stated in the reply [2].
As a summary (partly quotting from [2]):
The problem is I think one guest memory write operation (of this specific test) contains a few micro-steps when page is during kvm dirty tracking (here I'm only considering write-protect rather than pml but pml should be similar at least when the log buffer is full):
(1) Guest read 'iteration' number into register, prepare to write, page fault
(2) Set dirty bit in either dirty bitmap or dirty ring
(3) Return to guest, data written
When we verify the data, we assumed that all these steps are "atomic", say, when (1) happened for this page, we assume (2) & (3) must have happened. We had some trick to workaround "un-atomicity" of above three steps, as previous version of this patch wanted to fix atomicity of step (2)+(3) by explicitly letting the main thread wait for at least one vmenter of vcpu thread, which should work. However what I overlooked is probably that we still have race when (1) and (2) can be interrupted.
One example calltrace when it could happen that we read an old interation, got interrupted before even setting the dirty bit and flushing data:
__schedule+1742
__cond_resched+52
__get_user_pages+530
get_user_pages_unlocked+197
hva_to_pfn+206
try_async_pf+132
direct_page_fault+320
kvm_mmu_page_fault+103
vmx_handle_exit+288
vcpu_enter_guest+2460
kvm_arch_vcpu_ioctl_run+325
kvm_vcpu_ioctl+526
__x64_sys_ioctl+131
do_syscall_64+51
entry_SYSCALL_64_after_hwframe+68It means iteration number cached in vcpu register can be very old when dirty bit set and data flushed.
So far I don't see an easy way to guarantee all steps 1-3 atomicity but to sync at the GUEST_SYNC() point of guest code when we do verification of the dirty bits as what this patch does.
[1] https://lore.kernel.org/lkml/[email protected]/
[2] https://lore.kernel.org/lkml/20210417140956.GV4440@xz-x1/
Message-Id: <[email protected]>
--- tools/testing/selftests/kvm/dirty_log_test.c | 60 ++++++++++++++++++++++----- 1 file changed, 50 insertions(+), 10 deletions(-)
tools/testing/selftests/kvm/dirty_log_test.c +50 -10
@@ -17,6 +17,7 @@#include <linux/bitmap.h> #include <linux/bitops.h> #include <asm/barrier.h> +#include <linux/atomic.h> #include "kvm_util.h" #include "test_util.h"
@@ -137,12 +138,20 @@ static uint64_t host_clear_count;static uint64_t host_track_next_count;/* Whether dirty ring reset is requested, or finished */ -static sem_t dirty_ring_vcpu_stop; -static sem_t dirty_ring_vcpu_cont; +static sem_t sem_vcpu_stop; +static sem_t sem_vcpu_cont; +/* +* This is only set by main thread, and only cleared by vcpu thread. It is +* used to request vcpu thread to stop at the next GUEST_SYNC, since GUEST_SYNC +* is the only place that we'll guarantee both "dirty bit" and "dirty data" +* will match. E.g., SIG_IPI won't guarantee that if the vcpu is interrupted +* after setting dirty bit but before the data is written. +*/ +static atomic_t vcpu_sync_stop_requested;/* * This is updated by the vcpu thread to tell the host whether it's a * ring-full event. It should only be read until a sem_wait() of -* dirty_ring_vcpu_stop and before vcpu continues to run. +* sem_vcpu_stop and before vcpu continues to run. */ static bool dirty_ring_vcpu_ring_full;/*
@@ -234,6 +243,17 @@ static void clear_log_collect_dirty_pagekvm_vm_clear_dirty_log (vm, slot, bitmap,0 , num_pages); } +/* Should only be called after a GUEST_SYNC */ +static void vcpu_handle_sync_stop (void ) +{ +if (atomic_read (&vcpu_sync_stop_requested)) { +/* It means main thread is sleeping waiting */ +atomic_set (&vcpu_sync_stop_requested, false); +sem_post (&sem_vcpu_stop); +sem_wait_until (&sem_vcpu_cont); + } +} +static void default_after_vcpu_run (struct kvm_vm *vm,int ret,int err) {struct kvm_run *run =vcpu_state (vm,VCPU_ID );
@@ -244,6 +264,8 @@ static void default_after_vcpu_run(strucTEST_ASSERT (get_ucall (vm,VCPU_ID ,NULL ) ==UCALL_SYNC ,"Invalid guest sync status: exit_reason=%s\n" ,exit_reason_str (run->exit_reason)); + +vcpu_handle_sync_stop (); }static bool dirty_ring_supported (void )
@@ -301,13 +323,13 @@ static void dirty_ring_wait_vcpu(void) {/* This makes sure that hardware PML cache flushed */ vcpu_kick (); -sem_wait_until (&dirty_ring_vcpu_stop); +sem_wait_until (&sem_vcpu_stop); }static void dirty_ring_continue_vcpu (void ) {pr_info ("Notifying vcpu to continue\n" ); -sem_post (&dirty_ring_vcpu_cont); +sem_post (&sem_vcpu_cont); } static void dirty_ring_collect_dirty_pages(struct kvm_vm *vm, int slot,
@@ -361,11 +383,11 @@ static void dirty_ring_after_vcpu_run(st/* Update the flag first before pause */ WRITE_ONCE (dirty_ring_vcpu_ring_full, run->exit_reason ==KVM_EXIT_DIRTY_RING_FULL ); -sem_post (&dirty_ring_vcpu_stop); +sem_post (&sem_vcpu_stop);pr_info ("vcpu stops because %s...\n" , dirty_ring_vcpu_ring_full ?"dirty ring is full" :"vcpu is kicked out" ); -sem_wait_until (&dirty_ring_vcpu_cont); +sem_wait_until (&sem_vcpu_cont);pr_info ("vcpu continues now.\n" ); }else { TEST_ASSERT(false, "Invalid guest sync status: "
@@ -377,7 +399,7 @@ static void dirty_ring_after_vcpu_run(ststatic void dirty_ring_before_vcpu_join (void ) {/* Kick another round of vcpu just to make sure it will quit */ -sem_post (&dirty_ring_vcpu_cont); +sem_post (&sem_vcpu_cont); }struct log_mode {
@@ -768,7 +790,25 @@ static void run_test(enum vm_guest_modeusleep (p->interval *1000 );log_mode_collect_dirty_pages (vm,TEST_MEM_SLOT_INDEX , bmap, host_num_pages); + +/* +* See vcpu_sync_stop_requested definition for details on why +* we need to stop vcpu when verify data. +*/ +atomic_set (&vcpu_sync_stop_requested, true); +sem_wait_until (&sem_vcpu_stop); +/* +* NOTE: for dirty ring, it's possible that we didn't stop at +* GUEST_SYNC but instead we stopped because ring is full; +* that's okay too because ring full means we're only missing +* the flush of the last page, and since we handle the last +* page specially verification will succeed anyway. +*/ +assert (host_log_mode ==LOG_MODE_DIRTY_RING || +atomic_read (&vcpu_sync_stop_requested) == false);vm_dirty_log_verify (mode, bmap); +sem_post (&sem_vcpu_cont); + iteration++;sync_global_to_guest (vm, iteration); }
@@ -819,8 +859,8 @@ int main(int argc, char *argv[]) };int opt, i; -sem_init (&dirty_ring_vcpu_stop,0 ,0 ); -sem_init (&dirty_ring_vcpu_cont,0 ,0 ); +sem_init (&sem_vcpu_stop,0 ,0 ); +sem_init (&sem_vcpu_cont,0 ,0 );guest_modes_append_default ();
Greg Kroah-Hartman
maintainerPATCH 114/601 KVM: selftests: Always run vCPU thread with blocked SIG_IPI
In reply to Greg Kroah-HartmanFrom: Paolo Bonzini <[email protected]>
commit bf1e15a82e3b74ee86bb119d6038b41e1ed2b319 upstream.
The main thread could start to send SIG_IPI at any time, even before signal blocked on vcpu thread. Therefore, start the vcpu thread with the signal blocked.
Without this patch, on very busy cores the dirty_log_test could fail directly on receiving a SIGUSR1 without a handler (when vcpu runs far slower than main).
--- tools/testing/selftests/kvm/dirty_log_test.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
tools/testing/selftests/kvm/dirty_log_test.c +7 -2
@@ -527,9 +527,8 @@ static void *vcpu_worker(void *data)*/ sigmask->len =8 ;pthread_sigmask (0 ,NULL , sigset); +sigdelset (sigset,SIG_IPI );vcpu_ioctl (vm,VCPU_ID ,KVM_SET_SIGNAL_MASK , sigmask); -sigaddset (sigset,SIG_IPI ); -pthread_sigmask (SIG_BLOCK , sigset,NULL );sigemptyset (sigset);sigaddset (sigset,SIG_IPI );
@@ -858,6 +857,7 @@ int main(int argc, char *argv[]) .interval = TEST_HOST_LOOP_INTERVAL, };int opt, i; +sigset_t sigset;sem_init (&sem_vcpu_stop,0 ,0 );sem_init (&sem_vcpu_cont,0 ,0 );
@@ -916,6 +916,11 @@ int main(int argc, char *argv[])srandom (time (0 )); +/* Ensure that vCPU threads start with SIG_IPI blocked. */ +sigemptyset (&sigset); +sigaddset (&sigset,SIG_IPI ); +pthread_sigmask (SIG_BLOCK , &sigset,NULL ); +if (host_log_mode_option ==LOG_MODE_ALL ) {/* Run each log mode */ for (i =0 ; i <LOG_MODE_NUM ; i++) {
Greg Kroah-Hartman
maintainerPATCH 115/601 Revert "drivers/net/wan/hdlc_fr: Fix a double free in pvc_xmit"
In reply to Greg Kroah-HartmanFrom: Xie He <[email protected]>
commit d362fd0be456dba2d3d58a90b7a193962776562b upstream.
This reverts commit 1b479fb80160 ("drivers/net/wan/hdlc_fr: Fix a double free in pvc_xmit").
1. This commit is incorrect. "__skb_pad" will NOT free the skb on failure when its "free_on_error" parameter is "false".
2. This commit claims to fix my commit. But it didn't CC me??
--- drivers/net/wan/hdlc_fr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/net/wan/hdlc_fr.c +2 -3
@@ -415,7 +415,7 @@ static netdev_tx_t pvc_xmit(struct sk_buif (pad >0 ) {/* Pad the frame with zeros */ if (__skb_pad (skb, pad, false)) - goto out; + goto drop;skb_put (skb, pad); } }
@@ -448,9 +448,8 @@ static netdev_tx_t pvc_xmit(struct sk_bureturn NETDEV_TX_OK ; drop: -kfree_skb (skb); -out: dev->stats.tx_dropped++; +kfree_skb (skb);return NETDEV_TX_OK ; }
Greg Kroah-Hartman
maintainerPATCH 116/601 Revert "i3c master: fix missing destroy_workqueue() on error in i3c_master_register"
In reply to Greg Kroah-HartmanFrom: Jae Hyun Yoo <[email protected]>
commit 0d95f41ebde40d552bb4fea64b1d618607915fd6 upstream.
Adding the destroy_workqueue call in i3c_master_register introduced below kernel warning because it makes duplicate destroy_workqueue calls when i3c_master_register fails after allocating the workqueue. The workqueue will be destroyed by i3c_masterdev_release which is called by put_device at the end of the i3c_master_register function eventually in failure cases so the workqueue doesn't need to be destroyed in i3c_master_register.
[ 6.972952] WARNING: CPU: 1 PID: 1 at lib/list_debug.c:48 __list_del_entry_valid+0x9c/0xf4 [ 6.982205] list_del corruption, 8fe03c08->prev is LIST_POISON2 (00000122) [ 6.989910] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G W 5.10.23-c12838a-dirty-31dc772 #1 [ 7.000295] Hardware name: Generic DT based system [ 7.005638] Backtrace: [ 7.008369] [<809133f0>] (dump_backtrace) from [<80913644>] (show_stack+0x20/0x24) [ 7.016819] r7:00000030 r6:60000013 r5:00000000 r4:813b5d40 [ 7.023137] [<80913624>] (show_stack) from [<8091e1a0>] (dump_stack+0x9c/0xb0) [ 7.031201] [<8091e104>] (dump_stack) from [<8011fa30>] (__warn+0xf8/0x154) [ 7.038972] r7:00000030 r6:00000009 r5:804fa1c8 r4:80b6eca4 [ 7.045289] [<8011f938>] (__warn) from [<80913d14>] (warn_slowpath_fmt+0x8c/0xc0) [ 7.053641] r7:00000030 r6:80b6eca4 r5:80b6ed74 r4:818cc000 [ 7.059960] [<80913c8c>] (warn_slowpath_fmt) from [<804fa1c8>] (__list_del_entry_valid+0x9c/0xf4) [ 7.069866] r9:96becf8c r8:818cc000 r7:8fe03c10 r6:8fe03c00 r5:8fe03ba0 r4:ff7ead4c [ 7.078513] [<804fa12c>] (__list_del_entry_valid) from [<8013f0b4>] (destroy_workqueue+0x1c4/0x23c) [ 7.088615] [<8013eef0>] (destroy_workqueue) from [<806aa124>] (i3c_masterdev_release+0x40/0xb0) [ 7.098421] r7:00000000 r6:81a43b80 r5:8fe65360 r4:8fe65048 [ 7.104740] [<806aa0e4>] (i3c_masterdev_release) from [<805f3f04>] (device_release+0x40/0xb0) [ 7.114254] r5:00000000 r4:8fe65048 [ 7.118245] [<805f3ec4>] (device_release) from [<808fe754>] (kobject_put+0xc8/0x204) [ 7.126885] r5:813978dc r4:8fe65048 [ 7.130877] [<808fe68c>] (kobject_put) from [<805f5fbc>] (put_device+0x20/0x24) [ 7.139037] r7:8fe65358 r6:8fe65368 r5:8fe65358 r4:8fe65048 [ 7.145355] [<805f5f9c>] (put_device) from [<806abac4>] (i3c_master_register+0x338/0xb00) [ 7.154487] [<806ab78c>] (i3c_master_register) from [<806ae084>] (dw_i3c_probe+0x224/0x24c) [ 7.163811] r10:00000000 r9:8fe7a100 r8:00000032 r7:819fa810 r6:819fa800 r5:8fe65040 [ 7.172547] r4:00000000 [ 7.175376] [<806ade60>] (dw_i3c_probe) from [<805fdc14>] (platform_drv_probe+0x44/0x80) [ 7.184409] r9:813a25c0 r8:00000000 r7:815ec114 r6:00000000 r5:813a25c0 r4:819fa810 [ 7.193053] [<805fdbd0>] (platform_drv_probe) from [<805fb83c>] (really_probe+0x108/0x50c) [ 7.202275] r5:815ec004 r4:819fa810 [ 7.206265] [<805fb734>] (really_probe) from [<805fc180>] (driver_probe_device+0xb4/0x190) [ 7.215492] r10:813dc000 r9:80c4385c r8:000000d9 r7:813a25c0 r6:819fa810 r5:00000000 [ 7.224228] r4:813a25c0 [ 7.227055] [<805fc0cc>] (driver_probe_device) from [<805fc5cc>] (device_driver_attach+0xb8/0xc0) [ 7.236959] r9:80c4385c r8:000000d9 r7:813a25c0 r6:819fa854 r4:819fa810 [ 7.244439] [<805fc514>] (device_driver_attach) from [<805fc65c>] (__driver_attach+0x88/0x16c) [ 7.254051] r7:00000000 r6:819fa810 r5:00000000 r4:813a25c0 [ 7.260369] [<805fc5d4>] (__driver_attach) from [<805f954c>] (bus_for_each_dev+0x88/0xc8) [ 7.269489] r7:00000000 r6:818cc000 r5:805fc5d4 r4:813a25c0 [ 7.275806] [<805f94c4>] (bus_for_each_dev) from [<805fc76c>] (driver_attach+0x2c/0x30) [ 7.284739] r7:81397c98 r6:00000000 r5:8fe7db80 r4:813a25c0 [ 7.291057] [<805fc740>] (driver_attach) from [<805f9eec>] (bus_add_driver+0x120/0x200) [ 7.299984] [<805f9dcc>] (bus_add_driver) from [<805fce44>] (driver_register+0x98/0x128) [ 7.309005] r7:80c4383c r6:00000000 r5:00000000 r4:813a25c0 [ 7.315323] [<805fcdac>] (driver_register) from [<805fedb4>] (__platform_driver_register+0x50/0x58) [ 7.325410] r5:818cc000 r4:81397c98 [ 7.329404] [<805fed64>] (__platform_driver_register) from [<80c23398>] (dw_i3c_driver_init+0x24/0x28) [ 7.339790] r5:818cc000 r4:80c23374 [ 7.343784] [<80c23374>] (dw_i3c_driver_init) from [<80c01300>] (do_one_initcall+0xac/0x1d0) [ 7.353206] [<80c01254>] (do_one_initcall) from [<80c01630>] (kernel_init_freeable+0x1a8/0x204) [ 7.362916] r8:000000d9 r7:80c4383c r6:00000007 r5:819ca2c0 r4:80c67680 [ 7.370398] [<80c01488>] (kernel_init_freeable) from [<8091eb18>] (kernel_init+0x18/0x12c) [ 7.379616] r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:8091eb00 [ 7.388343] r4:00000000 [ 7.391170] [<8091eb00>] (kernel_init) from [<80100148>] (ret_from_fork+0x14/0x2c) [ 7.399607] Exception stack(0x818cdfb0 to 0x818cdff8) [ 7.405243] dfa0: 00000000 00000000 00000000 00000000 [ 7.414371] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 7.423499] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000 [ 7.430879] r5:8091eb00 r4:00000000
This reverts commit 59165d16c699182b86b5c65181013f1fd88feb62.
--- drivers/i3c/master.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/i3c/master.c +1 -4
@@ -2537,7 +2537,7 @@ int i3c_master_register(struct i3c_maste ret =i3c_master_bus_init (master);if (ret) - goto err_destroy_wq; + goto err_put_dev; ret =device_add (&master->dev);if (ret)
@@ -2568,9 +2568,6 @@ err_del_dev: err_cleanup_bus:i3c_master_bus_cleanup (master); -err_destroy_wq: -destroy_workqueue (master->wq); - err_put_dev:put_device (&master->dev);
Greg Kroah-Hartman
maintainerPATCH 117/601 mfd: stmpe: Revert "Constify static struct resource"
In reply to Greg Kroah-HartmanFrom: Rikard Falkeborn <[email protected]>
commit cb9e880a797a77c21c0f0e7ccd553da8eb4870af upstream.
In stmpe_devices_init(), the start and end field of these structs are modified, so they can not be const. Add a comment to those structs that lacked it to reduce the risk that this happens again.
This reverts commit 8d7b3a6dac4eae22c58b0853696cbd256966741b.
--- drivers/mfd/stmpe.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-)
drivers/mfd/stmpe.c +9 -5
@@ -312,7 +312,7 @@ EXPORT_SYMBOL_GPL(stmpe_set_altfunc);* GPIO (all variants) */ -static const struct resource stmpe_gpio_resources[] = { +static struct resource stmpe_gpio_resources[] = {/* Start and end filled dynamically */ { .flags =IORESOURCE_IRQ ,
@@ -336,7 +336,8 @@ static const struct mfd_cell stmpe_gpio_* Keypad (1601, 2401, 2403) */ -static const struct resource stmpe_keypad_resources[] = { +static struct resource stmpe_keypad_resources[] = { +/* Start and end filled dynamically */ { .name ="KEYPAD" , .flags =IORESOURCE_IRQ ,
@@ -357,7 +358,8 @@ static const struct mfd_cell stmpe_keypa/* * PWM (1601, 2401, 2403) */ -static const struct resource stmpe_pwm_resources[] = { +static struct resource stmpe_pwm_resources[] = { +/* Start and end filled dynamically */ { .name ="PWM0" , .flags =IORESOURCE_IRQ ,
@@ -445,7 +447,8 @@ static struct stmpe_variant_info stmpe80* Touchscreen (STMPE811 or STMPE610) */ -static const struct resource stmpe_ts_resources[] = { +static struct resource stmpe_ts_resources[] = { +/* Start and end filled dynamically */ { .name ="TOUCH_DET" , .flags =IORESOURCE_IRQ ,
@@ -467,7 +470,8 @@ static const struct mfd_cell stmpe_ts_ce* ADC (STMPE811) */ -static const struct resource stmpe_adc_resources[] = { +static struct resource stmpe_adc_resources[] = { +/* Start and end filled dynamically */ { .name ="STMPE_TEMP_SENS" , .flags =IORESOURCE_IRQ ,
Greg Kroah-Hartman
maintainerPATCH 118/601 ovl: fix missing revert_creds() on error path
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
commit 7b279bbfd2b230c7a210ff8f405799c7e46bbf48 upstream.
Smatch complains about missing that the ovl_override_creds() doesn't have a matching revert_creds() if the dentry is disconnected. Fix this by moving the ovl_override_creds() until after the disconnected check.
--- fs/overlayfs/copy_up.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
fs/overlayfs/copy_up.c +2 -1
@@ -932,7 +932,7 @@ static int ovl_copy_up_one(struct dentrystatic int ovl_copy_up_flags (struct dentry *dentry,int flags) {int err =0 ; -const struct cred *old_cred =ovl_override_creds (dentry->d_sb); +const struct cred *old_cred;bool disconnected = (dentry->d_flags &DCACHE_DISCONNECTED );/*
@@ -943,6 +943,7 @@ static int ovl_copy_up_flags(struct dentif (WARN_ON (disconnected &&d_is_dir (dentry)))return -EIO ; + old_cred =ovl_override_creds (dentry->d_sb);while (!err) {struct dentry *next;struct dentry *parent =NULL ;
Greg Kroah-Hartman
maintainerPATCH 119/601 Revert "drm/qxl: do not run release if qxl failed to init"
In reply to Greg Kroah-HartmanFrom: Gerd Hoffmann <[email protected]>
commit 93d8da8d7efbf690c0a9eaca798acc0c625245e6 upstream.
This reverts commit b91907a6241193465ca92e357adf16822242296d.
Patch is broken, it effectively makes qxl_drm_release() a nop because on normal driver shutdown qxl_drm_release() is called *after* drm_dev_unregister().
--- drivers/gpu/drm/qxl/qxl_drv.c | 2 -- 1 file changed, 2 deletions(-)
drivers/gpu/drm/qxl/qxl_drv.c +0 -2
@@ -144,8 +144,6 @@ static void qxl_drm_release(struct drm_d* reodering qxl_modeset_fini() + qxl_device_fini() calls is * non-trivial though. */ -if (!dev->registered) -return ;qxl_modeset_fini (qdev);qxl_device_fini (qdev); }
Greg Kroah-Hartman
maintainerPATCH 120/601 usb: gadget: pch_udc: Revert d3cb25a12138 completely
In reply to Greg Kroah-HartmanFrom: Andy Shevchenko <[email protected]>
commit 50a318cc9b54a36f00beadf77e578a50f3620477 upstream.
The commit d3cb25a12138 ("usb: gadget: udc: fix spin_lock in pch_udc") obviously was not thought through and had made the situation even worse than it was before. Two changes after almost reverted it. but a few leftovers have been left as it. With this revert d3cb25a12138 completely.
While at it, narrow down the scope of unlocked section to prevent potential race when prot_stall is assigned.
--- drivers/usb/gadget/udc/pch_udc.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-)
drivers/usb/gadget/udc/pch_udc.c +13 -4
@@ -596,18 +596,22 @@ static void pch_udc_reconnect(struct pchstatic inline void pch_udc_vbus_session (struct pch_udc_dev *dev,int is_active) { +unsigned long iflags; + +spin_lock_irqsave (&dev->lock, iflags);if (is_active) {pch_udc_reconnect (dev); dev->vbus_session =1 ; }else {if (dev->driver && dev->driver->disconnect) { -spin_lock (&dev->lock); +spin_unlock_irqrestore (&dev->lock, iflags); dev->driver->disconnect (&dev->gadget); -spin_unlock (&dev->lock); +spin_lock_irqsave (&dev->lock, iflags); }pch_udc_set_disconnect (dev); dev->vbus_session =0 ; } +spin_unlock_irqrestore (&dev->lock, iflags); }/**
@@ -1166,20 +1170,25 @@ static int pch_udc_pcd_selfpowered(strucstatic int pch_udc_pcd_pullup (struct usb_gadget *gadget,int is_on) {struct pch_udc_dev *dev; +unsigned long iflags;if (!gadget)return -EINVAL ; + dev = container_of(gadget, struct pch_udc_dev, gadget); + +spin_lock_irqsave (&dev->lock, iflags);if (is_on) {pch_udc_reconnect (dev); }else {if (dev->driver && dev->driver->disconnect) { -spin_lock (&dev->lock); +spin_unlock_irqrestore (&dev->lock, iflags); dev->driver->disconnect (&dev->gadget); -spin_unlock (&dev->lock); +spin_lock_irqsave (&dev->lock, iflags); }pch_udc_set_disconnect (dev); } +spin_unlock_irqrestore (&dev->lock, iflags);return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 121/601 Revert "tools/power turbostat: adjust for temperature offset"
In reply to Greg Kroah-HartmanFrom: Len Brown <[email protected]>
commit b2b94be787bf47eedd5890a249f3318bf9f1f1d5 upstream.
This reverts commit 6ff7cb371c4bea3dba03a56d774da925e78a5087.
Apparently the TCC offset should not be used to adjust what temperature we show the user after all.
(on most systems, TCC offset is 0, FWIW)
--- tools/power/x86/turbostat/turbostat.c | 62 ++++++++++++++++++---------------- 1 file changed, 33 insertions(+), 29 deletions(-)
tools/power/x86/turbostat/turbostat.c +33 -29
@@ -4822,33 +4822,12 @@ double discover_bclk(unsigned int family* below this value, including the Digital Thermal Sensor (DTS), * Package Thermal Management Sensor (PTM), and thermal event thresholds. */ -int read_tcc_activation_temp () +int set_temperature_target (struct thread_data *t,struct core_data *c,struct pkg_data *p) {unsigned long long msr; -unsigned int tcc, target_c, offset_c; - -/* Temperature Target MSR is Nehalem and newer only */ -if (!do_nhm_platform_info) -return 0 ; - -if (get_msr (base_cpu,MSR_IA32_TEMPERATURE_TARGET , &msr)) -return 0 ; +unsigned int target_c_local; +int cpu; - target_c = (msr >>16 ) &0xFF ; - - offset_c = (msr >>24 ) &0xF ; - - tcc = target_c - offset_c; - -if (!quiet) -fprintf (outf,"cpu%d: MSR_IA32_TEMPERATURE_TARGET: 0x%08llx (%d C) (%d default - %d offset)\n" , - base_cpu, msr, tcc, target_c, offset_c); - -return tcc; -} - -int set_temperature_target (struct thread_data *t,struct core_data *c,struct pkg_data *p) -{/* tcc_activation_temp is used only for dts or ptm */ if (!(do_dts || do_ptm))return 0 ;
@@ -4857,18 +4836,43 @@ int set_temperature_target(struct threadif (!(t->flags &CPU_IS_FIRST_THREAD_IN_CORE ) || !(t->flags &CPU_IS_FIRST_CORE_IN_PACKAGE ))return 0 ; + cpu = t->cpu_id; +if (cpu_migrate (cpu)) { +fprintf (outf,"Could not migrate to CPU %d\n" , cpu); +return -1 ; + } +if (tcc_activation_temp_override !=0 ) { tcc_activation_temp = tcc_activation_temp_override; -fprintf (outf,"Using cmdline TCC Target (%d C)\n" , tcc_activation_temp); +fprintf (outf,"cpu%d: Using cmdline TCC Target (%d C)\n" , + cpu, tcc_activation_temp);return 0 ; } - tcc_activation_temp =read_tcc_activation_temp (); -if (tcc_activation_temp) -return 0 ; +/* Temperature Target MSR is Nehalem and newer only */ +if (!do_nhm_platform_info) + goto guess; + +if (get_msr (base_cpu,MSR_IA32_TEMPERATURE_TARGET , &msr)) + goto guess; + + target_c_local = (msr >>16 ) &0xFF ; + +if (!quiet) +fprintf (outf,"cpu%d: MSR_IA32_TEMPERATURE_TARGET: 0x%08llx (%d C)\n" , + cpu, msr, target_c_local); + +if (!target_c_local) + goto guess; + + tcc_activation_temp = target_c_local; + +return 0 ; +guess: tcc_activation_temp =TJMAX_DEFAULT ; -fprintf (outf,"Guessing tjMax %d C, Please use -T to specify\n" , tcc_activation_temp); +fprintf (outf,"cpu%d: Guessing tjMax %d C, Please use -T to specify\n" , + cpu, tcc_activation_temp);return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 122/601 firmware: xilinx: Fix dereferencing freed memory
In reply to Greg Kroah-HartmanFrom: Tejas Patel <[email protected]>
[ Upstream commit f1f21bece82c76a56a96988ec7d51ccc033d8949 ]
Fix smatch warning:drivers/firmware/xilinx/zynqmp.c:1288 zynqmp_firmware_remove()
error: dereferencing freed memory 'feature_data'
Use hash_for_each_safe for safe removal of hash entry.
--- drivers/firmware/xilinx/zynqmp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/firmware/xilinx/zynqmp.c +3 -2
@@ -2,7 +2,7 @@/* * Xilinx Zynq MPSoC Firmware layer * -* Copyright (C) 2014-2020 Xilinx, Inc. +* Copyright (C) 2014-2021 Xilinx, Inc. * * Michal Simek <[email protected]> * Davorin Mista <[email protected]>
@@ -1280,12 +1280,13 @@ static int zynqmp_firmware_probe(struct platform_device *pdev)static int zynqmp_firmware_remove (struct platform_device *pdev) {struct pm_api_feature_data *feature_data; +struct hlist_node *tmp;int i;mfd_remove_devices (&pdev->dev);zynqmp_pm_api_debugfs_exit (); -hash_for_each (pm_api_features_map, i, feature_data, hentry) { +hash_for_each_safe (pm_api_features_map, i, tmp, feature_data, hentry) {hash_del (&feature_data->hentry);kfree (feature_data); }
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 123/601 firmware: xilinx: Remove zynqmp_pm_get_eemi_ops() in IS_REACHABLE(CONFIG_ZYNQMP_FIRMWARE)
In reply to Greg Kroah-HartmanFrom: Nobuhiro Iwamatsu <[email protected]>
[ Upstream commit 79bfe480a0a0b259ab9fddcd2fe52c03542b1196 ]
zynqmp_pm_get_eemi_ops() was removed in commit 4db8180ffe7c: "Firmware: xilinx:
Remove eemi ops for fpga related APIs", but not in IS_REACHABLE(CONFIG_ZYNQMP_FIRMWARE). Any driver who want to communicate with PMC using EEMI APIs use the functions provided for each function
This removed zynqmp_pm_get_eemi_ops() in IS_REACHABLE(CONFIG_ZYNQMP_FIRMWARE), and also modify the documentation for this driver.
--- Documentation/driver-api/xilinx/eemi.rst | 31 ++---------------------- include/linux/firmware/xlnx-zynqmp.h | 5 ---- 2 files changed, 2 insertions(+), 34 deletions(-)
Documentation/driver-api/xilinx/eemi.rst +2 -29
@@ -16,35 +16,8 @@ components running across different processing clusters on a chip or device to communicate with a power management controller (PMC) on a device to issue or respond to power management requests. -EEMI ops is a structure containing all eemi APIs supported by Zynq MPSoC. -The zynqmp-firmware driver maintain all EEMI APIs in zynqmp_eemi_ops -structure. Any driver who want to communicate with PMC using EEMI APIs -can call zynqmp_pm_get_eemi_ops(). - -Example of EEMI ops:: - - /* zynqmp-firmware driver maintain all EEMI APIs */ - struct zynqmp_eemi_ops { - int (*get_api_version)(u32 *version); - int (*query_data)(struct zynqmp_pm_query_data qdata, u32 *out); - }; - - static const struct zynqmp_eemi_ops eemi_ops = { - .get_api_version = zynqmp_pm_get_api_version, - .query_data = zynqmp_pm_query_data, - }; - -Example of EEMI ops usage:: - - static const struct zynqmp_eemi_ops *eemi_ops; - u32 ret_payload[PAYLOAD_ARG_CNT]; - int ret; - - eemi_ops = zynqmp_pm_get_eemi_ops(); - if (IS_ERR(eemi_ops)) - return PTR_ERR(eemi_ops); - - ret = eemi_ops->query_data(qdata, ret_payload); +Any driver who wants to communicate with PMC using EEMI APIs use the +functions provided for each function. IOCTL ------
include/linux/firmware/xlnx-zynqmp.h +0 -5
@@ -355,11 +355,6 @@ int zynqmp_pm_read_pggs(u32 index, u32 *value);int zynqmp_pm_system_shutdown (const u32 type,const u32 subtype);int zynqmp_pm_set_boot_health_status (u32 value);#else -static inline struct zynqmp_eemi_ops *zynqmp_pm_get_eemi_ops (void ) -{ -return ERR_PTR (-ENODEV ); -} -static inline int zynqmp_pm_get_api_version (u32 *version) {return -ENODEV ;
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 124/601 x86/vdso: Use proper modifier for lens format specifier in extract()
In reply to Greg Kroah-HartmanFrom: Jiri Slaby <[email protected]>
[ Upstream commit 70c9d959226b7c5c48c119e2c1cfc1424f87b023 ]
Commit
8382c668ce4f ("x86/vdso: Add support for exception fixup in vDSO functions")
prints length "len" which is size_t.
Compilers now complain when building on a 32-bit host:
HOSTCC arch/x86/entry/vdso/vdso2c
...
In file included from arch/x86/entry/vdso/vdso2c.c:162:
arch/x86/entry/vdso/vdso2c.h: In function 'extract64':
arch/x86/entry/vdso/vdso2c.h:38:52: warning: format '%lu' expects argument of \
type 'long unsigned int', but argument 4 has type 'size_t' {aka 'unsigned int'}So use proper modifier (%zu) for size_t.
[ bp: Massage commit message. ]
--- arch/x86/entry/vdso/vdso2c.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/entry/vdso/vdso2c.h +1 -1
@@ -35,7 +35,7 @@ static void BITSFUNC(extract)(const unsigned char *data, size_t data_len,if (offset + len > data_len)fail ("section to extract overruns input data" ); -fprintf (outfile,"static const unsigned char %s[%lu] = {" , name, len); +fprintf (outfile,"static const unsigned char %s[%zu] = {" , name, len);BITSFUNC (copy)(outfile, data + offset, len);fprintf (outfile,"\n};\n\n" ); }
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 125/601 fpga: fpga-mgr: xilinx-spi: fix error messages on -EPROBE_DEFER
In reply to Greg Kroah-HartmanFrom: Luca Ceresoli <[email protected]>
[ Upstream commit 484a58607a808c3721917f5ca5fba7eff809e4df ]
The current code produces an error message on devm_gpiod_get() errors even when the error is -EPROBE_DEFER, which should be silent.
This has been observed producing a significant amount of messages like:
xlnx-slave-spi spi1.1: Failed to get PROGRAM_B gpio: -517
Fix and simplify code by using the dev_err_probe() helper function.
--- drivers/fpga/xilinx-spi.c | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-)
drivers/fpga/xilinx-spi.c +9 -15
@@ -233,25 +233,19 @@ static int xilinx_spi_probe(struct spi_device *spi)/* PROGRAM_B is active low */ conf->prog_b =devm_gpiod_get (&spi->dev,"prog_b" ,GPIOD_OUT_LOW ); -if (IS_ERR (conf->prog_b)) { -dev_err (&spi->dev,"Failed to get PROGRAM_B gpio: %ld\n" , -PTR_ERR (conf->prog_b)); -return PTR_ERR (conf->prog_b); - } +if (IS_ERR (conf->prog_b)) +return dev_err_probe (&spi->dev,PTR_ERR (conf->prog_b), +"Failed to get PROGRAM_B gpio\n" ); conf->init_b =devm_gpiod_get_optional (&spi->dev,"init-b" ,GPIOD_IN ); -if (IS_ERR (conf->init_b)) { -dev_err (&spi->dev,"Failed to get INIT_B gpio: %ld\n" , -PTR_ERR (conf->init_b)); -return PTR_ERR (conf->init_b); - } +if (IS_ERR (conf->init_b)) +return dev_err_probe (&spi->dev,PTR_ERR (conf->init_b), +"Failed to get INIT_B gpio\n" ); conf->done =devm_gpiod_get (&spi->dev,"done" ,GPIOD_IN ); -if (IS_ERR (conf->done)) { -dev_err (&spi->dev,"Failed to get DONE gpio: %ld\n" , -PTR_ERR (conf->done)); -return PTR_ERR (conf->done); - } +if (IS_ERR (conf->done)) +return dev_err_probe (&spi->dev,PTR_ERR (conf->done), +"Failed to get DONE gpio\n" ); mgr = devm_fpga_mgr_create(&spi->dev, "Xilinx Slave Serial FPGA Manager",
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 126/601 crypto: keembay-ocs-aes - Fix error return code in kmb_ocs_aes_probe()
In reply to Greg Kroah-HartmanFrom: Wei Yongjun <[email protected]>
[ Upstream commit 2eee428d8212265af09d349b74746be03513382e ]
Fix to return negative error code -ENOMEM from the error handling case instead of 0, as done elsewhere in this function.
--- drivers/crypto/keembay/keembay-ocs-aes-core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/crypto/keembay/keembay-ocs-aes-core.c +3 -1
@@ -1649,8 +1649,10 @@ static int kmb_ocs_aes_probe(struct platform_device *pdev)/* Initialize crypto engine */ aes_dev->engine =crypto_engine_alloc_init (dev, true); -if (!aes_dev->engine) +if (!aes_dev->engine) { + rc = -ENOMEM ; goto list_del; + } rc =crypto_engine_start (aes_dev->engine);if (rc) {
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 127/601 crypto: sun8i-ss - fix result memory leak on error path
In reply to Greg Kroah-HartmanFrom: Corentin Labbe <[email protected]>
[ Upstream commit 1dbc6a1e25be8575d6c4114d1d2b841a796507f7 ]
This patch fixes a memory leak on an error path.
--- drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c +1 -1
@@ -438,8 +438,8 @@ int sun8i_ss_hash_run(struct crypto_engine *engine, void *breq)kfree (pad);memcpy (areq->result, result, algt->alg.hash.halg.digestsize); -kfree (result); theend: +kfree (result);crypto_finalize_hash_request (engine, breq, err);return 0 ; }
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 128/601 memory: gpmc: fix out of bounds read and dereference on gpmc_cs[]
In reply to Greg Kroah-HartmanFrom: Colin Ian King <[email protected]>
[ Upstream commit e004c3e67b6459c99285b18366a71af467d869f5 ]
Currently the array gpmc_cs is indexed by cs before it cs is range checked and the pointer read from this out-of-index read is dereferenced. Fix this by performing the range check on cs before the read and the following pointer dereference.
Addresses-Coverity: ("Negative array index read")
--- drivers/memory/omap-gpmc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/memory/omap-gpmc.c +5 -2
@@ -1009,8 +1009,8 @@ EXPORT_SYMBOL(gpmc_cs_request);void gpmc_cs_free (int cs) { -struct gpmc_cs_data *gpmc = &gpmc_cs[cs]; -struct resource *res = &gpmc->mem; +struct gpmc_cs_data *gpmc; +struct resource *res;spin_lock (&gpmc_mem_lock);if (cs >= gpmc_cs_num || cs <0 || !gpmc_cs_reserved (cs)) {
@@ -1018,6 +1018,9 @@ void gpmc_cs_free(int cs)spin_unlock (&gpmc_mem_lock);return ; } + gpmc = &gpmc_cs[cs]; + res = &gpmc->mem; +gpmc_cs_disable_mem (cs);if (res->flags)release_resource (res);
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 129/601 ARM: dts: exynos: correct fuel gauge interrupt trigger level on GT-I9100
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
[ Upstream commit 46799802136670e00498f19898f1635fbc85f583 ]
The Maxim fuel gauge datasheets describe the interrupt line as active low with a requirement of acknowledge from the CPU. The falling edge interrupt will mostly work but it's not correct.
--- arch/arm/boot/dts/exynos4210-i9100.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/exynos4210-i9100.dts +1 -1
@@ -136,7 +136,7 @@ compatible = "maxim,max17042"; interrupt-parent = <&gpx2>; - interrupts = <3 IRQ_TYPE_EDGE_FALLING>; + interrupts = <3 IRQ_TYPE_LEVEL_LOW>; pinctrl-0 = <&max17042_fuel_irq>; pinctrl-names = "default";
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 130/601 ARM: dts: exynos: correct fuel gauge interrupt trigger level on P4 Note family
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
[ Upstream commit c731a16e2cf424a462c7d42c33d6acd613576508 ]
The Maxim fuel gauge datasheets describe the interrupt line as active low with a requirement of acknowledge from the CPU. The falling edge interrupt will mostly work but it's not correct.
--- arch/arm/boot/dts/exynos4412-p4note.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/exynos4412-p4note.dtsi +1 -1
@@ -146,7 +146,7 @@ pinctrl-0 = <&fuel_alert_irq>; pinctrl-names = "default"; interrupt-parent = <&gpx2>; - interrupts = <3 IRQ_TYPE_EDGE_FALLING>; + interrupts = <3 IRQ_TYPE_LEVEL_LOW>; maxim,rsns-microohm = <10000>; maxim,over-heat-temp = <600>; maxim,over-volt = <4300>;
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 131/601 ARM: dts: exynos: correct fuel gauge interrupt trigger level on Midas family
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
[ Upstream commit 8a45f33bd36efbb624198cfa9fdf1f66fd1c3d26 ]
The Maxim fuel gauge datasheets describe the interrupt line as active low with a requirement of acknowledge from the CPU. The falling edge interrupt will mostly work but it's not correct.
--- arch/arm/boot/dts/exynos4412-midas.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/exynos4412-midas.dtsi +1 -1
@@ -221,7 +221,7 @@ fuel-gauge@36 { compatible = "maxim,max17047"; interrupt-parent = <&gpx2>; - interrupts = <3 IRQ_TYPE_EDGE_FALLING>; + interrupts = <3 IRQ_TYPE_LEVEL_LOW>; pinctrl-names = "default"; pinctrl-0 = <&max77693_fuel_irq>; reg = <0x36>;
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 132/601 ARM: dts: exynos: correct MUIC interrupt trigger level on Midas family
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
[ Upstream commit 15107e443ab8c6cb35eff10438993e4bc944d9ae ]
The Maxim MUIC datasheets describe the interrupt line as active low with a requirement of acknowledge from the CPU. Without specifying the interrupt type in Devicetree, kernel might apply some fixed configuration, not necessarily working for this hardware.
Additionally, the interrupt line is shared so using level sensitive interrupt is here especially important to avoid races.
--- arch/arm/boot/dts/exynos4412-midas.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/exynos4412-midas.dtsi +1 -1
@@ -173,7 +173,7 @@ pmic@66 { compatible = "maxim,max77693"; interrupt-parent = <&gpx1>; - interrupts = <5 IRQ_TYPE_EDGE_FALLING>; + interrupts = <5 IRQ_TYPE_LEVEL_LOW>; pinctrl-names = "default"; pinctrl-0 = <&max77693_irq>; reg = <0x66>;
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 133/601 ARM: dts: exynos: correct PMIC interrupt trigger level on Midas family
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
[ Upstream commit e52dcd6e70fab51f53292e53336ecb007bb60889 ]
The Maxim PMIC datasheets describe the interrupt line as active low with a requirement of acknowledge from the CPU. Without specifying the interrupt type in Devicetree, kernel might apply some fixed configuration, not necessarily working for this hardware.
Additionally, the interrupt line is shared so using level sensitive interrupt is here especially important to avoid races.
--- arch/arm/boot/dts/exynos4412-midas.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/exynos4412-midas.dtsi +1 -1
@@ -665,7 +665,7 @@ max77686: pmic@9 { compatible = "maxim,max77686"; interrupt-parent = <&gpx0>; - interrupts = <7 IRQ_TYPE_NONE>; + interrupts = <7 IRQ_TYPE_LEVEL_LOW>; pinctrl-0 = <&max77686_irq>; pinctrl-names = "default"; reg = <0x09>;
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 134/601 ARM: dts: exynos: correct PMIC interrupt trigger level on Odroid X/U3 family
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
[ Upstream commit 6503c568e97a52f8b7a3109718db438e52e59485 ]
The Maxim PMIC datasheets describe the interrupt line as active low with a requirement of acknowledge from the CPU. Without specifying the interrupt type in Devicetree, kernel might apply some fixed configuration, not necessarily working for this hardware.
Additionally, the interrupt line is shared so using level sensitive interrupt is here especially important to avoid races.
--- arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/exynos4412-odroid-common.dtsi +1 -1
@@ -278,7 +278,7 @@ max77686: pmic@9 { compatible = "maxim,max77686"; interrupt-parent = <&gpx3>; - interrupts = <2 IRQ_TYPE_NONE>; + interrupts = <2 IRQ_TYPE_LEVEL_LOW>; pinctrl-names = "default"; pinctrl-0 = <&max77686_irq>; reg = <0x09>;
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 135/601 ARM: dts: exynos: correct PMIC interrupt trigger level on P4 Note family
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
[ Upstream commit fbe9c9bb2e929865500a0985735f81c0142accad ]
The Maxim PMIC datasheets describe the interrupt line as active low with a requirement of acknowledge from the CPU. Without specifying the interrupt type in Devicetree, kernel might apply some fixed configuration, not necessarily working for this hardware.
Additionally, the interrupt line is shared so using level sensitive interrupt is here especially important to avoid races.
--- arch/arm/boot/dts/exynos4412-p4note.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/exynos4412-p4note.dtsi +1 -1
@@ -322,7 +322,7 @@ max77686: pmic@9 { compatible = "maxim,max77686"; interrupt-parent = <&gpx0>; - interrupts = <7 IRQ_TYPE_NONE>; + interrupts = <7 IRQ_TYPE_LEVEL_LOW>; pinctrl-0 = <&max77686_irq>; pinctrl-names = "default"; reg = <0x09>;
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 136/601 ARM: dts: exynos: correct PMIC interrupt trigger level on SMDK5250
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
[ Upstream commit f6368c60561370e4a92fac22982a3bd656172170 ]
The Maxim PMIC datasheets describe the interrupt line as active low with a requirement of acknowledge from the CPU. Without specifying the interrupt type in Devicetree, kernel might apply some fixed configuration, not necessarily working for this hardware.
Additionally, the interrupt line is shared so using level sensitive interrupt is here especially important to avoid races.
--- arch/arm/boot/dts/exynos5250-smdk5250.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/exynos5250-smdk5250.dts +1 -1
@@ -134,7 +134,7 @@ compatible = "maxim,max77686"; reg = <0x09>; interrupt-parent = <&gpx3>; - interrupts = <2 IRQ_TYPE_NONE>; + interrupts = <2 IRQ_TYPE_LEVEL_LOW>; pinctrl-names = "default"; pinctrl-0 = <&max77686_irq>; #clock-cells = <1>;
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 137/601 ARM: dts: exynos: correct PMIC interrupt trigger level on Snow
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
[ Upstream commit 8987efbb17c2522be8615085df9a14da2ab53d34 ]
The Maxim PMIC datasheets describe the interrupt line as active low with a requirement of acknowledge from the CPU. Without specifying the interrupt type in Devicetree, kernel might apply some fixed configuration, not necessarily working for this hardware.
Additionally, the interrupt line is shared so using level sensitive interrupt is here especially important to avoid races.
--- arch/arm/boot/dts/exynos5250-snow-common.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/exynos5250-snow-common.dtsi +1 -1
@@ -292,7 +292,7 @@ max77686: pmic@9 { compatible = "maxim,max77686"; interrupt-parent = <&gpx3>; - interrupts = <2 IRQ_TYPE_NONE>; + interrupts = <2 IRQ_TYPE_LEVEL_LOW>; pinctrl-names = "default"; pinctrl-0 = <&max77686_irq>; wakeup-source;
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 138/601 ARM: dts: s5pv210: correct fuel gauge interrupt trigger level on Fascinate family
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
[ Upstream commit 214e6ec8c9f5a3353d3282b3ff475d3ee86cc21a ]
The Maxim fuel gauge datasheets describe the interrupt line as active low with a requirement of acknowledge from the CPU. The falling edge interrupt will mostly work but it's not correct.
--- arch/arm/boot/dts/s5pv210-fascinate4g.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/s5pv210-fascinate4g.dts +1 -1
@@ -115,7 +115,7 @@ compatible = "maxim,max77836-battery"; interrupt-parent = <&gph3>; - interrupts = <3 IRQ_TYPE_EDGE_FALLING>; + interrupts = <3 IRQ_TYPE_LEVEL_LOW>; pinctrl-names = "default"; pinctrl-0 = <&fg_irq>;
Signature · 1 line
2.30.2