Merge 6.12.35 into android16-6.12-lts

GKI (arm64) relevant 87 out of 414 changes, affecting 112 files +738/-352
  bdb71ee651 configfs: Do not override creating attribute file failure in populate_attrs() [1 file, +1/-1]
  ba789be63d io_uring: account drain memory to cgroup [1 file, +1/-1]
  c58b577cf7 io_uring/kbuf: account ring io_buffer_list memory [1 file, +1/-1]
  f78b38af35 jbd2: fix data-race and null-ptr-deref in jbd2_journal_dirty_metadata() [1 file, +3/-2]
  2429bb9fad media: v4l2-dev: fix error handling in __video_register_device() [1 file, +7/-7]
  5d8b057ed7 media: videobuf2: use sgtable-based scatterlist wrappers [1 file, +2/-2]
  b52dc88361 media: uvcvideo: Return the number of processed controls [1 file, +10/-1]
  6d2b12e7c5 media: uvcvideo: Send control events for partial succeeds [1 file, +9/-3]
  aac91ae06c media: uvcvideo: Fix deferred probing error [1 file, +19/-8]
  86d9837e46 arm64/mm: Close theoretical race where stale TLB entry remains valid [1 file, +5/-4]
  5538af3843 block: use plug request list tail for one-shot backmerge attempt [1 file, +13/-13]
  943801c380 block: Clear BIO_EMULATES_ZONE_APPEND flag on BIO completion [1 file, +1/-0]
  1c71f3cf5f cgroup,freezer: fix incomplete freezing when attaching tasks [1 file, +1/-2]
  a0890b7805 bus: firewall: Fix missing static inline annotations for stubs [1 file, +9/-6]
  5766da2237 ext4: inline: fix len overflow in ext4_prepare_inline_data [1 file, +1/-1]
  796632e6f8 ext4: fix calculation of credits for extent tree modification [1 file, +6/-5]
  4b36399711 ext4: ensure i_size is smaller than maxbytes [1 file, +2/-1]
  be5f3061a6 ext4: only dirty folios when data journaling regular files [1 file, +6/-1]
  a0b1c91ada Input: gpio-keys - fix possible concurrent access in gpio_keys_irq_timer() [1 file, +2/-0]
  fed611bd8c f2fs: fix to do sanity check on ino and xnid [1 file, +6/-0]
  aaa644e7ff f2fs: prevent kernel warning due to negative i_nlink from corrupted image [1 file, +9/-0]
  ee1b421c46 f2fs: fix to do sanity check on sit_bitmap_size [1 file, +8/-0]
  f16a797dce watchdog: fix watchdog may detect false positive of softlockup [1 file, +27/-14]
  02137179ff mm: fix ratelimit_pages update error in dirty_ratio_handler() [1 file, +1/-1]
  462eee6d42 firmware: arm_scmi: Ensure that the message-id supports fastchannel [2 files, +45/-33]
  e3cf1ef571 dm-verity: fix a memory leak if some arguments are specified multiple times [3 files, +24/-5]
  f2986bccf2 dm: lock limits when reading them [1 file, +7/-1]
  ec5f0b4412 ovl: Fix nested backing file paths [1 file, +2/-2]
  92776ca0cc remoteproc: core: Cleanup acquired resources when rproc_handle_resources() fails in rproc_attach() [1 file, +2/-3]
  f4ef928ca5 remoteproc: core: Release rproc->clean_table after rproc_attach() fails [1 file, +1/-0]
  68e58f5791 PCI: dwc: ep: Correct PBA offset in .set_msix() callback [1 file, +3/-2]
  b20701d594 PCI: Add ACS quirk for Loongson PCIe [1 file, +23/-0]
  be0cf75cbd PCI: Fix lock symmetry in pci_slot_unlock() [1 file, +2/-1]
  7b45d2401d clocksource: Fix the CPUs' choice in the watchdog per CPU verification [1 file, +1/-1]
  c05aba32a9 ACPICA: Avoid sequence overread in call to strncmp() [1 file, +1/-1]
  66613b13cd ACPI: Add missing prototype for non CONFIG_SUSPEND/CONFIG_X86 case [1 file, +8/-1]
  33cd650d38 pmdomain: core: Reset genpd->states to avoid freeing invalid data [1 file, +3/-1]
  f34e0c1556 platform-msi: Add msi_remove_device_irq_domain() in platform_device_msi_free_irqs_all() [1 file, +1/-0]
  c519f81e9c gpiolib: of: Add polarity quirk for s5m8767 [1 file, +9/-0]
  1f152ae557 PM: runtime: fix denying of auto suspend in pm_suspend_timer_fn() [1 file, +1/-1]
  6c1151d53c tipc: use kfree_sensitive() for aead cleanup [1 file, +1/-1]
  b0e647442c f2fs: use vmalloc instead of kvmalloc in .init_{,de}compress_ctx [2 files, +15/-13]
  2d834477bb bpf: Check rcu_read_lock_trace_held() in bpf_map_lookup_percpu_elem() [1 file, +2/-1]
  77ff6aec7c cpufreq: scmi: Skip SCMI devices that aren't used by the CPUs [1 file, +35/-1]
  0a8446058c tcp: always seek for minimal rtt in tcp_rcv_rtt_update() [1 file, +8/-14]
  f97085d365 tcp: remove zero TCP TS samples for autotuning [1 file, +5/-5]
  89b20c406e tcp: fix initial tp->rcvq_space.space value for passive TS enabled flows [1 file, +3/-3]
  84c156a351 tcp: add receive queue awareness in tcp_rcv_space_adjust() [2 files, +5/-3]
  3a9e74d158 ipv4/route: Use this_cpu_inc() for stats on PREEMPT_RT [1 file, +4/-0]
  5eb9c50e0c net: page_pool: Don't recycle into cache on PREEMPT_RT [1 file, +4/-0]
  8b0741b167 xfrm: validate assignment of maximal possible SEQ number [1 file, +42/-10]
  8fdf2f79eb bpf: Pass the same orig_call value to trampoline functions [1 file, +1/-1]
  f0023d7a2a f2fs: fix to bail out in get_new_segment() [2 files, +6/-1]
  448dc45eea bpf: Use proper type to calculate bpf_raw_tp_null_args.mask index [1 file, +2/-2]
  78f768e36c net: bridge: mcast: re-implement br_multicast_{enable, disable}_port functions [1 file, +69/-8]
  4b3383110b software node: Correct a OOB check in software_node_get_reference_args() [1 file, +1/-1]
  b7129ef57d sock: Correct error checking condition for (assign|release)_proto_idx() [1 file, +2/-2]
  a58f0a0e99 f2fs: fix to set atomic write status more clear [3 files, +12/-2]
  b8b4b8bb34 bpf, sockmap: Fix data lost during EAGAIN retries [1 file, +2/-1]
  7c41f73b64 fs/xattr.c: fix simple_xattr_list() [1 file, +1/-0]
  2e10dc9c2a io_uring/kbuf: don't truncate end buffer for multiple buffer peeks [1 file, +4/-1]
  1a4254ab06 io_uring: fix task leak issue in io_wq_create() [1 file, +3/-1]
  4220cc0b98 nvme: always punt polled uring_cmd end_io work to task_work [1 file, +7/-14]
  f9b97d466e net_sched: sch_sfq: reject invalid perturb period [1 file, +8/-2]
  2a3ad42a57 net: clear the dst when changing skb protocol [1 file, +13/-6]
  510a29d776 mm: close theoretical race where stale TLB entries could linger [1 file, +2/-0]
  57ec081869 sched_ext, sched/core: Don't call scx_group_set_weight() prematurely from sched_create_group() [3 files, +9/-2]
  3d828519bd atm: Revert atm_account_tx() if copy_from_iter_full() fails. [3 files, +8/-1]
  47f34289d1 arm64: Restrict pagetable teardown to avoid false warning [1 file, +2/-1]
  9cf5b2a3b7 mm/hugetlb: unshare page tables during VMA split, not before [5 files, +57/-16]
  dc5f0aef9e net: Fix checksum update for ILA adj-transport [4 files, +7/-7]
  2516299184 bpf: Fix L4 csum update on IPv6 in CHECKSUM_COMPLETE [3 files, +7/-2]
  50189d9c5e erofs: remove unused trace event erofs_destroy_inode [1 file, +0/-18]
  348e541fef ipv6: remove leftover ip6 cookie initializer [1 file, +0/-2]
  3c44ebad5a ipv6: replace ipcm6_init calls with ipcm6_init_sk [4 files, +3/-29]
  6b358b3adf io_uring/sqpoll: don't put task_struct on tctx setup failure [1 file, +1/-4]
  8873080b88 workqueue: Initialize wq_isolated_cpumask in workqueue_init_early() [1 file, +2/-1]
  ac462a75fd net: netmem: fix skb_ensure_writable with unreadable skbs [1 file, +0/-3]
  61b39e189d ptp: allow reading of currently dialed frequency to succeed on free-running clocks [1 file, +2/-1]
  397c1faf8f tcp: fix tcp_packet_delayed() for tcp_is_non_sack_preventing_reopen() behavior [1 file, +25/-12]
  0d3d91c350 tipc: fix null-ptr-deref when acquiring remote ip of ethernet bearer [1 file, +2/-2]
  31d50dfe9c tcp: fix passive TFO socket having invalid NAPI ID [1 file, +3/-0]
  0f8df5d6f2 ublk: santizize the arguments from userspace when adding a device [1 file, +3/-0]
  456019adaa perf: Fix sample vs do_exit() [2 files, +16/-8]
  7335c33d62 perf: Fix cgroup state vs ERROR [1 file, +30/-21]
  fd199366bf perf/core: Fix WARN in perf_cgroup_switch() [1 file, +20/-2]
  22f935bc86 arm64/ptrace: Fix stack-out-of-bounds read in regs_get_kernel_stack_nth() [1 file, +1/-1]

