Linux 6.6.89
Greg Kroah-Hartman
maintainerI'm announcing the release of the 6.6.89 kernel.
All users of the 6.6 kernel series must upgrade.
The updated 6.6.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.6.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/scheduler/sched-capacity.rst | 13 - Makefile | 2 arch/arm64/boot/dts/nvidia/tegra234-p3768-0000.dtsi | 7 arch/loongarch/Kconfig | 1 arch/loongarch/include/asm/ptrace.h | 4 arch/loongarch/kernel/traps.c | 20 +- arch/loongarch/mm/hugetlbpage.c | 2 arch/loongarch/mm/init.c | 3 arch/mips/include/asm/mips-cm.h | 22 ++ arch/mips/kernel/mips-cm.c | 14 + arch/parisc/kernel/pdt.c | 2 arch/riscv/include/asm/alternative-macros.h | 19 -- arch/s390/kvm/intercept.c | 2 arch/s390/kvm/interrupt.c | 8 arch/s390/kvm/kvm-s390.c | 10 - arch/s390/kvm/trace-s390.h | 4 arch/x86/entry/entry.S | 2 arch/x86/events/core.c | 2 arch/x86/include/asm/asm.h | 3 arch/x86/include/asm/extable_fixup_types.h | 2 arch/x86/include/asm/intel-family.h | 2 arch/x86/kernel/cpu/bugs.c | 30 +-- arch/x86/kernel/cpu/mce/severity.c | 12 - arch/x86/kernel/i8253.c | 3 arch/x86/kvm/svm/avic.c | 60 +++--- arch/x86/kvm/vmx/posted_intr.c | 28 +-- arch/x86/kvm/x86.c | 3 arch/x86/mm/extable.c | 9 - arch/x86/mm/tlb.c | 6 arch/x86/platform/pvh/head.S | 7 crypto/crypto_null.c | 39 ++-- drivers/acpi/ec.c | 28 +++ drivers/acpi/pptt.c | 4 drivers/ata/libata-scsi.c | 25 +- drivers/auxdisplay/hd44780.c | 9 - drivers/base/base.h | 17 + drivers/base/bus.c | 2 drivers/base/core.c | 38 +++- drivers/base/dd.c | 6 drivers/block/loop.c | 2 drivers/char/misc.c | 2 drivers/char/virtio_console.c | 7 drivers/clk/clk.c | 4 drivers/clk/renesas/r9a07g043-cpg.c | 28 ++- drivers/clk/renesas/r9a07g044-cpg.c | 21 ++ drivers/clk/renesas/rzg2l-cpg.c | 180 ++++++++++++++------ drivers/clk/renesas/rzg2l-cpg.h | 24 +- drivers/comedi/drivers/jr3_pci.c | 2 drivers/cpufreq/apple-soc-cpufreq.c | 10 - drivers/cpufreq/cppc_cpufreq.c | 2 drivers/cpufreq/scmi-cpufreq.c | 10 - drivers/cpufreq/scpi-cpufreq.c | 13 + drivers/crypto/atmel-sha204a.c | 6 drivers/crypto/ccp/sp-pci.c | 1 drivers/cxl/core/regs.c | 4 drivers/dma-buf/udmabuf.c | 2 drivers/dma/dmatest.c | 6 drivers/gpio/gpiolib-of.c | 6 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 - drivers/iio/adc/ad7768-1.c | 5 drivers/infiniband/hw/qib/qib_fs.c | 1 drivers/iommu/amd/iommu.c | 2 drivers/irqchip/irq-gic-v2m.c | 2 drivers/mailbox/pcc.c | 15 + drivers/mcb/mcb-parse.c | 2 drivers/md/raid1.c | 26 +- drivers/media/test-drivers/vimc/vimc-streamer.c | 6 drivers/media/v4l2-core/v4l2-subdev.c | 101 +++++++---- drivers/misc/lkdtm/perms.c | 14 + drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c | 8 drivers/misc/mei/hw-me-regs.h | 1 drivers/misc/mei/pci-me.c | 1 drivers/mmc/host/sdhci-msm.c | 2 drivers/net/dsa/mt7530.c | 6 drivers/net/dsa/mv88e6xxx/chip.c | 27 ++- drivers/net/ethernet/amd/pds_core/adminq.c | 36 +--- drivers/net/ethernet/amd/pds_core/auxbus.c | 3 drivers/net/ethernet/amd/pds_core/core.c | 4 drivers/net/ethernet/amd/pds_core/core.h | 2 drivers/net/ethernet/amd/pds_core/devlink.c | 4 drivers/net/ethernet/mediatek/mtk_eth_soc.c | 24 ++ drivers/net/ethernet/mediatek/mtk_eth_soc.h | 10 + drivers/net/phy/microchip.c | 46 ----- drivers/net/phy/phy_led_triggers.c | 23 +- drivers/net/vmxnet3/vmxnet3_xdp.c | 2 drivers/net/xen-netfront.c | 17 + drivers/ntb/hw/amd/ntb_hw_amd.c | 1 drivers/ntb/hw/idt/ntb_hw_idt.c | 18 -- drivers/nvme/host/core.c | 9 + drivers/nvme/host/multipath.c | 2 drivers/nvme/target/fc.c | 25 +- drivers/of/resolver.c | 37 +--- drivers/pci/probe.c | 9 - drivers/pinctrl/renesas/pinctrl-rza2.c | 3 drivers/regulator/rk808-regulator.c | 4 drivers/rtc/rtc-pcf85063.c | 19 ++ drivers/s390/char/sclp_con.c | 17 + drivers/s390/char/sclp_tty.c | 12 + drivers/scsi/hisi_sas/hisi_sas_main.c | 20 ++ drivers/scsi/pm8001/pm8001_sas.c | 1 drivers/scsi/scsi.c | 36 ++-- drivers/scsi/scsi_lib.c | 6 drivers/soc/qcom/ice.c | 48 +++++ drivers/spi/spi-imx.c | 5 drivers/spi/spi-tegra210-quad.c | 6 drivers/thunderbolt/tb.c | 16 + drivers/tty/serial/msm_serial.c | 6 drivers/tty/serial/sifive.c | 6 drivers/ufs/core/ufs-mcq.c | 12 - drivers/ufs/host/ufs-exynos.c | 10 - drivers/ufs/host/ufs-qcom.c | 2 drivers/usb/cdns3/cdns3-gadget.c | 2 drivers/usb/chipidea/ci_hdrc_imx.c | 44 +++- drivers/usb/class/cdc-wdm.c | 21 +- drivers/usb/core/quirks.c | 9 + drivers/usb/dwc3/dwc3-pci.c | 10 + drivers/usb/dwc3/dwc3-xilinx.c | 4 drivers/usb/dwc3/gadget.c | 28 ++- drivers/usb/gadget/udc/aspeed-vhub/dev.c | 3 drivers/usb/host/max3421-hcd.c | 7 drivers/usb/host/ohci-pci.c | 23 ++ drivers/usb/host/xhci-mvebu.c | 10 - drivers/usb/host/xhci-mvebu.h | 6 drivers/usb/host/xhci-plat.c | 2 drivers/usb/host/xhci-ring.c | 13 - drivers/usb/serial/ftdi_sio.c | 2 drivers/usb/serial/ftdi_sio_ids.h | 5 drivers/usb/serial/option.c | 3 drivers/usb/serial/usb-serial-simple.c | 7 drivers/usb/storage/unusual_uas.h | 7 drivers/xen/Kconfig | 2 fs/btrfs/file.c | 9 - fs/ceph/inode.c | 2 fs/ext4/block_validity.c | 5 fs/ext4/inode.c | 9 - fs/iomap/buffered-io.c | 2 fs/namespace.c | 69 ++++--- fs/ntfs3/file.c | 1 fs/smb/client/sess.c | 60 ++++-- fs/smb/client/smb1ops.c | 36 ++++ fs/splice.c | 2 include/linux/energy_model.h | 1 include/media/v4l2-subdev.h | 25 ++ include/soc/qcom/ice.h | 2 include/trace/stages/stage3_trace_output.h | 8 include/trace/stages/stage7_class_define.h | 1 init/Kconfig | 2 io_uring/io_uring.c | 15 - io_uring/refs.h | 7 kernel/bpf/bpf_cgrp_storage.c | 11 - kernel/bpf/verifier.c | 32 +++ kernel/dma/contiguous.c | 3 kernel/events/core.c | 6 kernel/module/Kconfig | 1 kernel/panic.c | 6 kernel/sched/core.c | 92 ++++------ kernel/sched/cpudeadline.c | 2 kernel/sched/cpufreq_schedutil.c | 63 +++++-- kernel/sched/deadline.c | 4 kernel/sched/fair.c | 40 +++- kernel/sched/rt.c | 2 kernel/sched/sched.h | 28 --- kernel/sched/topology.c | 7 kernel/time/tick-common.c | 22 ++ kernel/trace/bpf_trace.c | 7 kernel/trace/trace_events.c | 7 lib/test_ubsan.c | 18 +- net/9p/client.c | 30 +-- net/core/lwtunnel.c | 26 ++ net/core/selftests.c | 18 +- net/sched/sch_hfsc.c | 23 +- net/tipc/monitor.c | 3 samples/trace_events/trace-events-sample.h | 18 +- scripts/Makefile.lib | 2 sound/soc/codecs/wcd934x.c | 2 sound/soc/qcom/apq8016_sbc.c | 2 sound/soc/qcom/apq8096.c | 2 sound/soc/qcom/common.c | 2 sound/soc/qcom/lpass-apq8016.c | 4 sound/soc/qcom/lpass-cpu.c | 7 sound/soc/qcom/lpass-hdmi.c | 2 sound/soc/qcom/lpass-ipq806x.c | 4 sound/soc/qcom/lpass-platform.c | 2 sound/soc/qcom/lpass-sc7180.c | 4 sound/soc/qcom/lpass-sc7280.c | 2 sound/soc/qcom/lpass.h | 4 sound/soc/qcom/qdsp6/q6afe.c | 8 sound/soc/qcom/qdsp6/q6apm-dai.c | 61 +++--- sound/soc/qcom/qdsp6/q6asm.h | 20 +- sound/soc/qcom/qdsp6/topology.c | 3 sound/soc/qcom/sc7180.c | 2 sound/soc/qcom/sc8280xp.c | 2 sound/soc/qcom/sdm845.c | 2 sound/soc/qcom/sdw.c | 2 sound/soc/qcom/sm8250.c | 2 sound/soc/qcom/storm.c | 2 sound/virtio/virtio_pcm.c | 21 +- tools/bpf/bpftool/prog.c | 1 tools/objtool/check.c | 36 +++- tools/testing/selftests/mincore/mincore_selftest.c | 3 tools/testing/selftests/ublk/test_stripe_04.sh | 24 ++ 201 files changed, 1783 insertions(+), 907 deletions(-)
Adam Xue (1):
USB: serial: option: add Sierra Wireless EM9291
Al Viro (2):
fix a couple of races in MNT_TREE_BENEATH handling by do_move_mount()
qibfs: fix _another_ leak
Alexander Stein (1):
usb: host: max3421-hcd: Add missing spi_device_id table
Alexander Usyskin (1):
mei: me: add panther lake H DID
Alexei Starovoitov (1):
bpf: Fix deadlock between rcu_tasks_trace and event_mutex.
Alexey Nepomnyashih (1):
xen-netfront: handle NULL returned by xdp_convert_buff_to_frame()
Anastasia Kovaleva (1):
scsi: core: Clear flags for scsi_cmnd that did not complete
Andrew Jones (1):
riscv: Provide all alternative macros all the time
Andy Shevchenko (3):
usb: dwc3: gadget: Refactor loop to avoid NULL endpoints
usb: dwc3: gadget: Avoid using reserved endpoints on Intel Merrifield
gpiolib: of: Move Atmel HSMCI quirk up out of the regulator comment
Ard Biesheuvel (1):
x86/pvh: Call C code via the kernel virtual mapping
Arnd Bergmann (2):
dma/contiguous: avoid warning about unused size_bytes
ntb: reduce stack usage in idt_scan_mws
Baokun Li (1):
ext4: goto right label 'out_mmap_sem' in ext4_setattr()
Basavaraj Natikar (1):
ntb_hw_amd: Add NTB PCI ID for new gen CPU
Bo-Cun Chen (1):
net: ethernet: mtk_eth_soc: net: revise NETSYSv3 hardware configuration
Breno Leitao (2):
spi: tegra210-quad: use WARN_ON_ONCE instead of WARN_ON for timeouts
spi: tegra210-quad: add rate limiting and simplify timeout error message
Brett Creeley (2):
pds_core: handle unsupported PDS_CORE_CMD_FW_CONTROL result
pds_core: Remove unnecessary check in pds_client_adminq_cmd()
Chenyuan Yang (3):
scsi: ufs: mcq: Add NULL check in ufshcd_mcq_abort()
pinctrl: renesas: rza2: Fix potential NULL pointer dereference
usb: gadget: aspeed: Add NULL pointer check in ast_vhub_init_dev()
Claudiu Beznea (6):
clk: renesas: rzg2l: Use u32 for flag and mux_flags
clk: renesas: rzg2l: Add struct clk_hw_data
clk: renesas: rzg2l: Remove CPG_SDHI_DSEL from generic header
clk: renesas: rzg2l: Refactor SD mux driver
clk: renesas: r9a07g04[34]: Use SEL_SDHI1_STS status configuration for SD1 mux
clk: renesas: r9a07g04[34]: Fix typo for sel_shdi variable
Cong Wang (2):
net_sched: hfsc: Fix a UAF vulnerability in class handling
net_sched: hfsc: Fix a potential UAF in hfsc_dequeue() too
Craig Hesling (1):
USB: serial: simple: add OWON HDS200 series oscilloscope support
Damien Le Moal (4):
ata: libata-scsi: Improve CDL control
ata: libata-scsi: Fix ata_mselect_control_ata_feature() return type
ata: libata-scsi: Fix ata_msense_control_ata_feature()
scsi: Improve CDL control
Daniel Borkmann (1):
vmxnet3: Fix malformed packet sizing in vmxnet3_process_xdp
Daniel Golle (1):
net: dsa: mt7530: sync driver-specific behavior of MT7531 variants
Daniel Wagner (2):
nvmet-fc: take tgtport reference only once
nvmet-fc: put ref when assoc->del_work is already scheduled
David Howells (1):
ceph: Fix incorrect flush end position calculation
Devaraj Rangasamy (1):
crypto: ccp - Add support for PCI device 0x1134
Dmitry Torokhov (3):
Revert "drivers: core: synchronize really_probe() and dev_uevent()" driver core: introduce device_set_driver() helper driver core: fix potential NULL pointer dereference in dev_uevent()
Dominique Martinet (1):
9p/net: fix improper handling of bogus negative read/write replies
Edward Adam Davis (1):
fs/ntfs3: Fix WARNING in ntfs_extend_initialized_size
Fedor Pchelkin (3):
usb: chipidea: ci_hdrc_imx: fix usbmisc handling
usb: chipidea: ci_hdrc_imx: fix call balance of regulator routines
usb: chipidea: ci_hdrc_imx: implement usb_phy_init() error handling
Fernando Fernandez Mancera (1):
x86/i8253: Call clockevent_i8253_disable() with interrupts disabled
Fiona Klute (1):
net: phy: microchip: force IRQ polling mode for lan88xx
Frode Isaksen (1):
usb: dwc3: gadget: check that event count does not exceed event buffer length
Gabriel Shahrouzi (1):
perf/core: Fix WARN_ON(!ctx) in __free_event() for partial init
Gou Hao (1):
iomap: skip unnecessary ifs_block_is_uptodate check
Greg Kroah-Hartman (1):
Linux 6.6.89
Gregory CLEMENT (1):
MIPS: cm: Detect CM quirks from device tree
Halil Pasic (1):
virtio_console: fix missing byte order handling for cols and rows
Hannes Reinecke (3):
nvme: requeue namespace scan on missed AENs
nvme: re-read ANA log page after ns scan completes
nvme: fixup scan failure for non-ANA multipath controllers
Haoxiang Li (4):
auxdisplay: hd44780: Fix an API misuse in hd44780.c
mcb: fix a double free bug in chameleon_parse_gdd() s390/sclp: Add check for get_zeroed_page() s390/tty: Fix a potential memory leak bug
Heiko Stuebner (1):
clk: check for disabled clock-provider in of_clk_get_hw_from_clkspec()
Henry Martin (3):
cpufreq: apple-soc: Fix null-ptr-deref in apple_soc_cpufreq_get_rate()
cpufreq: scmi: Fix null-ptr-deref in scmi_cpufreq_get_rate()
cpufreq: scpi: Fix null-ptr-deref in scpi_cpufreq_get_rate()
Herbert Xu (1):
crypto: null - Use spin lock instead of mutex
Huacai Chen (1):
USB: OHCI: Add quirk for LS7A OHCI controller (rev 0x02)
Huisong Li (1):
mailbox: pcc: Fix the possible race in updation of chan_in_use flag
Ian Abbott (1):
comedi: jr3_pci: Fix synchronous deletion of timer
Igor Pylypiv (1):
scsi: pm80xx: Set phy_attached to zero when device is gone
Jason Andryuk (1):
xen: Change xen-acpi-processor dom0 dependency
Jean-Marc Eurin (1):
ACPI PPTT: Fix coding mistakes in a couple of sizeof() calls
Jens Axboe (1):
io_uring: fix 'sync' handling of io_fallback_tw()
John Stultz (1):
sound/virtio: Fix cancel_sync warnings on uninitialized work_structs
Jonathan Cameron (1):
iio: adc: ad7768-1: Move setting of val a bit later to avoid unnecessary return value check
Josh Poimboeuf (11):
objtool: Silence more KCOV warnings
objtool, panic: Disable SMAP in __stack_chk_fail()
objtool, ASoC: codecs: wcd934x: Remove potential undefined behavior in wcd934x_slim_irq_handler() objtool, regulator: rk808: Remove potential undefined behavior in rk806_set_mode_dcdc() objtool, lkdtm: Obfuscate the do_nothing() pointer
objtool: Stop UNRET validation on UD2
x86/bugs: Use SBPB in write_ibpb() if applicable
x86/bugs: Don't fill RSB on VMEXIT with eIBRS+retpoline
x86/bugs: Don't fill RSB on context switch with eIBRS
objtool: Ignore end-of-section jumps for KCOV/GCOV
objtool: Silence more KCOV warnings, part 2
Justin Iurman (1):
net: lwtunnel: disable BHs when required
Krzysztof Kozlowski (2):
ASoC: qcom: q6apm-dai: drop unused 'q6apm_dai_rtd' fields
ASoC: qcom: Fix trivial code style issues
Lad Prabhakar (1):
clk: renesas: r9a07g043: Fix HP clock source for RZ/Five
Lukas Stockmann (1):
rtc: pcf85063: do a SW reset if POR failed
Luo Gengkun (1):
perf/x86: Fix non-sampling (counting) events on certain x86 platforms
Ma Ke (1):
PCI: Fix reference leak in pci_register_host_bridge()
Marc Zyngier (1):
cpufreq: cppc: Fix invalid return value in .get() callback
Marek Behún (7):
net: dsa: mv88e6xxx: fix internal PHYs for 6320 family
net: dsa: mv88e6xxx: fix VTU methods for 6320 family
crypto: atmel-sha204a - Set hwrng quality to lowest possible
net: dsa: mv88e6xxx: fix atu_move_port_mask for 6341 family
net: dsa: mv88e6xxx: enable PVT for 6321 switch
net: dsa: mv88e6xxx: enable .port_set_policy() for 6320 family
net: dsa: mv88e6xxx: enable STU methods for 6320 family
Mario Limonciello (1):
ACPI: EC: Set ec_no_wakeup for Lenovo Go S
Martin KaFai Lau (1):
bpf: Only fails the busy counter check in bpf_cgrp_storage_get if it creates storage
Meir Elisha (1):
md/raid1: Add check for missing source disk in process_checks()
Miao Li (2):
usb: quirks: add DELAY_INIT quirk for Silicon Motion Flash Drive
usb: quirks: Add delay init quirk for SanDisk 3.2Gen1 Flash Drive
Michael Ehrenreich (1):
USB: serial: ftdi_sio: add support for Abacus Electrics Optical Probe
Michal Pecio (2):
usb: xhci: Fix invalid pointer dereference in Etron workaround
usb: xhci: Avoid Stop Endpoint retry loop if the endpoint seems Running
Mika Westerberg (1):
thunderbolt: Scan retimers after device router has been enumerated
Mike Looijmans (1):
usb: dwc3: xilinx: Prevent spike in reset signal
Ming Lei (1):
selftests: ublk: fix test_stripe_04
Ming Wang (1):
LoongArch: Return NULL from huge_pte_offset() for invalid PMD
Mostafa Saleh (1):
ubsan: Fix panic from test_ubsan_out_of_bounds
Nikita Zhandarovich (1):
media: vimc: skip .s_stream() for stopped entities
Ninad Malwade (1):
arm64: tegra: Remove the Orin NX/Nano suspend key
Ojaswin Mujoo (1):
ext4: make block validity check resistent to sb bh corruption
Oleg Nesterov (1):
sched/isolation: Make CONFIG_CPU_ISOLATION depend on CONFIG_SMP
Oleksij Rempel (1):
net: selftests: initialize TCP header and skb payload with zero
Oliver Neukum (6):
USB: storage: quirk for ADATA Portable HDD CH94
USB: VLI disk crashes if LPM is used
USB: wdm: handle IO errors in wdm_wwan_port_start
USB: wdm: close race between wdm_open and wdm_wwan_port_stop
USB: wdm: wdm_wwan_port_tx_complete mutex in atomic context
USB: wdm: add annotation
Pali Rohár (2):
cifs: Fix encoding of SMB1 Session Setup Kerberos Request in non-UNICODE mode
cifs: Fix querying of WSL CHR and BLK reparse points over SMB1
Pavel Begunkov (1):
io_uring: always do atomic put from iowq
Peter Griffin (1):
scsi: ufs: exynos: Ensure pre_link() executes before exynos_ufs_phy_init()
Petr Tesarik (1):
LoongArch: Remove a bogus reference to ZONE_DMA
Pi Xiange (1):
x86/cpu: Add CPU model number for Bartlett Lake CPUs with Raptor Cove cores
Qingfang Deng (1):
net: phy: leds: fix memory leak
Qiuxu Zhuo (1):
selftests/mincore: Allow read-ahead pages to reach the end of the file
Qu Wenruo (1):
btrfs: avoid page_lockend underflow in btrfs_punch_hole_lock_range()
Rafael J. Wysocki (1):
cpufreq/sched: Explicitly synchronize limits_changed flag handling
Ralph Siemsen (1):
usb: cdns3: Fix deadlock when using NCM gadget
Rengarajan S (2):
misc: microchip: pci1xxxx: Fix Kernel panic during IRQ handler registration
misc: microchip: pci1xxxx: Fix incorrect IRQ status handling during ack
Rob Herring (Arm) (1):
of: resolver: Simplify of_resolve_phandles() using __free()
Roman Li (2):
drm/amd/display: Fix gpu reset in multidisplay config drm/amd/display: Force full update in gpu reset
Ryo Takakura (1):
serial: sifive: lock port in startup()/shutdown() callbacks
Sean Christopherson (4):
iommu/amd: Return an error if vCPU affinity is set for non-vCPU IRTE
KVM: SVM: Allocate IR data using atomic allocation
KVM: x86: Explicitly treat routing entry type changes as changes
KVM: x86: Reset IRTE to host control if *new* route isn't postable
Sebastian Andrzej Siewior (1):
timekeeping: Add a lockdep override in tick_freeze()
Sergiu Cuciurean (1):
iio: adc: ad7768-1: Fix conversion result sign
Sewon Nam (1):
bpf: bpftool: Setting error code in do_loader()
Shannon Nelson (1):
pds_core: make wait_context part of q_info
Shuai Xue (1):
x86/mce: use is_copy_from_user() to determine copy-from-user context
Smita Koralahalli (1):
cxl/core/regs.c: Skip Memory Space Enable check for RCD and RCH Ports
Srinivas Kandagatla (2):
ASoC: q6apm-dai: schedule all available frames to avoid dsp under-runs
ASoC: q6apm-dai: make use of q6apm_get_hw_pointer
Stephan Gerhold (1):
serial: msm: Configure correct working mode before starting earlycon
Steven Rostedt (2):
tracing: Add __print_dynamic_array() helper
tracing: Verify event formats that have "%*p.."
Steven Rostedt (Google) (1):
tracing: Add __string_len() example
Sudeep Holla (1):
mailbox: pcc: Always clear the platform ack interrupt first
Suzuki K Poulose (1):
irqchip/gic-v2m: Prevent use after free of gicv2m_get_fwnode()
T.J. Mercier (1):
splice: remove duplicate noinline from pipe_clear_nowait
Tamura Dai (1):
spi: spi-imx: Add check for spi_imx_setupxfer()
Thadeu Lima de Souza Cascardo (1):
char: misc: register chrdev region with all possible minors
Thomas Bogendoerfer (1):
MIPS: cm: Fix warning if MIPS_CM is disabled
Thomas Weißschuh (2):
KVM: s390: Don't use %pK through tracepoints
KVM: s390: Don't use %pK through debug printing
Thorsten Leemhuis (1):
module: sign with sha512 instead of sha1 by default
Théo Lebrun (1):
usb: host: xhci-plat: mvebu: use ->quirks instead of ->init_quirk() func
Tiezhu Yang (2):
LoongArch: Make regs_irqs_disabled() more clear
LoongArch: Make do_xyz() exception handlers more robust
Tomi Valkeinen (3):
media: subdev: Fix use of sd->enabled_streams in call_s_stream()
media: subdev: Improve v4l2_subdev_enable/disable_streams_fallback
media: subdev: Add v4l2_subdev_is_streaming()
Tong Tiangen (1):
x86/extable: Remove unused fixup type EX_TYPE_COPY
Tudor Ambarus (3):
soc: qcom: ice: introduce devm_of_qcom_ice_get
mmc: sdhci-msm: fix dev reference leaked through of_qcom_ice_get
scsi: ufs: qcom: fix dev reference leaked through of_qcom_ice_get
Tung Nguyen (1):
tipc: fix NULL pointer dereference in tipc_mon_reinit_self()
Uday Shankar (1):
nvme: multipath: fix return value of nvme_available_path
Uwe Kleine-König (2):
auxdisplay: hd44780: Convert to platform remove callback returning void
ASoC: qcom: lpass: Make asoc_qcom_lpass_cpu_platform_remove() return void
Vincent Guittot (2):
sched/topology: Consolidate and clean up access to a CPU's max compute capacity sched/cpufreq: Rework schedutil governor performance estimation
Vinicius Costa Gomes (1):
dmaengine: dmatest: Fix dmatest waiting less when interrupted
Xiaogang Chen (1):
udmabuf: fix a buf size overflow issue during udmabuf creation
Xingui Yang (1):
scsi: hisi_sas: Fix I/O errors caused by hardware port ID changes
Yafang Shao (1):
bpf: Reject attaching fexit/fmod_ret to __noreturn functions
Yu-Chun Lin (1):
parisc: PDT: Fix missing prototype warning
Yuli Wang (1):
LoongArch: Select ARCH_USE_MEMTEST
Yunlong Xing (1):
loop: aio inherit the ioprio of original request
Zijun Hu (1):
of: resolver: Fix device node refcount leakage in of_resolve_phandles()
Greg Kroah-Hartman
maintainerDocumentation/scheduler/sched-capacity.rst +7 -6
@@ -39,14 +39,15 @@ per Hz, leading to:: ------------------- Two different capacity values are used within the scheduler. A CPU's -``capacity_orig`` is its maximum attainable capacity, i.e. its maximum -attainable performance level. A CPU's ``capacity`` is its ``capacity_orig`` to -which some loss of available performance (e.g. time spent handling IRQs) is -subtracted. +``original capacity`` is its maximum attainable capacity, i.e. its maximum +attainable performance level. This original capacity is returned by +the function arch_scale_cpu_capacity(). A CPU's ``capacity`` is its ``original +capacity`` to which some loss of available performance (e.g. time spent +handling IRQs) is subtracted. Note that a CPU's ``capacity`` is solely intended to be used by the CFS class, -while ``capacity_orig`` is class-agnostic. The rest of this document will use -the term ``capacity`` interchangeably with ``capacity_orig`` for the sake of +while ``original capacity`` is class-agnostic. The rest of this document will use +the term ``capacity`` interchangeably with ``original capacity`` for the sake of brevity. 1.3 Platform examples
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 6 PATCHLEVEL = 6 -SUBLEVEL = 88 +SUBLEVEL = 89 EXTRAVERSION = NAME = Pinguïn Aangedreven
arch/arm64/boot/dts/nvidia/tegra234-p3768-0000.dtsi +0 -7
@@ -196,13 +196,6 @@ key-power { wakeup-event-action = <EV_ACT_ASSERTED>; wakeup-source; }; - - key-suspend { - label = "Suspend"; - gpios = <&gpio TEGRA234_MAIN_GPIO(G, 2) GPIO_ACTIVE_LOW>; - linux,input-type = <EV_KEY>; - linux,code = <KEY_SLEEP>; - }; }; fan: pwm-fan {
arch/loongarch/Kconfig +1 -0
@@ -59,6 +59,7 @@ config LOONGARCH select ARCH_SUPPORTS_NUMA_BALANCING select ARCH_USE_BUILTIN_BSWAP select ARCH_USE_CMPXCHG_LOCKREF + select ARCH_USE_MEMTEST select ARCH_USE_QUEUED_RWLOCKS select ARCH_USE_QUEUED_SPINLOCKS select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT
arch/loongarch/include/asm/ptrace.h +2 -2
@@ -33,9 +33,9 @@ struct pt_regs {unsigned long __last[]; }__aligned(8) ; -static inline int regs_irqs_disabled (struct pt_regs *regs) +static __always_inline bool regs_irqs_disabled(struct pt_regs *regs) { -return arch_irqs_disabled_flags (regs->csr_prmd); +return !(regs->csr_prmd &CSR_PRMD_PIE ); }static inline unsigned long kernel_stack_pointer (struct pt_regs *regs)
arch/loongarch/kernel/traps.c +12 -8
@@ -527,9 +527,10 @@ asmlinkage void noinstr do_ale(struct pt_regs *regs)die_if_kernel ("Kernel ale access" , regs);force_sig_fault (SIGBUS ,BUS_ADRALN , (void __user *)regs->csr_badvaddr);#else +bool pie =regs_irqs_disabled (regs);unsigned int *pc; -if (regs->csr_prmd &CSR_PRMD_PIE ) +if (!pie)local_irq_enable ();perf_sw_event (PERF_COUNT_SW_ALIGNMENT_FAULTS ,1 , regs, regs->csr_badvaddr);
@@ -556,7 +557,7 @@ asmlinkage void noinstr do_ale(struct pt_regs *regs)die_if_kernel ("Kernel ale access" , regs);force_sig_fault (SIGBUS ,BUS_ADRALN , (void __user *)regs->csr_badvaddr); out: -if (regs->csr_prmd &CSR_PRMD_PIE ) +if (!pie)local_irq_disable ();#endif irqentry_exit (regs, state);
@@ -588,12 +589,13 @@ static void bug_handler(struct pt_regs *regs) asmlinkage void noinstr do_bce(struct pt_regs *regs) {bool user =user_mode (regs); +bool pie =regs_irqs_disabled (regs);unsigned long era =exception_era (regs);u64 badv =0 , lower =0 , upper =ULONG_MAX ;union loongarch_instruction insn;irqentry_state_t state =irqentry_enter (regs); -if (regs->csr_prmd &CSR_PRMD_PIE ) +if (!pie)local_irq_enable (); current->thread.trap_nr =read_csr_excode ();
@@ -659,7 +661,7 @@ asmlinkage void noinstr do_bce(struct pt_regs *regs)force_sig_bnderr ((void __user *)badv, (void __user *)lower, (void __user *)upper); out: -if (regs->csr_prmd &CSR_PRMD_PIE ) +if (!pie)local_irq_disable ();irqentry_exit (regs, state);
@@ -677,11 +679,12 @@ asmlinkage void noinstr do_bce(struct pt_regs *regs) asmlinkage void noinstr do_bp(struct pt_regs *regs) {bool user =user_mode (regs); +bool pie =regs_irqs_disabled (regs);unsigned int opcode, bcode;unsigned long era =exception_era (regs);irqentry_state_t state =irqentry_enter (regs); -if (regs->csr_prmd &CSR_PRMD_PIE ) +if (!pie)local_irq_enable ();if (__get_inst (&opcode, (u32 *)era, user))
@@ -747,7 +750,7 @@ asmlinkage void noinstr do_bp(struct pt_regs *regs) } out: -if (regs->csr_prmd &CSR_PRMD_PIE ) +if (!pie)local_irq_disable ();irqentry_exit (regs, state);
@@ -982,6 +985,7 @@ static void init_restore_lbt(void) asmlinkage void noinstr do_lbt(struct pt_regs *regs) { +bool pie =regs_irqs_disabled (regs);irqentry_state_t state =irqentry_enter (regs);/*
@@ -991,7 +995,7 @@ asmlinkage void noinstr do_lbt(struct pt_regs *regs)* (including the user using 'MOVGR2GCSR' to turn on TM, which * will not trigger the BTE), we need to check PRMD first. */ -if (regs->csr_prmd &CSR_PRMD_PIE ) +if (!pie)local_irq_enable ();if (!cpu_has_lbt) {
@@ -1005,7 +1009,7 @@ asmlinkage void noinstr do_lbt(struct pt_regs *regs)preempt_enable (); out: -if (regs->csr_prmd &CSR_PRMD_PIE ) +if (!pie)local_irq_disable ();irqentry_exit (regs, state);
arch/loongarch/mm/hugetlbpage.c +1 -1
@@ -47,7 +47,7 @@ pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr, pmd =pmd_offset (pud, addr); } } -return (pte_t *) pmd; +return pmd_none (pmdp_get (pmd)) ?NULL : (pte_t *) pmd; }int pmd_huge (pmd_t pmd)
arch/loongarch/mm/init.c +0 -3
@@ -64,9 +64,6 @@ void __init paging_init(void) {unsigned long max_zone_pfns[MAX_NR_ZONES ]; -#ifdef CONFIG_ZONE_DMA - max_zone_pfns[ZONE_DMA ] =MAX_DMA_PFN ; -#endif #ifdef CONFIG_ZONE_DMA32 max_zone_pfns[ZONE_DMA32 ] =MAX_DMA32_PFN ;#endif
arch/mips/include/asm/mips-cm.h +22 -0
@@ -47,6 +47,16 @@ extern phys_addr_t __mips_cm_phys_base(void);*/ extern int mips_cm_is64; +/* +* mips_cm_is_l2_hci_broken - determine if HCI is broken +* +* Some CM reports show that Hardware Cache Initialization is +* complete, but in reality it's not the case. They also incorrectly +* indicate that Hardware Cache Initialization is supported. This +* flags allows warning about this broken feature. +*/ +extern bool mips_cm_is_l2_hci_broken; +/** * mips_cm_error_report - Report CM cache errors */
@@ -85,6 +95,18 @@ static inline bool mips_cm_present(void)#endif } +/** +* mips_cm_update_property - update property from the device tree +* +* Retrieve the properties from the device tree if a CM node exist and +* update the internal variable based on this. +*/ +#ifdef CONFIG_MIPS_CM +extern void mips_cm_update_property (void ); +#else +static inline void mips_cm_update_property (void ) {} +#endif +/** * mips_cm_has_l2sync - determine whether an L2-only sync region is present *
arch/mips/kernel/mips-cm.c +14 -0
@@ -5,6 +5,7 @@*/ #include <linux/errno.h> +#include <linux/of.h> #include <linux/percpu.h> #include <linux/spinlock.h>
@@ -14,6 +15,7 @@void __iomem *mips_gcr_base;void __iomem *mips_cm_l2sync_base;int mips_cm_is64; +bool mips_cm_is_l2_hci_broken;static char *cm2_tr[8 ] = {"mem" ,"gcr" ,"gic" ,"mmio" ,
@@ -243,6 +245,18 @@ static void mips_cm_probe_l2sync(void) mips_cm_l2sync_base =ioremap (addr,MIPS_CM_L2SYNC_SIZE ); } +void mips_cm_update_property (void ) +{ +struct device_node *cm_node; + + cm_node =of_find_compatible_node (of_root,NULL ,"mobileye,eyeq6-cm" ); +if (!cm_node) +return ; +pr_info ("HCI (Hardware Cache Init for the L2 cache) in GCR_L2_RAM_CONFIG from the CM3 is broken" ); + mips_cm_is_l2_hci_broken = true; +of_node_put (cm_node); +} +int mips_cm_probe (void ) {phys_addr_t addr;
arch/parisc/kernel/pdt.c +2 -0
@@ -63,6 +63,7 @@ static unsigned long pdt_entry[MAX_PDT_ENTRIES] __page_aligned_bss;#define PDT_ADDR_PERM_ERR (pdt_type != PDT_PDC ? 2UL : 0UL)#define PDT_ADDR_SINGLE_ERR 1UL +#ifdef CONFIG_PROC_FS /* report PDT entries via /proc/meminfo */ void arch_report_meminfo (struct seq_file *m) {
@@ -74,6 +75,7 @@ void arch_report_meminfo(struct seq_file *m)seq_printf (m,"PDT_cur_entries: %7lu\n" , pdt_status.pdt_entries); } +#endif static int get_info_pat_new (void ) {
arch/riscv/include/asm/alternative-macros.h +7 -12
@@ -115,24 +115,19 @@ \old_c .endm -#define _ALTERNATIVE_CFG (old_c, ...) \ - ALTERNATIVE_CFG old_c - -#define _ALTERNATIVE_CFG_2 (old_c, ...) \ - ALTERNATIVE_CFG old_c +#define __ALTERNATIVE_CFG (old_c, ...) ALTERNATIVE_CFG old_c +#define __ALTERNATIVE_CFG_2 (old_c, ...) ALTERNATIVE_CFG old_c#else /* !__ASSEMBLY__ */ -#define __ALTERNATIVE_CFG (old_c) \ - old_c "\n" +#define __ALTERNATIVE_CFG (old_c, ...) old_c "\n" +#define __ALTERNATIVE_CFG_2 (old_c, ...) old_c "\n" -#define _ALTERNATIVE_CFG (old_c, ...) \ - __ALTERNATIVE_CFG(old_c) +#endif /* __ASSEMBLY__ */ -#define _ALTERNATIVE_CFG_2 (old_c, ...) \ - __ALTERNATIVE_CFG(old_c) +#define _ALTERNATIVE_CFG (old_c, ...) __ALTERNATIVE_CFG(old_c) +#define _ALTERNATIVE_CFG_2 (old_c, ...) __ALTERNATIVE_CFG_2(old_c) -#endif /* __ASSEMBLY__ */ #endif /* CONFIG_RISCV_ALTERNATIVE */ /*
arch/s390/kvm/intercept.c +1 -1
@@ -94,7 +94,7 @@ static int handle_validity(struct kvm_vcpu *vcpu) vcpu->stat.exit_validity++;trace_kvm_s390_intercept_validity (vcpu, viwhy); -KVM_EVENT (3 ,"validity intercept 0x%x for pid %u (kvm 0x%pK)" , viwhy, +KVM_EVENT (3 ,"validity intercept 0x%x for pid %u (kvm 0x%p)" , viwhy, current->pid, vcpu->kvm);/* do not warn on invalid runtime instrumentation mode */
arch/s390/kvm/interrupt.c +4 -4
@@ -3161,7 +3161,7 @@ void kvm_s390_gisa_clear(struct kvm *kvm)if (!gi->origin)return ;gisa_clear_ipm (gi->origin); -VM_EVENT (kvm,3 ,"gisa 0x%pK cleared" , gi->origin); +VM_EVENT (kvm,3 ,"gisa 0x%p cleared" , gi->origin); }void kvm_s390_gisa_init (struct kvm *kvm)
@@ -3178,7 +3178,7 @@ void kvm_s390_gisa_init(struct kvm *kvm) gi->timer.function = gisa_vcpu_kicker;memset (gi->origin,0 ,sizeof (struct kvm_s390_gisa )); gi->origin->next_alert = (u32 )virt_to_phys (gi->origin); -VM_EVENT (kvm,3 ,"gisa 0x%pK initialized" , gi->origin); +VM_EVENT (kvm,3 ,"gisa 0x%p initialized" , gi->origin); }void kvm_s390_gisa_enable (struct kvm *kvm)
@@ -3219,7 +3219,7 @@ void kvm_s390_gisa_destroy(struct kvm *kvm)process_gib_alert_list ();hrtimer_cancel (&gi->timer); gi->origin =NULL ; -VM_EVENT (kvm,3 ,"gisa 0x%pK destroyed" , gisa); +VM_EVENT (kvm,3 ,"gisa 0x%p destroyed" , gisa); }void kvm_s390_gisa_disable (struct kvm *kvm)
@@ -3468,7 +3468,7 @@ int __init kvm_s390_gib_init(u8 nisc) } } -KVM_EVENT (3 ,"gib 0x%pK (nisc=%d) initialized" , gib, gib->nisc); +KVM_EVENT (3 ,"gib 0x%p (nisc=%d) initialized" , gib, gib->nisc); goto out; out_unreg_gal:
arch/s390/kvm/kvm-s390.c +5 -5
@@ -990,7 +990,7 @@ static int kvm_s390_set_mem_control(struct kvm *kvm, struct kvm_device_attr *att }mutex_unlock (&kvm->lock);VM_EVENT (kvm,3 ,"SET: max guest address: %lu" , new_limit); -VM_EVENT (kvm,3 ,"New guest asce: 0x%pK" , +VM_EVENT (kvm,3 ,"New guest asce: 0x%p" , (void *) kvm->arch.gmap->asce);break ; }
@@ -3418,7 +3418,7 @@ int kvm_arch_init_vm(struct kvm *kvm, unsigned long type)kvm_s390_gisa_init (kvm);INIT_LIST_HEAD (&kvm->arch.pv.need_cleanup); kvm->arch.pv.set_aside =NULL ; -KVM_EVENT (3 ,"vm 0x%pK created by pid %u" , kvm, current->pid); +KVM_EVENT (3 ,"vm 0x%p created by pid %u" , kvm, current->pid);return 0 ; out_err:
@@ -3481,7 +3481,7 @@ void kvm_arch_destroy_vm(struct kvm *kvm)kvm_s390_destroy_adapters (kvm);kvm_s390_clear_float_irqs (kvm);kvm_s390_vsie_destroy (kvm); -KVM_EVENT (3 ,"vm 0x%pK destroyed" , kvm); +KVM_EVENT (3 ,"vm 0x%p destroyed" , kvm); }/* Section: vcpu related */
@@ -3602,7 +3602,7 @@ static int sca_switch_to_extended(struct kvm *kvm)free_page ((unsigned long )old_sca); -VM_EVENT (kvm,2 ,"Switched to ESCA (0x%pK -> 0x%pK)" , +VM_EVENT (kvm,2 ,"Switched to ESCA (0x%p -> 0x%p)" , old_sca, kvm->arch.sca);return 0 ; }
@@ -3974,7 +3974,7 @@ int kvm_arch_vcpu_create(struct kvm_vcpu *vcpu) goto out_free_sie_block; } -VM_EVENT (vcpu->kvm,3 ,"create cpu %d at 0x%pK, sie block at 0x%pK" , +VM_EVENT (vcpu->kvm,3 ,"create cpu %d at 0x%p, sie block at 0x%p" , vcpu->vcpu_id, vcpu, vcpu->arch.sie_block);trace_kvm_s390_create_vcpu (vcpu->vcpu_id, vcpu, vcpu->arch.sie_block);
arch/s390/kvm/trace-s390.h +2 -2
@@ -56,7 +56,7 @@ TRACE_EVENT(kvm_s390_create_vcpu, __entry->sie_block = sie_block; ), -TP_printk ("create cpu %d at 0x%pK, sie block at 0x%pK" , +TP_printk ("create cpu %d at 0x%p, sie block at 0x%p" , __entry->id, __entry->vcpu, __entry->sie_block) );
@@ -255,7 +255,7 @@ TRACE_EVENT(kvm_s390_enable_css, __entry->kvm = kvm; ), -TP_printk ("enabling channel I/O support (kvm @ %pK)\n" , +TP_printk ("enabling channel I/O support (kvm @ %p)\n" , __entry->kvm) );
arch/x86/entry/entry.S +1 -1
@@ -16,7 +16,7 @@ SYM_FUNC_START(entry_ibpb) movl $MSR_IA32_PRED_CMD, %ecx - movl $PRED_CMD_IBPB, %eax + movl _ASM_RIP(x86_pred_cmd), %eax xorl %edx, %edx wrmsr
arch/x86/events/core.c +1 -1
@@ -623,7 +623,7 @@ int x86_pmu_hw_config(struct perf_event *event)if (event->attr.type == event->pmu->type) event->hw.config |= event->attr.config &X86_RAW_EVENT_MASK ; -if (!event->attr.freq && x86_pmu.limit_period) { +if (is_sampling_event (event) && !event->attr.freq && x86_pmu.limit_period) {s64 left = event->attr.sample_period; x86_pmu.limit_period (event, &left);if (left > event->attr.sample_period)
arch/x86/include/asm/asm.h +0 -3
@@ -229,9 +229,6 @@ register unsigned long current_stack_pointer asm(_ASM_SP);#define _ASM_EXTABLE_UA (from, to) \ _ASM_EXTABLE_TYPE(from, to, EX_TYPE_UACCESS) -#define _ASM_EXTABLE_CPY (from, to) \ - _ASM_EXTABLE_TYPE(from, to, EX_TYPE_COPY) -#define _ASM_EXTABLE_FAULT (from, to) \ _ASM_EXTABLE_TYPE(from, to, EX_TYPE_FAULT)
arch/x86/include/asm/extable_fixup_types.h +1 -1
@@ -36,7 +36,7 @@#define EX_TYPE_DEFAULT 1#define EX_TYPE_FAULT 2#define EX_TYPE_UACCESS 3 -#define EX_TYPE_COPY 4 +/* unused, was: #define EX_TYPE_COPY 4 */ #define EX_TYPE_CLEAR_FS 5#define EX_TYPE_FPU_RESTORE 6#define EX_TYPE_BPF 7
arch/x86/include/asm/intel-family.h +2 -0
@@ -159,6 +159,8 @@#define INTEL_FAM6_GRANITERAPIDS_D 0xAE#define INTEL_GRANITERAPIDS_D IFM(6, 0xAE) +#define INTEL_BARTLETTLAKE IFM(6, 0xD7)/* Raptor Cove */ +/* "Hybrid" Processors (P-Core/E-Core) */ #define INTEL_FAM6_LAKEFIELD 0x8A/* Sunny Cove / Tremont */
arch/x86/kernel/cpu/bugs.c +15 -15
@@ -1574,7 +1574,7 @@ static void __init spec_ctrl_disable_kernel_rrsba(void) rrsba_disabled = true; } -static void __init spectre_v2_determine_rsb_fill_type_at_vmexit (enum spectre_v2_mitigation mode) +static void __init spectre_v2_select_rsb_mitigation (enum spectre_v2_mitigation mode) {/* * Similar to context switches, there are two types of RSB attacks
@@ -1598,27 +1598,30 @@ static void __init spectre_v2_determine_rsb_fill_type_at_vmexit(enum spectre_v2_*/ switch (mode) {case SPECTRE_V2_NONE : -return ; +break ; -case SPECTRE_V2_EIBRS_LFENCE :case SPECTRE_V2_EIBRS : +case SPECTRE_V2_EIBRS_LFENCE : +case SPECTRE_V2_EIBRS_RETPOLINE :if (boot_cpu_has_bug (X86_BUG_EIBRS_PBRSB )) { -setup_force_cpu_cap (X86_FEATURE_RSB_VMEXIT_LITE );pr_info ("Spectre v2 / PBRSB-eIBRS: Retire a single CALL on VMEXIT\n" ); +setup_force_cpu_cap (X86_FEATURE_RSB_VMEXIT_LITE ); } -return ; +break ; -case SPECTRE_V2_EIBRS_RETPOLINE :case SPECTRE_V2_RETPOLINE :case SPECTRE_V2_LFENCE :case SPECTRE_V2_IBRS : +pr_info ("Spectre v2 / SpectreRSB: Filling RSB on context switch and VMEXIT\n" ); +setup_force_cpu_cap (X86_FEATURE_RSB_CTXSW );setup_force_cpu_cap (X86_FEATURE_RSB_VMEXIT ); -pr_info ("Spectre v2 / SpectreRSB : Filling RSB on VMEXIT\n" ); -return ; - } +break ; -pr_warn_once ("Unknown Spectre v2 mode, disabling RSB mitigation at VM exit" ); -dump_stack (); +default : +pr_warn_once ("Unknown Spectre v2 mode, disabling RSB mitigation\n" ); +dump_stack (); +break ; + } }/*
@@ -1844,10 +1847,7 @@ static void __init spectre_v2_select_mitigation(void)* * FIXME: Is this pointless for retbleed-affected AMD? */ -setup_force_cpu_cap (X86_FEATURE_RSB_CTXSW ); -pr_info ("Spectre v2 / SpectreRSB mitigation: Filling RSB on context switch\n" ); - -spectre_v2_determine_rsb_fill_type_at_vmexit (mode); +spectre_v2_select_rsb_mitigation (mode);/* * Retpoline protects the kernel, but doesn't protect firmware. IBRS
arch/x86/kernel/cpu/mce/severity.c +5 -7
@@ -288,14 +288,12 @@ static noinstr int error_context(struct mce *m, struct pt_regs *regs) copy_user =is_copy_from_user (regs);instrumentation_end (); -switch (fixup_type) { -case EX_TYPE_UACCESS : -case EX_TYPE_COPY : -if (!copy_user) -return IN_KERNEL ; - m->kflags |=MCE_IN_KERNEL_COPYIN ; - fallthrough; +if (copy_user) { + m->kflags |=MCE_IN_KERNEL_COPYIN |MCE_IN_KERNEL_RECOV ; +return IN_KERNEL_RECOV ; + } +switch (fixup_type) {case EX_TYPE_FAULT_MCE_SAFE :case EX_TYPE_DEFAULT_MCE_SAFE : m->kflags |=MCE_IN_KERNEL_RECOV ;
arch/x86/kernel/i8253.c +2 -1
@@ -46,7 +46,8 @@ bool __init pit_timer_init(void)* VMMs otherwise steal CPU time just to pointlessly waggle * the (masked) IRQ. */ -clockevent_i8253_disable (); +scoped_guard (irq) +clockevent_i8253_disable ();return false; }clockevent_i8253_init (true);
arch/x86/kvm/svm/avic.c +32 -28
90 lines not on this page · raw message
arch/x86/kvm/vmx/posted_intr.c +10 -18
@@ -274,6 +274,7 @@ int vmx_pi_update_irte(struct kvm *kvm, unsigned int host_irq, {struct kvm_kernel_irq_routing_entry *e;struct kvm_irq_routing_table *irq_rt; +bool enable_remapped_mode = true;struct kvm_lapic_irq irq;struct kvm_vcpu *vcpu;struct vcpu_data vcpu_info;
@@ -312,21 +313,8 @@ int vmx_pi_update_irte(struct kvm *kvm, unsigned int host_irq,kvm_set_msi_irq (kvm, e, &irq);if (!kvm_intr_is_single_vcpu (kvm, &irq, &vcpu) || - !kvm_irq_is_postable (&irq)) { -/* -* Make sure the IRTE is in remapped mode if -* we don't handle it in posted mode. -*/ - ret =irq_set_vcpu_affinity (host_irq,NULL ); -if (ret <0 ) { -printk (KERN_INFO -"failed to back to remapped mode, irq: %u\n" , - host_irq); - goto out; - } - + !kvm_irq_is_postable (&irq))continue ; - } vcpu_info.pi_desc_addr =__pa (vcpu_to_pi_desc (vcpu)); vcpu_info.vector = irq.vector;
@@ -334,11 +322,12 @@ int vmx_pi_update_irte(struct kvm *kvm, unsigned int host_irq,trace_kvm_pi_irte_update (host_irq, vcpu->vcpu_id, e->gsi, vcpu_info.vector, vcpu_info.pi_desc_addr, set); -if (set) - ret =irq_set_vcpu_affinity (host_irq, &vcpu_info); -else - ret =irq_set_vcpu_affinity (host_irq,NULL ); +if (!set) +continue ; + enable_remapped_mode = false; + + ret =irq_set_vcpu_affinity (host_irq, &vcpu_info);if (ret <0 ) {printk (KERN_INFO "%s: failed to update PI IRTE\n" , __func__);
@@ -346,6 +335,9 @@ int vmx_pi_update_irte(struct kvm *kvm, unsigned int host_irq, } } +if (enable_remapped_mode) + ret =irq_set_vcpu_affinity (host_irq,NULL ); + ret =0 ; out:srcu_read_unlock (&kvm->irq_srcu, idx);
arch/x86/kvm/x86.c +2 -1
@@ -13297,7 +13297,8 @@ int kvm_arch_update_irqfd_routing(struct kvm *kvm, unsigned int host_irq,bool kvm_arch_irqfd_route_changed (struct kvm_kernel_irq_routing_entry *old,struct kvm_kernel_irq_routing_entry *new) { -if (new->type !=KVM_IRQ_ROUTING_MSI ) +if (old->type !=KVM_IRQ_ROUTING_MSI || + new->type !=KVM_IRQ_ROUTING_MSI )return true;return !!memcmp (&old->msi, &new->msi,sizeof (new->msi));
arch/x86/mm/extable.c +0 -9
@@ -163,13 +163,6 @@ static bool ex_handler_uaccess(const struct exception_table_entry *fixup,return ex_handler_default (fixup, regs); } -static bool ex_handler_copy (const struct exception_table_entry *fixup, -struct pt_regs *regs,int trapnr) -{ -WARN_ONCE (trapnr ==X86_TRAP_GP ,"General protection fault in user access. Non-canonical address?" ); -return ex_handler_fault (fixup, regs, trapnr); -} -static bool ex_handler_msr (const struct exception_table_entry *fixup,struct pt_regs *regs,bool wrmsr,bool safe,int reg) {
@@ -267,8 +260,6 @@ int fixup_exception(struct pt_regs *regs, int trapnr, unsigned long error_code,return ex_handler_fault (e, regs, trapnr);case EX_TYPE_UACCESS :return ex_handler_uaccess (e, regs, trapnr, fault_addr); -case EX_TYPE_COPY : -return ex_handler_copy (e, regs, trapnr);case EX_TYPE_CLEAR_FS :return ex_handler_clear_fs (e, regs);case EX_TYPE_FPU_RESTORE :
arch/x86/mm/tlb.c +3 -3
@@ -392,9 +392,9 @@ static void cond_mitigation(struct task_struct *next) prev_mm =this_cpu_read (cpu_tlbstate.last_user_mm_spec);/* -* Avoid user/user BTB poisoning by flushing the branch predictor -* when switching between processes. This stops one process from -* doing Spectre-v2 attacks on another. +* Avoid user->user BTB/RSB poisoning by flushing them when switching +* between processes. This stops one process from doing Spectre-v2 +* attacks on another. * * Both, the conditional and the always IBPB mode use the mm * pointer to avoid the IBPB when switching between tasks of the
arch/x86/platform/pvh/head.S +6 -1
@@ -100,7 +100,12 @@ SYM_CODE_START_LOCAL(pvh_start_xen) xor %edx, %edx wrmsr - call xen_prepare_pvh + /* Call xen_prepare_pvh() via the kernel virtual mapping */ + leaq xen_prepare_pvh(%rip), %rax + subq phys_base(%rip), %rax + addq $__START_KERNEL_map, %rax + ANNOTATE_RETPOLINE_SAFE + call *%rax /* startup_64 expects boot_params in %rsi. */ mov $_pa(pvh_bootparams), %rsi
crypto/crypto_null.c +26 -13
@@ -17,10 +17,10 @@#include <crypto/internal/skcipher.h> #include <linux/init.h> #include <linux/module.h> -#include <linux/mm.h> +#include <linux/spinlock.h> #include <linux/string.h> -static DEFINE_MUTEX (crypto_default_null_skcipher_lock); +static DEFINE_SPINLOCK (crypto_default_null_skcipher_lock);static struct crypto_sync_skcipher *crypto_default_null_skcipher;static int crypto_default_null_skcipher_refcnt;
@@ -152,23 +152,32 @@ MODULE_ALIAS_CRYPTO("cipher_null");struct crypto_sync_skcipher *crypto_get_default_null_skcipher (void ) { +struct crypto_sync_skcipher *ntfm =NULL ;struct crypto_sync_skcipher *tfm; -mutex_lock (&crypto_default_null_skcipher_lock); +spin_lock_bh (&crypto_default_null_skcipher_lock); tfm = crypto_default_null_skcipher;if (!tfm) { - tfm =crypto_alloc_sync_skcipher ("ecb(cipher_null)" ,0 ,0 ); -if (IS_ERR (tfm)) - goto unlock; - - crypto_default_null_skcipher = tfm; +spin_unlock_bh (&crypto_default_null_skcipher_lock); + + ntfm =crypto_alloc_sync_skcipher ("ecb(cipher_null)" ,0 ,0 ); +if (IS_ERR (ntfm)) +return ntfm; + +spin_lock_bh (&crypto_default_null_skcipher_lock); + tfm = crypto_default_null_skcipher; +if (!tfm) { + tfm = ntfm; + ntfm =NULL ; + crypto_default_null_skcipher = tfm; + } } crypto_default_null_skcipher_refcnt++; +spin_unlock_bh (&crypto_default_null_skcipher_lock); -unlock: -mutex_unlock (&crypto_default_null_skcipher_lock); +crypto_free_sync_skcipher (ntfm);return tfm; }
@@ -176,12 +185,16 @@ EXPORT_SYMBOL_GPL(crypto_get_default_null_skcipher);void crypto_put_default_null_skcipher (void ) { -mutex_lock (&crypto_default_null_skcipher_lock); +struct crypto_sync_skcipher *tfm =NULL ; + +spin_lock_bh (&crypto_default_null_skcipher_lock);if (!--crypto_default_null_skcipher_refcnt) { -crypto_free_sync_skcipher (crypto_default_null_skcipher); + tfm = crypto_default_null_skcipher; crypto_default_null_skcipher =NULL ; } -mutex_unlock (&crypto_default_null_skcipher_lock); +spin_unlock_bh (&crypto_default_null_skcipher_lock); + +crypto_free_sync_skcipher (tfm); }EXPORT_SYMBOL_GPL (crypto_put_default_null_skcipher);
drivers/acpi/ec.c +28 -0
@@ -2301,6 +2301,34 @@ static const struct dmi_system_id acpi_ec_no_wakeup[] = { DMI_MATCH(DMI_PRODUCT_FAMILY, "103C_5336AN HP ZHAN 66 Pro"), }, }, +/* +* Lenovo Legion Go S; touchscreen blocks HW sleep when woken up from EC +* https://gitlab.freedesktop.org/drm/amd/-/issues/3929 +*/ + { + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"), + DMI_MATCH(DMI_PRODUCT_NAME, "83L3"), + } + }, + { + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"), + DMI_MATCH(DMI_PRODUCT_NAME, "83N6"), + } + }, + { + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"), + DMI_MATCH(DMI_PRODUCT_NAME, "83Q2"), + } + }, + { + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"), + DMI_MATCH(DMI_PRODUCT_NAME, "83Q3"), + } + }, { }, };
drivers/acpi/pptt.c +2 -2
@@ -229,7 +229,7 @@ static int acpi_pptt_leaf_node(struct acpi_table_header *table_hdr, node_entry =ACPI_PTR_DIFF (node, table_hdr); entry = ACPI_ADD_PTR(struct acpi_subtable_header, table_hdr,sizeof (struct acpi_table_pptt )); - proc_sz =sizeof (struct acpi_pptt_processor *); + proc_sz =sizeof (struct acpi_pptt_processor );while ((unsigned long )entry + proc_sz < table_end) { cpu_node = (struct acpi_pptt_processor *)entry;
@@ -270,7 +270,7 @@ static struct acpi_pptt_processor *acpi_find_processor_node(struct acpi_table_he table_end = (unsigned long )table_hdr + table_hdr->length; entry = ACPI_ADD_PTR(struct acpi_subtable_header, table_hdr,sizeof (struct acpi_table_pptt )); - proc_sz =sizeof (struct acpi_pptt_processor *); + proc_sz =sizeof (struct acpi_pptt_processor );/* find the processor structure associated with this cpuid */ while ((unsigned long )entry + proc_sz < table_end) {
drivers/ata/libata-scsi.c +17 -8
@@ -2354,8 +2354,8 @@ static unsigned int ata_msense_control_ata_feature(struct ata_device *dev,*/ put_unaligned_be16 (ATA_FEATURE_SUB_MPAGE_LEN -4 , &buf[2 ]); -if (dev->flags &ATA_DFLAG_CDL ) - buf[4 ] =0x02 ;/* Support T2A and T2B pages */ +if (dev->flags &ATA_DFLAG_CDL_ENABLED ) + buf[4 ] =0x02 ;/* T2A and T2B pages enabled */ else buf[4 ] =0 ;
@@ -3764,12 +3764,11 @@ static int ata_mselect_control_spg0(struct ata_queued_cmd *qc, }/* -* Translate MODE SELECT control mode page, sub-pages f2h (ATA feature mode +* Translate MODE SELECT control mode page, sub-page f2h (ATA feature mode * page) into a SET FEATURES command. */ -static unsigned int ata_mselect_control_ata_feature (struct ata_queued_cmd *qc, -const u8 *buf,int len, -u16 *fp) +static int ata_mselect_control_ata_feature (struct ata_queued_cmd *qc, +const u8 *buf,int len,u16 *fp) {struct ata_device *dev = qc->dev;struct ata_taskfile *tf = &qc->tf;
@@ -3787,17 +3786,27 @@ static unsigned int ata_mselect_control_ata_feature(struct ata_queued_cmd *qc,/* Check cdl_ctrl */ switch (buf[0 ] &0x03 ) {case 0 : -/* Disable CDL */ +/* Disable CDL if it is enabled */ +if (!(dev->flags &ATA_DFLAG_CDL_ENABLED )) +return 0 ; +ata_dev_dbg (dev,"Disabling CDL\n" ); cdl_action =0 ; dev->flags &= ~ATA_DFLAG_CDL_ENABLED ;break ;case 0x02 : -/* Enable CDL T2A/T2B: NCQ priority must be disabled */ +/* +* Enable CDL if not already enabled. Since this is mutually +* exclusive with NCQ priority, allow this only if NCQ priority +* is disabled. +*/ +if (dev->flags &ATA_DFLAG_CDL_ENABLED ) +return 0 ;if (dev->flags &ATA_DFLAG_NCQ_PRIO_ENABLED ) {ata_dev_err (dev,"NCQ priority must be disabled to enable CDL\n" );return -EINVAL ; } +ata_dev_dbg (dev,"Enabling CDL\n" ); cdl_action =1 ; dev->flags |=ATA_DFLAG_CDL_ENABLED ;break ;
drivers/auxdisplay/hd44780.c +4 -5
@@ -313,13 +313,13 @@ static int hd44780_probe(struct platform_device *pdev) fail3:kfree (hd); fail2: -kfree (lcd); +charlcd_free (lcd); fail1:kfree (hdc);return ret; } -static int hd44780_remove (struct platform_device *pdev) +static void hd44780_remove (struct platform_device *pdev) {struct charlcd *lcd =platform_get_drvdata (pdev);struct hd44780_common *hdc = lcd->drvdata;
@@ -328,8 +328,7 @@ static int hd44780_remove(struct platform_device *pdev)kfree (hdc->hd44780);kfree (lcd->drvdata); -kfree (lcd); -return 0 ; +charlcd_free (lcd); }static const struct of_device_id hd44780_of_match[] = {
@@ -340,7 +339,7 @@ MODULE_DEVICE_TABLE(of, hd44780_of_match);static struct platform_driver hd44780_driver = { .probe = hd44780_probe, - .remove = hd44780_remove, + .remove_new = hd44780_remove, .driver = { .name ="hd44780" , .of_match_table = hd44780_of_match,
drivers/base/base.h +17 -0
@@ -73,6 +73,7 @@ static inline void subsys_put(struct subsys_private *sp)kset_put (&sp->subsys); } +struct subsys_private *bus_to_subsys (const struct bus_type *bus);struct subsys_private *class_to_subsys (const struct class *class);struct driver_private {
@@ -179,6 +180,22 @@ int driver_add_groups(struct device_driver *drv, const struct attribute_group **void driver_remove_groups (struct device_driver *drv,const struct attribute_group **groups);void device_driver_detach (struct device *dev); +static inline void device_set_driver (struct device *dev,const struct device_driver *drv) +{ +/* +* Majority (all?) read accesses to dev->driver happens either +* while holding device lock or in bus/driver code that is only +* invoked when the device is bound to a driver and there is no +* concern of the pointer being changed while it is being read. +* However when reading device's uevent file we read driver pointer +* without taking device lock (so we do not block there for +* arbitrary amount of time). We use WRITE_ONCE() here to prevent +* tearing so that READ_ONCE() can safely be used in uevent code. +*/ +// FIXME - this cast should not be needed "soon" +WRITE_ONCE (dev->driver, (struct device_driver *)drv); +} +int devres_release_all (struct device *dev);void device_block_probing (void );void device_unblock_probing (void );
drivers/base/bus.c +1 -1
@@ -57,7 +57,7 @@ static int __must_check bus_rescan_devices_helper(struct device *dev,* NULL. A call to subsys_put() must be done when finished with the pointer in * order for it to be properly freed. */ -static struct subsys_private *bus_to_subsys (const struct bus_type *bus) +struct subsys_private *bus_to_subsys (const struct bus_type *bus) {struct subsys_private *sp =NULL ;struct kobject *kobj;
drivers/base/core.c +32 -6
@@ -2570,6 +2570,35 @@ static const char *dev_uevent_name(const struct kobject *kobj)return NULL ; } +/* +* Try filling "DRIVER=<name>" uevent variable for a device. Because this +* function may race with binding and unbinding the device from a driver, +* we need to be careful. Binding is generally safe, at worst we miss the +* fact that the device is already bound to a driver (but the driver +* information that is delivered through uevents is best-effort, it may +* become obsolete as soon as it is generated anyways). Unbinding is more +* risky as driver pointer is transitioning to NULL, so READ_ONCE() should +* be used to make sure we are dealing with the same pointer, and to +* ensure that driver structure is not going to disappear from under us +* we take bus' drivers klist lock. The assumption that only registered +* driver can be bound to a device, and to unregister a driver bus code +* will take the same lock. +*/ +static void dev_driver_uevent (const struct device *dev,struct kobj_uevent_env *env) +{ +struct subsys_private *sp =bus_to_subsys (dev->bus); + +if (sp) { + scoped_guard(spinlock, &sp->klist_drivers.k_lock) { +struct device_driver *drv =READ_ONCE (dev->driver); +if (drv) +add_uevent_var (env,"DRIVER=%s" , drv->name); + } + +subsys_put (sp); + } +} +static int dev_uevent (const struct kobject *kobj,struct kobj_uevent_env *env) {const struct device *dev =kobj_to_dev (kobj);
@@ -2601,8 +2630,8 @@ static int dev_uevent(const struct kobject *kobj, struct kobj_uevent_env *env)if (dev->type && dev->type->name)add_uevent_var (env,"DEVTYPE=%s" , dev->type->name); -if (dev->driver) -add_uevent_var (env,"DRIVER=%s" , dev->driver->name); +/* Add "DRIVER=%s" variable if the device is bound to a driver */ +dev_driver_uevent (dev, env);/* Add common DT information about the device */ of_device_uevent (dev, env);
@@ -2672,11 +2701,8 @@ static ssize_t uevent_show(struct device *dev, struct device_attribute *attr,if (!env)return -ENOMEM ; -/* Synchronize with really_probe() */ -device_lock (dev);/* let the kset specific function add its keys */ retval = kset->uevent_ops->uevent (&dev->kobj, env); -device_unlock (dev);if (retval) goto out;
@@ -3691,7 +3717,7 @@ int device_add(struct device *dev)device_pm_remove (dev);dpm_sysfs_remove (dev); DPMError: - dev->driver =NULL ; +device_set_driver (dev,NULL );bus_remove_device (dev); BusError:device_remove_attrs (dev);
drivers/base/dd.c +3 -3
@@ -550,7 +550,7 @@ static void device_unbind_cleanup(struct device *dev)arch_teardown_dma_ops (dev);kfree (dev->dma_range_map); dev->dma_range_map =NULL ; - dev->driver =NULL ; +device_set_driver (dev,NULL );dev_set_drvdata (dev,NULL );if (dev->pm_domain && dev->pm_domain->dismiss) dev->pm_domain->dismiss (dev);
@@ -629,7 +629,7 @@ static int really_probe(struct device *dev, struct device_driver *drv) } re_probe: - dev->driver = drv; +device_set_driver (dev, drv);/* If using pinctrl, bind pins now before probing */ ret =pinctrl_bind_pins (dev);
@@ -1014,7 +1014,7 @@ static int __device_attach(struct device *dev, bool allow_async)if (ret ==0 ) ret =1 ;else { - dev->driver =NULL ; +device_set_driver (dev,NULL ); ret =0 ; } }else {
drivers/block/loop.c +1 -1
@@ -441,7 +441,7 @@ static int lo_rw_aio(struct loop_device *lo, struct loop_cmd *cmd, cmd->iocb.ki_filp = file; cmd->iocb.ki_complete = lo_rw_aio_complete; cmd->iocb.ki_flags =IOCB_DIRECT ; - cmd->iocb.ki_ioprio =IOPRIO_PRIO_VALUE (IOPRIO_CLASS_NONE ,0 ); + cmd->iocb.ki_ioprio =req_get_ioprio (rq);if (rw ==ITER_SOURCE ) ret =call_write_iter (file, &cmd->iocb, &iter);
drivers/char/misc.c +1 -1
@@ -315,7 +315,7 @@ static int __init misc_init(void) goto fail_remove; err = -EIO ; -if (register_chrdev (MISC_MAJOR ,"misc" , &misc_fops)) +if (__register_chrdev (MISC_MAJOR ,0 ,MINORMASK +1 ,"misc" , &misc_fops)) goto fail_printk;return 0 ;
drivers/char/virtio_console.c +4 -3
@@ -1612,8 +1612,8 @@ static void handle_control_message(struct virtio_device *vdev,break ;case VIRTIO_CONSOLE_RESIZE : {struct { -__u16 rows; -__u16 cols; +__virtio16 rows; +__virtio16 cols; } size;if (!is_console_port (port))
@@ -1621,7 +1621,8 @@ static void handle_control_message(struct virtio_device *vdev,memcpy (&size, buf->buf + buf->offset +sizeof (*cpkt),sizeof (size)); -set_console_size (port, size.rows, size.cols); +set_console_size (port,virtio16_to_cpu (vdev, size.rows), +virtio16_to_cpu (vdev, size.cols)); port->cons.hvc->irq_requested =1 ;resize_console (port);
drivers/clk/clk.c +4 -0
@@ -5216,6 +5216,10 @@ of_clk_get_hw_from_clkspec(struct of_phandle_args *clkspec)if (!clkspec)return ERR_PTR (-EINVAL ); +/* Check if node in clkspec is in disabled/fail state */ +if (!of_device_is_available (clkspec->np)) +return ERR_PTR (-ENOENT ); +mutex_lock (&of_clk_mutex);list_for_each_entry (provider, &of_clk_providers, link) {if (provider->node == clkspec->np) {
drivers/clk/renesas/r9a07g043-cpg.c +25 -3
@@ -14,6 +14,17 @@#include "rzg2l-cpg.h" +/* Specific registers. */ +#define CPG_PL2SDHI_DSEL (0x218) + +/* Clock select configuration. */ +#define SEL_SDHI0 SEL_PLL_PACK(CPG_PL2SDHI_DSEL, 0, 2) +#define SEL_SDHI1 SEL_PLL_PACK(CPG_PL2SDHI_DSEL, 4, 2) + +/* Clock status configuration. */ +#define SEL_SDHI0_STS SEL_PLL_PACK(CPG_CLKSTATUS, 28, 1) +#define SEL_SDHI1_STS SEL_PLL_PACK(CPG_CLKSTATUS, 29, 1) +enum clk_ids {/* Core Clock Outputs exported to DT */ LAST_DT_CORE_CLK =R9A07G043_CLK_P0_DIV2 ,
@@ -75,8 +86,12 @@ static const struct clk_div_table dtable_1_32[] = {/* Mux clock tables */ static const char *const sel_pll3_3[] = {".pll3_533" ,".pll3_400" }; +#ifdef CONFIG_ARM64 static const char *const sel_pll6_2[] = {".pll6_250" ,".pll5_250" }; -static const char *const sel_shdi[] = {".clk_533" ,".clk_400" ,".clk_266" }; +#endif +static const char *const sel_sdhi[] = {".clk_533" ,".clk_400" ,".clk_266" }; + +static const u32 mtable_sdhi[] = {1 ,2 ,3 };static const struct cpg_core_clk r9a07g043_core_clks[]__initconst = {/* External Clock Inputs */
@@ -120,11 +135,18 @@ static const struct cpg_core_clk r9a07g043_core_clks[] __initconst = {DEF_DIV ("P2" ,R9A07G043_CLK_P2 ,CLK_PLL3_DIV2_4_2 ,DIVPL3A , dtable_1_32),DEF_FIXED ("M0" ,R9A07G043_CLK_M0 ,CLK_PLL3_DIV2_4 ,1 ,1 ),DEF_FIXED ("ZT" ,R9A07G043_CLK_ZT ,CLK_PLL3_DIV2_4_2 ,1 ,1 ), +#ifdef CONFIG_ARM64DEF_MUX ("HP" ,R9A07G043_CLK_HP ,SEL_PLL6_2 , sel_pll6_2), +#endif +#ifdef CONFIG_RISCV +DEF_FIXED ("HP" ,R9A07G043_CLK_HP ,CLK_PLL6_250 ,1 ,1 ), +#endifDEF_FIXED ("SPI0" ,R9A07G043_CLK_SPI0 ,CLK_DIV_PLL3_C ,1 ,2 ),DEF_FIXED ("SPI1" ,R9A07G043_CLK_SPI1 ,CLK_DIV_PLL3_C ,1 ,4 ), -DEF_SD_MUX ("SD0" ,R9A07G043_CLK_SD0 ,SEL_SDHI0 , sel_shdi), -DEF_SD_MUX ("SD1" ,R9A07G043_CLK_SD1 ,SEL_SDHI1 , sel_shdi), +DEF_SD_MUX ("SD0" ,R9A07G043_CLK_SD0 ,SEL_SDHI0 ,SEL_SDHI0_STS , sel_sdhi, + mtable_sdhi,0 , rzg2l_cpg_sd_clk_mux_notifier), +DEF_SD_MUX ("SD1" ,R9A07G043_CLK_SD1 ,SEL_SDHI1 ,SEL_SDHI1_STS , sel_sdhi, + mtable_sdhi,0 , rzg2l_cpg_sd_clk_mux_notifier),DEF_FIXED ("SD0_DIV4" ,CLK_SD0_DIV4 ,R9A07G043_CLK_SD0 ,1 ,4 ), DEF_FIXED("SD1_DIV4", CLK_SD1_DIV4, R9A07G043_CLK_SD1, 1, 4), };
drivers/clk/renesas/r9a07g044-cpg.c +18 -3
@@ -15,6 +15,17 @@#include "rzg2l-cpg.h" +/* Specific registers. */ +#define CPG_PL2SDHI_DSEL (0x218) + +/* Clock select configuration. */ +#define SEL_SDHI0 SEL_PLL_PACK(CPG_PL2SDHI_DSEL, 0, 2) +#define SEL_SDHI1 SEL_PLL_PACK(CPG_PL2SDHI_DSEL, 4, 2) + +/* Clock status configuration. */ +#define SEL_SDHI0_STS SEL_PLL_PACK(CPG_CLKSTATUS, 28, 1) +#define SEL_SDHI1_STS SEL_PLL_PACK(CPG_CLKSTATUS, 29, 1) +enum clk_ids {/* Core Clock Outputs exported to DT */ LAST_DT_CORE_CLK =R9A07G054_CLK_DRP_A ,
@@ -95,9 +106,11 @@ static const struct clk_div_table dtable_16_128[] = {static const char *const sel_pll3_3[] = {".pll3_533" ,".pll3_400" };static const char *const sel_pll5_4[] = {".pll5_foutpostdiv" ,".pll5_fout1ph0" };static const char *const sel_pll6_2[] = {".pll6_250" ,".pll5_250" }; -static const char *const sel_shdi[] = {".clk_533" ,".clk_400" ,".clk_266" }; +static const char *const sel_sdhi[] = {".clk_533" ,".clk_400" ,".clk_266" };static const char *const sel_gpu2[] = {".pll6" ,".pll3_div2_2" }; +static const u32 mtable_sdhi[] = {1 ,2 ,3 }; + static const struct { struct cpg_core_clk common[56]; #ifdef CONFIG_CLK_R9A07G054
@@ -163,8 +176,10 @@ static const struct {DEF_MUX ("HP" ,R9A07G044_CLK_HP ,SEL_PLL6_2 , sel_pll6_2),DEF_FIXED ("SPI0" ,R9A07G044_CLK_SPI0 ,CLK_DIV_PLL3_C ,1 ,2 ),DEF_FIXED ("SPI1" ,R9A07G044_CLK_SPI1 ,CLK_DIV_PLL3_C ,1 ,4 ), -DEF_SD_MUX ("SD0" ,R9A07G044_CLK_SD0 ,SEL_SDHI0 , sel_shdi), -DEF_SD_MUX ("SD1" ,R9A07G044_CLK_SD1 ,SEL_SDHI1 , sel_shdi), +DEF_SD_MUX ("SD0" ,R9A07G044_CLK_SD0 ,SEL_SDHI0 ,SEL_SDHI0_STS , sel_sdhi, + mtable_sdhi,0 , rzg2l_cpg_sd_clk_mux_notifier), +DEF_SD_MUX ("SD1" ,R9A07G044_CLK_SD1 ,SEL_SDHI1 ,SEL_SDHI1_STS , sel_sdhi, + mtable_sdhi,0 , rzg2l_cpg_sd_clk_mux_notifier),DEF_FIXED ("SD0_DIV4" ,CLK_SD0_DIV4 ,R9A07G044_CLK_SD0 ,1 ,4 ),DEF_FIXED ("SD1_DIV4" ,CLK_SD1_DIV4 ,R9A07G044_CLK_SD1 ,1 ,4 ), DEF_DIV("G", R9A07G044_CLK_G, CLK_SEL_GPU2, DIVGPU, dtable_1_8),
drivers/clk/renesas/rzg2l-cpg.c +131 -49
246 lines not on this page · raw message
drivers/clk/renesas/rzg2l-cpg.h +13 -11
@@ -9,6 +9,8 @@#ifndef __RENESAS_RZG2L_CPG_H__#define __RENESAS_RZG2L_CPG_H__ +#include <linux/notifier.h> +#define CPG_SIPLL5_STBY (0x140)#define CPG_SIPLL5_CLK1 (0x144)#define CPG_SIPLL5_CLK3 (0x14C)
@@ -19,7 +21,6 @@#define CPG_PL2_DDIV (0x204)#define CPG_PL3A_DDIV (0x208)#define CPG_PL6_DDIV (0x210) -#define CPG_PL2SDHI_DSEL (0x218)#define CPG_CLKSTATUS (0x280)#define CPG_PL3_SSEL (0x408)#define CPG_PL6_SSEL (0x414)
@@ -43,8 +44,6 @@#define CPG_CLKSTATUS_SELSDHI0_STS BIT(28)#define CPG_CLKSTATUS_SELSDHI1_STS BIT(29) -#define CPG_SDHI_CLK_SWITCH_STATUS_TIMEOUT_US 200 -/* n = 0/1/2 for PLL1/4/6 */ #define CPG_SAMPLL_CLK1 (n) (0x04 + (16 * n))#define CPG_SAMPLL_CLK2 (n) (0x08 + (16 * n))
@@ -69,9 +68,6 @@#define SEL_PLL6_2 SEL_PLL_PACK(CPG_PL6_ETH_SSEL, 0, 1)#define SEL_GPU2 SEL_PLL_PACK(CPG_PL6_SSEL, 12, 1) -#define SEL_SDHI0 DDIV_PACK(CPG_PL2SDHI_DSEL, 0, 2) -#define SEL_SDHI1 DDIV_PACK(CPG_PL2SDHI_DSEL, 4, 2) -#define EXTAL_FREQ_IN_MEGA_HZ (24)/**
@@ -90,10 +86,13 @@ struct cpg_core_clk {unsigned int mult;unsigned int type;unsigned int conf; +unsigned int sconf;const struct clk_div_table *dtable; +const u32 *mtable;const char *const *parent_names; -int flag; -int mux_flags; +notifier_fn_t notifier; +u32 flag; +u32 mux_flags;int num_parents; };
@@ -151,10 +150,11 @@ enum clk_types { .parent_names = _parent_names, \ .num_parents = ARRAY_SIZE(_parent_names), \ .mux_flags = CLK_MUX_READ_ONLY) -#define DEF_SD_MUX (_name, _id, _conf, _parent_names) \ - DEF_TYPE(_name, _id, CLK_TYPE_SD_MUX, .conf = _conf, \ +#define DEF_SD_MUX (_name, _id, _conf, _sconf, _parent_names, _mtable, _clk_flags, _notifier) \ + DEF_TYPE(_name, _id, CLK_TYPE_SD_MUX, .conf = _conf, .sconf = _sconf, \ .parent_names = _parent_names, \ - .num_parents = ARRAY_SIZE(_parent_names)) + .num_parents = ARRAY_SIZE(_parent_names), \ + .mtable = _mtable, .flag = _clk_flags, .notifier = _notifier)#define DEF_PLL5_FOUTPOSTDIV (_name, _id, _parent) \ DEF_TYPE(_name, _id, CLK_TYPE_SIPLL5, .parent = _parent)#define DEF_PLL5_4_MUX (_name, _id, _conf, _parent_names) \
@@ -273,4 +273,6 @@ extern const struct rzg2l_cpg_info r9a07g044_cpg_info;extern const struct rzg2l_cpg_info r9a07g054_cpg_info;extern const struct rzg2l_cpg_info r9a09g011_cpg_info; +int rzg2l_cpg_sd_clk_mux_notifier (struct notifier_block *nb,unsigned long event,void *data); +#endif
drivers/comedi/drivers/jr3_pci.c +1 -1
@@ -758,7 +758,7 @@ static void jr3_pci_detach(struct comedi_device *dev)struct jr3_pci_dev_private *devpriv = dev->private;if (devpriv) -del_timer_sync (&devpriv->timer); +timer_shutdown_sync (&devpriv->timer);comedi_pci_detach (dev); }
drivers/cpufreq/apple-soc-cpufreq.c +8 -2
@@ -103,11 +103,17 @@ static const struct of_device_id apple_soc_cpufreq_of_match[] = {static unsigned int apple_soc_cpufreq_get_rate (unsigned int cpu) { -struct cpufreq_policy *policy =cpufreq_cpu_get_raw (cpu); -struct apple_cpu_priv *priv = policy->driver_data; +struct cpufreq_policy *policy; +struct apple_cpu_priv *priv;struct cpufreq_frequency_table *p;unsigned int pstate; + policy =cpufreq_cpu_get_raw (cpu); +if (unlikely (!policy)) +return 0 ; + + priv = policy->driver_data; +if (priv->info->cur_pstate_mask) {u64 reg =readq_relaxed (priv->reg_base +APPLE_DVFS_STATUS );
drivers/cpufreq/cppc_cpufreq.c +1 -1
@@ -773,7 +773,7 @@ static unsigned int cppc_cpufreq_get_rate(unsigned int cpu)int ret;if (!policy) -return -ENODEV ; +return 0 ; cpu_data = policy->driver_data;
drivers/cpufreq/scmi-cpufreq.c +8 -2
@@ -33,11 +33,17 @@ static const struct scmi_perf_proto_ops *perf_ops;static unsigned int scmi_cpufreq_get_rate (unsigned int cpu) { -struct cpufreq_policy *policy =cpufreq_cpu_get_raw (cpu); -struct scmi_data *priv = policy->driver_data; +struct cpufreq_policy *policy; +struct scmi_data *priv;unsigned long rate;int ret; + policy =cpufreq_cpu_get_raw (cpu); +if (unlikely (!policy)) +return 0 ; + + priv = policy->driver_data; + ret = perf_ops->freq_get (ph, priv->domain_id, &rate, false);if (ret)return 0 ;
drivers/cpufreq/scpi-cpufreq.c +10 -3
@@ -29,9 +29,16 @@ static struct scpi_ops *scpi_ops;static unsigned int scpi_cpufreq_get_rate (unsigned int cpu) { -struct cpufreq_policy *policy =cpufreq_cpu_get_raw (cpu); -struct scpi_data *priv = policy->driver_data; -unsigned long rate =clk_get_rate (priv->clk); +struct cpufreq_policy *policy; +struct scpi_data *priv; +unsigned long rate; + + policy =cpufreq_cpu_get_raw (cpu); +if (unlikely (!policy)) +return 0 ; + + priv = policy->driver_data; + rate =clk_get_rate (priv->clk);return rate /1000 ; }
drivers/crypto/atmel-sha204a.c +6 -0
@@ -107,6 +107,12 @@ static int atmel_sha204a_probe(struct i2c_client *client) i2c_priv->hwrng.name =dev_name (&client->dev); i2c_priv->hwrng.read = atmel_sha204a_rng_read; +/* +* According to review by Bill Cox [1], this HWRNG has very low entropy. +* [1] https://www.metzdowd.com/pipermail/cryptography/2014-December/023858.html +*/ + i2c_priv->hwrng.quality =1 ; + ret =devm_hwrng_register (&client->dev, &i2c_priv->hwrng);if (ret)dev_warn (&client->dev,"failed to register RNG (%d)\n" , ret);
drivers/crypto/ccp/sp-pci.c +1 -0
@@ -577,6 +577,7 @@ static const struct pci_device_id sp_pci_table[] = { { PCI_VDEVICE(AMD, 0x14CA), (kernel_ulong_t)&dev_vdata[5] }, { PCI_VDEVICE(AMD, 0x15C7), (kernel_ulong_t)&dev_vdata[6] }, { PCI_VDEVICE(AMD, 0x1649), (kernel_ulong_t)&dev_vdata[6] }, + { PCI_VDEVICE(AMD, 0x1134), (kernel_ulong_t)&dev_vdata[7] }, { PCI_VDEVICE(AMD, 0x17E0), (kernel_ulong_t)&dev_vdata[7] }, { PCI_VDEVICE(AMD, 0x156E), (kernel_ulong_t)&dev_vdata[8] }, /* Last entry must be zero */
drivers/cxl/core/regs.c +0 -4
@@ -478,7 +478,6 @@ resource_size_t __rcrb_to_component(struct device *dev, struct cxl_rcrb_info *riresource_size_t rcrb = ri->base;void __iomem *addr;u32 bar0, bar1; -u16 cmd;u32 id;if (which ==CXL_RCRB_UPSTREAM )
@@ -500,7 +499,6 @@ resource_size_t __rcrb_to_component(struct device *dev, struct cxl_rcrb_info *ri } id =readl (addr +PCI_VENDOR_ID ); - cmd =readw (addr +PCI_COMMAND ); bar0 =readl (addr +PCI_BASE_ADDRESS_0 ); bar1 =readl (addr +PCI_BASE_ADDRESS_1 );iounmap (addr);
@@ -515,8 +513,6 @@ resource_size_t __rcrb_to_component(struct device *dev, struct cxl_rcrb_info *ridev_err (dev,"Failed to access Downstream Port RCRB\n" );return CXL_RESOURCE_NONE ; } -if (!(cmd &PCI_COMMAND_MEMORY )) -return CXL_RESOURCE_NONE ;/* The RCRB is a Memory Window, and the MEM_TYPE_1M bit is obsolete */ if (bar0 & (PCI_BASE_ADDRESS_MEM_TYPE_1M |PCI_BASE_ADDRESS_SPACE_IO ))return CXL_RESOURCE_NONE ;
drivers/dma-buf/udmabuf.c +1 -1
@@ -214,7 +214,7 @@ static long udmabuf_create(struct miscdevice *device,if (!ubuf)return -ENOMEM ; - pglimit = (size_limit_mb *1024 *1024 ) >>PAGE_SHIFT ; + pglimit = ((u64 )size_limit_mb *1024 *1024 ) >>PAGE_SHIFT ;for (i =0 ; i < head->count; i++) {if (!IS_ALIGNED (list[i].offset,PAGE_SIZE )) goto err;
drivers/dma/dmatest.c +3 -3
@@ -827,9 +827,9 @@ static int dmatest_func(void *data) }else {dma_async_issue_pending (chan); -wait_event_freezable_timeout (thread->done_wait, - done->done, -msecs_to_jiffies (params->timeout)); +wait_event_timeout (thread->done_wait, + done->done, +msecs_to_jiffies (params->timeout)); status =dma_async_is_tx_complete (chan, cookie,NULL ,NULL );
drivers/gpio/gpiolib-of.c +3 -3
@@ -247,6 +247,9 @@ static void of_gpio_set_polarity_by_property(const struct device_node *np, { "fsl,imx8qm-fec", "phy-reset-gpios", "phy-reset-active-high" }, { "fsl,s32v234-fec", "phy-reset-gpios", "phy-reset-active-high" }, #endif +#if IS_ENABLED(CONFIG_MMC_ATMELMCI) + { "atmel,hsmci", "cd-gpios", "cd-inverted" }, +#endif #if IS_ENABLED(CONFIG_PCI_IMX6) { "fsl,imx6q-pcie", "reset-gpio", "reset-gpio-active-high" }, { "fsl,imx6sx-pcie", "reset-gpio", "reset-gpio-active-high" },
@@ -272,9 +275,6 @@ static void of_gpio_set_polarity_by_property(const struct device_node *np, #if IS_ENABLED(CONFIG_REGULATOR_GPIO) { "regulator-gpio", "enable-gpio", "enable-active-high" }, { "regulator-gpio", "enable-gpios", "enable-active-high" }, -#endif -#if IS_ENABLED(CONFIG_MMC_ATMELMCI) - { "atmel,hsmci", "cd-gpios", "cd-inverted" }, #endif }; unsigned int i;
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +6 -3
@@ -2789,16 +2789,16 @@ static void dm_gpureset_commit_state(struct dc_state *dc_state,for (k =0 ; k < dc_state->stream_count; k++) { bundle->stream_update.stream = dc_state->streams[k]; -for (m =0 ; m < dc_state->stream_status->plane_count; m++) { +for (m =0 ; m < dc_state->stream_status[k].plane_count; m++) { bundle->surface_updates[m].surface = - dc_state->stream_status->plane_states[m]; + dc_state->stream_status[k].plane_states[m]; bundle->surface_updates[m].surface->force_full_update = true; }update_planes_and_stream_adapter (dm->dc,UPDATE_TYPE_FULL , - dc_state->stream_status->plane_count, + dc_state->stream_status[k].plane_count, dc_state->streams[k], &bundle->stream_update, bundle->surface_updates);
@@ -9590,6 +9590,9 @@ static bool should_reset_plane(struct drm_atomic_state *state,if (adev->ip_versions[DCE_HWIP ][0 ] <IP_VERSION (3 ,2 ,0 ) && state->allow_modeset)return true; +if (amdgpu_in_reset (adev) && state->allow_modeset) +return true; +/* Exit early if we know that we're adding or removing the plane. */ if (old_plane_state->crtc != new_plane_state->crtc)return true;
drivers/iio/adc/ad7768-1.c +2 -3
@@ -142,7 +142,7 @@ static const struct iio_chan_spec ad7768_channels[] = { .channel = 0, .scan_index = 0, .scan_type = { - .sign = 'u', + .sign = 's', .realbits = 24, .storagebits = 32, .shift = 8,
@@ -370,12 +370,11 @@ static int ad7768_read_raw(struct iio_dev *indio_dev,return ret; ret =ad7768_scan_direct (indio_dev); -if (ret >=0 ) - *val = ret;iio_device_release_direct_mode (indio_dev);if (ret <0 )return ret; + *val =sign_extend32 (ret, chan->scan_type.realbits -1 );return IIO_VAL_INT ;
drivers/infiniband/hw/qib/qib_fs.c +1 -0
@@ -55,6 +55,7 @@ static int qibfs_mknod(struct inode *dir, struct dentry *dentry,struct inode *inode =new_inode (dir->i_sb);if (!inode) { +dput (dentry); error = -EPERM ; goto bail; }
drivers/iommu/amd/iommu.c +1 -1
@@ -3619,7 +3619,7 @@ static int amd_ir_set_vcpu_affinity(struct irq_data *data, void *vcpu_info)* we should not modify the IRTE */ if (!dev_data || !dev_data->use_vapic) -return 0 ; +return -EINVAL ; ir_data->cfg =irqd_cfg (data); pi_data->ir_data = ir_data;
drivers/irqchip/irq-gic-v2m.c +1 -1
@@ -454,7 +454,7 @@ static int __init gicv2m_of_init(struct fwnode_handle *parent_handle,#ifdef CONFIG_ACPI static int acpi_num_msi; -static __init struct fwnode_handle *gicv2m_get_fwnode (struct device *dev) +static struct fwnode_handle *gicv2m_get_fwnode (struct device *dev) {struct v2m_data *data;
drivers/mailbox/pcc.c +11 -4
@@ -313,6 +313,10 @@ static irqreturn_t pcc_mbox_irq(int irq, void *p)int ret; pchan = chan->con_priv; + +if (pcc_chan_reg_read_modify_write (&pchan->plat_irq_ack)) +return IRQ_NONE ; +if (pchan->type ==ACPI_PCCT_TYPE_EXT_PCC_MASTER_SUBSPACE && !pchan->chan_in_use)return IRQ_NONE ;
@@ -330,13 +334,16 @@ static irqreturn_t pcc_mbox_irq(int irq, void *p)return IRQ_NONE ; } -if (pcc_chan_reg_read_modify_write (&pchan->plat_irq_ack)) -return IRQ_NONE ; - +/* +* Clear this flag after updating interrupt ack register and just +* before mbox_chan_received_data() which might call pcc_send_data() +* where the flag is set again to start new transfer. This is +* required to avoid any possible race in updatation of this flag. +*/ + pchan->chan_in_use = false;mbox_chan_received_data (chan,NULL );check_and_ack (pchan, chan); - pchan->chan_in_use = false;return IRQ_HANDLED ; }
drivers/mcb/mcb-parse.c +1 -1
@@ -101,7 +101,7 @@ static int chameleon_parse_gdd(struct mcb_bus *bus, ret =mcb_device_register (bus, mdev);if (ret <0 ) - goto err; +return ret;return 0 ;
drivers/md/raid1.c +16 -10
@@ -2061,14 +2061,9 @@ static int fix_sync_read_error(struct r1bio *r1_bio)if (!rdev_set_badblocks (rdev, sect, s,0 )) abort =1 ; } -if (abort) { - conf->recovery_disabled = - mddev->recovery_disabled; -set_bit (MD_RECOVERY_INTR , &mddev->recovery); -md_done_sync (mddev, r1_bio->sectors,0 ); -put_buf (r1_bio); +if (abort)return 0 ; - } +/* Try next page */ sectors -= s; sect += s;
@@ -2207,10 +2202,21 @@ static void sync_request_write(struct mddev *mddev, struct r1bio *r1_bio)int disks = conf->raid_disks *2 ;struct bio *wbio; -if (!test_bit (R1BIO_Uptodate, &r1_bio->state)) -/* ouch - failed to read all of that. */ -if (!fix_sync_read_error (r1_bio)) +if (!test_bit (R1BIO_Uptodate, &r1_bio->state)) { +/* +* ouch - failed to read all of that. +* No need to fix read error for check/repair +* because all member disks are read. +*/ +if (test_bit (MD_RECOVERY_REQUESTED , &mddev->recovery) || + !fix_sync_read_error (r1_bio)) { + conf->recovery_disabled = mddev->recovery_disabled; +set_bit (MD_RECOVERY_INTR , &mddev->recovery); +md_done_sync (mddev, r1_bio->sectors,0 ); +put_buf (r1_bio);return ; + } + }if (test_bit (MD_RECOVERY_REQUESTED , &mddev->recovery))process_checks (r1_bio);
drivers/media/test-drivers/vimc/vimc-streamer.c +6 -0
@@ -59,6 +59,12 @@ static void vimc_streamer_pipeline_terminate(struct vimc_stream *stream)continue ; sd =media_entity_to_v4l2_subdev (ved->ent); +/* +* Do not call .s_stream() to stop an already +* stopped/unstarted subdev. +*/ +if (!v4l2_subdev_is_streaming (sd)) +continue ;v4l2_subdev_call (sd, video, s_stream,0 ); } }
drivers/media/v4l2-core/v4l2-subdev.c +67 -34
166 lines not on this page · raw message
drivers/misc/lkdtm/perms.c +11 -3
@@ -28,6 +28,13 @@ static const unsigned long rodata = 0xAA55AA55;/* This is marked __ro_after_init, so it should ultimately be .rodata. */ static unsigned long ro_after_init__ro_after_init =0x55AA5500 ; +/* +* This is a pointer to do_nothing() which is initialized at runtime rather +* than build time to avoid objtool IBT validation warnings caused by an +* inlined unrolled memcpy() in execute_location(). +*/ +static void __ro_after_init *do_nothing_ptr; +/* * This just returns to the caller. It is designed to be copied into * non-executable memory regions.
@@ -65,13 +72,12 @@ static noinline __nocfi void execute_location(void *dst, bool write) {void (*func)(void );func_desc_t fdesc; -void *do_nothing_text =dereference_function_descriptor (do_nothing); -pr_info ("attempting ok execution at %px\n" , do_nothing_text); +pr_info ("attempting ok execution at %px\n" , do_nothing_ptr);do_nothing ();if (write ==CODE_WRITE ) { -memcpy (dst, do_nothing_text,EXEC_SIZE ); +memcpy (dst, do_nothing_ptr,EXEC_SIZE );flush_icache_range ((unsigned long )dst, (unsigned long )dst +EXEC_SIZE ); }
@@ -267,6 +273,8 @@ static void lkdtm_ACCESS_NULL(void)void __init lkdtm_perms_init (void ) { + do_nothing_ptr =dereference_function_descriptor (do_nothing); +/* Make sure we can write to __ro_after_init values during __init */ ro_after_init |=0xAA ; }
drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c +6 -2
@@ -37,6 +37,7 @@struct pci1xxxx_gpio {struct auxiliary_device *aux_dev;void __iomem *reg_base; +raw_spinlock_t wa_lock;struct gpio_chip gpio;spinlock_t lock;int irq_base;
@@ -164,7 +165,7 @@ static void pci1xxxx_gpio_irq_ack(struct irq_data *data)unsigned long flags;spin_lock_irqsave (&priv->lock, flags); -pci1xxx_assign_bit (priv->reg_base,INTR_STAT_OFFSET (gpio), (gpio %32 ), true); +writel (BIT (gpio %32 ), priv->reg_base +INTR_STAT_OFFSET (gpio));spin_unlock_irqrestore (&priv->lock, flags); }
@@ -254,6 +255,7 @@ static irqreturn_t pci1xxxx_gpio_irq_handler(int irq, void *dev_id)struct pci1xxxx_gpio *priv = dev_id;struct gpio_chip *gc = &priv->gpio;unsigned long int_status =0 ; +unsigned long wa_flags;unsigned long flags;u8 pincount;int bit;
@@ -277,7 +279,9 @@ static irqreturn_t pci1xxxx_gpio_irq_handler(int irq, void *dev_id)writel (BIT (bit), priv->reg_base +INTR_STATUS_OFFSET (gpiobank));spin_unlock_irqrestore (&priv->lock, flags); irq =irq_find_mapping (gc->irq.domain, (bit + (gpiobank *32 ))); -handle_nested_irq (irq); +raw_spin_lock_irqsave (&priv->wa_lock, wa_flags); +generic_handle_irq (irq); +raw_spin_unlock_irqrestore (&priv->wa_lock, wa_flags); } }spin_lock_irqsave (&priv->lock, flags);
drivers/misc/mei/hw-me-regs.h +1 -0
@@ -117,6 +117,7 @@#define MEI_DEV_ID_LNL_M 0xA870/* Lunar Lake Point M */ +#define MEI_DEV_ID_PTL_H 0xE370/* Panther Lake H */ #define MEI_DEV_ID_PTL_P 0xE470/* Panther Lake P */ /*
drivers/misc/mei/pci-me.c +1 -0
@@ -124,6 +124,7 @@ static const struct pci_device_id mei_me_pci_tbl[] = { {MEI_PCI_DEVICE(MEI_DEV_ID_LNL_M, MEI_ME_PCH15_CFG)}, + {MEI_PCI_DEVICE(MEI_DEV_ID_PTL_H, MEI_ME_PCH15_CFG)}, {MEI_PCI_DEVICE(MEI_DEV_ID_PTL_P, MEI_ME_PCH15_CFG)},/* required last entry */
drivers/mmc/host/sdhci-msm.c +1 -1
@@ -1866,7 +1866,7 @@ static int sdhci_msm_ice_init(struct sdhci_msm_host *msm_host,if (!(cqhci_readl (cq_host,CQHCI_CAP ) &CQHCI_CAP_CS ))return 0 ; - ice =of_qcom_ice_get (dev); + ice =devm_of_qcom_ice_get (dev);if (ice ==ERR_PTR (-EOPNOTSUPP )) {dev_warn (dev,"Disabling inline encryption support\n" ); ice =NULL ;
drivers/net/dsa/mt7530.c +3 -3
@@ -2596,6 +2596,9 @@ mt7531_setup_common(struct dsa_switch *ds)struct mt7530_priv *priv = ds->priv;int ret, i; + ds->assisted_learning_on_cpu_port = true; + ds->mtu_enforcement_ingress = true; +mt753x_trap_frames (priv);/* Enable and reset MIB counters */
@@ -2735,9 +2738,6 @@ mt7531_setup(struct dsa_switch *ds)mt7531_setup_common (ds); - ds->assisted_learning_on_cpu_port = true; - ds->mtu_enforcement_ingress = true; -return 0 ; }
drivers/net/dsa/mv88e6xxx/chip.c +19 -8
@@ -5047,6 +5047,7 @@ static const struct mv88e6xxx_ops mv88e6320_ops = { .port_set_rgmii_delay = mv88e6320_port_set_rgmii_delay, .port_set_speed_duplex = mv88e6185_port_set_speed_duplex, .port_tag_remap = mv88e6095_port_tag_remap, + .port_set_policy = mv88e6352_port_set_policy, .port_set_frame_mode = mv88e6351_port_set_frame_mode, .port_set_ucast_flood = mv88e6352_port_set_ucast_flood, .port_set_mcast_flood = mv88e6352_port_set_mcast_flood,
@@ -5071,8 +5072,10 @@ static const struct mv88e6xxx_ops mv88e6320_ops = { .hardware_reset_pre = mv88e6xxx_g2_eeprom_wait, .hardware_reset_post = mv88e6xxx_g2_eeprom_wait, .reset = mv88e6352_g1_reset, - .vtu_getnext = mv88e6185_g1_vtu_getnext, - .vtu_loadpurge = mv88e6185_g1_vtu_loadpurge, + .vtu_getnext = mv88e6352_g1_vtu_getnext, + .vtu_loadpurge = mv88e6352_g1_vtu_loadpurge, + .stu_getnext = mv88e6352_g1_stu_getnext, + .stu_loadpurge = mv88e6352_g1_stu_loadpurge, .gpio_ops = &mv88e6352_gpio_ops, .avb_ops = &mv88e6352_avb_ops, .ptp_ops = &mv88e6352_ptp_ops,
@@ -5097,6 +5100,7 @@ static const struct mv88e6xxx_ops mv88e6321_ops = { .port_set_rgmii_delay = mv88e6320_port_set_rgmii_delay, .port_set_speed_duplex = mv88e6185_port_set_speed_duplex, .port_tag_remap = mv88e6095_port_tag_remap, + .port_set_policy = mv88e6352_port_set_policy, .port_set_frame_mode = mv88e6351_port_set_frame_mode, .port_set_ucast_flood = mv88e6352_port_set_ucast_flood, .port_set_mcast_flood = mv88e6352_port_set_mcast_flood,
@@ -5120,8 +5124,10 @@ static const struct mv88e6xxx_ops mv88e6321_ops = { .hardware_reset_pre = mv88e6xxx_g2_eeprom_wait, .hardware_reset_post = mv88e6xxx_g2_eeprom_wait, .reset = mv88e6352_g1_reset, - .vtu_getnext = mv88e6185_g1_vtu_getnext, - .vtu_loadpurge = mv88e6185_g1_vtu_loadpurge, + .vtu_getnext = mv88e6352_g1_vtu_getnext, + .vtu_loadpurge = mv88e6352_g1_vtu_loadpurge, + .stu_getnext = mv88e6352_g1_stu_getnext, + .stu_loadpurge = mv88e6352_g1_stu_loadpurge, .gpio_ops = &mv88e6352_gpio_ops, .avb_ops = &mv88e6352_avb_ops, .ptp_ops = &mv88e6352_ptp_ops,
@@ -5713,7 +5719,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = { .global1_addr = 0x1b, .global2_addr = 0x1c, .age_time_coeff = 3750, - .atu_move_port_mask = 0x1f, + .atu_move_port_mask = 0xf, .g1_irqs = 9, .g2_irqs = 10, .pvt = true,
@@ -6114,9 +6120,11 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = { .num_databases = 4096, .num_macs = 8192, .num_ports = 7, - .num_internal_phys = 5, + .num_internal_phys = 2, + .internal_phys_offset = 3, .num_gpio = 15, .max_vid = 4095, + .max_sid = 63, .port_base_addr = 0x10, .phy_base_addr = 0x0, .global1_addr = 0x1b,
@@ -6139,9 +6147,11 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = { .num_databases = 4096, .num_macs = 8192, .num_ports = 7, - .num_internal_phys = 5, + .num_internal_phys = 2, + .internal_phys_offset = 3, .num_gpio = 15, .max_vid = 4095, + .max_sid = 63, .port_base_addr = 0x10, .phy_base_addr = 0x0, .global1_addr = 0x1b,
@@ -6150,6 +6160,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = { .g1_irqs = 8, .g2_irqs = 10, .atu_move_port_mask = 0xf, + .pvt = true, .multi_chip = true, .edsa_support = MV88E6XXX_EDSA_SUPPORTED, .ptp_support = true,
@@ -6172,7 +6183,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = { .global1_addr = 0x1b, .global2_addr = 0x1c, .age_time_coeff = 3750, - .atu_move_port_mask = 0x1f, + .atu_move_port_mask = 0xf, .g1_irqs = 9, .g2_irqs = 10, .pvt = true,
drivers/net/ethernet/amd/pds_core/adminq.c +14 -22
@@ -5,11 +5,6 @@#include "core.h" -struct pdsc_wait_context { -struct pdsc_qcq *qcq; -struct completion wait_completion; -}; -static int pdsc_process_notifyq (struct pdsc_qcq *qcq) {union pds_core_notifyq_comp *comp;
@@ -110,10 +105,10 @@ void pdsc_process_adminq(struct pdsc_qcq *qcq) q_info = &q->info[q->tail_idx]; q->tail_idx = (q->tail_idx +1 ) & (q->num_descs -1 ); -/* Copy out the completion data */ -memcpy (q_info->dest, comp,sizeof (*comp)); - -complete_all (&q_info->wc->wait_completion); +if (!completion_done (&q_info->completion)) { +memcpy (q_info->dest, comp,sizeof (*comp)); +complete (&q_info->completion); + }if (cq->tail_idx == cq->num_descs -1 ) cq->done_color = !cq->done_color;
@@ -166,8 +161,7 @@ irqreturn_t pdsc_adminq_isr(int irq, void *data)static int __pdsc_adminq_post (struct pdsc *pdsc,struct pdsc_qcq *qcq,union pds_core_adminq_cmd *cmd, -union pds_core_adminq_comp *comp, -struct pdsc_wait_context *wc) +union pds_core_adminq_comp *comp) {struct pdsc_queue *q = &qcq->q;struct pdsc_q_info *q_info;
@@ -209,9 +203,9 @@ static int __pdsc_adminq_post(struct pdsc *pdsc,/* Post the request */ index = q->head_idx; q_info = &q->info[index]; - q_info->wc = wc; q_info->dest = comp;memcpy (q_info->desc, cmd,sizeof (*cmd)); +reinit_completion (&q_info->completion);dev_dbg (pdsc->dev,"head_idx %d tail_idx %d\n" , q->head_idx, q->tail_idx);
@@ -235,16 +229,13 @@ int pdsc_adminq_post(struct pdsc *pdsc, union pds_core_adminq_comp *comp, bool fast_poll) { -struct pdsc_wait_context wc = { - .wait_completion = -COMPLETION_INITIALIZER_ONSTACK (wc.wait_completion), - };unsigned long poll_interval =1 ;unsigned long poll_jiffies;unsigned long time_limit;unsigned long time_start;unsigned long time_done;unsigned long remaining; +struct completion *wc;int err =0 ;int index;
@@ -254,20 +245,19 @@ int pdsc_adminq_post(struct pdsc *pdsc,return -ENXIO ; } - wc.qcq = &pdsc->adminqcq; - index =__pdsc_adminq_post (pdsc, &pdsc->adminqcq, cmd, comp, &wc); + index =__pdsc_adminq_post (pdsc, &pdsc->adminqcq, cmd, comp);if (index <0 ) { err = index; goto err_out; } + wc = &pdsc->adminqcq.q.info[index].completion; time_start = jiffies; time_limit = time_start +HZ * pdsc->devcmd_timeout; do { /* Timeslice the actual wait to catch IO errors etc early */ poll_jiffies = msecs_to_jiffies(poll_interval); - remaining = wait_for_completion_timeout(&wc.wait_completion, - poll_jiffies); + remaining = wait_for_completion_timeout(wc, poll_jiffies); if (remaining) break;
@@ -296,9 +286,11 @@ int pdsc_adminq_post(struct pdsc *pdsc,dev_dbg (pdsc->dev,"%s: elapsed %d msecs\n" , __func__,jiffies_to_msecs (time_done - time_start)); -/* Check the results */ -if (time_after_eq (time_done, time_limit)) +/* Check the results and clear an un-completed timeout */ +if (time_after_eq (time_done, time_limit) && !completion_done (wc)) { err = -ETIMEDOUT ; +complete (wc); + }dev_dbg (pdsc->dev,"read admin queue completion idx %d:\n" , index); dynamic_hex_dump("comp ", DUMP_PREFIX_OFFSET, 16, 1,
drivers/net/ethernet/amd/pds_core/auxbus.c +0 -3
@@ -107,9 +107,6 @@ int pds_client_adminq_cmd(struct pds_auxiliary_dev *padev,dev_dbg (pf->dev,"%s: %s opcode %d\n" , __func__,dev_name (&padev->aux_dev.dev), req->opcode); -if (pf->state) -return -ENXIO ; -/* Wrap the client's request */ cmd.client_request.opcode =PDS_AQ_CMD_CLIENT_CMD ; cmd.client_request.client_id =cpu_to_le16 (padev->client_id);
drivers/net/ethernet/amd/pds_core/core.c +3 -1
@@ -169,8 +169,10 @@ static void pdsc_q_map(struct pdsc_queue *q, void *base, dma_addr_t base_pa) q->base = base; q->base_pa = base_pa; -for (i =0 , cur = q->info; i < q->num_descs; i++, cur++) +for (i =0 , cur = q->info; i < q->num_descs; i++, cur++) { cur->desc = base + (i * q->desc_size); +init_completion (&cur->completion); + } }static void pdsc_cq_map (struct pdsc_cq *cq,void *base,dma_addr_t base_pa)
drivers/net/ethernet/amd/pds_core/core.h +1 -1
@@ -96,7 +96,7 @@ struct pdsc_q_info {unsigned int bytes;unsigned int nbufs;struct pdsc_buf_info bufs[PDS_CORE_MAX_FRAGS ]; -struct pdsc_wait_context *wc; +struct completion completion;void *dest; };
drivers/net/ethernet/amd/pds_core/devlink.c +1 -3
@@ -101,7 +101,7 @@ int pdsc_dl_info_get(struct devlink *dl, struct devlink_info_req *req, .fw_control.opcode = PDS_CORE_CMD_FW_CONTROL, .fw_control.oper = PDS_CORE_FW_GET_LIST, }; -struct pds_core_fw_list_info fw_list; +struct pds_core_fw_list_info fw_list = {};struct pdsc *pdsc =devlink_priv (dl);union pds_core_dev_comp comp;char buf[32 ];
@@ -114,8 +114,6 @@ int pdsc_dl_info_get(struct devlink *dl, struct devlink_info_req *req,if (!err)memcpy_fromio (&fw_list, pdsc->cmd_regs->data,sizeof (fw_list));mutex_unlock (&pdsc->devcmd_lock); -if (err && err != -EIO ) -return err; listlen =min (fw_list.num_fw_slots,ARRAY_SIZE (fw_list.fw_names));for (i =0 ; i < listlen; i++) {
drivers/net/ethernet/mediatek/mtk_eth_soc.c +20 -4
@@ -3949,11 +3949,27 @@ static int mtk_hw_init(struct mtk_eth *eth, bool reset)mtk_w32 (eth,0x21021000 ,MTK_FE_INT_GRP );if (mtk_is_netsys_v3_or_greater (eth)) { -/* PSE should not drop port1, port8 and port9 packets */ -mtk_w32 (eth,0x00000302 ,PSE_DROP_CFG ); +/* PSE dummy page mechanism */ +mtk_w32 (eth,PSE_DUMMY_WORK_GDM (1 ) |PSE_DUMMY_WORK_GDM (2 ) | +PSE_DUMMY_WORK_GDM (3 ) |DUMMY_PAGE_THR ,PSE_DUMY_REQ ); + +/* PSE free buffer drop threshold */ +mtk_w32 (eth,0x00600009 ,PSE_IQ_REV (8 )); + +/* PSE should not drop port8, port9 and port13 packets from +* WDMA Tx +*/ +mtk_w32 (eth,0x00002300 ,PSE_DROP_CFG ); + +/* PSE should drop packets to port8, port9 and port13 on WDMA Rx +* ring full +*/ +mtk_w32 (eth,0x00002300 ,PSE_PPE_DROP (0 )); +mtk_w32 (eth,0x00002300 ,PSE_PPE_DROP (1 )); +mtk_w32 (eth,0x00002300 ,PSE_PPE_DROP (2 ));/* GDM and CDM Threshold */ -mtk_w32 (eth,0x00000707 ,MTK_CDMW0_THRES ); +mtk_w32 (eth,0x08000707 ,MTK_CDMW0_THRES );mtk_w32 (eth,0x00000077 ,MTK_CDMW1_THRES );/* Disable GDM1 RX CRC stripping */
@@ -3970,7 +3986,7 @@ static int mtk_hw_init(struct mtk_eth *eth, bool reset)mtk_w32 (eth,0x00000300 ,PSE_DROP_CFG );/* PSE should drop packets to port 8/9 on WDMA Rx ring full */ -mtk_w32 (eth,0x00000300 ,PSE_PPE0_DROP ); +mtk_w32 (eth,0x00000300 ,PSE_PPE_DROP (0 ));/* PSE Free Queue Flow Control */ mtk_w32 (eth,0x01fa01f4 ,PSE_FQFC_CFG2 );
drivers/net/ethernet/mediatek/mtk_eth_soc.h +9 -1
@@ -149,7 +149,15 @@#define PSE_FQFC_CFG1 0x100#define PSE_FQFC_CFG2 0x104#define PSE_DROP_CFG 0x108 -#define PSE_PPE0_DROP 0x110 +#define PSE_PPE_DROP (x) (0x110 + ((x) * 0x4)) + +/* PSE Last FreeQ Page Request Control */ +#define PSE_DUMY_REQ 0x10C +/* PSE_DUMY_REQ is not a typo but actually called like that also in +* MediaTek's datasheet +*/ +#define PSE_DUMMY_WORK_GDM (x) BIT(16 + (x)) +#define DUMMY_PAGE_THR 0x1/* PSE Input Queue Reservation Register*/ #define PSE_IQ_REV (x) (0x140 + (((x) - 1) << 2))
drivers/net/phy/microchip.c +3 -43
58 lines not on this page · raw message
drivers/net/phy/phy_led_triggers.c +13 -10
@@ -91,9 +91,8 @@ int phy_led_triggers_register(struct phy_device *phy)if (!phy->phy_num_led_triggers)return 0 ; - phy->led_link_trigger =devm_kzalloc (&phy->mdio.dev, -sizeof (*phy->led_link_trigger), -GFP_KERNEL ); + phy->led_link_trigger =kzalloc (sizeof (*phy->led_link_trigger), +GFP_KERNEL );if (!phy->led_link_trigger) { err = -ENOMEM ; goto out_clear;
@@ -103,10 +102,9 @@ int phy_led_triggers_register(struct phy_device *phy)if (err) goto out_free_link; - phy->phy_led_triggers =devm_kcalloc (&phy->mdio.dev, - phy->phy_num_led_triggers, -sizeof (struct phy_led_trigger ), -GFP_KERNEL ); + phy->phy_led_triggers =kcalloc (phy->phy_num_led_triggers, +sizeof (struct phy_led_trigger ), +GFP_KERNEL );if (!phy->phy_led_triggers) { err = -ENOMEM ; goto out_unreg_link;
@@ -127,11 +125,11 @@ int phy_led_triggers_register(struct phy_device *phy) out_unreg:while (i--)phy_led_trigger_unregister (&phy->phy_led_triggers[i]); -devm_kfree (&phy->mdio.dev, phy->phy_led_triggers); +kfree (phy->phy_led_triggers); out_unreg_link:phy_led_trigger_unregister (phy->led_link_trigger); out_free_link: -devm_kfree (&phy->mdio.dev, phy->led_link_trigger); +kfree (phy->led_link_trigger); phy->led_link_trigger =NULL ; out_clear: phy->phy_num_led_triggers =0 ;
@@ -145,8 +143,13 @@ void phy_led_triggers_unregister(struct phy_device *phy)for (i =0 ; i < phy->phy_num_led_triggers; i++)phy_led_trigger_unregister (&phy->phy_led_triggers[i]); +kfree (phy->phy_led_triggers); + phy->phy_led_triggers =NULL ; -if (phy->led_link_trigger) +if (phy->led_link_trigger) {phy_led_trigger_unregister (phy->led_link_trigger); +kfree (phy->led_link_trigger); + phy->led_link_trigger =NULL ; + } }EXPORT_SYMBOL_GPL (phy_led_triggers_unregister);
drivers/net/vmxnet3/vmxnet3_xdp.c +1 -1
@@ -397,7 +397,7 @@ vmxnet3_process_xdp(struct vmxnet3_adapter *adapter,xdp_init_buff (&xdp,PAGE_SIZE , &rq->xdp_rxq);xdp_prepare_buff (&xdp,page_address (page), rq->page_pool->p.offset, - rbi->len, false); + rcd->len, false);xdp_buff_clear_frags_flag (&xdp); xdp_prog =rcu_dereference (rq->adapter->xdp_bpf_prog);
drivers/net/xen-netfront.c +12 -5
@@ -985,20 +985,27 @@ static u32 xennet_run_xdp(struct netfront_queue *queue, struct page *pdata, act =bpf_prog_run_xdp (prog, xdp);switch (act) {case XDP_TX : -get_page (pdata); xdpf =xdp_convert_buff_to_frame (xdp); +if (unlikely (!xdpf)) { +trace_xdp_exception (queue->info->netdev, prog, act); +break ; + } +get_page (pdata); err =xennet_xdp_xmit (queue->info->netdev,1 , &xdpf,0 ); -if (unlikely (!err)) +if (unlikely (err <=0 )) { +if (err <0 ) +trace_xdp_exception (queue->info->netdev, prog, act);xdp_return_frame_rx_napi (xdpf); -else if (unlikely (err <0 )) -trace_xdp_exception (queue->info->netdev, prog, act); + }break ;case XDP_REDIRECT :get_page (pdata); err =xdp_do_redirect (queue->info->netdev, xdp, prog); *need_xdp_flush = true; -if (unlikely (err)) +if (unlikely (err)) {trace_xdp_exception (queue->info->netdev, prog, act); +xdp_return_buff (xdp); + }break ;case XDP_PASS :case XDP_DROP :
drivers/ntb/hw/amd/ntb_hw_amd.c +1 -0
@@ -1318,6 +1318,7 @@ static const struct pci_device_id amd_ntb_pci_tbl[] = { { PCI_VDEVICE(AMD, 0x148b), (kernel_ulong_t)&dev_data[1] }, { PCI_VDEVICE(AMD, 0x14c0), (kernel_ulong_t)&dev_data[1] }, { PCI_VDEVICE(AMD, 0x14c3), (kernel_ulong_t)&dev_data[1] }, + { PCI_VDEVICE(AMD, 0x155a), (kernel_ulong_t)&dev_data[1] }, { PCI_VDEVICE(HYGON, 0x145b), (kernel_ulong_t)&dev_data[0] }, { 0, } };
drivers/ntb/hw/idt/ntb_hw_idt.c +7 -11
@@ -1041,7 +1041,7 @@ static inline char *idt_get_mw_name(enum idt_mw_type mw_type)static struct idt_mw_cfg *idt_scan_mws (struct idt_ntb_dev *ndev,int port,unsigned char *mw_cnt) { -struct idt_mw_cfg mws[IDT_MAX_NR_MWS ], *ret_mws; +struct idt_mw_cfg *mws;const struct idt_ntb_bar *bars;enum idt_mw_type mw_type;unsigned char widx, bidx, en_cnt;
@@ -1049,6 +1049,11 @@ static struct idt_mw_cfg *idt_scan_mws(struct idt_ntb_dev *ndev, int port,int aprt_size;u32 data; + mws =devm_kcalloc (&ndev->ntb.pdev->dev,IDT_MAX_NR_MWS , +sizeof (*mws),GFP_KERNEL ); +if (!mws) +return ERR_PTR (-ENOMEM ); +/* Retrieve the array of the BARs registers */ bars = portdata_tbl[port].bars;
@@ -1103,16 +1108,7 @@ static struct idt_mw_cfg *idt_scan_mws(struct idt_ntb_dev *ndev, int port, } } -/* Allocate memory for memory window descriptors */ - ret_mws =devm_kcalloc (&ndev->ntb.pdev->dev, *mw_cnt,sizeof (*ret_mws), -GFP_KERNEL ); -if (!ret_mws) -return ERR_PTR (-ENOMEM ); - -/* Copy the info of detected memory windows */ -memcpy (ret_mws, mws, (*mw_cnt)*sizeof (*ret_mws)); - -return ret_mws; +return mws; }/*
drivers/nvme/host/core.c +9 -0
@@ -3972,6 +3972,15 @@ static void nvme_scan_work(struct work_struct *work)nvme_scan_ns_sequential (ctrl); }mutex_unlock (&ctrl->scan_lock); + +/* Requeue if we have missed AENs */ +if (test_bit (NVME_AER_NOTICE_NS_CHANGED , &ctrl->events)) +nvme_queue_scan (ctrl); +#ifdef CONFIG_NVME_MULTIPATH + else if (ctrl->ana_log_buf) + /* Re-read the ANA log page to not miss updates */ + queue_work(nvme_wq, &ctrl->ana_work); +#endif }/*
drivers/nvme/host/multipath.c +1 -1
@@ -426,7 +426,7 @@ static bool nvme_available_path(struct nvme_ns_head *head)struct nvme_ns *ns;if (!test_bit (NVME_NSHEAD_DISK_LIVE , &head->flags)) -return NULL ; +return false;list_for_each_entry_srcu (ns, &head->list, siblings,srcu_read_lock_held (&head->srcu)) {
drivers/nvme/target/fc.c +9 -16
@@ -1030,33 +1030,24 @@ nvmet_fc_alloc_hostport(struct nvmet_fc_tgtport *tgtport, void *hosthandle)struct nvmet_fc_hostport *newhost, *match =NULL ;unsigned long flags; +/* +* Caller holds a reference on tgtport. +*/ +/* if LLDD not implemented, leave as NULL */ if (!hosthandle)return NULL ; -/* -* take reference for what will be the newly allocated hostport if -* we end up using a new allocation -*/ -if (!nvmet_fc_tgtport_get (tgtport)) -return ERR_PTR (-EINVAL ); -spin_lock_irqsave (&tgtport->lock, flags); match =nvmet_fc_match_hostport (tgtport, hosthandle);spin_unlock_irqrestore (&tgtport->lock, flags); -if (match) { -/* no new allocation - release reference */ -nvmet_fc_tgtport_put (tgtport); +if (match)return match; - } newhost =kzalloc (sizeof (*newhost),GFP_KERNEL ); -if (!newhost) { -/* no new allocation - release reference */ -nvmet_fc_tgtport_put (tgtport); +if (!newhost)return ERR_PTR (-ENOMEM ); - }spin_lock_irqsave (&tgtport->lock, flags); match =nvmet_fc_match_hostport (tgtport, hosthandle);
@@ -1065,6 +1056,7 @@ nvmet_fc_alloc_hostport(struct nvmet_fc_tgtport *tgtport, void *hosthandle)kfree (newhost); newhost = match; }else { +nvmet_fc_tgtport_get (tgtport); newhost->tgtport = tgtport; newhost->hosthandle = hosthandle;INIT_LIST_HEAD (&newhost->host_list);
@@ -1099,7 +1091,8 @@ static void nvmet_fc_schedule_delete_assoc(struct nvmet_fc_tgt_assoc *assoc) {nvmet_fc_tgtport_get (assoc->tgtport); -queue_work (nvmet_wq, &assoc->del_work); +if (!queue_work (nvmet_wq, &assoc->del_work)) +nvmet_fc_tgtport_put (assoc->tgtport); } static struct nvmet_fc_tgt_assoc *
drivers/of/resolver.c +13 -24
@@ -262,25 +262,22 @@ static int adjust_local_phandle_references(struct device_node *local_fixups,*/ int of_resolve_phandles (struct device_node *overlay) { -struct device_node *child, *local_fixups, *refnode; -struct device_node *tree_symbols, *overlay_fixups; +struct device_node *child, *refnode; +struct device_node *overlay_fixups; + struct device_node __free(device_node) *local_fixups = NULL;struct property *prop;const char *refpath;phandle phandle, phandle_delta;int err; - tree_symbols =NULL ; -if (!overlay) {pr_err ("null overlay\n" ); - err = -EINVAL ; - goto out; +return -EINVAL ; }if (!of_node_check_flag (overlay,OF_DETACHED )) {pr_err ("overlay not detached\n" ); - err = -EINVAL ; - goto out; +return -EINVAL ; } phandle_delta =live_tree_max_phandle () +1 ;
@@ -292,7 +289,7 @@ int of_resolve_phandles(struct device_node *overlay) err =adjust_local_phandle_references (local_fixups, overlay, phandle_delta);if (err) - goto out; +return err; overlay_fixups =NULL ;
@@ -301,16 +298,13 @@ int of_resolve_phandles(struct device_node *overlay) overlay_fixups = child; } -if (!overlay_fixups) { - err =0 ; - goto out; - } +if (!overlay_fixups) +return 0 ; - tree_symbols =of_find_node_by_path ("/__symbols__" ); + struct device_node __free(device_node) *tree_symbols = of_find_node_by_path("/__symbols__");if (!tree_symbols) {pr_err ("no symbols in root of device tree.\n" ); - err = -EINVAL ; - goto out; +return -EINVAL ; }for_each_property_of_node (overlay_fixups, prop) {
@@ -324,14 +318,12 @@ int of_resolve_phandles(struct device_node *overlay)if (err) {pr_err ("node label '%s' not found in live devicetree symbols table\n" , prop->name); - goto out; +return err; } refnode =of_find_node_by_path (refpath); -if (!refnode) { - err = -ENOENT ; - goto out; - } +if (!refnode) +return -ENOENT ; phandle = refnode->phandle;of_node_put (refnode);
@@ -341,11 +333,8 @@ int of_resolve_phandles(struct device_node *overlay)break ; } -out:if (err)pr_err ("overlay phandle fixup failed: %d\n" , err); -of_node_put (tree_symbols); -return err; }EXPORT_SYMBOL_GPL (of_resolve_phandles);
drivers/pci/probe.c +7 -2
@@ -885,6 +885,7 @@ static int pci_register_host_bridge(struct pci_host_bridge *bridge)resource_size_t offset, next_offset;LIST_HEAD (resources);struct resource *res, *next_res; +bool bus_registered = false;char addr[64 ], *fmt;const char *name;int err;
@@ -948,6 +949,7 @@ static int pci_register_host_bridge(struct pci_host_bridge *bridge) name =dev_name (&bus->dev); err =device_register (&bus->dev); + bus_registered = true;if (err) goto unregister;
@@ -1031,12 +1033,15 @@ static int pci_register_host_bridge(struct pci_host_bridge *bridge) unregister:put_device (&bridge->dev);device_del (&bridge->dev); - free: #ifdef CONFIG_PCI_DOMAINS_GENERICpci_bus_release_domain_nr (bus ,parent );#endif -kfree (bus); +if (bus_registered) +put_device (&bus->dev); +else +kfree (bus); +return err; }
drivers/pinctrl/renesas/pinctrl-rza2.c +3 -0
@@ -243,6 +243,9 @@ static int rza2_gpio_register(struct rza2_pinctrl_priv *priv)int ret; chip.label =devm_kasprintf (priv->dev,GFP_KERNEL ,"%pOFn" , np); +if (!chip.label) +return -ENOMEM ; + chip.parent = priv->dev; chip.ngpio = priv->npins;
drivers/regulator/rk808-regulator.c +2 -2
@@ -267,8 +267,8 @@ static const unsigned int rk817_buck1_4_ramp_table[] = {static int rk806_set_mode_dcdc (struct regulator_dev *rdev,unsigned int mode) { -int rid =rdev_get_id (rdev); -int ctr_bit, reg; +unsigned int rid =rdev_get_id (rdev); +unsigned int ctr_bit, reg; reg =RK806_POWER_FPWM_EN0 + rid /8 ; ctr_bit = rid %8 ;
drivers/rtc/rtc-pcf85063.c +18 -1
@@ -35,6 +35,7 @@#define PCF85063_REG_CTRL1_CAP_SEL BIT(0)#define PCF85063_REG_CTRL1_STOP BIT(5)#define PCF85063_REG_CTRL1_EXT_TEST BIT(7) +#define PCF85063_REG_CTRL1_SWR 0x58#define PCF85063_REG_CTRL2 0x01#define PCF85063_CTRL2_AF BIT(6)
@@ -589,7 +590,7 @@ static int pcf85063_probe(struct i2c_client *client)i2c_set_clientdata (client, pcf85063); - err =regmap_read (pcf85063->regmap,PCF85063_REG_CTRL1 , &tmp); + err =regmap_read (pcf85063->regmap,PCF85063_REG_SC , &tmp);if (err) {dev_err (&client->dev,"RTC chip is not present\n" );return err;
@@ -599,6 +600,22 @@ static int pcf85063_probe(struct i2c_client *client)if (IS_ERR (pcf85063->rtc))return PTR_ERR (pcf85063->rtc); +/* +* If a Power loss is detected, SW reset the device. +* From PCF85063A datasheet: +* There is a low probability that some devices will have corruption +* of the registers after the automatic power-on reset... +*/ +if (tmp &PCF85063_REG_SC_OS ) { +dev_warn (&client->dev, +"POR issue detected, sending a SW reset\n" ); + err =regmap_write (pcf85063->regmap,PCF85063_REG_CTRL1 , +PCF85063_REG_CTRL1_SWR ); +if (err <0 ) +dev_warn (&client->dev, +"SW reset failed, trying to continue\n" ); + } + err =pcf85063_load_capacitance (pcf85063, client->dev.of_node, config->force_cap_7000 ?7000 :0 );if (err <0 )
drivers/s390/char/sclp_con.c +17 -0
@@ -263,6 +263,19 @@ static struct console sclp_console = .index = 0 /* ttyS0 */ }; +/* +* Release allocated pages. +*/ +static void __init __sclp_console_free_pages (void ) +{ +struct list_head *page, *p; + +list_for_each_safe (page, p, &sclp_con_pages) { +list_del (page); +free_page ((unsigned long )page); + } +} +/* * called by console_init() in drivers/char/tty_io.c at boot-time. */
@@ -282,6 +295,10 @@ sclp_console_init(void)/* Allocate pages for output buffering */ for (i =0 ; i < sclp_console_pages; i++) { page = (void *)get_zeroed_page (GFP_KERNEL |GFP_DMA ); +if (!page) { +__sclp_console_free_pages (); +return -ENOMEM ; + }list_add_tail (page, &sclp_con_pages); } sclp_conbuf =NULL ;
drivers/s390/char/sclp_tty.c +12 -0
@@ -490,6 +490,17 @@ static const struct tty_operations sclp_ops = { .flush_buffer = sclp_tty_flush_buffer, }; +/* Release allocated pages. */ +static void __init __sclp_tty_free_pages (void ) +{ +struct list_head *page, *p; + +list_for_each_safe (page, p, &sclp_tty_pages) { +list_del (page); +free_page ((unsigned long )page); + } +} +static int __init sclp_tty_init (void ) {
@@ -516,6 +527,7 @@ sclp_tty_init(void)for (i =0 ; i <MAX_KMEM_PAGES ; i++) { page = (void *)get_zeroed_page (GFP_KERNEL |GFP_DMA );if (page ==NULL ) { +__sclp_tty_free_pages ();tty_driver_kref_put (driver);return -ENOMEM ; }
drivers/scsi/hisi_sas/hisi_sas_main.c +20 -0
@@ -911,8 +911,28 @@ static void hisi_sas_phyup_work_common(struct work_struct *work,container_of (work,typeof (*phy), works[event]);struct hisi_hba *hisi_hba = phy->hisi_hba;struct asd_sas_phy *sas_phy = &phy->sas_phy; +struct asd_sas_port *sas_port = sas_phy->port; +struct hisi_sas_port *port = phy->port; +struct device *dev = hisi_hba->dev; +struct domain_device *port_dev;int phy_no = sas_phy->id; +if (!test_bit (HISI_SAS_RESETTING_BIT , &hisi_hba->flags) && + sas_port && port && (port->id != phy->port_id)) { +dev_info (dev,"phy%d's hw port id changed from %d to %llu\n" , + phy_no, port->id, phy->port_id); + port_dev = sas_port->port_dev; +if (port_dev && !dev_is_expander (port_dev->dev_type)) { +/* +* Set the device state to gone to block +* sending IO to the device. +*/ +set_bit (SAS_DEV_GONE , &port_dev->state); +hisi_sas_notify_phy_event (phy,HISI_PHYE_LINK_RESET ); +return ; + } + } + phy->wait_phyup_cnt =0 ;if (phy->identify.target_port_protocols ==SAS_PROTOCOL_SSP ) hisi_hba->hw->sl_notify_ssp (hisi_hba, phy_no);
drivers/scsi/pm8001/pm8001_sas.c +1 -0
@@ -719,6 +719,7 @@ static void pm8001_dev_gone_notify(struct domain_device *dev)spin_lock_irqsave (&pm8001_ha->lock, flags); }PM8001_CHIP_DISP ->dereg_dev_req (pm8001_ha, device_id); + pm8001_ha->phy[pm8001_dev->attached_phy].phy_attached =0 ;pm8001_free_dev (pm8001_dev); }else {pm8001_dbg (pm8001_ha,DISC ,"Found dev has gone.\n" );
drivers/scsi/scsi.c +24 -12
@@ -693,26 +693,23 @@ void scsi_cdl_check(struct scsi_device *sdev)*/ int scsi_cdl_enable (struct scsi_device *sdev,bool enable) { -struct scsi_mode_data data; -struct scsi_sense_hdr sshdr; -struct scsi_vpd *vpd; -bool is_ata = false;char buf[64 ]; +bool is_ata;int ret;if (!sdev->cdl_supported)return -EOPNOTSUPP ;rcu_read_lock (); - vpd =rcu_dereference (sdev->vpd_pg89); -if (vpd) - is_ata = true; + is_ata =rcu_dereference (sdev->vpd_pg89);rcu_read_unlock ();/* * For ATA devices, CDL needs to be enabled with a SET FEATURES command. */ if (is_ata) { +struct scsi_mode_data data; +struct scsi_sense_hdr sshdr;char *buf_data;int len;
@@ -721,16 +718,30 @@ int scsi_cdl_enable(struct scsi_device *sdev, bool enable)if (ret)return -EINVAL ; -/* Enable CDL using the ATA feature page */ +/* Enable or disable CDL using the ATA feature page */ len =min_t (size_t,sizeof (buf), data.length - data.header_length - data.block_descriptor_length); buf_data = buf + data.header_length + data.block_descriptor_length; -if (enable) - buf_data[4 ] =0x02 ; -else - buf_data[4 ] =0 ; + +/* +* If we want to enable CDL and CDL is already enabled on the +* device, do nothing. This avoids needlessly resetting the CDL +* statistics on the device as that is implied by the CDL enable +* action. Similar to this, there is no need to do anything if +* we want to disable CDL and CDL is already disabled. +*/ +if (enable) { +if ((buf_data[4 ] &0x03 ) ==0x02 ) + goto out; + buf_data[4 ] &= ~0x03 ; + buf_data[4 ] |=0x02 ; + }else { +if ((buf_data[4 ] &0x03 ) ==0x00 ) + goto out; + buf_data[4 ] &= ~0x03 ; + } ret =scsi_mode_select (sdev,1 ,0 , buf_data, len,5 *HZ ,3 , &data, &sshdr);
@@ -742,6 +753,7 @@ int scsi_cdl_enable(struct scsi_device *sdev, bool enable) } } +out: sdev->cdl_enable = enable;return 0 ;
drivers/scsi/scsi_lib.c +5 -1
@@ -1152,8 +1152,12 @@ EXPORT_SYMBOL_GPL(scsi_alloc_request);*/ static void scsi_cleanup_rq (struct request *rq) { +struct scsi_cmnd *cmd =blk_mq_rq_to_pdu (rq); + + cmd->flags =0 ; +if (rq->rq_flags &RQF_DONTPREP ) { -scsi_mq_uninit_cmd (blk_mq_rq_to_pdu (rq)); +scsi_mq_uninit_cmd (cmd); rq->rq_flags &= ~RQF_DONTPREP ; } }
drivers/soc/qcom/ice.c +48 -0
39 lines not on this page · raw message
drivers/usb/chipidea/ci_hdrc_imx.c +31 -13
44 lines not on this page · raw message
drivers/usb/gadget/udc/aspeed-vhub/dev.c +3 -0
Lines of this file are not shown. View the raw message.
fs/namespace.c +36 -33
69 lines not on this page · raw message
fs/smb/client/sess.c +40 -20
60 lines not on this page · raw message
include/trace/stages/stage3_trace_output.h +8 -0
Lines of this file are not shown. View the raw message.
include/trace/stages/stage7_class_define.h +1 -0
Lines of this file are not shown. View the raw message.
kernel/sched/core.c +39 -53
92 lines not on this page · raw message
kernel/sched/cpufreq_schedutil.c +49 -14
63 lines not on this page · raw message
samples/trace_events/trace-events-sample.h +15 -3
Lines of this file are not shown. View the raw message.
sound/soc/qcom/qdsp6/q6apm-dai.c +29 -32
61 lines not on this page · raw message
tools/testing/selftests/mincore/mincore_selftest.c +0 -3
Lines of this file are not shown. View the raw message.
tools/testing/selftests/ublk/test_stripe_04.sh new file +24 -0
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.