Changes in 6.12.35
	configfs: Do not override creating attribute file failure in populate_attrs()
	crypto: marvell/cesa - Do not chain submitted requests
	gfs2: move msleep to sleepable context
	crypto: qat - add shutdown handler to qat_c3xxx
	crypto: qat - add shutdown handler to qat_420xx
	crypto: qat - add shutdown handler to qat_4xxx
	crypto: qat - add shutdown handler to qat_c62x
	crypto: qat - add shutdown handler to qat_dh895xcc
	ASoC: qcom: sdm845: Add error handling in sdm845_slim_snd_hw_params()
	ASoC: meson: meson-card-utils: use of_property_present() for DT parsing
	ASoC: amd: sof_amd_sdw: Fix unlikely uninitialized variable use in create_sdw_dailinks()
	io_uring: account drain memory to cgroup
	io_uring/kbuf: account ring io_buffer_list memory
	powerpc/pseries/msi: Avoid reading PCI device registers in reduced power states
	s390/pci: Remove redundant bus removal and disable from zpci_release_device()
	s390/pci: Prevent self deletion in disable_slot()
	s390/pci: Allow re-add of a reserved but not yet removed device
	s390/pci: Serialize device addition and removal
	regulator: max20086: Fix MAX200086 chip id
	regulator: max20086: Change enable gpio to optional
	net/mlx5_core: Add error handling inmlx5_query_nic_vport_qkey_viol_cntr()
	net/mlx5: Add error handling in mlx5_query_nic_vport_node_guid()
	wifi: p54: prevent buffer-overflow in p54_rx_eeprom_readback()
	wifi: mt76: mt7925: fix host interrupt register initialization
	wifi: ath11k: fix rx completion meta data corruption
	wifi: rtw88: usb: Upload the firmware in bigger chunks
	wifi: ath11k: fix ring-buffer corruption
	NFSD: unregister filesystem in case genl_register_family() fails
	NFSD: fix race between nfsd registration and exports_proc
	NFSD: Implement FATTR4_CLONE_BLKSIZE attribute
	nfsd: nfsd4_spo_must_allow() must check this is a v4 compound request
	nfsd: Initialize ssc before laundromat_work to prevent NULL dereference
	SUNRPC: Prevent hang on NFS mount with xprtsec=[m]tls
	NFSv4: Don't check for OPEN feature support in v4.1
	fs/nfs/read: fix double-unlock bug in nfs_return_empty_folio()
	wifi: ath12k: fix ring-buffer corruption
	jbd2: fix data-race and null-ptr-deref in jbd2_journal_dirty_metadata()
	svcrdma: Unregister the device if svc_rdma_accept() fails
	wifi: rtw88: usb: Reduce control message timeout to 500 ms
	wifi: rtlwifi: disable ASPM for RTL8723BE with subsystem ID 11ad:1723
	media: ov8856: suppress probe deferral errors
	media: ov5675: suppress probe deferral errors
	media: imx335: Use correct register width for HNUM
	media: nxp: imx8-isi: better handle the m2m usage_count
	media: i2c: ds90ub913: Fix returned fmt from .set_fmt()
	media: ccs-pll: Start VT pre-PLL multiplier search from correct value
	media: ov2740: Move pm-runtime cleanup on probe-errors to proper place
	media: ccs-pll: Start OP pre-PLL multiplier search from correct value
	media: ccs-pll: Correct the upper limit of maximum op_pre_pll_clk_div
	media: ccs-pll: Check for too high VT PLL multiplier in dual PLL case
	media: cxusb: no longer judge rbuf when the write fails
	media: davinci: vpif: Fix memory leak in probe error path
	media: gspca: Add error handling for stv06xx_read_sensor()
	media: i2c: imx335: Fix frame size enumeration
	media: imagination: fix a potential memory leak in e5010_probe()
	media: intel/ipu6: Fix dma mask for non-secure mode
	media: ipu6: Remove workaround for Meteor Lake ES2
	media: mediatek: vcodec: Correct vsi_core framebuffer size
	media: omap3isp: use sgtable-based scatterlist wrappers
	media: v4l2-dev: fix error handling in __video_register_device()
	media: venus: Fix probe error handling
	media: videobuf2: use sgtable-based scatterlist wrappers
	media: vidtv: Terminating the subsequent process of initialization failure
	media: vivid: Change the siize of the composing
	media: imx-jpeg: Drop the first error frames
	media: imx-jpeg: Move mxc_jpeg_free_slot_data() ahead
	media: imx-jpeg: Reset slot data pointers when freed
	media: imx-jpeg: Cleanup after an allocation error
	media: uvcvideo: Return the number of processed controls
	media: uvcvideo: Send control events for partial succeeds
	media: uvcvideo: Fix deferred probing error
	arm64/mm: Close theoretical race where stale TLB entry remains valid
	ARM: 9447/1: arm/memremap: fix arch_memremap_can_ram_remap()
	ARM: omap: pmic-cpcap: do not mess around without CPCAP or OMAP4
	ASoC: codecs: wcd9375: Fix double free of regulator supplies
	ASoC: codecs: wcd937x: Drop unused buck_supply
	block: use plug request list tail for one-shot backmerge attempt
	block: Clear BIO_EMULATES_ZONE_APPEND flag on BIO completion
	bus: mhi: ep: Update read pointer only after buffer is written
	bus: mhi: host: Fix conflict between power_up and SYSERR
	can: kvaser_pciefd: refine error prone echo_skb_max handling logic
	can: tcan4x5x: fix power regulator retrieval during probe
	ceph: avoid kernel BUG for encrypted inode with unaligned file size
	ceph: set superblock s_magic for IMA fsmagic matching
	cgroup,freezer: fix incomplete freezing when attaching tasks
	bus: firewall: Fix missing static inline annotations for stubs
	ata: pata_via: Force PIO for ATAPI devices on VT6415/VT6330
	ata: ahci: Disallow LPM for ASUSPRO-D840SA motherboard
	ata: ahci: Disallow LPM for Asus B550-F motherboard
	bus: fsl-mc: do not add a device-link for the UAPI used DPMCP device
	bus: fsl-mc: fix GET/SET_TAILDROP command ids
	ext4: inline: fix len overflow in ext4_prepare_inline_data
	ext4: fix calculation of credits for extent tree modification
	ext4: factor out ext4_get_maxbytes()
	ext4: ensure i_size is smaller than maxbytes
	ext4: only dirty folios when data journaling regular files
	Input: ims-pcu - check record size in ims_pcu_flash_firmware()
	Input: gpio-keys - fix possible concurrent access in gpio_keys_irq_timer()
	f2fs: fix to do sanity check on ino and xnid
	f2fs: prevent kernel warning due to negative i_nlink from corrupted image
	f2fs: fix to do sanity check on sit_bitmap_size
	hwmon: (ftsteutates) Fix TOCTOU race in fts_read()
	NFC: nci: uart: Set tty->disc_data only in success path
	net/sched: fix use-after-free in taprio_dev_notifier
	net: ftgmac100: select FIXED_PHY
	iommu/vt-d: Restore context entry setup order for aliased devices
	fbdev: Fix do_register_framebuffer to prevent null-ptr-deref in fb_videomode_to_var
	EDAC/altera: Use correct write width with the INTTEST register
	fbdev: Fix fb_set_var to prevent null-ptr-deref in fb_videomode_to_var
	parisc/unaligned: Fix hex output to show 8 hex chars
	vgacon: Add check for vc_origin address range in vgacon_scroll()
	parisc: fix building with gcc-15
	clk: meson-g12a: add missing fclk_div2 to spicc
	ipc: fix to protect IPCS lookups using RCU
	watchdog: fix watchdog may detect false positive of softlockup
	RDMA/iwcm: Fix use-after-free of work objects after cm_id destruction
	mm: fix ratelimit_pages update error in dirty_ratio_handler()
	soc: qcom: pmic_glink_altmode: fix spurious DP hotplug events
	configfs-tsm-report: Fix NULL dereference of tsm_ops
	firmware: arm_scmi: Ensure that the message-id supports fastchannel
	mtd: rawnand: sunxi: Add randomizer configuration in sunxi_nfc_hw_ecc_write_chunk
	mtd: nand: sunxi: Add randomizer configuration before randomizer enable
	KVM: SVM: Clear current_vmcb during vCPU free for all *possible* CPUs
	KVM: VMX: Flush shadow VMCS on emergency reboot
	dm-mirror: fix a tiny race condition
	dm-verity: fix a memory leak if some arguments are specified multiple times
	mtd: rawnand: qcom: Fix read len for onfi param page
	ftrace: Fix UAF when lookup kallsym after ftrace disabled
	dm: lock limits when reading them
	phy: fsl-imx8mq-usb: fix phy_tx_vboost_level_from_property()
	net: ch9200: fix uninitialised access during mii_nway_restart
	KVM: s390: rename PROT_NONE to PROT_TYPE_DUMMY
	sysfb: Fix screen_info type check for VGA
	video: screen_info: Relocate framebuffers behind PCI bridges
	pwm: axi-pwmgen: fix missing separate external clock
	staging: iio: ad5933: Correct settling cycles encoding per datasheet
	mips: Add -std= flag specified in KBUILD_CFLAGS to vdso CFLAGS
	ovl: Fix nested backing file paths
	regulator: max14577: Add error check for max14577_read_reg()
	remoteproc: core: Cleanup acquired resources when rproc_handle_resources() fails in rproc_attach()
	remoteproc: core: Release rproc->clean_table after rproc_attach() fails
	remoteproc: k3-m4: Don't assert reset in detach routine
	cifs: reset connections for all channels when reconnect requested
	cifs: update dstaddr whenever channel iface is updated
	cifs: dns resolution is needed only for primary channel
	smb: client: add NULL check in automount_fullpath
	Drivers: hv: Allocate interrupt and monitor pages aligned to system page boundary
	uio_hv_generic: Use correct size for interrupt and monitor pages
	uio_hv_generic: Align ring size to system page
	PCI: cadence-ep: Correct PBA offset in .set_msix() callback
	PCI: dwc: ep: Correct PBA offset in .set_msix() callback
	PCI: Add ACS quirk for Loongson PCIe
	PCI: Fix lock symmetry in pci_slot_unlock()
	PCI: dw-rockchip: Remove PCIE_L0S_ENTRY check from rockchip_pcie_link_up()
	PCI: dw-rockchip: Fix PHY function call sequence in rockchip_pcie_phy_deinit()
	iio: accel: fxls8962af: Fix temperature scan element sign
	accel/ivpu: Improve buffer object logging
	accel/ivpu: Use firmware names from upstream repo
	accel/ivpu: Use dma_resv_lock() instead of a custom mutex
	accel/ivpu: Fix warning in ivpu_gem_bo_free()
	dummycon: Trigger redraw when switching consoles with deferred takeover
	mm/hugetlb: fix huge_pmd_unshare() vs GUP-fast race
	iio: imu: inv_icm42600: Fix temperature calculation
	iio: adc: ad7944: mask high bits on direct read
	iio: adc: ti-ads1298: Kconfig: add kfifo dependency to fix module build
	iio: adc: ad7606_spi: fix reg write value mask
	ACPICA: fix acpi operand cache leak in dswstate.c
	ASoC: amd: yc: Add quirk for Lenovo Yoga Pro 7 14ASP9
	clocksource: Fix the CPUs' choice in the watchdog per CPU verification
	power: supply: collie: Fix wakeup source leaks on device unbind
	mmc: Add quirk to disable DDR50 tuning
	ACPICA: Avoid sequence overread in call to strncmp()
	ASoC: tas2770: Power cycle amp on ISENSE/VSENSE change
	ASoC: intel/sdw_utils: Assign initial value in asoc_sdw_rt_amp_spk_rtd_init()
	ACPI: bus: Bail out if acpi_kobj registration fails
	ACPI: Add missing prototype for non CONFIG_SUSPEND/CONFIG_X86 case
	ACPICA: fix acpi parse and parseext cache leaks
	ACPICA: Apply pack(1) to union aml_resource
	ALSA: hda: cs35l41: Fix swapped l/r audio channels for Acer Helios laptops
	power: supply: bq27xxx: Retrieve again when busy
	pmdomain: core: Reset genpd->states to avoid freeing invalid data
	ACPICA: utilities: Fix overflow check in vsnprintf()
	platform-msi: Add msi_remove_device_irq_domain() in platform_device_msi_free_irqs_all()
	ASoC: tegra210_ahub: Add check to of_device_get_match_data()
	Make 'cc-option' work correctly for the -Wno-xyzzy pattern
	gpiolib: of: Add polarity quirk for s5m8767
	PM: runtime: fix denying of auto suspend in pm_suspend_timer_fn()
	power: supply: max17040: adjust thermal channel scaling
	ACPI: battery: negate current when discharging
	net: macb: Check return value of dma_set_mask_and_coherent()
	net: lan743x: Modify the EEPROM and OTP size for PCI1xxxx devices
	tipc: use kfree_sensitive() for aead cleanup
	f2fs: use vmalloc instead of kvmalloc in .init_{,de}compress_ctx
	bpf: Check rcu_read_lock_trace_held() in bpf_map_lookup_percpu_elem()
	Bluetooth: btusb: Add new VID/PID 13d3/3584 for MT7922
	i2c: designware: Invoke runtime suspend on quick slave re-registration
	wifi: mt76: mt7996: drop fragments with multicast or broadcast RA
	emulex/benet: correct command version selection in be_cmd_get_stats()
	Bluetooth: btusb: Add new VID/PID 13d3/3630 for MT7925
	wifi: mt76: mt76x2: Add support for LiteOn WN4516R,WN4519R
	wifi: mt76: mt7921: add 160 MHz AP for mt7922 device
	wifi: mt76: mt7925: introduce thermal protection
	wifi: mac80211: validate SCAN_FLAG_AP in scan request during MLO
	sctp: Do not wake readers in __sctp_write_space()
	libbpf/btf: Fix string handling to support multi-split BTF
	cpufreq: scmi: Skip SCMI devices that aren't used by the CPUs
	i2c: tegra: check msg length in SMBUS block read
	i2c: npcm: Add clock toggle recovery
	clk: qcom: gcc-x1e80100: Set FORCE MEM CORE for UFS clocks
	net: dlink: add synchronization for stats update
	wifi: ath12k: fix macro definition HAL_RX_MSDU_PKT_LENGTH_GET
	wifi: ath12k: fix a possible dead lock caused by ab->base_lock
	wifi: ath11k: Fix QMI memory reuse logic
	iommu/amd: Allow matching ACPI HID devices without matching UIDs
	wifi: rtw89: leave idle mode when setting WEP encryption for AP mode
	tcp: always seek for minimal rtt in tcp_rcv_rtt_update()
	tcp: remove zero TCP TS samples for autotuning
	tcp: fix initial tp->rcvq_space.space value for passive TS enabled flows
	tcp: add receive queue awareness in tcp_rcv_space_adjust()
	x86/sgx: Prevent attempts to reclaim poisoned pages
	ipv4/route: Use this_cpu_inc() for stats on PREEMPT_RT
	net: page_pool: Don't recycle into cache on PREEMPT_RT
	xfrm: validate assignment of maximal possible SEQ number
	net: atlantic: generate software timestamp just before the doorbell
	pinctrl: armada-37xx: propagate error from armada_37xx_pmx_set_by_name()
	pinctrl: armada-37xx: propagate error from armada_37xx_gpio_get_direction()
	bpf: Pass the same orig_call value to trampoline functions
	net: stmmac: generate software timestamp just before the doorbell
	pinctrl: armada-37xx: propagate error from armada_37xx_pmx_gpio_set_direction()
	libbpf: Check bpf_map_skeleton link for NULL
	pinctrl: armada-37xx: propagate error from armada_37xx_gpio_get()
	net: mlx4: add SOF_TIMESTAMPING_TX_SOFTWARE flag when getting ts info
	net: vertexcom: mse102x: Return code for mse102x_rx_pkt_spi
	wireless: purelifi: plfxlc: fix memory leak in plfxlc_usb_wreq_asyn()
	wifi: mac80211: do not offer a mesh path if forwarding is disabled
	clk: rockchip: rk3036: mark ddrphy as critical
	hid-asus: check ROG Ally MCU version and warn
	wifi: iwlwifi: mvm: fix beacon CCK flag
	f2fs: fix to bail out in get_new_segment()
	netfilter: nft_set_pipapo: clamp maximum map bucket size to INT_MAX
	libbpf: Add identical pointer detection to btf_dedup_is_equiv()
	scsi: lpfc: Fix lpfc_check_sli_ndlp() handling for GEN_REQUEST64 commands
	scsi: smartpqi: Add new PCI IDs
	iommu/amd: Ensure GA log notifier callbacks finish running before module unload
	wifi: iwlwifi: pcie: make sure to lock rxq->read
	wifi: rtw89: 8922a: fix TX fail with wrong VCO setting
	wifi: mac80211_hwsim: Prevent tsf from setting if beacon is disabled
	netdevsim: Mark NAPI ID on skb in nsim_rcv
	net/mlx5: HWS, Fix IP version decision
	bpf: Use proper type to calculate bpf_raw_tp_null_args.mask index
	wifi: mac80211: VLAN traffic in multicast path
	Revert "mac80211: Dynamically set CoDel parameters per station"
	wifi: iwlwifi: Add missing MODULE_FIRMWARE for Qu-c0-jf-b0
	net: bridge: mcast: update multicast contex when vlan state is changed
	net: bridge: mcast: re-implement br_multicast_{enable, disable}_port functions
	vxlan: Do not treat dst cache initialization errors as fatal
	bnxt_en: Remove unused field "ref_count" in struct bnxt_ulp
	wifi: ath12k: using msdu end descriptor to check for rx multicast packets
	net: ethernet: ti: am65-cpsw: handle -EPROBE_DEFER
	software node: Correct a OOB check in software_node_get_reference_args()
	isofs: fix Y2038 and Y2156 issues in Rock Ridge TF entry
	pinctrl: mcp23s08: Reset all pins to input at probe
	wifi: ath12k: fix failed to set mhi state error during reboot with hardware grouping
	scsi: lpfc: Use memcpy() for BIOS version
	sock: Correct error checking condition for (assign|release)_proto_idx()
	i40e: fix MMIO write access to an invalid page in i40e_clear_hw
	ixgbe: Fix unreachable retry logic in combined and byte I2C write functions
	RDMA/hns: initialize db in update_srq_db()
	ice: fix check for existing switch rule
	usbnet: asix AX88772: leave the carrier control to phylink
	f2fs: fix to set atomic write status more clear
	bpf, sockmap: Fix data lost during EAGAIN retries
	net: ethernet: cortina: Use TOE/TSO on all TCP
	octeontx2-pf: Add error log forcn10k_map_unmap_rq_policer()
	wifi: ath11k: determine PM policy based on machine model
	wifi: ath12k: fix link valid field initialization in the monitor Rx
	wifi: ath12k: fix incorrect CE addresses
	wifi: ath12k: Pass correct values of center freq1 and center freq2 for 160 MHz
	net/mlx5: HWS, Harden IP version definer checks
	fbcon: Make sure modelist not set on unregistered console
	watchdog: da9052_wdt: respect TWDMIN
	bus: fsl-mc: increase MC_CMD_COMPLETION_TIMEOUT_MS value
	ARM: OMAP2+: Fix l4ls clk domain handling in STANDBY
	tee: Prevent size calculation wraparound on 32-bit kernels
	Revert "bus: ti-sysc: Probe for l4_wkup and l4_cfg interconnect devices first"
	fs/xattr.c: fix simple_xattr_list()
	platform/x86/amd: pmc: Clear metrics table at start of cycle
	platform/x86/amd: pmf: Prevent amd_pmf_tee_deinit() from running twice
	platform/x86: dell_rbu: Fix list usage
	platform/x86: dell_rbu: Stop overwriting data buffer
	powerpc/vdso: Fix build of VDSO32 with pcrel
	powerpc/eeh: Fix missing PE bridge reconfiguration during VFIO EEH recovery
	io_uring/kbuf: don't truncate end buffer for multiple buffer peeks
	io_uring: fix task leak issue in io_wq_create()
	drivers/rapidio/rio_cm.c: prevent possible heap overwrite
	platform/loongarch: laptop: Get brightness setting from EC on probe
	platform/loongarch: laptop: Unregister generic_sub_drivers on exit
	platform/loongarch: laptop: Add backlight power control support
	LoongArch: vDSO: Correctly use asm parameters in syscall wrappers
	LoongArch: Avoid using $r0/$r1 as "mask" for csrxchg
	LoongArch: Fix panic caused by NULL-PMD in huge_pte_offset()
	jffs2: check that raw node were preallocated before writing summary
	jffs2: check jffs2_prealloc_raw_node_refs() result in few other places
	cifs: deal with the channel loading lag while picking channels
	cifs: serialize other channels when query server interfaces is pending
	cifs: do not disable interface polling on failure
	smb: improve directory cache reuse for readdir operations
	scsi: storvsc: Increase the timeouts to storvsc_timeout
	scsi: s390: zfcp: Ensure synchronous unit_add
	nvme: always punt polled uring_cmd end_io work to task_work
	net_sched: sch_sfq: reject invalid perturb period
	net: clear the dst when changing skb protocol
	mm: close theoretical race where stale TLB entries could linger
	udmabuf: use sgtable-based scatterlist wrappers
	x86/virt/tdx: Avoid indirect calls to TDX assembly functions
	selftests/x86: Add a test to detect infinite SIGTRAP handler loop
	ksmbd: fix null pointer dereference in destroy_previous_session
	platform/x86: ideapad-laptop: use usleep_range() for EC polling
	selinux: fix selinux_xfrm_alloc_user() to set correct ctx_len
	platform/x86/intel-uncore-freq: Fail module load when plat_info is NULL
	sched_ext, sched/core: Don't call scx_group_set_weight() prematurely from sched_create_group()
	atm: Revert atm_account_tx() if copy_from_iter_full() fails.
	wifi: rtw89: phy: add dummy C2H event handler for report of TAS power
	cpufreq/amd-pstate: Add missing NULL ptr check in amd_pstate_update
	Input: sparcspkr - avoid unannotated fall-through
	wifi: ath12k: Clear affinity hint before calling ath12k_pci_free_irq() in error path
	wifi: cfg80211: init wiphy_work before allocating rfkill fails
	arm64: Restrict pagetable teardown to avoid false warning
	ALSA: usb-audio: Rename ALSA kcontrol PCM and PCM1 for the KTMicro sound card
	ALSA: hda/intel: Add Thinkpad E15 to PM deny list
	ALSA: hda/realtek - Add mute LED support for HP Victus 16-s1xxx and HP Victus 15-fa1xxx
	ALSA: hda/realtek: enable headset mic on Latitude 5420 Rugged
	ALSA: hda/realtek: Fix built-in mic on ASUS VivoBook X513EA
	ALSA: hda/realtek: Add quirk for Asus GU605C
	iio: accel: fxls8962af: Fix temperature calculation
	mm/hugetlb: unshare page tables during VMA split, not before
	drm/amdgpu: read back register after written for VCN v4.0.5
	kbuild: rust: add rustc-min-version support function
	rust: compile libcore with edition 2024 for 1.87+
	net: Fix checksum update for ILA adj-transport
	bpf: Fix L4 csum update on IPv6 in CHECKSUM_COMPLETE
	erofs: remove unused trace event erofs_destroy_inode
	nfsd: use threads array as-is in netlink interface
	sunrpc: handle SVC_GARBAGE during svc auth processing as auth error
	drm/v3d: Avoid NULL pointer dereference in `v3d_job_update_stats()`
	Kunit to check the longest symbol length
	x86/tools: Drop duplicate unlikely() definition in insn_decoder_test.c
	ipv6: remove leftover ip6 cookie initializer
	ipv6: replace ipcm6_init calls with ipcm6_init_sk
	smb: fix secondary channel creation issue with kerberos by populating hostname when adding channels
	drm/msm/disp: Correct porch timing for SDM845
	drm/msm/dsi/dsi_phy_10nm: Fix missing initial VCO rate
	drm/msm: Fix CP_RESET_CONTEXT_STATE bitfield names
	drm/msm/a7xx: Call CP_RESET_CONTEXT_STATE
	drm/ssd130x: fix ssd132x_clear_screen() columns
	ionic: Prevent driver/fw getting out of sync on devcmd(s)
	drm/nouveau/bl: increase buffer size to avoid truncate warning
	drm/i915/pmu: Fix build error with GCOV and AutoFDO enabled
	hwmon: (occ) Rework attribute registration for stack usage
	hwmon: (occ) fix unaligned accesses
	hwmon: (ltc4282) avoid repeated register write
	pldmfw: Select CRC32 when PLDMFW is selected
	aoe: clean device rq_list in aoedev_downdev()
	io_uring/sqpoll: don't put task_struct on tctx setup failure
	net: ice: Perform accurate aRFS flow match
	ice: fix eswitch code memory leak in reset scenario
	e1000e: set fixed clock frequency indication for Nahum 11 and Nahum 13
	workqueue: Initialize wq_isolated_cpumask in workqueue_init_early()
	ksmbd: add free_transport ops in ksmbd connection
	net: netmem: fix skb_ensure_writable with unreadable skbs
	bnxt_en: Fix double invocation of bnxt_ulp_stop()/bnxt_ulp_start()
	eth: bnxt: fix out-of-range access of vnic_info array
	bnxt_en: Add a helper function to configure MRU and RSS
	bnxt_en: Update MRU and RSS table of RSS contexts on queue reset
	ptp: fix breakage after ptp_vclock_in_use() rework
	ptp: allow reading of currently dialed frequency to succeed on free-running clocks
	wifi: carl9170: do not ping device which has failed to load firmware
	mpls: Use rcu_dereference_rtnl() in mpls_route_input_rcu().
	atm: atmtcp: Free invalid length skb in atmtcp_c_send().
	tcp: fix tcp_packet_delayed() for tcp_is_non_sack_preventing_reopen() behavior
	tipc: fix null-ptr-deref when acquiring remote ip of ethernet bearer
	tcp: fix passive TFO socket having invalid NAPI ID
	eth: fbnic: avoid double free when failing to DMA-map FW msg
	net: lan743x: fix potential out-of-bounds write in lan743x_ptp_io_event_clock_get()
	ublk: santizize the arguments from userspace when adding a device
	drm/xe: Wire up device shutdown handler
	drm/xe/gt: Update handling of xe_force_wake_get return
	drm/xe/bmg: Update Wa_16023588340
	calipso: Fix null-ptr-deref in calipso_req_{set,del}attr().
	mlxbf_gige: return EPROBE_DEFER if PHY IRQ is not available
	net: atm: add lec_mutex
	net: atm: fix /proc/net/atm/lec handling
	EDAC/amd64: Correct number of UMCs for family 19h models 70h-7fh
	dt-bindings: i2c: nvidia,tegra20-i2c: Specify the required properties
	smb: Log an error when close_all_cached_dirs fails
	serial: sh-sci: Clean sci_ports[0] after at earlycon exit
	serial: sh-sci: Increment the runtime usage counter for the earlycon device
	smb: client: fix first command failure during re-negotiation
	smb: client: fix max_sge overflow in smb_extract_folioq_to_rdma()
	s390/pci: Fix __pcilg_mio_inuser() inline assembly
	perf: Fix sample vs do_exit()
	perf: Fix cgroup state vs ERROR
	perf/core: Fix WARN in perf_cgroup_switch()
	arm64/ptrace: Fix stack-out-of-bounds read in regs_get_kernel_stack_nth()
	scsi: elx: efct: Fix memory leak in efct_hw_parse_filter()
	RISC-V: KVM: Fix the size parameter check in SBI SFENCE calls
	RISC-V: KVM: Don't treat SBI HFENCE calls as NOPs
	gpio: pca953x: fix wrong error probe return value
	perf evsel: Missed close() when probing hybrid core PMUs
	perf test: Directory file descriptor leak
	gpio: mlxbf3: only get IRQ for device instance 0
	cifs: Remove duplicate fattr->cf_dtype assignment from wsl_to_fattr() function
	bpftool: Fix cgroup command to only show cgroup bpf programs
	Linux 6.12.35

Change-Id: Ida57d269272a624bedb979bfad0b3c5e7df7e846
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Greg Kroah-Hartman
2025-07-09 09:08:40 +00:00
432 changed files with 3745 additions and 1686 deletions

View File

@@ -97,7 +97,10 @@ properties:
resets:
items:
- description: module reset
- description:
Module reset. This property is optional for controllers in Tegra194,
Tegra234 etc where an internal software reset is available as an
alternative.
reset-names:
items:
@@ -116,6 +119,13 @@ properties:
- const: rx
- const: tx
required:
- compatible
- reg
- interrupts
- clocks
- clock-names
allOf:
- $ref: /schemas/i2c/i2c-controller.yaml
- if:
@@ -169,6 +179,18 @@ allOf:
properties:
power-domains: false
- if:
not:
properties:
compatible:
contains:
enum:
- nvidia,tegra194-i2c
then:
required:
- resets
- reset-names
unevaluatedProperties: false
examples:

View File

@@ -656,6 +656,20 @@ cc-cross-prefix
endif
endif
$(RUSTC) support functions
--------------------------
rustc-min-version
rustc-min-version tests if the value of $(CONFIG_RUSTC_VERSION) is greater
than or equal to the provided value and evaluates to y if so.
Example::
rustflags-$(call rustc-min-version, 108500) := -Cfoo
In this example, rustflags-y will be assigned the value -Cfoo if
$(CONFIG_RUSTC_VERSION) is >= 1.85.0.
$(LD) support functions
-----------------------

View File

@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 6
PATCHLEVEL = 12
SUBLEVEL = 34
SUBLEVEL = 35
EXTRAVERSION =
NAME = Baby Opossum Posse

View File

@@ -48,6 +48,7 @@
#define CLKDM_NO_AUTODEPS (1 << 4)
#define CLKDM_ACTIVE_WITH_MPU (1 << 5)
#define CLKDM_MISSING_IDLE_REPORTING (1 << 6)
#define CLKDM_STANDBY_FORCE_WAKEUP BIT(7)
#define CLKDM_CAN_HWSUP (CLKDM_CAN_ENABLE_AUTO | CLKDM_CAN_DISABLE_AUTO)
#define CLKDM_CAN_SWSUP (CLKDM_CAN_FORCE_SLEEP | CLKDM_CAN_FORCE_WAKEUP)

View File

@@ -19,7 +19,7 @@ static struct clockdomain l4ls_am33xx_clkdm = {
.pwrdm = { .name = "per_pwrdm" },
.cm_inst = AM33XX_CM_PER_MOD,
.clkdm_offs = AM33XX_CM_PER_L4LS_CLKSTCTRL_OFFSET,
.flags = CLKDM_CAN_SWSUP,
.flags = CLKDM_CAN_SWSUP | CLKDM_STANDBY_FORCE_WAKEUP,
};
static struct clockdomain l3s_am33xx_clkdm = {

View File

@@ -20,6 +20,9 @@
#include "cm-regbits-34xx.h"
#include "cm-regbits-33xx.h"
#include "prm33xx.h"
#if IS_ENABLED(CONFIG_SUSPEND)
#include <linux/suspend.h>
#endif
/*
* CLKCTRL_IDLEST_*: possible values for the CM_*_CLKCTRL.IDLEST bitfield:
@@ -328,8 +331,17 @@ static int am33xx_clkdm_clk_disable(struct clockdomain *clkdm)
{
bool hwsup = false;
#if IS_ENABLED(CONFIG_SUSPEND)
/*
* In case of standby, Don't put the l4ls clk domain to sleep.
* Since CM3 PM FW doesn't wake-up/enable the l4ls clk domain
* upon wake-up, CM3 PM FW fails to wake-up th MPU.
*/
if (pm_suspend_target_state == PM_SUSPEND_STANDBY &&
(clkdm->flags & CLKDM_STANDBY_FORCE_WAKEUP))
return 0;
#endif
hwsup = am33xx_cm_is_clkdm_in_hwsup(clkdm->cm_inst, clkdm->clkdm_offs);
if (!hwsup && (clkdm->flags & CLKDM_CAN_FORCE_SLEEP))
am33xx_clkdm_sleep(clkdm);

View File

@@ -264,7 +264,11 @@ int __init omap4_cpcap_init(void)
static int __init cpcap_late_init(void)
{
omap4_vc_set_pmic_signaling(PWRDM_POWER_RET);
if (!of_find_compatible_node(NULL, NULL, "motorola,cpcap"))
return 0;
if (soc_is_omap443x() || soc_is_omap446x() || soc_is_omap447x())
omap4_vc_set_pmic_signaling(PWRDM_POWER_RET);
return 0;
}

View File

@@ -515,7 +515,5 @@ void __init early_ioremap_init(void)
bool arch_memremap_can_ram_remap(resource_size_t offset, size_t size,
unsigned long flags)
{
unsigned long pfn = PHYS_PFN(offset);
return memblock_is_map_memory(pfn);
return memblock_is_map_memory(offset);
}

View File

@@ -48,7 +48,7 @@ KBUILD_CFLAGS += $(CC_FLAGS_NO_FPU) \
KBUILD_CFLAGS += $(call cc-disable-warning, psabi)
KBUILD_AFLAGS += $(compat_vdso)
ifeq ($(call test-ge, $(CONFIG_RUSTC_VERSION), 108500),y)
ifeq ($(call rustc-min-version, 108500),y)
KBUILD_RUSTFLAGS += --target=aarch64-unknown-none-softfloat
else
KBUILD_RUSTFLAGS += --target=aarch64-unknown-none -Ctarget-feature="-neon"

View File

@@ -330,13 +330,14 @@ static inline void arch_tlbbatch_add_pending(struct arch_tlbflush_unmap_batch *b
}
/*
* If mprotect/munmap/etc occurs during TLB batched flushing, we need to
* synchronise all the TLBI issued with a DSB to avoid the race mentioned in
* flush_tlb_batched_pending().
* If mprotect/munmap/etc occurs during TLB batched flushing, we need to ensure
* all the previously issued TLBIs targeting mm have completed. But since we
* can be executing on a remote CPU, a DSB cannot guarantee this like it can
* for arch_tlbbatch_flush(). Our only option is to flush the entire mm.
*/
static inline void arch_flush_tlb_batched_pending(struct mm_struct *mm)
{
dsb(ish);
flush_tlb_mm(mm);
}
/*

View File

@@ -142,7 +142,7 @@ unsigned long regs_get_kernel_stack_nth(struct pt_regs *regs, unsigned int n)
addr += n;
if (regs_within_kernel_stack(regs, (unsigned long)addr))
return *addr;
return READ_ONCE_NOCHECK(*addr);
else
return 0;
}

View File

@@ -1286,7 +1286,8 @@ int pud_free_pmd_page(pud_t *pudp, unsigned long addr)
next = addr;
end = addr + PUD_SIZE;
do {
pmd_free_pte_page(pmdp, next);
if (pmd_present(pmdp_get(pmdp)))
pmd_free_pte_page(pmdp, next);
} while (pmdp++, next += PMD_SIZE, next != end);
pud_clear(pudp);

View File

@@ -14,40 +14,48 @@
static inline void arch_local_irq_enable(void)
{
u32 flags = CSR_CRMD_IE;
register u32 mask asm("t0") = CSR_CRMD_IE;
__asm__ __volatile__(
"csrxchg %[val], %[mask], %[reg]\n\t"
: [val] "+r" (flags)
: [mask] "r" (CSR_CRMD_IE), [reg] "i" (LOONGARCH_CSR_CRMD)
: [mask] "r" (mask), [reg] "i" (LOONGARCH_CSR_CRMD)
: "memory");
}
static inline void arch_local_irq_disable(void)
{
u32 flags = 0;
register u32 mask asm("t0") = CSR_CRMD_IE;
__asm__ __volatile__(
"csrxchg %[val], %[mask], %[reg]\n\t"
: [val] "+r" (flags)
: [mask] "r" (CSR_CRMD_IE), [reg] "i" (LOONGARCH_CSR_CRMD)
: [mask] "r" (mask), [reg] "i" (LOONGARCH_CSR_CRMD)
: "memory");
}
static inline unsigned long arch_local_irq_save(void)
{
u32 flags = 0;
register u32 mask asm("t0") = CSR_CRMD_IE;
__asm__ __volatile__(
"csrxchg %[val], %[mask], %[reg]\n\t"
: [val] "+r" (flags)
: [mask] "r" (CSR_CRMD_IE), [reg] "i" (LOONGARCH_CSR_CRMD)
: [mask] "r" (mask), [reg] "i" (LOONGARCH_CSR_CRMD)
: "memory");
return flags;
}
static inline void arch_local_irq_restore(unsigned long flags)
{
register u32 mask asm("t0") = CSR_CRMD_IE;
__asm__ __volatile__(
"csrxchg %[val], %[mask], %[reg]\n\t"
: [val] "+r" (flags)
: [mask] "r" (CSR_CRMD_IE), [reg] "i" (LOONGARCH_CSR_CRMD)
: [mask] "r" (mask), [reg] "i" (LOONGARCH_CSR_CRMD)
: "memory");
}

View File

@@ -20,7 +20,7 @@ static __always_inline ssize_t getrandom_syscall(void *_buffer, size_t _len, uns
asm volatile(
" syscall 0\n"
: "+r" (ret)
: "=r" (ret)
: "r" (nr), "r" (buffer), "r" (len), "r" (flags)
: "$t0", "$t1", "$t2", "$t3", "$t4", "$t5", "$t6", "$t7", "$t8",
"memory");

View File

@@ -25,7 +25,7 @@ static __always_inline long gettimeofday_fallback(
asm volatile(
" syscall 0\n"
: "+r" (ret)
: "=r" (ret)
: "r" (nr), "r" (tv), "r" (tz)
: "$t0", "$t1", "$t2", "$t3", "$t4", "$t5", "$t6", "$t7",
"$t8", "memory");
@@ -44,7 +44,7 @@ static __always_inline long clock_gettime_fallback(
asm volatile(
" syscall 0\n"
: "+r" (ret)
: "=r" (ret)
: "r" (nr), "r" (clkid), "r" (ts)
: "$t0", "$t1", "$t2", "$t3", "$t4", "$t5", "$t6", "$t7",
"$t8", "memory");
@@ -63,7 +63,7 @@ static __always_inline int clock_getres_fallback(
asm volatile(
" syscall 0\n"
: "+r" (ret)
: "=r" (ret)
: "r" (nr), "r" (clkid), "r" (ts)
: "$t0", "$t1", "$t2", "$t3", "$t4", "$t5", "$t6", "$t7",
"$t8", "memory");

View File

@@ -47,7 +47,8 @@ pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr,
pmd = pmd_offset(pud, addr);
}
}
return pmd_none(pmdp_get(pmd)) ? NULL : (pte_t *) pmd;
return (!pmd || pmd_none(pmdp_get(pmd))) ? NULL : (pte_t *) pmd;
}
uint64_t pmd_to_entrylo(unsigned long pmd_val)

View File

@@ -27,6 +27,7 @@ endif
# offsets.
cflags-vdso := $(ccflags-vdso) \
$(filter -W%,$(filter-out -Wa$(comma)%,$(KBUILD_CFLAGS))) \
$(filter -std=%,$(KBUILD_CFLAGS)) \
-O3 -g -fPIC -fno-strict-aliasing -fno-common -fno-builtin -G 0 \
-mrelax-pic-calls $(call cc-option, -mexplicit-relocs) \
-fno-stack-protector -fno-jump-tables -DDISABLE_BRANCH_PROFILING \

View File

@@ -18,6 +18,7 @@ KBUILD_CFLAGS += -fno-PIE -mno-space-regs -mdisable-fpregs -Os
ifndef CONFIG_64BIT
KBUILD_CFLAGS += -mfast-indirect-calls
endif
KBUILD_CFLAGS += -std=gnu11
LDFLAGS_vmlinux := -X -e startup --as-needed -T
$(obj)/vmlinux: $(obj)/vmlinux.lds $(addprefix $(obj)/, $(OBJECTS)) $(LIBGCC) FORCE

View File

@@ -25,7 +25,7 @@
#define DPRINTF(fmt, args...)
#endif
#define RFMT "%#08lx"
#define RFMT "0x%08lx"
/* 1111 1100 0000 0000 0001 0011 1100 0000 */
#define OPCODE1(a,b,c) ((a)<<26|(b)<<12|(c)<<6)

View File

@@ -183,7 +183,7 @@
/*
* Used to name C functions called from asm
*/
#ifdef CONFIG_PPC_KERNEL_PCREL
#if defined(__powerpc64__) && defined(CONFIG_PPC_KERNEL_PCREL)
#define CFUNC(name) name@notoc
#else
#define CFUNC(name) name

View File

@@ -1509,6 +1509,8 @@ int eeh_pe_configure(struct eeh_pe *pe)
/* Invalid PE ? */
if (!pe)
return -ENODEV;
else
ret = eeh_ops->configure_bridge(pe);
return ret;
}

View File

@@ -53,7 +53,7 @@ ldflags-$(CONFIG_LD_ORPHAN_WARN) += -Wl,--orphan-handling=$(CONFIG_LD_ORPHAN_WAR
ldflags-y += $(filter-out $(CC_AUTO_VAR_INIT_ZERO_ENABLER) $(CC_FLAGS_FTRACE) -Wa$(comma)%, $(KBUILD_CFLAGS))
CC32FLAGS := -m32
CC32FLAGSREMOVE := -mcmodel=medium -mabi=elfv1 -mabi=elfv2 -mcall-aixdesc
CC32FLAGSREMOVE := -mcmodel=medium -mabi=elfv1 -mabi=elfv2 -mcall-aixdesc -mpcrel
ifdef CONFIG_CC_IS_CLANG
# This flag is supported by clang for 64-bit but not 32-bit so it will cause
# an unused command line flag warning for this file.

View File

@@ -524,7 +524,12 @@ static struct msi_domain_info pseries_msi_domain_info = {
static void pseries_msi_compose_msg(struct irq_data *data, struct msi_msg *msg)
{
__pci_read_msi_msg(irq_data_get_msi_desc(data), msg);
struct pci_dev *dev = msi_desc_to_pci_dev(irq_data_get_msi_desc(data));
if (dev->current_state == PCI_D0)
__pci_read_msi_msg(irq_data_get_msi_desc(data), msg);
else
get_cached_msi_msg(data->irq, msg);
}
static struct irq_chip pseries_msi_irq_chip = {

View File

@@ -103,7 +103,7 @@ static int kvm_sbi_ext_rfence_handler(struct kvm_vcpu *vcpu, struct kvm_run *run
kvm_riscv_vcpu_pmu_incr_fw(vcpu, SBI_PMU_FW_FENCE_I_SENT);
break;
case SBI_EXT_RFENCE_REMOTE_SFENCE_VMA:
if (cp->a2 == 0 && cp->a3 == 0)
if ((cp->a2 == 0 && cp->a3 == 0) || cp->a3 == -1UL)
kvm_riscv_hfence_vvma_all(vcpu->kvm, hbase, hmask);
else
kvm_riscv_hfence_vvma_gva(vcpu->kvm, hbase, hmask,
@@ -111,7 +111,7 @@ static int kvm_sbi_ext_rfence_handler(struct kvm_vcpu *vcpu, struct kvm_run *run
kvm_riscv_vcpu_pmu_incr_fw(vcpu, SBI_PMU_FW_HFENCE_VVMA_SENT);
break;
case SBI_EXT_RFENCE_REMOTE_SFENCE_VMA_ASID:
if (cp->a2 == 0 && cp->a3 == 0)
if ((cp->a2 == 0 && cp->a3 == 0) || cp->a3 == -1UL)
kvm_riscv_hfence_vvma_asid_all(vcpu->kvm,
hbase, hmask, cp->a4);
else
@@ -127,9 +127,9 @@ static int kvm_sbi_ext_rfence_handler(struct kvm_vcpu *vcpu, struct kvm_run *run
case SBI_EXT_RFENCE_REMOTE_HFENCE_VVMA_ASID:
/*
* Until nested virtualization is implemented, the
* SBI HFENCE calls should be treated as NOPs
* SBI HFENCE calls should return not supported
* hence fallthrough.
*/
break;
default:
retdata->err_val = SBI_ERR_NOT_SUPPORTED;
}

View File

@@ -317,7 +317,7 @@ enum prot_type {
PROT_TYPE_DAT = 3,
PROT_TYPE_IEP = 4,
/* Dummy value for passing an initialized value when code != PGM_PROTECTION */
PROT_NONE,
PROT_TYPE_DUMMY,
};
static int trans_exc_ending(struct kvm_vcpu *vcpu, int code, unsigned long gva, u8 ar,
@@ -333,7 +333,7 @@ static int trans_exc_ending(struct kvm_vcpu *vcpu, int code, unsigned long gva,
switch (code) {
case PGM_PROTECTION:
switch (prot) {
case PROT_NONE:
case PROT_TYPE_DUMMY:
/* We should never get here, acts like termination */
WARN_ON_ONCE(1);
break;
@@ -803,7 +803,7 @@ static int guest_range_to_gpas(struct kvm_vcpu *vcpu, unsigned long ga, u8 ar,
gpa = kvm_s390_real_to_abs(vcpu, ga);
if (!kvm_is_gpa_in_memslot(vcpu->kvm, gpa)) {
rc = PGM_ADDRESSING;
prot = PROT_NONE;
prot = PROT_TYPE_DUMMY;
}
}
if (rc)
@@ -961,7 +961,7 @@ int access_guest_with_key(struct kvm_vcpu *vcpu, unsigned long ga, u8 ar,
if (rc == PGM_PROTECTION)
prot = PROT_TYPE_KEYC;
else
prot = PROT_NONE;
prot = PROT_TYPE_DUMMY;
rc = trans_exc_ending(vcpu, rc, ga, ar, mode, prot, terminate);
}
out_unlock:

View File

@@ -44,6 +44,7 @@
/* list of all detected zpci devices */
static LIST_HEAD(zpci_list);
static DEFINE_SPINLOCK(zpci_list_lock);
static DEFINE_MUTEX(zpci_add_remove_lock);
static DECLARE_BITMAP(zpci_domain, ZPCI_DOMAIN_BITMAP_SIZE);
static DEFINE_SPINLOCK(zpci_domain_lock);
@@ -69,6 +70,15 @@ EXPORT_SYMBOL_GPL(zpci_aipb);
struct airq_iv *zpci_aif_sbv;
EXPORT_SYMBOL_GPL(zpci_aif_sbv);
void zpci_zdev_put(struct zpci_dev *zdev)
{
if (!zdev)
return;
mutex_lock(&zpci_add_remove_lock);
kref_put_lock(&zdev->kref, zpci_release_device, &zpci_list_lock);
mutex_unlock(&zpci_add_remove_lock);
}
struct zpci_dev *get_zdev_by_fid(u32 fid)
{
struct zpci_dev *tmp, *zdev = NULL;
@@ -831,6 +841,7 @@ int zpci_add_device(struct zpci_dev *zdev)
{
int rc;
mutex_lock(&zpci_add_remove_lock);
zpci_dbg(1, "add fid:%x, fh:%x, c:%d\n", zdev->fid, zdev->fh, zdev->state);
rc = zpci_init_iommu(zdev);
if (rc)
@@ -844,12 +855,14 @@ int zpci_add_device(struct zpci_dev *zdev)
spin_lock(&zpci_list_lock);
list_add_tail(&zdev->entry, &zpci_list);
spin_unlock(&zpci_list_lock);
mutex_unlock(&zpci_add_remove_lock);
return 0;
error_destroy_iommu:
zpci_destroy_iommu(zdev);
error:
zpci_dbg(0, "add fid:%x, rc:%d\n", zdev->fid, rc);
mutex_unlock(&zpci_add_remove_lock);
return rc;
}
@@ -919,21 +932,20 @@ int zpci_deconfigure_device(struct zpci_dev *zdev)
* @zdev: the zpci_dev that was reserved
*
* Handle the case that a given zPCI function was reserved by another system.
* After a call to this function the zpci_dev can not be found via
* get_zdev_by_fid() anymore but may still be accessible via existing
* references though it will not be functional anymore.
*/
void zpci_device_reserved(struct zpci_dev *zdev)
{
/*
* Remove device from zpci_list as it is going away. This also
* makes sure we ignore subsequent zPCI events for this device.
*/
spin_lock(&zpci_list_lock);
list_del(&zdev->entry);
spin_unlock(&zpci_list_lock);
lockdep_assert_held(&zdev->state_lock);
/* We may declare the device reserved multiple times */
if (zdev->state == ZPCI_FN_STATE_RESERVED)
return;
zdev->state = ZPCI_FN_STATE_RESERVED;
zpci_dbg(3, "rsv fid:%x\n", zdev->fid);
/*
* The underlying device is gone. Allow the zdev to be freed
* as soon as all other references are gone by accounting for
* the removal as a dropped reference.
*/
zpci_zdev_put(zdev);
}
@@ -941,13 +953,14 @@ void zpci_release_device(struct kref *kref)
{
struct zpci_dev *zdev = container_of(kref, struct zpci_dev, kref);
lockdep_assert_held(&zpci_add_remove_lock);
WARN_ON(zdev->state != ZPCI_FN_STATE_RESERVED);
if (zdev->zbus->bus)
zpci_bus_remove_device(zdev, false);
if (zdev_enabled(zdev))
zpci_disable_device(zdev);
/*
* We already hold zpci_list_lock thanks to kref_put_lock().
* This makes sure no new reference can be taken from the list.
*/
list_del(&zdev->entry);
spin_unlock(&zpci_list_lock);
if (zdev->has_hp_slot)
zpci_exit_slot(zdev);

View File

@@ -17,11 +17,8 @@ int zpci_bus_scan_device(struct zpci_dev *zdev);
void zpci_bus_remove_device(struct zpci_dev *zdev, bool set_error);
void zpci_release_device(struct kref *kref);
static inline void zpci_zdev_put(struct zpci_dev *zdev)
{
if (zdev)
kref_put(&zdev->kref, zpci_release_device);
}
void zpci_zdev_put(struct zpci_dev *zdev);
static inline void zpci_zdev_get(struct zpci_dev *zdev)
{

View File

@@ -322,6 +322,22 @@ static void zpci_event_hard_deconfigured(struct zpci_dev *zdev, u32 fh)
zdev->state = ZPCI_FN_STATE_STANDBY;
}
static void zpci_event_reappear(struct zpci_dev *zdev)
{
lockdep_assert_held(&zdev->state_lock);
/*
* The zdev is in the reserved state. This means that it was presumed to
* go away but there are still undropped references. Now, the platform
* announced its availability again. Bring back the lingering zdev
* to standby. This is safe because we hold a temporary reference
* now so that it won't go away. Account for the re-appearance of the
* underlying device by incrementing the reference count.
*/
zdev->state = ZPCI_FN_STATE_STANDBY;
zpci_zdev_get(zdev);
zpci_dbg(1, "rea fid:%x, fh:%x\n", zdev->fid, zdev->fh);
}
static void __zpci_event_availability(struct zpci_ccdf_avail *ccdf)
{
struct zpci_dev *zdev = get_zdev_by_fid(ccdf->fid);
@@ -345,8 +361,10 @@ static void __zpci_event_availability(struct zpci_ccdf_avail *ccdf)
break;
}
} else {
if (zdev->state == ZPCI_FN_STATE_RESERVED)
zpci_event_reappear(zdev);
/* the configuration request may be stale */
if (zdev->state != ZPCI_FN_STATE_STANDBY)
else if (zdev->state != ZPCI_FN_STATE_STANDBY)
break;
zdev->state = ZPCI_FN_STATE_CONFIGURED;
}
@@ -362,6 +380,8 @@ static void __zpci_event_availability(struct zpci_ccdf_avail *ccdf)
break;
}
} else {
if (zdev->state == ZPCI_FN_STATE_RESERVED)
zpci_event_reappear(zdev);
zpci_update_fh(zdev, ccdf->fh);
}
break;

View File

@@ -228,7 +228,7 @@ static inline int __pcilg_mio_inuser(
[ioaddr_len] "+&d" (ioaddr_len.pair),
[cc] "+d" (cc), [val] "=d" (val),
[dst] "+a" (dst), [cnt] "+d" (cnt), [tmp] "=d" (tmp),
[shift] "+d" (shift)
[shift] "+a" (shift)
:: "cc", "memory");
/* did we write everything to the user space buffer? */

View File

@@ -97,7 +97,7 @@ void tdx_init(void);
typedef u64 (*sc_func_t)(u64 fn, struct tdx_module_args *args);
static inline u64 sc_retry(sc_func_t func, u64 fn,
static __always_inline u64 sc_retry(sc_func_t func, u64 fn,
struct tdx_module_args *args)
{
int retry = RDRAND_RETRY_LOOPS;

View File

@@ -719,6 +719,8 @@ int arch_memory_failure(unsigned long pfn, int flags)
goto out;
}
sgx_unmark_page_reclaimable(page);
/*
* TBD: Add additional plumbing to enable pre-emptive
* action for asynchronous poison notification. Until

View File

@@ -1483,7 +1483,7 @@ static void svm_clear_current_vmcb(struct vmcb *vmcb)
{
int i;
for_each_online_cpu(i)
for_each_possible_cpu(i)
cmpxchg(per_cpu_ptr(&svm_data.current_vmcb, i), vmcb, NULL);
}

View File

@@ -770,8 +770,11 @@ void vmx_emergency_disable_virtualization_cpu(void)
return;
list_for_each_entry(v, &per_cpu(loaded_vmcss_on_cpu, cpu),
loaded_vmcss_on_cpu_link)
loaded_vmcss_on_cpu_link) {
vmcs_clear(v->vmcs);
if (v->shadow_vmcs)
vmcs_clear(v->shadow_vmcs);
}
kvm_cpu_vmxoff();
}

View File

@@ -10,8 +10,7 @@
#include <assert.h>
#include <unistd.h>
#include <stdarg.h>
#define unlikely(cond) (cond)
#include <linux/kallsyms.h>
#include <asm/insn.h>
#include <inat.c>
@@ -106,7 +105,7 @@ static void parse_args(int argc, char **argv)
}
}
#define BUFSIZE 256
#define BUFSIZE (256 + KSYM_NAME_LEN)
int main(int argc, char **argv)
{

View File

@@ -69,8 +69,9 @@ static inline void seamcall_err_ret(u64 fn, u64 err,
args->r9, args->r10, args->r11);
}
static inline int sc_retry_prerr(sc_func_t func, sc_err_func_t err_func,
u64 fn, struct tdx_module_args *args)
static __always_inline int sc_retry_prerr(sc_func_t func,
sc_err_func_t err_func,
u64 fn, struct tdx_module_args *args)
{
u64 sret = sc_retry(func, fn, args);

View File

@@ -1144,20 +1144,20 @@ bool blk_attempt_plug_merge(struct request_queue *q, struct bio *bio,
if (!plug || rq_list_empty(&plug->mq_list))
return false;
rq_list_for_each(&plug->mq_list, rq) {
if (rq->q == q) {
if (blk_attempt_bio_merge(q, rq, bio, nr_segs, false) ==
BIO_MERGE_OK)
return true;
break;
}
rq = plug->mq_list.tail;
if (rq->q == q)
return blk_attempt_bio_merge(q, rq, bio, nr_segs, false) ==
BIO_MERGE_OK;
else if (!plug->multiple_queues)
return false;
/*
* Only keep iterating plug list for merges if we have multiple
* queues
*/
if (!plug->multiple_queues)
break;
rq_list_for_each(&plug->mq_list, rq) {
if (rq->q != q)
continue;
if (blk_attempt_bio_merge(q, rq, bio, nr_segs, false) ==
BIO_MERGE_OK)
return true;
break;
}
return false;
}

View File

@@ -1222,6 +1222,7 @@ void blk_zone_write_plug_bio_endio(struct bio *bio)
if (bio_flagged(bio, BIO_EMULATES_ZONE_APPEND)) {
bio->bi_opf &= ~REQ_OP_MASK;
bio->bi_opf |= REQ_OP_ZONE_APPEND;
bio_clear_flag(bio, BIO_EMULATES_ZONE_APPEND);
}
/*

View File

@@ -53,18 +53,18 @@ static struct {
int gen;
const char *name;
} fw_names[] = {
{ IVPU_HW_IP_37XX, "vpu_37xx.bin" },
{ IVPU_HW_IP_37XX, "intel/vpu/vpu_37xx_v1.bin" },
{ IVPU_HW_IP_37XX, "intel/vpu/vpu_37xx_v0.0.bin" },
{ IVPU_HW_IP_40XX, "vpu_40xx.bin" },
{ IVPU_HW_IP_40XX, "intel/vpu/vpu_40xx_v1.bin" },
{ IVPU_HW_IP_40XX, "intel/vpu/vpu_40xx_v0.0.bin" },
{ IVPU_HW_IP_50XX, "vpu_50xx.bin" },
{ IVPU_HW_IP_50XX, "intel/vpu/vpu_50xx_v1.bin" },
{ IVPU_HW_IP_50XX, "intel/vpu/vpu_50xx_v0.0.bin" },
};
/* Production fw_names from the table above */
MODULE_FIRMWARE("intel/vpu/vpu_37xx_v0.0.bin");
MODULE_FIRMWARE("intel/vpu/vpu_40xx_v0.0.bin");
MODULE_FIRMWARE("intel/vpu/vpu_50xx_v0.0.bin");
MODULE_FIRMWARE("intel/vpu/vpu_37xx_v1.bin");
MODULE_FIRMWARE("intel/vpu/vpu_40xx_v1.bin");
MODULE_FIRMWARE("intel/vpu/vpu_50xx_v1.bin");
static int ivpu_fw_request(struct ivpu_device *vdev)
{

View File

@@ -26,11 +26,21 @@ static inline void ivpu_dbg_bo(struct ivpu_device *vdev, struct ivpu_bo *bo, con
{
ivpu_dbg(vdev, BO,
"%6s: bo %8p vpu_addr %9llx size %8zu ctx %d has_pages %d dma_mapped %d mmu_mapped %d wc %d imported %d\n",
action, bo, bo->vpu_addr, ivpu_bo_size(bo), bo->ctx ? bo->ctx->id : 0,
action, bo, bo->vpu_addr, ivpu_bo_size(bo), bo->ctx_id,
(bool)bo->base.pages, (bool)bo->base.sgt, bo->mmu_mapped, bo->base.map_wc,
(bool)bo->base.base.import_attach);
}
static inline int ivpu_bo_lock(struct ivpu_bo *bo)
{
return dma_resv_lock(bo->base.base.resv, NULL);
}
static inline void ivpu_bo_unlock(struct ivpu_bo *bo)
{
dma_resv_unlock(bo->base.base.resv);
}
/*
* ivpu_bo_pin() - pin the backing physical pages and map them to VPU.
*
@@ -41,22 +51,22 @@ static inline void ivpu_dbg_bo(struct ivpu_device *vdev, struct ivpu_bo *bo, con
int __must_check ivpu_bo_pin(struct ivpu_bo *bo)
{
struct ivpu_device *vdev = ivpu_bo_to_vdev(bo);
struct sg_table *sgt;
int ret = 0;
mutex_lock(&bo->lock);
ivpu_dbg_bo(vdev, bo, "pin");
drm_WARN_ON(&vdev->drm, !bo->ctx);
sgt = drm_gem_shmem_get_pages_sgt(&bo->base);
if (IS_ERR(sgt)) {
ret = PTR_ERR(sgt);
ivpu_err(vdev, "Failed to map BO in IOMMU: %d\n", ret);
return ret;
}
ivpu_bo_lock(bo);
if (!bo->mmu_mapped) {
struct sg_table *sgt = drm_gem_shmem_get_pages_sgt(&bo->base);
if (IS_ERR(sgt)) {
ret = PTR_ERR(sgt);
ivpu_err(vdev, "Failed to map BO in IOMMU: %d\n", ret);
goto unlock;
}
drm_WARN_ON(&vdev->drm, !bo->ctx);
ret = ivpu_mmu_context_map_sgt(vdev, bo->ctx, bo->vpu_addr, sgt,
ivpu_bo_is_snooped(bo));
if (ret) {
@@ -67,7 +77,7 @@ int __must_check ivpu_bo_pin(struct ivpu_bo *bo)
}
unlock:
mutex_unlock(&bo->lock);
ivpu_bo_unlock(bo);
return ret;
}
@@ -82,7 +92,7 @@ ivpu_bo_alloc_vpu_addr(struct ivpu_bo *bo, struct ivpu_mmu_context *ctx,
if (!drm_dev_enter(&vdev->drm, &idx))
return -ENODEV;
mutex_lock(&bo->lock);
ivpu_bo_lock(bo);
ret = ivpu_mmu_context_insert_node(ctx, range, ivpu_bo_size(bo), &bo->mm_node);
if (!ret) {
@@ -92,9 +102,7 @@ ivpu_bo_alloc_vpu_addr(struct ivpu_bo *bo, struct ivpu_mmu_context *ctx,
ivpu_err(vdev, "Failed to add BO to context %u: %d\n", ctx->id, ret);
}
ivpu_dbg_bo(vdev, bo, "alloc");
mutex_unlock(&bo->lock);
ivpu_bo_unlock(bo);
drm_dev_exit(idx);
@@ -105,7 +113,7 @@ static void ivpu_bo_unbind_locked(struct ivpu_bo *bo)
{
struct ivpu_device *vdev = ivpu_bo_to_vdev(bo);
lockdep_assert(lockdep_is_held(&bo->lock) || !kref_read(&bo->base.base.refcount));
lockdep_assert(dma_resv_held(bo->base.base.resv) || !kref_read(&bo->base.base.refcount));
if (bo->mmu_mapped) {
drm_WARN_ON(&vdev->drm, !bo->ctx);
@@ -123,14 +131,12 @@ static void ivpu_bo_unbind_locked(struct ivpu_bo *bo)
if (bo->base.base.import_attach)
return;
dma_resv_lock(bo->base.base.resv, NULL);
if (bo->base.sgt) {
dma_unmap_sgtable(vdev->drm.dev, bo->base.sgt, DMA_BIDIRECTIONAL, 0);
sg_free_table(bo->base.sgt);
kfree(bo->base.sgt);
bo->base.sgt = NULL;
}
dma_resv_unlock(bo->base.base.resv);
}
void ivpu_bo_unbind_all_bos_from_context(struct ivpu_device *vdev, struct ivpu_mmu_context *ctx)
@@ -142,12 +148,12 @@ void ivpu_bo_unbind_all_bos_from_context(struct ivpu_device *vdev, struct ivpu_m
mutex_lock(&vdev->bo_list_lock);
list_for_each_entry(bo, &vdev->bo_list, bo_list_node) {
mutex_lock(&bo->lock);
ivpu_bo_lock(bo);
if (bo->ctx == ctx) {
ivpu_dbg_bo(vdev, bo, "unbind");
ivpu_bo_unbind_locked(bo);
}
mutex_unlock(&bo->lock);
ivpu_bo_unlock(bo);
}
mutex_unlock(&vdev->bo_list_lock);
}
@@ -167,12 +173,11 @@ struct drm_gem_object *ivpu_gem_create_object(struct drm_device *dev, size_t siz
bo->base.pages_mark_dirty_on_put = true; /* VPU can dirty a BO anytime */
INIT_LIST_HEAD(&bo->bo_list_node);
mutex_init(&bo->lock);
return &bo->base.base;
}
static struct ivpu_bo *ivpu_bo_alloc(struct ivpu_device *vdev, u64 size, u32 flags)
static struct ivpu_bo *ivpu_bo_alloc(struct ivpu_device *vdev, u64 size, u32 flags, u32 ctx_id)
{
struct drm_gem_shmem_object *shmem;
struct ivpu_bo *bo;
@@ -190,6 +195,7 @@ static struct ivpu_bo *ivpu_bo_alloc(struct ivpu_device *vdev, u64 size, u32 fla
return ERR_CAST(shmem);
bo = to_ivpu_bo(&shmem->base);
bo->ctx_id = ctx_id;
bo->base.map_wc = flags & DRM_IVPU_BO_WC;
bo->flags = flags;
@@ -197,6 +203,8 @@ static struct ivpu_bo *ivpu_bo_alloc(struct ivpu_device *vdev, u64 size, u32 fla
list_add_tail(&bo->bo_list_node, &vdev->bo_list);
mutex_unlock(&vdev->bo_list_lock);
ivpu_dbg_bo(vdev, bo, "alloc");
return bo;
}
@@ -234,10 +242,14 @@ static void ivpu_gem_bo_free(struct drm_gem_object *obj)
list_del(&bo->bo_list_node);
mutex_unlock(&vdev->bo_list_lock);
drm_WARN_ON(&vdev->drm, !dma_resv_test_signaled(obj->resv, DMA_RESV_USAGE_READ));
drm_WARN_ON(&vdev->drm, !drm_gem_is_imported(&bo->base.base) &&
!dma_resv_test_signaled(obj->resv, DMA_RESV_USAGE_READ));
drm_WARN_ON(&vdev->drm, ivpu_bo_size(bo) == 0);
drm_WARN_ON(&vdev->drm, bo->base.vaddr);
ivpu_bo_unbind_locked(bo);
mutex_destroy(&bo->lock);
drm_WARN_ON(&vdev->drm, bo->mmu_mapped);
drm_WARN_ON(&vdev->drm, bo->ctx);
drm_WARN_ON(obj->dev, bo->base.pages_use_count > 1);
drm_gem_shmem_free(&bo->base);
@@ -271,7 +283,7 @@ int ivpu_bo_create_ioctl(struct drm_device *dev, void *data, struct drm_file *fi
if (size == 0)
return -EINVAL;
bo = ivpu_bo_alloc(vdev, size, args->flags);
bo = ivpu_bo_alloc(vdev, size, args->flags, file_priv->ctx.id);
if (IS_ERR(bo)) {
ivpu_err(vdev, "Failed to allocate BO: %pe (ctx %u size %llu flags 0x%x)",
bo, file_priv->ctx.id, args->size, args->flags);
@@ -279,7 +291,10 @@ int ivpu_bo_create_ioctl(struct drm_device *dev, void *data, struct drm_file *fi
}
ret = drm_gem_handle_create(file, &bo->base.base, &args->handle);
if (!ret)
if (ret)
ivpu_err(vdev, "Failed to create handle for BO: %pe (ctx %u size %llu flags 0x%x)",
bo, file_priv->ctx.id, args->size, args->flags);
else
args->vpu_addr = bo->vpu_addr;
drm_gem_object_put(&bo->base.base);
@@ -302,7 +317,7 @@ ivpu_bo_create(struct ivpu_device *vdev, struct ivpu_mmu_context *ctx,
drm_WARN_ON(&vdev->drm, !PAGE_ALIGNED(range->end));
drm_WARN_ON(&vdev->drm, !PAGE_ALIGNED(size));
bo = ivpu_bo_alloc(vdev, size, flags);
bo = ivpu_bo_alloc(vdev, size, flags, IVPU_GLOBAL_CONTEXT_MMU_SSID);
if (IS_ERR(bo)) {
ivpu_err(vdev, "Failed to allocate BO: %pe (vpu_addr 0x%llx size %llu flags 0x%x)",
bo, range->start, size, flags);
@@ -318,9 +333,9 @@ ivpu_bo_create(struct ivpu_device *vdev, struct ivpu_mmu_context *ctx,
goto err_put;
if (flags & DRM_IVPU_BO_MAPPABLE) {
dma_resv_lock(bo->base.base.resv, NULL);
ivpu_bo_lock(bo);
ret = drm_gem_shmem_vmap(&bo->base, &map);
dma_resv_unlock(bo->base.base.resv);
ivpu_bo_unlock(bo);
if (ret)
goto err_put;
@@ -343,9 +358,9 @@ void ivpu_bo_free(struct ivpu_bo *bo)
struct iosys_map map = IOSYS_MAP_INIT_VADDR(bo->base.vaddr);
if (bo->flags & DRM_IVPU_BO_MAPPABLE) {
dma_resv_lock(bo->base.base.resv, NULL);
ivpu_bo_lock(bo);
drm_gem_shmem_vunmap(&bo->base, &map);
dma_resv_unlock(bo->base.base.resv);
ivpu_bo_unlock(bo);
}
drm_gem_object_put(&bo->base.base);
@@ -364,12 +379,12 @@ int ivpu_bo_info_ioctl(struct drm_device *dev, void *data, struct drm_file *file
bo = to_ivpu_bo(obj);
mutex_lock(&bo->lock);
ivpu_bo_lock(bo);
args->flags = bo->flags;
args->mmap_offset = drm_vma_node_offset_addr(&obj->vma_node);
args->vpu_addr = bo->vpu_addr;
args->size = obj->size;
mutex_unlock(&bo->lock);
ivpu_bo_unlock(bo);
drm_gem_object_put(obj);
return ret;
@@ -403,10 +418,10 @@ int ivpu_bo_wait_ioctl(struct drm_device *dev, void *data, struct drm_file *file
static void ivpu_bo_print_info(struct ivpu_bo *bo, struct drm_printer *p)
{
mutex_lock(&bo->lock);
ivpu_bo_lock(bo);
drm_printf(p, "%-9p %-3u 0x%-12llx %-10lu 0x%-8x %-4u",
bo, bo->ctx ? bo->ctx->id : 0, bo->vpu_addr, bo->base.base.size,
bo, bo->ctx_id, bo->vpu_addr, bo->base.base.size,
bo->flags, kref_read(&bo->base.base.refcount));
if (bo->base.pages)
@@ -420,7 +435,7 @@ static void ivpu_bo_print_info(struct ivpu_bo *bo, struct drm_printer *p)
drm_printf(p, "\n");
mutex_unlock(&bo->lock);
ivpu_bo_unlock(bo);
}
void ivpu_bo_list(struct drm_device *dev, struct drm_printer *p)

View File

@@ -17,10 +17,10 @@ struct ivpu_bo {
struct list_head bo_list_node;
struct drm_mm_node mm_node;
struct mutex lock; /* Protects: ctx, mmu_mapped, vpu_addr */
u64 vpu_addr;
u32 flags;
u32 job_status; /* Valid only for command buffer */
u32 ctx_id;
bool mmu_mapped;
};

View File

@@ -504,10 +504,6 @@ struct aml_resource_pin_group_config {
#define AML_RESOURCE_PIN_GROUP_CONFIG_REVISION 1 /* ACPI 6.2 */
/* restore default alignment */
#pragma pack()
/* Union of all resource descriptors, so we can allocate the worst case */
union aml_resource {
@@ -562,6 +558,10 @@ union aml_resource {
u8 byte_item;
};
/* restore default alignment */
#pragma pack()
/* Interfaces used by both the disassembler and compiler */
void

View File

@@ -668,6 +668,8 @@ acpi_ds_create_operands(struct acpi_walk_state *walk_state,
union acpi_parse_object *arguments[ACPI_OBJ_NUM_OPERANDS];
u32 arg_count = 0;
u32 index = walk_state->num_operands;
u32 prev_num_operands = walk_state->num_operands;
u32 new_num_operands;
u32 i;
ACPI_FUNCTION_TRACE_PTR(ds_create_operands, first_arg);
@@ -696,6 +698,7 @@ acpi_ds_create_operands(struct acpi_walk_state *walk_state,
/* Create the interpreter arguments, in reverse order */
new_num_operands = index;
index--;
for (i = 0; i < arg_count; i++) {
arg = arguments[index];
@@ -720,7 +723,11 @@ cleanup:
* pop everything off of the operand stack and delete those
* objects
*/
acpi_ds_obj_stack_pop_and_delete(arg_count, walk_state);
walk_state->num_operands = i;
acpi_ds_obj_stack_pop_and_delete(new_num_operands, walk_state);
/* Restore operand count */
walk_state->num_operands = prev_num_operands;
ACPI_EXCEPTION((AE_INFO, status, "While creating Arg %u", index));
return_ACPI_STATUS(status);

View File

@@ -636,7 +636,8 @@ acpi_status
acpi_ps_complete_final_op(struct acpi_walk_state *walk_state,
union acpi_parse_object *op, acpi_status status)
{
acpi_status status2;
acpi_status return_status = status;
u8 ascending = TRUE;
ACPI_FUNCTION_TRACE_PTR(ps_complete_final_op, walk_state);
@@ -650,7 +651,7 @@ acpi_ps_complete_final_op(struct acpi_walk_state *walk_state,
op));
do {
if (op) {
if (walk_state->ascending_callback != NULL) {
if (ascending && walk_state->ascending_callback != NULL) {
walk_state->op = op;
walk_state->op_info =
acpi_ps_get_opcode_info(op->common.
@@ -672,49 +673,26 @@ acpi_ps_complete_final_op(struct acpi_walk_state *walk_state,
}
if (status == AE_CTRL_TERMINATE) {
status = AE_OK;
/* Clean up */
do {
if (op) {
status2 =
acpi_ps_complete_this_op
(walk_state, op);
if (ACPI_FAILURE
(status2)) {
return_ACPI_STATUS
(status2);
}
}
acpi_ps_pop_scope(&
(walk_state->
parser_state),
&op,
&walk_state->
arg_types,
&walk_state->
arg_count);
} while (op);
return_ACPI_STATUS(status);
ascending = FALSE;
return_status = AE_CTRL_TERMINATE;
}
else if (ACPI_FAILURE(status)) {
/* First error is most important */
(void)
acpi_ps_complete_this_op(walk_state,
op);
return_ACPI_STATUS(status);
ascending = FALSE;
return_status = status;
}
}
status2 = acpi_ps_complete_this_op(walk_state, op);
if (ACPI_FAILURE(status2)) {
return_ACPI_STATUS(status2);
status = acpi_ps_complete_this_op(walk_state, op);
if (ACPI_FAILURE(status)) {
ascending = FALSE;
if (ACPI_SUCCESS(return_status) ||
return_status == AE_CTRL_TERMINATE) {
return_status = status;
}
}
}
@@ -724,5 +702,5 @@ acpi_ps_complete_final_op(struct acpi_walk_state *walk_state,
} while (op);
return_ACPI_STATUS(status);
return_ACPI_STATUS(return_status);
}

View File

@@ -272,18 +272,13 @@ u8
acpi_rs_get_address_common(struct acpi_resource *resource,
union aml_resource *aml)
{
struct aml_resource_address address;
ACPI_FUNCTION_ENTRY();
/* Avoid undefined behavior: member access within misaligned address */
memcpy(&address, aml, sizeof(address));
/* Validate the Resource Type */
if ((address.resource_type > 2) &&
(address.resource_type < 0xC0) && (address.resource_type != 0x0A)) {
if ((aml->address.resource_type > 2) &&
(aml->address.resource_type < 0xC0) &&
(aml->address.resource_type != 0x0A)) {
return (FALSE);
}
@@ -304,7 +299,7 @@ acpi_rs_get_address_common(struct acpi_resource *resource,
/* Generic resource type, just grab the type_specific byte */
resource->data.address.info.type_specific =
address.specific_flags;
aml->address.specific_flags;
}
return (TRUE);

View File

@@ -608,18 +608,12 @@ acpi_rs_get_list_length(u8 *aml_buffer,
case ACPI_RESOURCE_NAME_SERIAL_BUS:{
/* Avoid undefined behavior: member access within misaligned address */
struct aml_resource_common_serialbus
common_serial_bus;
memcpy(&common_serial_bus, aml_resource,
sizeof(common_serial_bus));
minimum_aml_resource_length =
acpi_gbl_resource_aml_serial_bus_sizes
[common_serial_bus.type];
[aml_resource->common_serial_bus.type];
extra_struct_bytes +=
common_serial_bus.resource_length -
aml_resource->common_serial_bus.
resource_length -
minimum_aml_resource_length;
break;
}
@@ -688,16 +682,10 @@ acpi_rs_get_list_length(u8 *aml_buffer,
*/
if (acpi_ut_get_resource_type(aml_buffer) ==
ACPI_RESOURCE_NAME_SERIAL_BUS) {
/* Avoid undefined behavior: member access within misaligned address */
struct aml_resource_common_serialbus common_serial_bus;
memcpy(&common_serial_bus, aml_resource,
sizeof(common_serial_bus));
buffer_size =
acpi_gbl_resource_struct_serial_bus_sizes
[common_serial_bus.type] + extra_struct_bytes;
[aml_resource->common_serial_bus.type] +
extra_struct_bytes;
} else {
buffer_size =
acpi_gbl_resource_struct_sizes[resource_index] +

View File

@@ -55,21 +55,15 @@ acpi_rs_convert_aml_to_resources(u8 * aml,
aml_resource = ACPI_CAST_PTR(union aml_resource, aml);
if (acpi_ut_get_resource_type(aml) == ACPI_RESOURCE_NAME_SERIAL_BUS) {
/* Avoid undefined behavior: member access within misaligned address */
struct aml_resource_common_serialbus common_serial_bus;
memcpy(&common_serial_bus, aml_resource,
sizeof(common_serial_bus));
if (common_serial_bus.type > AML_RESOURCE_MAX_SERIALBUSTYPE) {
if (aml_resource->common_serial_bus.type >
AML_RESOURCE_MAX_SERIALBUSTYPE) {
conversion_table = NULL;
} else {
/* This is an I2C, SPI, UART, or CSI2 serial_bus descriptor */
conversion_table =
acpi_gbl_convert_resource_serial_bus_dispatch
[common_serial_bus.type];
[aml_resource->common_serial_bus.type];
}
} else {
conversion_table =

View File

@@ -333,11 +333,8 @@ int vsnprintf(char *string, acpi_size size, const char *format, va_list args)
pos = string;
if (size != ACPI_UINT32_MAX) {
end = string + size;
} else {
end = ACPI_CAST_PTR(char, ACPI_UINT32_MAX);
}
size = ACPI_MIN(size, ACPI_PTR_DIFF(ACPI_MAX_PTR, string));
end = string + size;
for (; *format; ++format) {
if (*format != '%') {

View File

@@ -361,20 +361,16 @@ acpi_ut_validate_resource(struct acpi_walk_state *walk_state,
aml_resource = ACPI_CAST_PTR(union aml_resource, aml);
if (resource_type == ACPI_RESOURCE_NAME_SERIAL_BUS) {
/* Avoid undefined behavior: member access within misaligned address */
struct aml_resource_common_serialbus common_serial_bus;
memcpy(&common_serial_bus, aml_resource,
sizeof(common_serial_bus));
/* Validate the bus_type field */
if ((common_serial_bus.type == 0) ||
(common_serial_bus.type > AML_RESOURCE_MAX_SERIALBUSTYPE)) {
if ((aml_resource->common_serial_bus.type == 0) ||
(aml_resource->common_serial_bus.type >
AML_RESOURCE_MAX_SERIALBUSTYPE)) {
if (walk_state) {
ACPI_ERROR((AE_INFO,
"Invalid/unsupported SerialBus resource descriptor: BusType 0x%2.2X",
common_serial_bus.type));
aml_resource->common_serial_bus.
type));
}
return (AE_AML_INVALID_RESOURCE_TYPE);
}

View File

@@ -243,10 +243,23 @@ static int acpi_battery_get_property(struct power_supply *psy,
break;
case POWER_SUPPLY_PROP_CURRENT_NOW:
case POWER_SUPPLY_PROP_POWER_NOW:
if (battery->rate_now == ACPI_BATTERY_VALUE_UNKNOWN)
if (battery->rate_now == ACPI_BATTERY_VALUE_UNKNOWN) {
ret = -ENODEV;
else
val->intval = battery->rate_now * 1000;
break;
}
val->intval = battery->rate_now * 1000;
/*
* When discharging, the current should be reported as a
* negative number as per the power supply class interface
* definition.
*/
if (psp == POWER_SUPPLY_PROP_CURRENT_NOW &&
(battery->state & ACPI_BATTERY_STATE_DISCHARGING) &&
acpi_battery_handle_discharging(battery)
== POWER_SUPPLY_STATUS_DISCHARGING)
val->intval = -val->intval;
break;
case POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN:
case POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN:

View File

@@ -1444,8 +1444,10 @@ static int __init acpi_init(void)
}
acpi_kobj = kobject_create_and_add("acpi", firmware_kobj);
if (!acpi_kobj)
pr_debug("%s: kset create error\n", __func__);
if (!acpi_kobj) {
pr_err("Failed to register kobject\n");
return -ENOMEM;
}
init_prmt();
acpi_init_pcc();

View File

@@ -1410,8 +1410,15 @@ static bool ahci_broken_suspend(struct pci_dev *pdev)
static bool ahci_broken_lpm(struct pci_dev *pdev)
{
/*
* Platforms with LPM problems.
* If driver_data is NULL, there is no existing BIOS version with
* functioning LPM.
* If driver_data is non-NULL, then driver_data contains the DMI BIOS
* build date of the first BIOS version with functioning LPM (i.e. older
* BIOS versions have broken LPM).
*/
static const struct dmi_system_id sysids[] = {
/* Various Lenovo 50 series have LPM issues with older BIOSen */
{
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
@@ -1446,6 +1453,29 @@ static bool ahci_broken_lpm(struct pci_dev *pdev)
*/
.driver_data = "20180310", /* 2.35 */
},
{
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
DMI_MATCH(DMI_PRODUCT_VERSION, "ASUSPRO D840MB_M840SA"),
},
/* 320 is broken, there is no known good version. */
},
{
/*
* AMD 500 Series Chipset SATA Controller [1022:43eb]
* on this motherboard timeouts on ports 5 and 6 when
* LPM is enabled, at least with WDC WD20EFAX-68FB5N0
* hard drives. LPM with the same drive works fine on
* all other ports on the same controller.
*/
.matches = {
DMI_MATCH(DMI_BOARD_VENDOR,
"ASUSTeK COMPUTER INC."),
DMI_MATCH(DMI_BOARD_NAME,
"ROG STRIX B550-F GAMING (WI-FI)"),
},
/* 3621 is broken, there is no known good version. */
},
{ } /* terminate list */
};
const struct dmi_system_id *dmi = dmi_first_match(sysids);
@@ -1455,6 +1485,9 @@ static bool ahci_broken_lpm(struct pci_dev *pdev)
if (!dmi)
return false;
if (!dmi->driver_data)
return true;
dmi_get_date(DMI_BIOS_DATE, &year, &month, &date);
snprintf(buf, sizeof(buf), "%04d%02d%02d", year, month, date);

View File

@@ -368,7 +368,8 @@ static unsigned int via_mode_filter(struct ata_device *dev, unsigned int mask)
}
if (dev->class == ATA_DEV_ATAPI &&
dmi_check_system(no_atapi_dma_dmi_table)) {
(dmi_check_system(no_atapi_dma_dmi_table) ||
config->id == PCI_DEVICE_ID_VIA_6415)) {
ata_dev_warn(dev, "controller locks up on ATAPI DMA, forcing PIO\n");
mask &= ATA_MASK_PIO;
}

View File

@@ -288,7 +288,9 @@ static int atmtcp_c_send(struct atm_vcc *vcc,struct sk_buff *skb)
struct sk_buff *new_skb;
int result = 0;
if (!skb->len) return 0;
if (skb->len < sizeof(struct atmtcp_hdr))
goto done;
dev = vcc->dev_data;
hdr = (struct atmtcp_hdr *) skb->data;
if (hdr->length == ATMTCP_HDR_MAGIC) {

View File

@@ -95,5 +95,6 @@ EXPORT_SYMBOL_GPL(platform_device_msi_init_and_alloc_irqs);
void platform_device_msi_free_irqs_all(struct device *dev)
{
msi_domain_free_irqs_all(dev, MSI_DEFAULT_DOMAIN);
msi_remove_device_irq_domain(dev, MSI_DEFAULT_DOMAIN);
}
EXPORT_SYMBOL_GPL(platform_device_msi_free_irqs_all);

View File

@@ -1003,7 +1003,7 @@ static enum hrtimer_restart pm_suspend_timer_fn(struct hrtimer *timer)
* If 'expires' is after the current time, we've been called
* too early.
*/
if (expires > 0 && expires < ktime_get_mono_fast_ns()) {
if (expires > 0 && expires <= ktime_get_mono_fast_ns()) {
dev->power.timer_expires = 0;
rpm_suspend(dev, dev->power.timer_autosuspends ?
(RPM_ASYNC | RPM_AUTO) : RPM_ASYNC);

View File

@@ -529,7 +529,7 @@ software_node_get_reference_args(const struct fwnode_handle *fwnode,
if (prop->is_inline)
return -EINVAL;
if (index * sizeof(*ref) >= prop->length)
if ((index + 1) * sizeof(*ref) > prop->length)
return -ENOENT;
ref_array = prop->pointer;

View File

@@ -198,6 +198,7 @@ aoedev_downdev(struct aoedev *d)
{
struct aoetgt *t, **tt, **te;
struct list_head *head, *pos, *nx;
struct request *rq, *rqnext;
int i;
d->flags &= ~DEVFL_UP;
@@ -223,6 +224,13 @@ aoedev_downdev(struct aoedev *d)
/* clean out the in-process request (if any) */
aoe_failip(d);
/* clean out any queued block requests */
list_for_each_entry_safe(rq, rqnext, &d->rq_list, queuelist) {
list_del_init(&rq->queuelist);
blk_mq_start_request(rq);
blk_mq_end_request(rq, BLK_STS_IOERR);
}
/* fast fail all pending I/O */
if (d->blkq) {
/* UP is cleared, freeze+quiesce to insure all are errored */

View File

@@ -2457,6 +2457,9 @@ static int ublk_ctrl_add_dev(struct io_uring_cmd *cmd)
if (copy_from_user(&info, argp, sizeof(info)))
return -EFAULT;
if (info.queue_depth > UBLK_MAX_QUEUE_DEPTH || info.nr_hw_queues > UBLK_MAX_NR_QUEUES)
return -EINVAL;
if (capable(CAP_SYS_ADMIN))
info.flags &= ~UBLK_F_UNPRIVILEGED_DEV;
else if (!(info.flags & UBLK_F_UNPRIVILEGED_DEV))

View File

@@ -673,6 +673,8 @@ static const struct usb_device_id quirks_table[] = {
BTUSB_WIDEBAND_SPEECH },
{ USB_DEVICE(0x13d3, 0x3568), .driver_info = BTUSB_MEDIATEK |
BTUSB_WIDEBAND_SPEECH },
{ USB_DEVICE(0x13d3, 0x3584), .driver_info = BTUSB_MEDIATEK |
BTUSB_WIDEBAND_SPEECH },
{ USB_DEVICE(0x13d3, 0x3605), .driver_info = BTUSB_MEDIATEK |
BTUSB_WIDEBAND_SPEECH },
{ USB_DEVICE(0x13d3, 0x3607), .driver_info = BTUSB_MEDIATEK |
@@ -713,6 +715,8 @@ static const struct usb_device_id quirks_table[] = {
BTUSB_WIDEBAND_SPEECH },
{ USB_DEVICE(0x13d3, 0x3628), .driver_info = BTUSB_MEDIATEK |
BTUSB_WIDEBAND_SPEECH },
{ USB_DEVICE(0x13d3, 0x3630), .driver_info = BTUSB_MEDIATEK |
BTUSB_WIDEBAND_SPEECH },
/* Additional Realtek 8723AE Bluetooth devices */
{ USB_DEVICE(0x0930, 0x021d), .driver_info = BTUSB_REALTEK },

View File

@@ -275,13 +275,13 @@ static struct fsl_mc_cmd_desc fsl_mc_accepted_cmds[] = {
.size = 8,
},
[DPSW_GET_TAILDROP] = {
.cmdid_value = 0x0A80,
.cmdid_value = 0x0A90,
.cmdid_mask = 0xFFF0,
.token = true,
.size = 14,
},
[DPSW_SET_TAILDROP] = {
.cmdid_value = 0x0A90,
.cmdid_value = 0x0A80,
.cmdid_mask = 0xFFF0,
.token = true,
.size = 24,

View File

@@ -214,12 +214,19 @@ int __must_check fsl_mc_portal_allocate(struct fsl_mc_device *mc_dev,
if (error < 0)
goto error_cleanup_resource;
dpmcp_dev->consumer_link = device_link_add(&mc_dev->dev,
&dpmcp_dev->dev,
DL_FLAG_AUTOREMOVE_CONSUMER);
if (!dpmcp_dev->consumer_link) {
error = -EINVAL;
goto error_cleanup_mc_io;
/* If the DPRC device itself tries to allocate a portal (usually for
* UAPI interaction), don't add a device link between them since the
* DPMCP device is an actual child device of the DPRC and a reverse
* dependency is not allowed.
*/
if (mc_dev != mc_bus_dev) {
dpmcp_dev->consumer_link = device_link_add(&mc_dev->dev,
&dpmcp_dev->dev,
DL_FLAG_AUTOREMOVE_CONSUMER);
if (!dpmcp_dev->consumer_link) {
error = -EINVAL;
goto error_cleanup_mc_io;
}
}
*new_mc_io = mc_io;

View File

@@ -19,7 +19,7 @@
/*
* Timeout in milliseconds to wait for the completion of an MC command
*/
#define MC_CMD_COMPLETION_TIMEOUT_MS 500
#define MC_CMD_COMPLETION_TIMEOUT_MS 15000
/*
* usleep_range() min and max values used to throttle down polling

View File

@@ -131,19 +131,23 @@ int mhi_ep_ring_add_element(struct mhi_ep_ring *ring, struct mhi_ring_element *e
}
old_offset = ring->rd_offset;
mhi_ep_ring_inc_index(ring);
dev_dbg(dev, "Adding an element to ring at offset (%zu)\n", ring->rd_offset);
buf_info.host_addr = ring->rbase + (old_offset * sizeof(*el));
buf_info.dev_addr = el;
buf_info.size = sizeof(*el);
ret = mhi_cntrl->write_sync(mhi_cntrl, &buf_info);
if (ret)
return ret;
mhi_ep_ring_inc_index(ring);
/* Update rp in ring context */
rp = cpu_to_le64(ring->rd_offset * sizeof(*el) + ring->rbase);
memcpy_toio((void __iomem *) &ring->ring_ctx->generic.rp, &rp, sizeof(u64));
buf_info.host_addr = ring->rbase + (old_offset * sizeof(*el));
buf_info.dev_addr = el;
buf_info.size = sizeof(*el);
return mhi_cntrl->write_sync(mhi_cntrl, &buf_info);
return ret;
}
void mhi_ep_ring_init(struct mhi_ep_ring *ring, enum mhi_ep_ring_type type, u32 id)

View File

@@ -602,6 +602,7 @@ static void mhi_pm_sys_error_transition(struct mhi_controller *mhi_cntrl)
struct mhi_cmd *mhi_cmd;
struct mhi_event_ctxt *er_ctxt;
struct device *dev = &mhi_cntrl->mhi_dev->dev;
bool reset_device = false;
int ret, i;
dev_dbg(dev, "Transitioning from PM state: %s to: %s\n",
@@ -630,8 +631,23 @@ static void mhi_pm_sys_error_transition(struct mhi_controller *mhi_cntrl)
/* Wake up threads waiting for state transition */
wake_up_all(&mhi_cntrl->state_event);
/* Trigger MHI RESET so that the device will not access host memory */
if (MHI_REG_ACCESS_VALID(prev_state)) {
/*
* If the device is in PBL or SBL, it will only respond to
* RESET if the device is in SYSERR state. SYSERR might
* already be cleared at this point.
*/
enum mhi_state cur_state = mhi_get_mhi_state(mhi_cntrl);
enum mhi_ee_type cur_ee = mhi_get_exec_env(mhi_cntrl);
if (cur_state == MHI_STATE_SYS_ERR)
reset_device = true;
else if (cur_ee != MHI_EE_PBL && cur_ee != MHI_EE_SBL)
reset_device = true;
}
/* Trigger MHI RESET so that the device will not access host memory */
if (reset_device) {
u32 in_reset = -1;
unsigned long timeout = msecs_to_jiffies(mhi_cntrl->timeout_ms);

View File

@@ -677,51 +677,6 @@ static int sysc_parse_and_check_child_range(struct sysc *ddata)
return 0;
}
/* Interconnect instances to probe before l4_per instances */
static struct resource early_bus_ranges[] = {
/* am3/4 l4_wkup */
{ .start = 0x44c00000, .end = 0x44c00000 + 0x300000, },
/* omap4/5 and dra7 l4_cfg */
{ .start = 0x4a000000, .end = 0x4a000000 + 0x300000, },
/* omap4 l4_wkup */
{ .start = 0x4a300000, .end = 0x4a300000 + 0x30000, },
/* omap5 and dra7 l4_wkup without dra7 dcan segment */
{ .start = 0x4ae00000, .end = 0x4ae00000 + 0x30000, },
};
static atomic_t sysc_defer = ATOMIC_INIT(10);
/**
* sysc_defer_non_critical - defer non_critical interconnect probing
* @ddata: device driver data
*
* We want to probe l4_cfg and l4_wkup interconnect instances before any
* l4_per instances as l4_per instances depend on resources on l4_cfg and
* l4_wkup interconnects.
*/
static int sysc_defer_non_critical(struct sysc *ddata)
{
struct resource *res;
int i;
if (!atomic_read(&sysc_defer))
return 0;
for (i = 0; i < ARRAY_SIZE(early_bus_ranges); i++) {
res = &early_bus_ranges[i];
if (ddata->module_pa >= res->start &&
ddata->module_pa <= res->end) {
atomic_set(&sysc_defer, 0);
return 0;
}
}
atomic_dec_if_positive(&sysc_defer);
return -EPROBE_DEFER;
}
static struct device_node *stdout_path;
static void sysc_init_stdout_path(struct sysc *ddata)
@@ -947,10 +902,6 @@ static int sysc_map_and_check_registers(struct sysc *ddata)
if (error)
return error;
error = sysc_defer_non_critical(ddata);
if (error)
return error;
sysc_check_children(ddata);
if (!of_property_present(np, "reg"))

View File

@@ -4099,6 +4099,7 @@ static const struct clk_parent_data spicc_sclk_parent_data[] = {
{ .hw = &g12a_clk81.hw },
{ .hw = &g12a_fclk_div4.hw },
{ .hw = &g12a_fclk_div3.hw },
{ .hw = &g12a_fclk_div2.hw },
{ .hw = &g12a_fclk_div5.hw },
{ .hw = &g12a_fclk_div7.hw },
};

View File

@@ -6753,6 +6753,10 @@ static int gcc_x1e80100_probe(struct platform_device *pdev)
/* Clear GDSC_SLEEP_ENA_VOTE to stop votes being auto-removed in sleep. */
regmap_write(regmap, 0x52224, 0x0);
/* FORCE_MEM_CORE_ON for ufs phy ice core and gcc ufs phy axi clocks */
qcom_branch_set_force_mem_core(regmap, gcc_ufs_phy_ice_core_clk, true);
qcom_branch_set_force_mem_core(regmap, gcc_ufs_phy_axi_clk, true);
return qcom_cc_really_probe(&pdev->dev, &gcc_x1e80100_desc, regmap);
}

View File

@@ -431,6 +431,7 @@ static const char *const rk3036_critical_clocks[] __initconst = {
"hclk_peri",
"pclk_peri",
"pclk_ddrupctl",
"ddrphy",
};
static void __init rk3036_clk_init(struct device_node *np)

View File

@@ -482,6 +482,9 @@ static void amd_pstate_update(struct amd_cpudata *cpudata, u32 min_perf,
u32 nominal_perf = READ_ONCE(cpudata->nominal_perf);
u64 value = prev;
if (!policy)
return;
min_perf = clamp_t(unsigned long, min_perf, cpudata->min_limit_perf,
cpudata->max_limit_perf);
max_perf = clamp_t(unsigned long, max_perf, cpudata->min_limit_perf,

View File

@@ -410,6 +410,40 @@ static struct cpufreq_driver scmi_cpufreq_driver = {
.register_em = scmi_cpufreq_register_em,
};
static bool scmi_dev_used_by_cpus(struct device *scmi_dev)
{
struct device_node *scmi_np = dev_of_node(scmi_dev);
struct device_node *cpu_np, *np;
struct device *cpu_dev;
int cpu, idx;
if (!scmi_np)
return false;
for_each_possible_cpu(cpu) {
cpu_dev = get_cpu_device(cpu);
if (!cpu_dev)
continue;
cpu_np = dev_of_node(cpu_dev);
np = of_parse_phandle(cpu_np, "clocks", 0);
of_node_put(np);
if (np == scmi_np)
return true;
idx = of_property_match_string(cpu_np, "power-domain-names", "perf");
np = of_parse_phandle(cpu_np, "power-domains", idx);
of_node_put(np);
if (np == scmi_np)
return true;
}
return false;
}
static int scmi_cpufreq_probe(struct scmi_device *sdev)
{
int ret;
@@ -418,7 +452,7 @@ static int scmi_cpufreq_probe(struct scmi_device *sdev)
handle = sdev->handle;
if (!handle)
if (!handle || !scmi_dev_used_by_cpus(dev))
return -ENODEV;
scmi_cpufreq_driver.driver_data = sdev;

View File

@@ -181,11 +181,19 @@ static void adf_remove(struct pci_dev *pdev)
adf_cleanup_accel(accel_dev);
}
static void adf_shutdown(struct pci_dev *pdev)
{
struct adf_accel_dev *accel_dev = adf_devmgr_pci_to_accel_dev(pdev);
adf_dev_down(accel_dev);
}
static struct pci_driver adf_driver = {
.id_table = adf_pci_tbl,
.name = ADF_420XX_DEVICE_NAME,
.probe = adf_probe,
.remove = adf_remove,
.shutdown = adf_shutdown,
.sriov_configure = adf_sriov_configure,
.err_handler = &adf_err_handler,
};

View File

@@ -183,11 +183,19 @@ static void adf_remove(struct pci_dev *pdev)
adf_cleanup_accel(accel_dev);
}
static void adf_shutdown(struct pci_dev *pdev)
{
struct adf_accel_dev *accel_dev = adf_devmgr_pci_to_accel_dev(pdev);
adf_dev_down(accel_dev);
}
static struct pci_driver adf_driver = {
.id_table = adf_pci_tbl,
.name = ADF_4XXX_DEVICE_NAME,
.probe = adf_probe,
.remove = adf_remove,
.shutdown = adf_shutdown,
.sriov_configure = adf_sriov_configure,
.err_handler = &adf_err_handler,
};

View File

@@ -19,6 +19,13 @@
#include <adf_dbgfs.h>
#include "adf_c3xxx_hw_data.h"
static void adf_shutdown(struct pci_dev *pdev)
{
struct adf_accel_dev *accel_dev = adf_devmgr_pci_to_accel_dev(pdev);
adf_dev_down(accel_dev);
}
static const struct pci_device_id adf_pci_tbl[] = {
{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_QAT_C3XXX), },
{ }
@@ -33,6 +40,7 @@ static struct pci_driver adf_driver = {
.name = ADF_C3XXX_DEVICE_NAME,
.probe = adf_probe,
.remove = adf_remove,
.shutdown = adf_shutdown,
.sriov_configure = adf_sriov_configure,
.err_handler = &adf_err_handler,
};

View File

@@ -19,6 +19,13 @@
#include <adf_dbgfs.h>
#include "adf_c62x_hw_data.h"
static void adf_shutdown(struct pci_dev *pdev)
{
struct adf_accel_dev *accel_dev = adf_devmgr_pci_to_accel_dev(pdev);
adf_dev_down(accel_dev);
}
static const struct pci_device_id adf_pci_tbl[] = {
{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_QAT_C62X), },
{ }
@@ -33,6 +40,7 @@ static struct pci_driver adf_driver = {
.name = ADF_C62X_DEVICE_NAME,
.probe = adf_probe,
.remove = adf_remove,
.shutdown = adf_shutdown,
.sriov_configure = adf_sriov_configure,
.err_handler = &adf_err_handler,
};

View File

@@ -19,6 +19,13 @@
#include <adf_dbgfs.h>
#include "adf_dh895xcc_hw_data.h"
static void adf_shutdown(struct pci_dev *pdev)
{
struct adf_accel_dev *accel_dev = adf_devmgr_pci_to_accel_dev(pdev);
adf_dev_down(accel_dev);
}
static const struct pci_device_id adf_pci_tbl[] = {
{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_QAT_DH895XCC), },
{ }
@@ -33,6 +40,7 @@ static struct pci_driver adf_driver = {
.name = ADF_DH895XCC_DEVICE_NAME,
.probe = adf_probe,
.remove = adf_remove,
.shutdown = adf_shutdown,
.sriov_configure = adf_sriov_configure,
.err_handler = &adf_err_handler,
};

View File

@@ -94,7 +94,7 @@ static int mv_cesa_std_process(struct mv_cesa_engine *engine, u32 status)
static int mv_cesa_int_process(struct mv_cesa_engine *engine, u32 status)
{
if (engine->chain.first && engine->chain.last)
if (engine->chain_hw.first && engine->chain_hw.last)
return mv_cesa_tdma_process(engine, status);
return mv_cesa_std_process(engine, status);

View File

@@ -440,8 +440,10 @@ struct mv_cesa_dev {
* SRAM
* @queue: fifo of the pending crypto requests
* @load: engine load counter, useful for load balancing
* @chain: list of the current tdma descriptors being processed
* by this engine.
* @chain_hw: list of the current tdma descriptors being processed
* by the hardware.
* @chain_sw: list of the current tdma descriptors that will be
* submitted to the hardware.
* @complete_queue: fifo of the processed requests by the engine
*
* Structure storing CESA engine information.
@@ -463,7 +465,8 @@ struct mv_cesa_engine {
struct gen_pool *pool;
struct crypto_queue queue;
atomic_t load;
struct mv_cesa_tdma_chain chain;
struct mv_cesa_tdma_chain chain_hw;
struct mv_cesa_tdma_chain chain_sw;
struct list_head complete_queue;
int irq;
};

View File

@@ -38,6 +38,15 @@ void mv_cesa_dma_step(struct mv_cesa_req *dreq)
{
struct mv_cesa_engine *engine = dreq->engine;
spin_lock_bh(&engine->lock);
if (engine->chain_sw.first == dreq->chain.first) {
engine->chain_sw.first = NULL;
engine->chain_sw.last = NULL;
}
engine->chain_hw.first = dreq->chain.first;
engine->chain_hw.last = dreq->chain.last;
spin_unlock_bh(&engine->lock);
writel_relaxed(0, engine->regs + CESA_SA_CFG);
mv_cesa_set_int_mask(engine, CESA_SA_INT_ACC0_IDMA_DONE);
@@ -96,25 +105,27 @@ void mv_cesa_dma_prepare(struct mv_cesa_req *dreq,
void mv_cesa_tdma_chain(struct mv_cesa_engine *engine,
struct mv_cesa_req *dreq)
{
if (engine->chain.first == NULL && engine->chain.last == NULL) {
engine->chain.first = dreq->chain.first;
engine->chain.last = dreq->chain.last;
} else {
struct mv_cesa_tdma_desc *last;
struct mv_cesa_tdma_desc *last = engine->chain_sw.last;
last = engine->chain.last;
/*
* Break the DMA chain if the request being queued needs the IV
* regs to be set before lauching the request.
*/
if (!last || dreq->chain.first->flags & CESA_TDMA_SET_STATE)
engine->chain_sw.first = dreq->chain.first;
else {
last->next = dreq->chain.first;
engine->chain.last = dreq->chain.last;
/*
* Break the DMA chain if the CESA_TDMA_BREAK_CHAIN is set on
* the last element of the current chain, or if the request
* being queued needs the IV regs to be set before lauching
* the request.
*/
if (!(last->flags & CESA_TDMA_BREAK_CHAIN) &&
!(dreq->chain.first->flags & CESA_TDMA_SET_STATE))
last->next_dma = cpu_to_le32(dreq->chain.first->cur_dma);
last->next_dma = cpu_to_le32(dreq->chain.first->cur_dma);
}
last = dreq->chain.last;
engine->chain_sw.last = last;
/*
* Break the DMA chain if the CESA_TDMA_BREAK_CHAIN is set on
* the last element of the current chain.
*/
if (last->flags & CESA_TDMA_BREAK_CHAIN) {
engine->chain_sw.first = NULL;
engine->chain_sw.last = NULL;
}
}
@@ -127,7 +138,7 @@ int mv_cesa_tdma_process(struct mv_cesa_engine *engine, u32 status)
tdma_cur = readl(engine->regs + CESA_TDMA_CUR);
for (tdma = engine->chain.first; tdma; tdma = next) {
for (tdma = engine->chain_hw.first; tdma; tdma = next) {
spin_lock_bh(&engine->lock);
next = tdma->next;
spin_unlock_bh(&engine->lock);
@@ -149,12 +160,12 @@ int mv_cesa_tdma_process(struct mv_cesa_engine *engine, u32 status)
&backlog);
/* Re-chaining to the next request */
engine->chain.first = tdma->next;
engine->chain_hw.first = tdma->next;
tdma->next = NULL;
/* If this is the last request, clear the chain */
if (engine->chain.first == NULL)
engine->chain.last = NULL;
if (engine->chain_hw.first == NULL)
engine->chain_hw.last = NULL;
spin_unlock_bh(&engine->lock);
ctx = crypto_tfm_ctx(req->tfm);

View File

@@ -264,8 +264,7 @@ static int begin_cpu_udmabuf(struct dma_buf *buf,
ubuf->sg = NULL;
}
} else {
dma_sync_sg_for_cpu(dev, ubuf->sg->sgl, ubuf->sg->nents,
direction);
dma_sync_sgtable_for_cpu(dev, ubuf->sg, direction);
}
return ret;
@@ -280,7 +279,7 @@ static int end_cpu_udmabuf(struct dma_buf *buf,
if (!ubuf->sg)
return -EINVAL;
dma_sync_sg_for_device(dev, ubuf->sg->sgl, ubuf->sg->nents, direction);
dma_sync_sgtable_for_device(dev, ubuf->sg, direction);
return 0;
}

View File

@@ -1746,9 +1746,9 @@ altr_edac_a10_device_trig(struct file *file, const char __user *user_buf,
local_irq_save(flags);
if (trig_type == ALTR_UE_TRIGGER_CHAR)
writel(priv->ue_set_mask, set_addr);
writew(priv->ue_set_mask, set_addr);
else
writel(priv->ce_set_mask, set_addr);
writew(priv->ce_set_mask, set_addr);
/* Ensure the interrupt test bits are set */
wmb();
@@ -1778,7 +1778,7 @@ altr_edac_a10_device_trig2(struct file *file, const char __user *user_buf,
local_irq_save(flags);
if (trig_type == ALTR_UE_TRIGGER_CHAR) {
writel(priv->ue_set_mask, set_addr);
writew(priv->ue_set_mask, set_addr);
} else {
/* Setup read/write of 4 bytes */
writel(ECC_WORD_WRITE, drvdata->base + ECC_BLK_DBYTECTRL_OFST);

View File

@@ -3882,6 +3882,7 @@ static int per_family_init(struct amd64_pvt *pvt)
break;
case 0x70 ... 0x7f:
pvt->ctl_name = "F19h_M70h";
pvt->max_mcs = 4;
pvt->flags.zn_regs_v2 = 1;
break;
case 0x90 ... 0x9f:

View File

@@ -1708,6 +1708,39 @@ static int scmi_common_get_max_msg_size(const struct scmi_protocol_handle *ph)
return info->desc->max_msg_size;
}
/**
* scmi_protocol_msg_check - Check protocol message attributes
*
* @ph: A reference to the protocol handle.
* @message_id: The ID of the message to check.
* @attributes: A parameter to optionally return the retrieved message
* attributes, in case of Success.
*
* An helper to check protocol message attributes for a specific protocol
* and message pair.
*
* Return: 0 on SUCCESS
*/
static int scmi_protocol_msg_check(const struct scmi_protocol_handle *ph,
u32 message_id, u32 *attributes)
{
int ret;
struct scmi_xfer *t;
ret = xfer_get_init(ph, PROTOCOL_MESSAGE_ATTRIBUTES,
sizeof(__le32), 0, &t);
if (ret)
return ret;
put_unaligned_le32(message_id, t->tx.buf);
ret = do_xfer(ph, t);
if (!ret && attributes)
*attributes = get_unaligned_le32(t->rx.buf);
xfer_put(ph, t);
return ret;
}
/**
* struct scmi_iterator - Iterator descriptor
* @msg: A reference to the message TX buffer; filled by @prepare_message with
@@ -1849,6 +1882,7 @@ scmi_common_fastchannel_init(const struct scmi_protocol_handle *ph,
int ret;
u32 flags;
u64 phys_addr;
u32 attributes;
u8 size;
void __iomem *addr;
struct scmi_xfer *t;
@@ -1857,6 +1891,15 @@ scmi_common_fastchannel_init(const struct scmi_protocol_handle *ph,
struct scmi_msg_resp_desc_fc *resp;
const struct scmi_protocol_instance *pi = ph_to_pi(ph);
/* Check if the MSG_ID supports fastchannel */
ret = scmi_protocol_msg_check(ph, message_id, &attributes);
if (ret || !MSG_SUPPORTS_FASTCHANNEL(attributes)) {
dev_dbg(ph->dev,
"Skip FC init for 0x%02X/%d domain:%d - ret:%d\n",
pi->proto->id, message_id, domain, ret);
return;
}
if (!p_addr) {
ret = -EINVAL;
goto err_out;
@@ -1984,39 +2027,6 @@ static void scmi_common_fastchannel_db_ring(struct scmi_fc_db_info *db)
#endif
}
/**
* scmi_protocol_msg_check - Check protocol message attributes
*
* @ph: A reference to the protocol handle.
* @message_id: The ID of the message to check.
* @attributes: A parameter to optionally return the retrieved message
* attributes, in case of Success.
*
* An helper to check protocol message attributes for a specific protocol
* and message pair.
*
* Return: 0 on SUCCESS
*/
static int scmi_protocol_msg_check(const struct scmi_protocol_handle *ph,
u32 message_id, u32 *attributes)
{
int ret;
struct scmi_xfer *t;
ret = xfer_get_init(ph, PROTOCOL_MESSAGE_ATTRIBUTES,
sizeof(__le32), 0, &t);
if (ret)
return ret;
put_unaligned_le32(message_id, t->tx.buf);
ret = do_xfer(ph, t);
if (!ret && attributes)
*attributes = get_unaligned_le32(t->rx.buf);
xfer_put(ph, t);
return ret;
}
static const struct scmi_proto_helpers_ops helpers_ops = {
.extended_name_get = scmi_common_extended_name_get,
.get_max_msg_size = scmi_common_get_max_msg_size,

View File

@@ -31,6 +31,8 @@
#define SCMI_PROTOCOL_VENDOR_BASE 0x80
#define MSG_SUPPORTS_FASTCHANNEL(x) ((x) & BIT(0))
enum scmi_common_cmd {
PROTOCOL_VERSION = 0x0,
PROTOCOL_ATTRIBUTES = 0x1,

View File

@@ -124,6 +124,7 @@ static __init int sysfb_init(void)
{
struct screen_info *si = &screen_info;
struct device *parent;
unsigned int type;
struct simplefb_platform_data mode;
const char *name;
bool compatible;
@@ -151,17 +152,26 @@ static __init int sysfb_init(void)
goto put_device;
}
type = screen_info_video_type(si);
/* if the FB is incompatible, create a legacy framebuffer device */
if (si->orig_video_isVGA == VIDEO_TYPE_EFI)
name = "efi-framebuffer";
else if (si->orig_video_isVGA == VIDEO_TYPE_VLFB)
name = "vesa-framebuffer";
else if (si->orig_video_isVGA == VIDEO_TYPE_VGAC)
name = "vga-framebuffer";
else if (si->orig_video_isVGA == VIDEO_TYPE_EGAC)
switch (type) {
case VIDEO_TYPE_EGAC:
name = "ega-framebuffer";
else
break;
case VIDEO_TYPE_VGAC:
name = "vga-framebuffer";
break;
case VIDEO_TYPE_VLFB:
name = "vesa-framebuffer";
break;
case VIDEO_TYPE_EFI:
name = "efi-framebuffer";
break;
default:
name = "platform-framebuffer";
break;
}
pd = platform_device_alloc(name, 0);
if (!pd) {

View File

@@ -190,7 +190,9 @@ static int mlxbf3_gpio_probe(struct platform_device *pdev)
struct mlxbf3_gpio_context *gs;
struct gpio_irq_chip *girq;
struct gpio_chip *gc;
char *colon_ptr;
int ret, irq;
long num;
gs = devm_kzalloc(dev, sizeof(*gs), GFP_KERNEL);
if (!gs)
@@ -227,25 +229,39 @@ static int mlxbf3_gpio_probe(struct platform_device *pdev)
gc->owner = THIS_MODULE;
gc->add_pin_ranges = mlxbf3_gpio_add_pin_ranges;
irq = platform_get_irq(pdev, 0);
if (irq >= 0) {
girq = &gs->gc.irq;
gpio_irq_chip_set_chip(girq, &gpio_mlxbf3_irqchip);
girq->default_type = IRQ_TYPE_NONE;
/* This will let us handle the parent IRQ in the driver */
girq->num_parents = 0;
girq->parents = NULL;
girq->parent_handler = NULL;
girq->handler = handle_bad_irq;
colon_ptr = strchr(dev_name(dev), ':');
if (!colon_ptr) {
dev_err(dev, "invalid device name format\n");
return -EINVAL;
}
/*
* Directly request the irq here instead of passing
* a flow-handler because the irq is shared.
*/
ret = devm_request_irq(dev, irq, mlxbf3_gpio_irq_handler,
IRQF_SHARED, dev_name(dev), gs);
if (ret)
return dev_err_probe(dev, ret, "failed to request IRQ");
ret = kstrtol(++colon_ptr, 16, &num);
if (ret) {
dev_err(dev, "invalid device instance\n");
return ret;
}
if (!num) {
irq = platform_get_irq(pdev, 0);
if (irq >= 0) {
girq = &gs->gc.irq;
gpio_irq_chip_set_chip(girq, &gpio_mlxbf3_irqchip);
girq->default_type = IRQ_TYPE_NONE;
/* This will let us handle the parent IRQ in the driver */
girq->num_parents = 0;
girq->parents = NULL;
girq->parent_handler = NULL;
girq->handler = handle_bad_irq;
/*
* Directly request the irq here instead of passing
* a flow-handler because the irq is shared.
*/
ret = devm_request_irq(dev, irq, mlxbf3_gpio_irq_handler,
IRQF_SHARED, dev_name(dev), gs);
if (ret)
return dev_err_probe(dev, ret, "failed to request IRQ");
}
}
platform_set_drvdata(pdev, gs);

View File

@@ -951,7 +951,7 @@ static int pca953x_irq_setup(struct pca953x_chip *chip, int irq_base)
IRQF_ONESHOT | IRQF_SHARED, dev_name(dev),
chip);
if (ret)
return dev_err_probe(dev, client->irq, "failed to request irq\n");
return dev_err_probe(dev, ret, "failed to request irq\n");
return 0;
}

View File

@@ -215,6 +215,15 @@ static void of_gpio_try_fixup_polarity(const struct device_node *np,
*/
{ "lantiq,pci-xway", "gpio-reset", false },
#endif
#if IS_ENABLED(CONFIG_REGULATOR_S5M8767)
/*
* According to S5M8767, the DVS and DS pin are
* active-high signals. However, exynos5250-spring.dts use
* active-low setting.
*/
{ "samsung,s5m8767-pmic", "s5m8767,pmic-buck-dvs-gpios", true },
{ "samsung,s5m8767-pmic", "s5m8767,pmic-buck-ds-gpios", true },
#endif
#if IS_ENABLED(CONFIG_TOUCHSCREEN_TSC2005)
/*
* DTS for Nokia N900 incorrectly specified "active high"

View File

@@ -985,6 +985,10 @@ static int vcn_v4_0_5_start_dpg_mode(struct amdgpu_device *adev, int inst_idx, b
ring->doorbell_index << VCN_RB1_DB_CTRL__OFFSET__SHIFT |
VCN_RB1_DB_CTRL__EN_MASK);
/* Keeping one read-back to ensure all register writes are done, otherwise
* it may introduce race conditions */
RREG32_SOC15(VCN, inst_idx, regVCN_RB1_DB_CTRL);
return 0;
}
@@ -1167,6 +1171,10 @@ static int vcn_v4_0_5_start(struct amdgpu_device *adev)
tmp |= VCN_RB_ENABLE__RB1_EN_MASK;
WREG32_SOC15(VCN, i, regVCN_RB_ENABLE, tmp);
fw_shared->sq.queue_mode &= ~(FW_QUEUE_RING_RESET | FW_QUEUE_DPG_HOLD_OFF);
/* Keeping one read-back to ensure all register writes are done, otherwise
* it may introduce race conditions */
RREG32_SOC15(VCN, i, regVCN_RB_ENABLE);
}
return 0;

View File

@@ -115,7 +115,7 @@ static u32 config_mask(const u64 config)
{
unsigned int bit = config_bit(config);
if (__builtin_constant_p(config))
if (__builtin_constant_p(bit))
BUILD_BUG_ON(bit >
BITS_PER_TYPE(typeof_member(struct i915_pmu,
enable)) - 1);
@@ -124,7 +124,7 @@ static u32 config_mask(const u64 config)
BITS_PER_TYPE(typeof_member(struct i915_pmu,
enable)) - 1);
return BIT(config_bit(config));
return BIT(bit);
}
static bool is_engine_event(struct perf_event *event)

View File

@@ -123,6 +123,20 @@ static void a6xx_set_pagetable(struct a6xx_gpu *a6xx_gpu,
OUT_RING(ring, lower_32_bits(rbmemptr(ring, fence)));
OUT_RING(ring, upper_32_bits(rbmemptr(ring, fence)));
OUT_RING(ring, submit->seqno - 1);
OUT_PKT7(ring, CP_THREAD_CONTROL, 1);
OUT_RING(ring, CP_SET_THREAD_BOTH);
/* Reset state used to synchronize BR and BV */
OUT_PKT7(ring, CP_RESET_CONTEXT_STATE, 1);
OUT_RING(ring,
CP_RESET_CONTEXT_STATE_0_CLEAR_ON_CHIP_TS |
CP_RESET_CONTEXT_STATE_0_CLEAR_RESOURCE_TABLE |
CP_RESET_CONTEXT_STATE_0_CLEAR_BV_BR_COUNTER |
CP_RESET_CONTEXT_STATE_0_RESET_GLOBAL_LOCAL_TS);
OUT_PKT7(ring, CP_THREAD_CONTROL, 1);
OUT_RING(ring, CP_SET_THREAD_BR);
}
if (!sysprof) {

View File

@@ -94,17 +94,21 @@ static void drm_mode_to_intf_timing_params(
timing->vsync_polarity = 0;
}
/* for DP/EDP, Shift timings to align it to bottom right */
if (phys_enc->hw_intf->cap->type == INTF_DP) {
timing->wide_bus_en = dpu_encoder_is_widebus_enabled(phys_enc->parent);
timing->compression_en = dpu_encoder_is_dsc_enabled(phys_enc->parent);
/*
* For DP/EDP, Shift timings to align it to bottom right.
* wide_bus_en is set for everything excluding SDM845 &
* porch changes cause DisplayPort failure and HDMI tearing.
*/
if (phys_enc->hw_intf->cap->type == INTF_DP && timing->wide_bus_en) {
timing->h_back_porch += timing->h_front_porch;
timing->h_front_porch = 0;
timing->v_back_porch += timing->v_front_porch;
timing->v_front_porch = 0;
}
timing->wide_bus_en = dpu_encoder_is_widebus_enabled(phys_enc->parent);
timing->compression_en = dpu_encoder_is_dsc_enabled(phys_enc->parent);
/*
* for DP, divide the horizonal parameters by 2 when
* widebus is enabled

View File

@@ -703,6 +703,13 @@ static int dsi_pll_10nm_init(struct msm_dsi_phy *phy)
/* TODO: Remove this when we have proper display handover support */
msm_dsi_phy_pll_save_state(phy);
/*
* Store also proper vco_current_rate, because its value will be used in
* dsi_10nm_pll_restore_state().
*/
if (!dsi_pll_10nm_vco_recalc_rate(&pll_10nm->clk_hw, VCO_REF_CLK_RATE))
pll_10nm->vco_current_rate = pll_10nm->phy->cfg->min_pll_rate;
return 0;
}

View File

@@ -2260,7 +2260,8 @@ opcode: CP_LOAD_STATE4 (30) (4 dwords)
<reg32 offset="0" name="0">
<bitfield name="CLEAR_ON_CHIP_TS" pos="0" type="boolean"/>
<bitfield name="CLEAR_RESOURCE_TABLE" pos="1" type="boolean"/>
<bitfield name="CLEAR_GLOBAL_LOCAL_TS" pos="2" type="boolean"/>
<bitfield name="CLEAR_BV_BR_COUNTER" pos="2" type="boolean"/>
<bitfield name="RESET_GLOBAL_LOCAL_TS" pos="3" type="boolean"/>
</reg32>
</domain>

View File

@@ -42,7 +42,7 @@
#include "nouveau_acpi.h"
static struct ida bl_ida;
#define BL_NAME_SIZE 15 // 12 for name + 2 for digits + 1 for '\0'
#define BL_NAME_SIZE 24 // 12 for name + 11 for digits + 1 for '\0'
static bool
nouveau_get_backlight_name(char backlight_name[BL_NAME_SIZE],

View File

@@ -974,7 +974,7 @@ static void ssd130x_clear_screen(struct ssd130x_device *ssd130x, u8 *data_array)
static void ssd132x_clear_screen(struct ssd130x_device *ssd130x, u8 *data_array)
{
unsigned int columns = DIV_ROUND_UP(ssd130x->height, SSD132X_SEGMENT_WIDTH);
unsigned int columns = DIV_ROUND_UP(ssd130x->width, SSD132X_SEGMENT_WIDTH);
unsigned int height = ssd130x->height;
memset(data_array, 0, columns * height);

View File

@@ -191,7 +191,6 @@ v3d_job_update_stats(struct v3d_job *job, enum v3d_queue queue)
struct v3d_dev *v3d = job->v3d;
struct v3d_file_priv *file = job->file->driver_priv;
struct v3d_stats *global_stats = &v3d->queue[queue].stats;
struct v3d_stats *local_stats = &file->stats[queue];
u64 now = local_clock();
unsigned long flags;
@@ -201,7 +200,12 @@ v3d_job_update_stats(struct v3d_job *job, enum v3d_queue queue)
else
preempt_disable();
v3d_stats_update(local_stats, now);
/* Don't update the local stats if the file context has already closed */
if (file)
v3d_stats_update(&file->stats[queue], now);
else
drm_dbg(&v3d->drm, "The file descriptor was closed before job completion\n");
v3d_stats_update(global_stats, now);
if (IS_ENABLED(CONFIG_LOCKDEP))

View File

@@ -352,6 +352,36 @@ void xe_display_pm_suspend(struct xe_device *xe)
__xe_display_pm_suspend(xe, false);
}
void xe_display_pm_shutdown(struct xe_device *xe)
{
struct intel_display *display = &xe->display;
if (!xe->info.probe_display)
return;
intel_power_domains_disable(xe);
intel_fbdev_set_suspend(&xe->drm, FBINFO_STATE_SUSPENDED, true);
if (has_display(xe)) {
drm_kms_helper_poll_disable(&xe->drm);
intel_display_driver_disable_user_access(xe);
intel_display_driver_suspend(xe);
}
xe_display_flush_cleanup_work(xe);
intel_dp_mst_suspend(xe);
intel_hpd_cancel_work(xe);
if (has_display(xe))
intel_display_driver_suspend_access(xe);
intel_encoder_suspend_all(display);
intel_encoder_shutdown_all(display);
intel_opregion_suspend(display, PCI_D3cold);
intel_dmc_suspend(xe);
}
void xe_display_pm_runtime_suspend(struct xe_device *xe)
{
if (!xe->info.probe_display)
@@ -376,6 +406,19 @@ void xe_display_pm_suspend_late(struct xe_device *xe)
intel_display_power_suspend_late(xe);
}
void xe_display_pm_shutdown_late(struct xe_device *xe)
{
if (!xe->info.probe_display)
return;
/*
* The only requirement is to reboot with display DC states disabled,
* for now leaving all display power wells in the INIT power domain
* enabled.
*/
intel_power_domains_driver_remove(xe);
}
void xe_display_pm_resume_early(struct xe_device *xe)
{
if (!xe->info.probe_display)

View File

@@ -35,7 +35,9 @@ void xe_display_irq_reset(struct xe_device *xe);
void xe_display_irq_postinstall(struct xe_device *xe, struct xe_gt *gt);
void xe_display_pm_suspend(struct xe_device *xe);
void xe_display_pm_shutdown(struct xe_device *xe);
void xe_display_pm_suspend_late(struct xe_device *xe);
void xe_display_pm_shutdown_late(struct xe_device *xe);
void xe_display_pm_resume_early(struct xe_device *xe);
void xe_display_pm_resume(struct xe_device *xe);
void xe_display_pm_runtime_suspend(struct xe_device *xe);
@@ -66,7 +68,9 @@ static inline void xe_display_irq_reset(struct xe_device *xe) {}
static inline void xe_display_irq_postinstall(struct xe_device *xe, struct xe_gt *gt) {}
static inline void xe_display_pm_suspend(struct xe_device *xe) {}
static inline void xe_display_pm_shutdown(struct xe_device *xe) {}
static inline void xe_display_pm_suspend_late(struct xe_device *xe) {}
static inline void xe_display_pm_shutdown_late(struct xe_device *xe) {}
static inline void xe_display_pm_resume_early(struct xe_device *xe) {}
static inline void xe_display_pm_resume(struct xe_device *xe) {}
static inline void xe_display_pm_runtime_suspend(struct xe_device *xe) {}

View File

@@ -374,6 +374,11 @@ err:
return ERR_PTR(err);
}
static bool xe_driver_flr_disabled(struct xe_device *xe)
{
return xe_mmio_read32(xe_root_mmio_gt(xe), GU_CNTL_PROTECTED) & DRIVERINT_FLR_DIS;
}
/*
* The driver-initiated FLR is the highest level of reset that we can trigger
* from within the driver. It is different from the PCI FLR in that it doesn't
@@ -387,17 +392,12 @@ err:
* if/when a new instance of i915 is bound to the device it will do a full
* re-init anyway.
*/
static void xe_driver_flr(struct xe_device *xe)
static void __xe_driver_flr(struct xe_device *xe)
{
const unsigned int flr_timeout = 3 * MICRO; /* specs recommend a 3s wait */
struct xe_gt *gt = xe_root_mmio_gt(xe);
int ret;
if (xe_mmio_read32(gt, GU_CNTL_PROTECTED) & DRIVERINT_FLR_DIS) {
drm_info_once(&xe->drm, "BIOS Disabled Driver-FLR\n");
return;
}
drm_dbg(&xe->drm, "Triggering Driver-FLR\n");
/*
@@ -438,6 +438,16 @@ static void xe_driver_flr(struct xe_device *xe)
xe_mmio_write32(gt, GU_DEBUG, DRIVERFLR_STATUS);
}
static void xe_driver_flr(struct xe_device *xe)
{
if (xe_driver_flr_disabled(xe)) {
drm_info_once(&xe->drm, "BIOS Disabled Driver-FLR\n");
return;
}
__xe_driver_flr(xe);
}
static void xe_driver_flr_fini(void *arg)
{
struct xe_device *xe = arg;
@@ -797,6 +807,24 @@ void xe_device_remove(struct xe_device *xe)
void xe_device_shutdown(struct xe_device *xe)
{
struct xe_gt *gt;
u8 id;
drm_dbg(&xe->drm, "Shutting down device\n");
if (xe_driver_flr_disabled(xe)) {
xe_display_pm_shutdown(xe);
xe_irq_suspend(xe);
for_each_gt(gt, xe, id)
xe_gt_shutdown(gt);
xe_display_pm_shutdown_late(xe);
} else {
/* BOOM! */
__xe_driver_flr(xe);
}
}
/**

View File

@@ -98,14 +98,14 @@ void xe_gt_sanitize(struct xe_gt *gt)
static void xe_gt_enable_host_l2_vram(struct xe_gt *gt)
{
unsigned int fw_ref;
u32 reg;
int err;
if (!XE_WA(gt, 16023588340))
return;
err = xe_force_wake_get(gt_to_fw(gt), XE_FW_GT);
if (WARN_ON(err))
fw_ref = xe_force_wake_get(gt_to_fw(gt), XE_FW_GT);
if (!fw_ref)
return;
if (!xe_gt_is_media_type(gt)) {
@@ -114,14 +114,14 @@ static void xe_gt_enable_host_l2_vram(struct xe_gt *gt)
xe_gt_mcr_multicast_write(gt, XE2_GAMREQSTRM_CTRL, reg);
}
xe_gt_mcr_multicast_write(gt, XEHPC_L3CLOS_MASK(3), 0x3);
xe_force_wake_put(gt_to_fw(gt), XE_FW_GT);
xe_gt_mcr_multicast_write(gt, XEHPC_L3CLOS_MASK(3), 0xF);
xe_force_wake_put(gt_to_fw(gt), fw_ref);
}
static void xe_gt_disable_host_l2_vram(struct xe_gt *gt)
{
unsigned int fw_ref;
u32 reg;
int err;
if (!XE_WA(gt, 16023588340))
return;
@@ -129,15 +129,15 @@ static void xe_gt_disable_host_l2_vram(struct xe_gt *gt)
if (xe_gt_is_media_type(gt))
return;
err = xe_force_wake_get(gt_to_fw(gt), XE_FW_GT);
if (WARN_ON(err))
fw_ref = xe_force_wake_get(gt_to_fw(gt), XE_FW_GT);
if (!fw_ref)
return;
reg = xe_gt_mcr_unicast_read_any(gt, XE2_GAMREQSTRM_CTRL);
reg &= ~CG_DIS_CNTLBUS;
xe_gt_mcr_multicast_write(gt, XE2_GAMREQSTRM_CTRL, reg);
xe_force_wake_put(gt_to_fw(gt), XE_FW_GT);
xe_force_wake_put(gt_to_fw(gt), fw_ref);
}
/**
@@ -405,11 +405,14 @@ static void dump_pat_on_error(struct xe_gt *gt)
static int gt_fw_domain_init(struct xe_gt *gt)
{
unsigned int fw_ref;
int err, i;
err = xe_force_wake_get(gt_to_fw(gt), XE_FW_GT);
if (err)
fw_ref = xe_force_wake_get(gt_to_fw(gt), XE_FW_GT);
if (!fw_ref) {
err = -ETIMEDOUT;
goto err_hw_fence_irq;
}
if (!xe_gt_is_media_type(gt)) {
err = xe_ggtt_init(gt_to_tile(gt)->mem.ggtt);
@@ -444,14 +447,12 @@ static int gt_fw_domain_init(struct xe_gt *gt)
*/
gt->info.gmdid = xe_mmio_read32(gt, GMD_ID);
err = xe_force_wake_put(gt_to_fw(gt), XE_FW_GT);
XE_WARN_ON(err);
xe_force_wake_put(gt_to_fw(gt), fw_ref);
return 0;
err_force_wake:
dump_pat_on_error(gt);
xe_force_wake_put(gt_to_fw(gt), XE_FW_GT);
xe_force_wake_put(gt_to_fw(gt), fw_ref);
err_hw_fence_irq:
for (i = 0; i < XE_ENGINE_CLASS_MAX; ++i)
xe_hw_fence_irq_finish(&gt->fence_irq[i]);
@@ -461,11 +462,14 @@ err_hw_fence_irq:
static int all_fw_domain_init(struct xe_gt *gt)
{
unsigned int fw_ref;
int err, i;
err = xe_force_wake_get(gt_to_fw(gt), XE_FORCEWAKE_ALL);
if (err)
goto err_hw_fence_irq;
fw_ref = xe_force_wake_get(gt_to_fw(gt), XE_FORCEWAKE_ALL);
if (!xe_force_wake_ref_has_domain(fw_ref, XE_FORCEWAKE_ALL)) {
err = -ETIMEDOUT;
goto err_force_wake;
}
xe_gt_mcr_set_implicit_defaults(gt);
xe_wa_process_gt(gt);
@@ -531,14 +535,12 @@ static int all_fw_domain_init(struct xe_gt *gt)
if (IS_SRIOV_PF(gt_to_xe(gt)))
xe_gt_sriov_pf_init_hw(gt);
err = xe_force_wake_put(gt_to_fw(gt), XE_FORCEWAKE_ALL);
XE_WARN_ON(err);
xe_force_wake_put(gt_to_fw(gt), fw_ref);
return 0;
err_force_wake:
xe_force_wake_put(gt_to_fw(gt), XE_FORCEWAKE_ALL);
err_hw_fence_irq:
xe_force_wake_put(gt_to_fw(gt), fw_ref);
for (i = 0; i < XE_ENGINE_CLASS_MAX; ++i)
xe_hw_fence_irq_finish(&gt->fence_irq[i]);
@@ -551,11 +553,12 @@ err_hw_fence_irq:
*/
int xe_gt_init_hwconfig(struct xe_gt *gt)
{
unsigned int fw_ref;
int err;
err = xe_force_wake_get(gt_to_fw(gt), XE_FW_GT);
if (err)
goto out;
fw_ref = xe_force_wake_get(gt_to_fw(gt), XE_FW_GT);
if (!fw_ref)
return -ETIMEDOUT;
xe_gt_mcr_init_early(gt);
xe_pat_init(gt);
@@ -573,8 +576,7 @@ int xe_gt_init_hwconfig(struct xe_gt *gt)
xe_gt_enable_host_l2_vram(gt);
out_fw:
xe_force_wake_put(gt_to_fw(gt), XE_FW_GT);
out:
xe_force_wake_put(gt_to_fw(gt), fw_ref);
return err;
}
@@ -744,6 +746,7 @@ static int do_gt_restart(struct xe_gt *gt)
static int gt_reset(struct xe_gt *gt)
{
unsigned int fw_ref;
int err;
if (xe_device_wedged(gt_to_xe(gt)))
@@ -764,9 +767,11 @@ static int gt_reset(struct xe_gt *gt)
xe_gt_sanitize(gt);
err = xe_force_wake_get(gt_to_fw(gt), XE_FORCEWAKE_ALL);
if (err)
goto err_msg;
fw_ref = xe_force_wake_get(gt_to_fw(gt), XE_FORCEWAKE_ALL);
if (!xe_force_wake_ref_has_domain(fw_ref, XE_FORCEWAKE_ALL)) {
err = -ETIMEDOUT;
goto err_out;
}
xe_uc_gucrc_disable(&gt->uc);
xe_uc_stop_prepare(&gt->uc);
@@ -784,8 +789,7 @@ static int gt_reset(struct xe_gt *gt)
if (err)
goto err_out;
err = xe_force_wake_put(gt_to_fw(gt), XE_FORCEWAKE_ALL);
XE_WARN_ON(err);
xe_force_wake_put(gt_to_fw(gt), fw_ref);
xe_pm_runtime_put(gt_to_xe(gt));
xe_gt_info(gt, "reset done\n");
@@ -793,8 +797,7 @@ static int gt_reset(struct xe_gt *gt)
return 0;
err_out:
XE_WARN_ON(xe_force_wake_put(gt_to_fw(gt), XE_FORCEWAKE_ALL));
err_msg:
xe_force_wake_put(gt_to_fw(gt), fw_ref);
XE_WARN_ON(xe_uc_start(&gt->uc));
err_fail:
xe_gt_err(gt, "reset failed (%pe)\n", ERR_PTR(err));
@@ -826,22 +829,25 @@ void xe_gt_reset_async(struct xe_gt *gt)
void xe_gt_suspend_prepare(struct xe_gt *gt)
{
XE_WARN_ON(xe_force_wake_get(gt_to_fw(gt), XE_FORCEWAKE_ALL));
unsigned int fw_ref;
fw_ref = xe_force_wake_get(gt_to_fw(gt), XE_FORCEWAKE_ALL);
xe_uc_suspend_prepare(&gt->uc);
XE_WARN_ON(xe_force_wake_put(gt_to_fw(gt), XE_FORCEWAKE_ALL));
xe_force_wake_put(gt_to_fw(gt), fw_ref);
}
int xe_gt_suspend(struct xe_gt *gt)
{
unsigned int fw_ref;
int err;
xe_gt_dbg(gt, "suspending\n");
xe_gt_sanitize(gt);
err = xe_force_wake_get(gt_to_fw(gt), XE_FORCEWAKE_ALL);
if (err)
fw_ref = xe_force_wake_get(gt_to_fw(gt), XE_FORCEWAKE_ALL);
if (!xe_force_wake_ref_has_domain(fw_ref, XE_FORCEWAKE_ALL))
goto err_msg;
err = xe_uc_suspend(&gt->uc);
@@ -852,19 +858,29 @@ int xe_gt_suspend(struct xe_gt *gt)
xe_gt_disable_host_l2_vram(gt);
XE_WARN_ON(xe_force_wake_put(gt_to_fw(gt), XE_FORCEWAKE_ALL));
xe_force_wake_put(gt_to_fw(gt), fw_ref);
xe_gt_dbg(gt, "suspended\n");
return 0;
err_force_wake:
XE_WARN_ON(xe_force_wake_put(gt_to_fw(gt), XE_FORCEWAKE_ALL));
err_msg:
err = -ETIMEDOUT;
err_force_wake:
xe_force_wake_put(gt_to_fw(gt), fw_ref);
xe_gt_err(gt, "suspend failed (%pe)\n", ERR_PTR(err));
return err;
}
void xe_gt_shutdown(struct xe_gt *gt)
{
unsigned int fw_ref;
fw_ref = xe_force_wake_get(gt_to_fw(gt), XE_FORCEWAKE_ALL);
do_gt_reset(gt);
xe_force_wake_put(gt_to_fw(gt), fw_ref);
}
/**
* xe_gt_sanitize_freq() - Restore saved frequencies if necessary.
* @gt: the GT object
@@ -887,11 +903,12 @@ int xe_gt_sanitize_freq(struct xe_gt *gt)
int xe_gt_resume(struct xe_gt *gt)
{
unsigned int fw_ref;
int err;
xe_gt_dbg(gt, "resuming\n");
err = xe_force_wake_get(gt_to_fw(gt), XE_FORCEWAKE_ALL);
if (err)
fw_ref = xe_force_wake_get(gt_to_fw(gt), XE_FORCEWAKE_ALL);
if (!xe_force_wake_ref_has_domain(fw_ref, XE_FORCEWAKE_ALL))
goto err_msg;
err = do_gt_restart(gt);
@@ -900,14 +917,15 @@ int xe_gt_resume(struct xe_gt *gt)
xe_gt_idle_enable_pg(gt);
XE_WARN_ON(xe_force_wake_put(gt_to_fw(gt), XE_FORCEWAKE_ALL));
xe_force_wake_put(gt_to_fw(gt), fw_ref);
xe_gt_dbg(gt, "resumed\n");
return 0;
err_force_wake:
XE_WARN_ON(xe_force_wake_put(gt_to_fw(gt), XE_FORCEWAKE_ALL));
err_msg:
err = -ETIMEDOUT;
err_force_wake:
xe_force_wake_put(gt_to_fw(gt), fw_ref);
xe_gt_err(gt, "resume failed (%pe)\n", ERR_PTR(err));
return err;

Some files were not shown because too many files have changed in this diff Show More