Merge 6.1.79 into android14-6.1-lts

Changes in 6.1.79
	work around gcc bugs with 'asm goto' with outputs
	update workarounds for gcc "asm goto" issue
	btrfs: add and use helper to check if block group is used
	btrfs: do not delete unused block group if it may be used soon
	btrfs: forbid creating subvol qgroups
	btrfs: do not ASSERT() if the newly created subvolume already got read
	btrfs: forbid deleting live subvol qgroup
	btrfs: send: return EOPNOTSUPP on unknown flags
	btrfs: don't reserve space for checksums when writing to nocow files
	btrfs: reject encoded write if inode has nodatasum flag set
	btrfs: don't drop extent_map for free space inode on write error
	driver core: Fix device_link_flag_is_sync_state_only()
	of: unittest: Fix compile in the non-dynamic case
	KVM: selftests: Clear dirty ring states between two modes in dirty_log_test
	KVM: selftests: Fix a semaphore imbalance in the dirty ring logging test
	wifi: iwlwifi: Fix some error codes
	wifi: iwlwifi: uninitialized variable in iwl_acpi_get_ppag_table()
	of: property: Improve finding the supplier of a remote-endpoint property
	net: openvswitch: limit the number of recursions from action sets
	lan966x: Fix crash when adding interface under a lag
	tls/sw: Use splice_eof() to flush
	tls: extract context alloc/initialization out of tls_set_sw_offload
	net: tls: factor out tls_*crypt_async_wait()
	tls: fix race between async notify and socket close
	net: tls: fix use-after-free with partial reads and async decrypt
	net: tls: fix returned read length with async decrypt
	spi: ppc4xx: Drop write-only variable
	ASoC: rt5645: Fix deadlock in rt5645_jack_detect_work()
	net: sysfs: Fix /sys/class/net/<iface> path for statistics
	nouveau/svm: fix kvcalloc() argument order
	MIPS: Add 'memory' clobber to csum_ipv6_magic() inline assembler
	i40e: Do not allow untrusted VF to remove administratively set MAC
	i40e: Fix waiting for queues of all VSIs to be disabled
	scs: add CONFIG_MMU dependency for vfree_atomic()
	tracing/trigger: Fix to return error if failed to alloc snapshot
	mm/writeback: fix possible divide-by-zero in wb_dirty_limits(), again
	scsi: storvsc: Fix ring buffer size calculation
	dm-crypt, dm-verity: disable tasklets
	ASoC: amd: yc: Add DMI quirk for MSI Bravo 15 C7VF
	parisc: Prevent hung tasks when printing inventory on serial console
	ALSA: hda/realtek: Fix the external mic not being recognised for Acer Swift 1 SF114-32
	ALSA: hda/realtek: Enable Mute LED on HP Laptop 14-fq0xxx
	HID: i2c-hid-of: fix NULL-deref on failed power up
	HID: wacom: generic: Avoid reporting a serial of '0' to userspace
	HID: wacom: Do not register input devices until after hid_hw_start
	iio: hid-sensor-als: Return 0 for HID_USAGE_SENSOR_TIME_TIMESTAMP
	usb: ucsi: Add missing ppm_lock
	usb: ulpi: Fix debugfs directory leak
	usb: ucsi_acpi: Fix command completion handling
	USB: hub: check for alternate port before enabling A_ALT_HNP_SUPPORT
	usb: f_mass_storage: forbid async queue when shutdown happen
	usb: dwc3: gadget: Fix NULL pointer dereference in dwc3_gadget_suspend
	interconnect: qcom: sc8180x: Mark CO0 BCM keepalive
	media: ir_toy: fix a memleak in irtoy_tx
	driver core: fw_devlink: Improve detection of overlapping cycles
	powerpc/kasan: Fix addr error caused by page alignment
	cifs: fix underflow in parse_server_interfaces()
	i2c: qcom-geni: Correct I2C TRE sequence
	irqchip/loongson-eiointc: Use correct struct type in eiointc_domain_alloc()
	powerpc/kasan: Limit KASAN thread size increase to 32KB
	i2c: pasemi: split driver into two separate modules
	i2c: i801: Fix block process call transactions
	modpost: trim leading spaces when processing source files list
	mptcp: get rid of msk->subflow
	mptcp: fix data re-injection from stale subflow
	selftests: mptcp: add missing kconfig for NF Filter
	selftests: mptcp: add missing kconfig for NF Filter in v6
	selftests: mptcp: add missing kconfig for NF Mangle
	selftests: mptcp: increase timeout to 30 min
	mptcp: drop the push_pending field
	mptcp: check addrs list in userspace_pm_get_local_id
	media: Revert "media: rkisp1: Drop IRQF_SHARED"
	scsi: Revert "scsi: fcoe: Fix potential deadlock on &fip->ctlr_lock"
	Revert "drm/amd: flush any delayed gfxoff on suspend entry"
	drm/virtio: Set segment size for virtio_gpu device
	lsm: fix the logic in security_inode_getsecctx()
	firewire: core: correct documentation of fw_csr_string() kernel API
	ALSA: hda/realtek: Apply headset jack quirk for non-bass alc287 thinkpads
	kbuild: Fix changing ELF file type for output of gen_btf for big endian
	nfc: nci: free rx_data_reassembly skb on NCI device cleanup
	net: hsr: remove WARN_ONCE() in send_hsr_supervision_frame()
	net: stmmac: do not clear TBS enable bit on link up/down
	xen-netback: properly sync TX responses
	modpost: propagate W=1 build option to modpost
	modpost: Don't let "driver"s reference .exit.*
	linux/init: remove __memexit* annotations
	modpost: Include '.text.*' in TEXT_SECTIONS
	um: Fix adding '-no-pie' for clang
	modpost: Add '.ltext' and '.ltext.*' to TEXT_SECTIONS
	ALSA: hda/realtek: Enable headset mic on Vaio VJFE-ADL
	ASoC: codecs: wcd938x: handle deferred probe
	ALSA: hda/cs8409: Suppress vmaster control for Dolphin models
	ALSA: hda/realtek: fix mute/micmute LEDs for HP ZBook Power
	binder: signal epoll threads of self-work
	misc: fastrpc: Mark all sessions as invalid in cb_remove
	ext4: fix double-free of blocks due to wrong extents moved_len
	ext4: avoid bb_free and bb_fragments inconsistency in mb_free_blocks()
	tracing: Fix wasted memory in saved_cmdlines logic
	staging: iio: ad5933: fix type mismatch regression
	iio: magnetometer: rm3100: add boundary check for the value read from RM3100_REG_TMRC
	iio: core: fix memleak in iio_device_register_sysfs
	iio: commom: st_sensors: ensure proper DMA alignment
	iio: accel: bma400: Fix a compilation problem
	iio: adc: ad_sigma_delta: ensure proper DMA alignment
	iio: imu: adis: ensure proper DMA alignment
	iio: imu: bno055: serdev requires REGMAP
	media: rc: bpf attach/detach requires write permission
	ksmbd: free aux buffer if ksmbd_iov_pin_rsp_read fails
	xfrm: Remove inner/outer modes from output path
	xfrm: Remove inner/outer modes from input path
	drm/msm: Wire up tlb ops
	drm/prime: Support page array >= 4GB
	drm/amd/display: Increase frame-larger-than for all display_mode_vba files
	drm/amd/display: Preserve original aspect ratio in create stream
	hv_netvsc: Fix race condition between netvsc_probe and netvsc_remove
	ring-buffer: Clean ring_buffer_poll_wait() error return
	nfp: flower: fix hardware offload for the transfer layer port
	serial: max310x: set default value when reading clock ready bit
	serial: max310x: improve crystal stable clock detection
	serial: max310x: fail probe if clock crystal is unstable
	serial: max310x: prevent infinite while() loop in port startup
	powerpc/64: Set task pt_regs->link to the LR value on scv entry
	powerpc/cputable: Add missing PPC_FEATURE_BOOKE on PPC64 Book-E
	powerpc/pseries: fix accuracy of stolen time
	x86/Kconfig: Transmeta Crusoe is CPU family 5, not 6
	x86/fpu: Stop relying on userspace for info to fault in xsave buffer
	KVM: x86/pmu: Fix type length error when reading pmu->fixed_ctr_ctrl
	x86/mm/ident_map: Use gbpages only where full GB page should be mapped.
	io_uring/net: fix multishot accept overflow handling
	mmc: slot-gpio: Allow non-sleeping GPIO ro
	ALSA: hda/realtek: fix mute/micmute LED For HP mt645
	ALSA: hda/conexant: Add quirk for SWS JS201D
	nilfs2: fix data corruption in dsync block recovery for small block sizes
	nilfs2: fix hang in nilfs_lookup_dirty_data_buffers()
	crypto: ccp - Fix null pointer dereference in __sev_platform_shutdown_locked
	nfp: use correct macro for LengthSelect in BAR config
	nfp: flower: prevent re-adding mac index for bonded port
	wifi: cfg80211: fix wiphy delayed work queueing
	wifi: mac80211: reload info pointer in ieee80211_tx_dequeue()
	irqchip/irq-brcmstb-l2: Add write memory barrier before exit
	irqchip/gic-v3-its: Fix GICv4.1 VPE affinity update
	zonefs: Improve error handling
	mmc: sdhci-pci-o2micro: Fix a warm reboot issue that disk can't be detected by BIOS
	ASoC: amd: yc: Add DMI quirk for Lenovo Ideapad Pro 5 16ARP8
	tools/rtla: Remove unused sched_getattr() function
	tools/rtla: Replace setting prio with nice for SCHED_OTHER
	tools/rtla: Exit with EXIT_SUCCESS when help is invoked
	tools/rtla: Fix uninitialized bucket/data->bucket_size warning
	tools/rtla: Fix Makefile compiler options for clang
	fs: relax mount_setattr() permission checks
	net: ethernet: ti: cpsw: enable mac_managed_pm to fix mdio
	s390/qeth: Fix potential loss of L3-IP@ in case of network issues
	net: ethernet: ti: cpsw_new: enable mac_managed_pm to fix mdio
	hv_netvsc: Register VF in netvsc_probe if NET_DEVICE_REGISTER missed
	ceph: prevent use-after-free in encode_cap_msg()
	fs,hugetlb: fix NULL pointer dereference in hugetlbs_fill_super
	mm: hugetlb pages should not be reserved by shmat() if SHM_NORESERVE
	of: property: fix typo in io-channels
	can: netlink: Fix TDCO calculation using the old data bittiming
	can: j1939: prevent deadlock by changing j1939_socks_lock to rwlock
	can: j1939: Fix UAF in j1939_sk_match_filter during setsockopt(SO_J1939_FILTER)
	pmdomain: core: Move the unused cleanup to a _sync initcall
	fs/proc: do_task_stat: move thread_group_cputime_adjusted() outside of lock_task_sighand()
	tracing: Inform kmemleak of saved_cmdlines allocation
	xfrm: Use xfrm_state selector for BEET input
	xfrm: Silence warnings triggerable by bad packets
	tls: fix NULL deref on tls_sw_splice_eof() with empty record
	selftests/mm: ksm_tests should only MADV_HUGEPAGE valid memory
	selftests/mm: Update va_high_addr_switch.sh to check CPU for la57 flag
	md: bypass block throttle for superblock update
	ARM: dts: imx6q-apalis: add can power-up delay on ixora board
	wifi: mwifiex: Support SD8978 chipset
	wifi: mwifiex: add extra delay for firmware ready
	bus: moxtet: Add spi device table
	arm64: dts: qcom: msm8916: Enable blsp_dma by default
	arm64: dts: qcom: msm8916: Make blsp_dma controlled-remotely
	arm64: dts: qcom: sdm845: fix USB SS wakeup
	arm64: dts: qcom: sm8150: fix USB SS wakeup
	wifi: mwifiex: fix uninitialized firmware_stat
	crypto: lib/mpi - Fix unexpected pointer access in mpi_ec_init
	block: fix partial zone append completion handling in req_bio_endio()
	netfilter: ipset: fix performance regression in swap operation
	netfilter: ipset: Missing gc cancellations fixed
	parisc: Fix random data corruption from exception handler
	nfsd: fix RELEASE_LOCKOWNER
	nfsd: don't take fi_lock in nfsd_break_deleg_cb()
	hrtimer: Ignore slack time for RT tasks in schedule_hrtimeout_range()
	RDMA/irdma: Ensure iWarp QP queue memory is OS paged aligned
	smb: client: fix potential OOBs in smb2_parse_contexts()
	smb: client: fix parsing of SMB3.1.1 POSIX create context
	net: prevent mss overflow in skb_segment()
	bpf: Add struct for bin_args arg in bpf_bprintf_prepare
	bpf: Do cleanup in bpf_bprintf_cleanup only when needed
	bpf: Remove trace_printk_lock
	userfaultfd: fix mmap_changing checking in mfill_atomic_hugetlb
	dmaengine: ioat: Free up __cleanup() name
	apparmor: Free up __cleanup() name
	locking: Introduce __cleanup() based infrastructure
	kbuild: Drop -Wdeclaration-after-statement
	sched/membarrier: reduce the ability to hammer on sys_membarrier
	of: property: Add in-ports/out-ports support to of_graph_get_port_parent()
	nilfs2: fix potential bug in end_buffer_async_write
	nilfs2: replace WARN_ONs for invalid DAT metadata block requests
	dm: limit the number of targets and parameter size area
	arm64: Subscribe Microsoft Azure Cobalt 100 to ARM Neoverse N2 errata
	fs/ntfs3: Add null pointer checks
	mlxsw: spectrum_acl_tcam: Fix stack corruption
	Linux 6.1.79

Change-Id: I7051a7a0b0aae8ff6503314e4999e561e713769a
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Greg Kroah-Hartman
2024-04-19 13:12:20 +00:00
250 changed files with 2314 additions and 1047 deletions

View File

@@ -1,4 +1,4 @@
What: /sys/class/<iface>/statistics/collisions What: /sys/class/net/<iface>/statistics/collisions
Date: April 2005 Date: April 2005
KernelVersion: 2.6.12 KernelVersion: 2.6.12
Contact: netdev@vger.kernel.org Contact: netdev@vger.kernel.org
@@ -6,7 +6,7 @@ Description:
Indicates the number of collisions seen by this network device. Indicates the number of collisions seen by this network device.
This value might not be relevant with all MAC layers. This value might not be relevant with all MAC layers.
What: /sys/class/<iface>/statistics/multicast What: /sys/class/net/<iface>/statistics/multicast
Date: April 2005 Date: April 2005
KernelVersion: 2.6.12 KernelVersion: 2.6.12
Contact: netdev@vger.kernel.org Contact: netdev@vger.kernel.org
@@ -14,7 +14,7 @@ Description:
Indicates the number of multicast packets received by this Indicates the number of multicast packets received by this
network device. network device.
What: /sys/class/<iface>/statistics/rx_bytes What: /sys/class/net/<iface>/statistics/rx_bytes
Date: April 2005 Date: April 2005
KernelVersion: 2.6.12 KernelVersion: 2.6.12
Contact: netdev@vger.kernel.org Contact: netdev@vger.kernel.org
@@ -23,7 +23,7 @@ Description:
See the network driver for the exact meaning of when this See the network driver for the exact meaning of when this
value is incremented. value is incremented.
What: /sys/class/<iface>/statistics/rx_compressed What: /sys/class/net/<iface>/statistics/rx_compressed
Date: April 2005 Date: April 2005
KernelVersion: 2.6.12 KernelVersion: 2.6.12
Contact: netdev@vger.kernel.org Contact: netdev@vger.kernel.org
@@ -32,7 +32,7 @@ Description:
network device. This value might only be relevant for interfaces network device. This value might only be relevant for interfaces
that support packet compression (e.g: PPP). that support packet compression (e.g: PPP).
What: /sys/class/<iface>/statistics/rx_crc_errors What: /sys/class/net/<iface>/statistics/rx_crc_errors
Date: April 2005 Date: April 2005
KernelVersion: 2.6.12 KernelVersion: 2.6.12
Contact: netdev@vger.kernel.org Contact: netdev@vger.kernel.org
@@ -41,7 +41,7 @@ Description:
by this network device. Note that the specific meaning might by this network device. Note that the specific meaning might
depend on the MAC layer used by the interface. depend on the MAC layer used by the interface.
What: /sys/class/<iface>/statistics/rx_dropped What: /sys/class/net/<iface>/statistics/rx_dropped
Date: April 2005 Date: April 2005
KernelVersion: 2.6.12 KernelVersion: 2.6.12
Contact: netdev@vger.kernel.org Contact: netdev@vger.kernel.org
@@ -51,7 +51,7 @@ Description:
packet processing. See the network driver for the exact packet processing. See the network driver for the exact
meaning of this value. meaning of this value.
What: /sys/class/<iface>/statistics/rx_errors What: /sys/class/net/<iface>/statistics/rx_errors
Date: April 2005 Date: April 2005
KernelVersion: 2.6.12 KernelVersion: 2.6.12
Contact: netdev@vger.kernel.org Contact: netdev@vger.kernel.org
@@ -59,7 +59,7 @@ Description:
Indicates the number of receive errors on this network device. Indicates the number of receive errors on this network device.
See the network driver for the exact meaning of this value. See the network driver for the exact meaning of this value.
What: /sys/class/<iface>/statistics/rx_fifo_errors What: /sys/class/net/<iface>/statistics/rx_fifo_errors
Date: April 2005 Date: April 2005
KernelVersion: 2.6.12 KernelVersion: 2.6.12
Contact: netdev@vger.kernel.org Contact: netdev@vger.kernel.org
@@ -68,7 +68,7 @@ Description:
network device. See the network driver for the exact network device. See the network driver for the exact
meaning of this value. meaning of this value.
What: /sys/class/<iface>/statistics/rx_frame_errors What: /sys/class/net/<iface>/statistics/rx_frame_errors
Date: April 2005 Date: April 2005
KernelVersion: 2.6.12 KernelVersion: 2.6.12
Contact: netdev@vger.kernel.org Contact: netdev@vger.kernel.org
@@ -78,7 +78,7 @@ Description:
on the MAC layer protocol used. See the network driver for on the MAC layer protocol used. See the network driver for
the exact meaning of this value. the exact meaning of this value.
What: /sys/class/<iface>/statistics/rx_length_errors What: /sys/class/net/<iface>/statistics/rx_length_errors
Date: April 2005 Date: April 2005
KernelVersion: 2.6.12 KernelVersion: 2.6.12
Contact: netdev@vger.kernel.org Contact: netdev@vger.kernel.org
@@ -87,7 +87,7 @@ Description:
error, oversized or undersized. See the network driver for the error, oversized or undersized. See the network driver for the
exact meaning of this value. exact meaning of this value.
What: /sys/class/<iface>/statistics/rx_missed_errors What: /sys/class/net/<iface>/statistics/rx_missed_errors
Date: April 2005 Date: April 2005
KernelVersion: 2.6.12 KernelVersion: 2.6.12
Contact: netdev@vger.kernel.org Contact: netdev@vger.kernel.org
@@ -96,7 +96,7 @@ Description:
due to lack of capacity in the receive side. See the network due to lack of capacity in the receive side. See the network
driver for the exact meaning of this value. driver for the exact meaning of this value.
What: /sys/class/<iface>/statistics/rx_nohandler What: /sys/class/net/<iface>/statistics/rx_nohandler
Date: February 2016 Date: February 2016
KernelVersion: 4.6 KernelVersion: 4.6
Contact: netdev@vger.kernel.org Contact: netdev@vger.kernel.org
@@ -104,7 +104,7 @@ Description:
Indicates the number of received packets that were dropped on Indicates the number of received packets that were dropped on
an inactive device by the network core. an inactive device by the network core.
What: /sys/class/<iface>/statistics/rx_over_errors What: /sys/class/net/<iface>/statistics/rx_over_errors
Date: April 2005 Date: April 2005
KernelVersion: 2.6.12 KernelVersion: 2.6.12
Contact: netdev@vger.kernel.org Contact: netdev@vger.kernel.org
@@ -114,7 +114,7 @@ Description:
(e.g: larger than MTU). See the network driver for the exact (e.g: larger than MTU). See the network driver for the exact
meaning of this value. meaning of this value.
What: /sys/class/<iface>/statistics/rx_packets What: /sys/class/net/<iface>/statistics/rx_packets
Date: April 2005 Date: April 2005
KernelVersion: 2.6.12 KernelVersion: 2.6.12
Contact: netdev@vger.kernel.org Contact: netdev@vger.kernel.org
@@ -122,7 +122,7 @@ Description:
Indicates the total number of good packets received by this Indicates the total number of good packets received by this
network device. network device.
What: /sys/class/<iface>/statistics/tx_aborted_errors What: /sys/class/net/<iface>/statistics/tx_aborted_errors
Date: April 2005 Date: April 2005
KernelVersion: 2.6.12 KernelVersion: 2.6.12
Contact: netdev@vger.kernel.org Contact: netdev@vger.kernel.org
@@ -132,7 +132,7 @@ Description:
a medium collision). See the network driver for the exact a medium collision). See the network driver for the exact
meaning of this value. meaning of this value.
What: /sys/class/<iface>/statistics/tx_bytes What: /sys/class/net/<iface>/statistics/tx_bytes
Date: April 2005 Date: April 2005
KernelVersion: 2.6.12 KernelVersion: 2.6.12
Contact: netdev@vger.kernel.org Contact: netdev@vger.kernel.org
@@ -143,7 +143,7 @@ Description:
transmitted packets or all packets that have been queued for transmitted packets or all packets that have been queued for
transmission. transmission.
What: /sys/class/<iface>/statistics/tx_carrier_errors What: /sys/class/net/<iface>/statistics/tx_carrier_errors
Date: April 2005 Date: April 2005
KernelVersion: 2.6.12 KernelVersion: 2.6.12
Contact: netdev@vger.kernel.org Contact: netdev@vger.kernel.org
@@ -152,7 +152,7 @@ Description:
because of carrier errors (e.g: physical link down). See the because of carrier errors (e.g: physical link down). See the
network driver for the exact meaning of this value. network driver for the exact meaning of this value.
What: /sys/class/<iface>/statistics/tx_compressed What: /sys/class/net/<iface>/statistics/tx_compressed
Date: April 2005 Date: April 2005
KernelVersion: 2.6.12 KernelVersion: 2.6.12
Contact: netdev@vger.kernel.org Contact: netdev@vger.kernel.org
@@ -161,7 +161,7 @@ Description:
this might only be relevant for devices that support this might only be relevant for devices that support
compression (e.g: PPP). compression (e.g: PPP).
What: /sys/class/<iface>/statistics/tx_dropped What: /sys/class/net/<iface>/statistics/tx_dropped
Date: April 2005 Date: April 2005
KernelVersion: 2.6.12 KernelVersion: 2.6.12
Contact: netdev@vger.kernel.org Contact: netdev@vger.kernel.org
@@ -170,7 +170,7 @@ Description:
See the driver for the exact reasons as to why the packets were See the driver for the exact reasons as to why the packets were
dropped. dropped.
What: /sys/class/<iface>/statistics/tx_errors What: /sys/class/net/<iface>/statistics/tx_errors
Date: April 2005 Date: April 2005
KernelVersion: 2.6.12 KernelVersion: 2.6.12
Contact: netdev@vger.kernel.org Contact: netdev@vger.kernel.org
@@ -179,7 +179,7 @@ Description:
a network device. See the driver for the exact reasons as to a network device. See the driver for the exact reasons as to
why the packets were dropped. why the packets were dropped.
What: /sys/class/<iface>/statistics/tx_fifo_errors What: /sys/class/net/<iface>/statistics/tx_fifo_errors
Date: April 2005 Date: April 2005
KernelVersion: 2.6.12 KernelVersion: 2.6.12
Contact: netdev@vger.kernel.org Contact: netdev@vger.kernel.org
@@ -188,7 +188,7 @@ Description:
FIFO error. See the driver for the exact reasons as to why the FIFO error. See the driver for the exact reasons as to why the
packets were dropped. packets were dropped.
What: /sys/class/<iface>/statistics/tx_heartbeat_errors What: /sys/class/net/<iface>/statistics/tx_heartbeat_errors
Date: April 2005 Date: April 2005
KernelVersion: 2.6.12 KernelVersion: 2.6.12
Contact: netdev@vger.kernel.org Contact: netdev@vger.kernel.org
@@ -197,7 +197,7 @@ Description:
reported as heartbeat errors. See the driver for the exact reported as heartbeat errors. See the driver for the exact
reasons as to why the packets were dropped. reasons as to why the packets were dropped.
What: /sys/class/<iface>/statistics/tx_packets What: /sys/class/net/<iface>/statistics/tx_packets
Date: April 2005 Date: April 2005
KernelVersion: 2.6.12 KernelVersion: 2.6.12
Contact: netdev@vger.kernel.org Contact: netdev@vger.kernel.org
@@ -206,7 +206,7 @@ Description:
device. See the driver for whether this reports the number of all device. See the driver for whether this reports the number of all
attempted or successful transmissions. attempted or successful transmissions.
What: /sys/class/<iface>/statistics/tx_window_errors What: /sys/class/net/<iface>/statistics/tx_window_errors
Date: April 2005 Date: April 2005
KernelVersion: 2.6.12 KernelVersion: 2.6.12
Contact: netdev@vger.kernel.org Contact: netdev@vger.kernel.org

View File

@@ -221,3 +221,10 @@ stable kernels.
+----------------+-----------------+-----------------+-----------------------------+ +----------------+-----------------+-----------------+-----------------------------+
| ASR | ASR8601 | #8601001 | N/A | | ASR | ASR8601 | #8601001 | N/A |
+----------------+-----------------+-----------------+-----------------------------+ +----------------+-----------------+-----------------+-----------------------------+
+----------------+-----------------+-----------------+-----------------------------+
| Microsoft | Azure Cobalt 100| #2139208 | ARM64_ERRATUM_2139208 |
+----------------+-----------------+-----------------+-----------------------------+
| Microsoft | Azure Cobalt 100| #2067961 | ARM64_ERRATUM_2067961 |
+----------------+-----------------+-----------------+-----------------------------+
| Microsoft | Azure Cobalt 100| #2253138 | ARM64_ERRATUM_2253138 |
+----------------+-----------------+-----------------+-----------------------------+

View File

@@ -1,4 +1,4 @@
Marvell 8787/8897/8997 (sd8787/sd8897/sd8997/pcie8997) SDIO/PCIE devices Marvell 8787/8897/8978/8997 (sd8787/sd8897/sd8978/sd8997/pcie8997) SDIO/PCIE devices
------ ------
This node provides properties for controlling the Marvell SDIO/PCIE wireless device. This node provides properties for controlling the Marvell SDIO/PCIE wireless device.
@@ -10,7 +10,9 @@ Required properties:
- compatible : should be one of the following: - compatible : should be one of the following:
* "marvell,sd8787" * "marvell,sd8787"
* "marvell,sd8897" * "marvell,sd8897"
* "marvell,sd8978"
* "marvell,sd8997" * "marvell,sd8997"
* "nxp,iw416"
* "pci11ab,2b42" * "pci11ab,2b42"
* "pci1b4b,2b42" * "pci1b4b,2b42"

View File

@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0 # SPDX-License-Identifier: GPL-2.0
VERSION = 6 VERSION = 6
PATCHLEVEL = 1 PATCHLEVEL = 1
SUBLEVEL = 78 SUBLEVEL = 79
EXTRAVERSION = EXTRAVERSION =
NAME = Curry Ramen NAME = Curry Ramen
@@ -477,8 +477,7 @@ HOSTRUSTC = rustc
HOSTPKG_CONFIG = pkg-config HOSTPKG_CONFIG = pkg-config
KBUILD_USERHOSTCFLAGS := -Wall -Wmissing-prototypes -Wstrict-prototypes \ KBUILD_USERHOSTCFLAGS := -Wall -Wmissing-prototypes -Wstrict-prototypes \
-O2 -fomit-frame-pointer -std=gnu11 \ -O2 -fomit-frame-pointer -std=gnu11
-Wdeclaration-after-statement
KBUILD_USERCFLAGS := $(KBUILD_USERHOSTCFLAGS) $(USERCFLAGS) KBUILD_USERCFLAGS := $(KBUILD_USERHOSTCFLAGS) $(USERCFLAGS)
KBUILD_USERLDFLAGS := $(USERLDFLAGS) KBUILD_USERLDFLAGS := $(USERLDFLAGS)
@@ -1046,9 +1045,6 @@ endif
# arch Makefile may override CC so keep this after arch Makefile is included # arch Makefile may override CC so keep this after arch Makefile is included
NOSTDINC_FLAGS += -nostdinc NOSTDINC_FLAGS += -nostdinc
# warn about C99 declaration after statement
KBUILD_CFLAGS += -Wdeclaration-after-statement
# Variable Length Arrays (VLAs) should not be used anywhere in the kernel # Variable Length Arrays (VLAs) should not be used anywhere in the kernel
KBUILD_CFLAGS += -Wvla KBUILD_CFLAGS += -Wvla

View File

@@ -642,6 +642,7 @@ config SHADOW_CALL_STACK
bool "Shadow Call Stack" bool "Shadow Call Stack"
depends on ARCH_SUPPORTS_SHADOW_CALL_STACK depends on ARCH_SUPPORTS_SHADOW_CALL_STACK
depends on DYNAMIC_FTRACE_WITH_ARGS || DYNAMIC_FTRACE_WITH_REGS || !FUNCTION_GRAPH_TRACER depends on DYNAMIC_FTRACE_WITH_ARGS || DYNAMIC_FTRACE_WITH_REGS || !FUNCTION_GRAPH_TRACER
depends on MMU
help help
This option enables the compiler's Shadow Call Stack, which This option enables the compiler's Shadow Call Stack, which
uses a shadow stack to protect function return addresses from uses a shadow stack to protect function return addresses from

View File

@@ -31,7 +31,7 @@
static __always_inline bool arch_static_branch(struct static_key *key, static __always_inline bool arch_static_branch(struct static_key *key,
bool branch) bool branch)
{ {
asm_volatile_goto(".balign "__stringify(JUMP_LABEL_NOP_SIZE)" \n" asm goto(".balign "__stringify(JUMP_LABEL_NOP_SIZE)" \n"
"1: \n" "1: \n"
"nop \n" "nop \n"
".pushsection __jump_table, \"aw\" \n" ".pushsection __jump_table, \"aw\" \n"
@@ -47,7 +47,7 @@ l_yes:
static __always_inline bool arch_static_branch_jump(struct static_key *key, static __always_inline bool arch_static_branch_jump(struct static_key *key,
bool branch) bool branch)
{ {
asm_volatile_goto(".balign "__stringify(JUMP_LABEL_NOP_SIZE)" \n" asm goto(".balign "__stringify(JUMP_LABEL_NOP_SIZE)" \n"
"1: \n" "1: \n"
"b %l[l_yes] \n" "b %l[l_yes] \n"
".pushsection __jump_table, \"aw\" \n" ".pushsection __jump_table, \"aw\" \n"

View File

@@ -76,6 +76,7 @@
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&pinctrl_enable_can1_power>; pinctrl-0 = <&pinctrl_enable_can1_power>;
regulator-name = "can1_supply"; regulator-name = "can1_supply";
startup-delay-us = <1000>;
}; };
reg_can2_supply: regulator-can2-supply { reg_can2_supply: regulator-can2-supply {
@@ -85,6 +86,7 @@
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&pinctrl_enable_can2_power>; pinctrl-0 = <&pinctrl_enable_can2_power>;
regulator-name = "can2_supply"; regulator-name = "can2_supply";
startup-delay-us = <1000>;
}; };
}; };

View File

@@ -11,7 +11,7 @@
static __always_inline bool arch_static_branch(struct static_key *key, bool branch) static __always_inline bool arch_static_branch(struct static_key *key, bool branch)
{ {
asm_volatile_goto("1:\n\t" asm goto("1:\n\t"
WASM(nop) "\n\t" WASM(nop) "\n\t"
".pushsection __jump_table, \"aw\"\n\t" ".pushsection __jump_table, \"aw\"\n\t"
".word 1b, %l[l_yes], %c0\n\t" ".word 1b, %l[l_yes], %c0\n\t"
@@ -25,7 +25,7 @@ l_yes:
static __always_inline bool arch_static_branch_jump(struct static_key *key, bool branch) static __always_inline bool arch_static_branch_jump(struct static_key *key, bool branch)
{ {
asm_volatile_goto("1:\n\t" asm goto("1:\n\t"
WASM(b) " %l[l_yes]\n\t" WASM(b) " %l[l_yes]\n\t"
".pushsection __jump_table, \"aw\"\n\t" ".pushsection __jump_table, \"aw\"\n\t"
".word 1b, %l[l_yes], %c0\n\t" ".word 1b, %l[l_yes], %c0\n\t"

View File

@@ -169,10 +169,6 @@
}; };
}; };
&blsp_dma {
status = "okay";
};
&blsp_i2c2 { &blsp_i2c2 {
/* On Low speed expansion */ /* On Low speed expansion */
status = "okay"; status = "okay";

View File

@@ -1522,7 +1522,7 @@
clock-names = "bam_clk"; clock-names = "bam_clk";
#dma-cells = <1>; #dma-cells = <1>;
qcom,ee = <0>; qcom,ee = <0>;
status = "disabled"; qcom,controlled-remotely;
}; };
blsp1_uart1: serial@78af000 { blsp1_uart1: serial@78af000 {

View File

@@ -4049,7 +4049,7 @@
assigned-clock-rates = <19200000>, <150000000>; assigned-clock-rates = <19200000>, <150000000>;
interrupts-extended = <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, interrupts-extended = <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>,
<&intc GIC_SPI 486 IRQ_TYPE_LEVEL_HIGH>, <&pdc_intc 6 IRQ_TYPE_LEVEL_HIGH>,
<&pdc_intc 8 IRQ_TYPE_EDGE_BOTH>, <&pdc_intc 8 IRQ_TYPE_EDGE_BOTH>,
<&pdc_intc 9 IRQ_TYPE_EDGE_BOTH>; <&pdc_intc 9 IRQ_TYPE_EDGE_BOTH>;
interrupt-names = "hs_phy_irq", "ss_phy_irq", interrupt-names = "hs_phy_irq", "ss_phy_irq",
@@ -4100,7 +4100,7 @@
assigned-clock-rates = <19200000>, <150000000>; assigned-clock-rates = <19200000>, <150000000>;
interrupts-extended = <&intc GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>, interrupts-extended = <&intc GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>,
<&intc GIC_SPI 487 IRQ_TYPE_LEVEL_HIGH>, <&pdc_intc 7 IRQ_TYPE_LEVEL_HIGH>,
<&pdc_intc 10 IRQ_TYPE_EDGE_BOTH>, <&pdc_intc 10 IRQ_TYPE_EDGE_BOTH>,
<&pdc_intc 11 IRQ_TYPE_EDGE_BOTH>; <&pdc_intc 11 IRQ_TYPE_EDGE_BOTH>;
interrupt-names = "hs_phy_irq", "ss_phy_irq", interrupt-names = "hs_phy_irq", "ss_phy_irq",

View File

@@ -3629,7 +3629,7 @@
assigned-clock-rates = <19200000>, <200000000>; assigned-clock-rates = <19200000>, <200000000>;
interrupts-extended = <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, interrupts-extended = <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>,
<&intc GIC_SPI 486 IRQ_TYPE_LEVEL_HIGH>, <&pdc 6 IRQ_TYPE_LEVEL_HIGH>,
<&pdc 8 IRQ_TYPE_EDGE_BOTH>, <&pdc 8 IRQ_TYPE_EDGE_BOTH>,
<&pdc 9 IRQ_TYPE_EDGE_BOTH>; <&pdc 9 IRQ_TYPE_EDGE_BOTH>;
interrupt-names = "hs_phy_irq", "ss_phy_irq", interrupt-names = "hs_phy_irq", "ss_phy_irq",
@@ -3678,7 +3678,7 @@
assigned-clock-rates = <19200000>, <200000000>; assigned-clock-rates = <19200000>, <200000000>;
interrupts-extended = <&intc GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>, interrupts-extended = <&intc GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>,
<&intc GIC_SPI 487 IRQ_TYPE_LEVEL_HIGH>, <&pdc 7 IRQ_TYPE_LEVEL_HIGH>,
<&pdc 10 IRQ_TYPE_EDGE_BOTH>, <&pdc 10 IRQ_TYPE_EDGE_BOTH>,
<&pdc 11 IRQ_TYPE_EDGE_BOTH>; <&pdc 11 IRQ_TYPE_EDGE_BOTH>;
interrupt-names = "hs_phy_irq", "ss_phy_irq", interrupt-names = "hs_phy_irq", "ss_phy_irq",

View File

@@ -230,7 +230,7 @@ alternative_has_feature_likely(unsigned long feature)
compiletime_assert(feature < ARM64_NCAPS, compiletime_assert(feature < ARM64_NCAPS,
"feature must be < ARM64_NCAPS"); "feature must be < ARM64_NCAPS");
asm_volatile_goto( asm goto(
ALTERNATIVE_CB("b %l[l_no]", %[feature], alt_cb_patch_nops) ALTERNATIVE_CB("b %l[l_no]", %[feature], alt_cb_patch_nops)
: :
: [feature] "i" (feature) : [feature] "i" (feature)
@@ -248,7 +248,7 @@ alternative_has_feature_unlikely(unsigned long feature)
compiletime_assert(feature < ARM64_NCAPS, compiletime_assert(feature < ARM64_NCAPS,
"feature must be < ARM64_NCAPS"); "feature must be < ARM64_NCAPS");
asm_volatile_goto( asm goto(
ALTERNATIVE("nop", "b %l[l_yes]", %[feature]) ALTERNATIVE("nop", "b %l[l_yes]", %[feature])
: :
: [feature] "i" (feature) : [feature] "i" (feature)

View File

@@ -61,6 +61,7 @@
#define ARM_CPU_IMP_HISI 0x48 #define ARM_CPU_IMP_HISI 0x48
#define ARM_CPU_IMP_APPLE 0x61 #define ARM_CPU_IMP_APPLE 0x61
#define ARM_CPU_IMP_AMPERE 0xC0 #define ARM_CPU_IMP_AMPERE 0xC0
#define ARM_CPU_IMP_MICROSOFT 0x6D
#define ARM_CPU_PART_AEM_V8 0xD0F #define ARM_CPU_PART_AEM_V8 0xD0F
#define ARM_CPU_PART_FOUNDATION 0xD00 #define ARM_CPU_PART_FOUNDATION 0xD00
@@ -128,6 +129,8 @@
#define AMPERE_CPU_PART_AMPERE1 0xAC3 #define AMPERE_CPU_PART_AMPERE1 0xAC3
#define MICROSOFT_CPU_PART_AZURE_COBALT_100 0xD49 /* Based on r0p0 of ARM Neoverse N2 */
#define MIDR_CORTEX_A53 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A53) #define MIDR_CORTEX_A53 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A53)
#define MIDR_CORTEX_A57 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A57) #define MIDR_CORTEX_A57 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A57)
#define MIDR_CORTEX_A72 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A72) #define MIDR_CORTEX_A72 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A72)
@@ -179,6 +182,7 @@
#define MIDR_APPLE_M1_ICESTORM_MAX MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_M1_ICESTORM_MAX) #define MIDR_APPLE_M1_ICESTORM_MAX MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_M1_ICESTORM_MAX)
#define MIDR_APPLE_M1_FIRESTORM_MAX MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_M1_FIRESTORM_MAX) #define MIDR_APPLE_M1_FIRESTORM_MAX MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_M1_FIRESTORM_MAX)
#define MIDR_AMPERE1 MIDR_CPU_MODEL(ARM_CPU_IMP_AMPERE, AMPERE_CPU_PART_AMPERE1) #define MIDR_AMPERE1 MIDR_CPU_MODEL(ARM_CPU_IMP_AMPERE, AMPERE_CPU_PART_AMPERE1)
#define MIDR_MICROSOFT_AZURE_COBALT_100 MIDR_CPU_MODEL(ARM_CPU_IMP_MICROSOFT, MICROSOFT_CPU_PART_AZURE_COBALT_100)
/* Fujitsu Erratum 010001 affects A64FX 1.0 and 1.1, (v0r0 and v1r0) */ /* Fujitsu Erratum 010001 affects A64FX 1.0 and 1.1, (v0r0 and v1r0) */
#define MIDR_FUJITSU_ERRATUM_010001 MIDR_FUJITSU_A64FX #define MIDR_FUJITSU_ERRATUM_010001 MIDR_FUJITSU_A64FX

View File

@@ -18,7 +18,7 @@
static __always_inline bool arch_static_branch(struct static_key *key, static __always_inline bool arch_static_branch(struct static_key *key,
bool branch) bool branch)
{ {
asm_volatile_goto( asm goto(
"1: nop \n\t" "1: nop \n\t"
" .pushsection __jump_table, \"aw\" \n\t" " .pushsection __jump_table, \"aw\" \n\t"
" .align 3 \n\t" " .align 3 \n\t"
@@ -35,7 +35,7 @@ l_yes:
static __always_inline bool arch_static_branch_jump(struct static_key *key, static __always_inline bool arch_static_branch_jump(struct static_key *key,
bool branch) bool branch)
{ {
asm_volatile_goto( asm goto(
"1: b %l[l_yes] \n\t" "1: b %l[l_yes] \n\t"
" .pushsection __jump_table, \"aw\" \n\t" " .pushsection __jump_table, \"aw\" \n\t"
" .align 3 \n\t" " .align 3 \n\t"

View File

@@ -390,6 +390,7 @@ static const struct midr_range erratum_1463225[] = {
static const struct midr_range trbe_overwrite_fill_mode_cpus[] = { static const struct midr_range trbe_overwrite_fill_mode_cpus[] = {
#ifdef CONFIG_ARM64_ERRATUM_2139208 #ifdef CONFIG_ARM64_ERRATUM_2139208
MIDR_ALL_VERSIONS(MIDR_NEOVERSE_N2), MIDR_ALL_VERSIONS(MIDR_NEOVERSE_N2),
MIDR_ALL_VERSIONS(MIDR_MICROSOFT_AZURE_COBALT_100),
#endif #endif
#ifdef CONFIG_ARM64_ERRATUM_2119858 #ifdef CONFIG_ARM64_ERRATUM_2119858
MIDR_ALL_VERSIONS(MIDR_CORTEX_A710), MIDR_ALL_VERSIONS(MIDR_CORTEX_A710),
@@ -403,6 +404,7 @@ static const struct midr_range trbe_overwrite_fill_mode_cpus[] = {
static const struct midr_range tsb_flush_fail_cpus[] = { static const struct midr_range tsb_flush_fail_cpus[] = {
#ifdef CONFIG_ARM64_ERRATUM_2067961 #ifdef CONFIG_ARM64_ERRATUM_2067961
MIDR_ALL_VERSIONS(MIDR_NEOVERSE_N2), MIDR_ALL_VERSIONS(MIDR_NEOVERSE_N2),
MIDR_ALL_VERSIONS(MIDR_MICROSOFT_AZURE_COBALT_100),
#endif #endif
#ifdef CONFIG_ARM64_ERRATUM_2054223 #ifdef CONFIG_ARM64_ERRATUM_2054223
MIDR_ALL_VERSIONS(MIDR_CORTEX_A710), MIDR_ALL_VERSIONS(MIDR_CORTEX_A710),
@@ -415,6 +417,7 @@ static const struct midr_range tsb_flush_fail_cpus[] = {
static struct midr_range trbe_write_out_of_range_cpus[] = { static struct midr_range trbe_write_out_of_range_cpus[] = {
#ifdef CONFIG_ARM64_ERRATUM_2253138 #ifdef CONFIG_ARM64_ERRATUM_2253138
MIDR_ALL_VERSIONS(MIDR_NEOVERSE_N2), MIDR_ALL_VERSIONS(MIDR_NEOVERSE_N2),
MIDR_ALL_VERSIONS(MIDR_MICROSOFT_AZURE_COBALT_100),
#endif #endif
#ifdef CONFIG_ARM64_ERRATUM_2224489 #ifdef CONFIG_ARM64_ERRATUM_2224489
MIDR_ALL_VERSIONS(MIDR_CORTEX_A710), MIDR_ALL_VERSIONS(MIDR_CORTEX_A710),

View File

@@ -68,11 +68,9 @@ VDSO_CFLAGS += -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -fno-common \ -fno-strict-aliasing -fno-common \
-Werror-implicit-function-declaration \ -Werror-implicit-function-declaration \
-Wno-format-security \ -Wno-format-security \
-Wdeclaration-after-statement \
-std=gnu11 -std=gnu11
VDSO_CFLAGS += -O2 VDSO_CFLAGS += -O2
# Some useful compiler-dependent flags from top-level Makefile # Some useful compiler-dependent flags from top-level Makefile
VDSO_CFLAGS += $(call cc32-option,-Wdeclaration-after-statement,)
VDSO_CFLAGS += $(call cc32-option,-Wno-pointer-sign) VDSO_CFLAGS += $(call cc32-option,-Wno-pointer-sign)
VDSO_CFLAGS += -fno-strict-overflow VDSO_CFLAGS += -fno-strict-overflow
VDSO_CFLAGS += $(call cc32-option,-Werror=strict-prototypes) VDSO_CFLAGS += $(call cc32-option,-Werror=strict-prototypes)

View File

@@ -12,7 +12,7 @@
static __always_inline bool arch_static_branch(struct static_key *key, static __always_inline bool arch_static_branch(struct static_key *key,
bool branch) bool branch)
{ {
asm_volatile_goto( asm goto(
"1: nop32 \n" "1: nop32 \n"
" .pushsection __jump_table, \"aw\" \n" " .pushsection __jump_table, \"aw\" \n"
" .align 2 \n" " .align 2 \n"
@@ -29,7 +29,7 @@ label:
static __always_inline bool arch_static_branch_jump(struct static_key *key, static __always_inline bool arch_static_branch_jump(struct static_key *key,
bool branch) bool branch)
{ {
asm_volatile_goto( asm goto(
"1: bsr32 %l[label] \n" "1: bsr32 %l[label] \n"
" .pushsection __jump_table, \"aw\" \n" " .pushsection __jump_table, \"aw\" \n"
" .align 2 \n" " .align 2 \n"

View File

@@ -241,7 +241,8 @@ static __inline__ __sum16 csum_ipv6_magic(const struct in6_addr *saddr,
" .set pop" " .set pop"
: "=&r" (sum), "=&r" (tmp) : "=&r" (sum), "=&r" (tmp)
: "r" (saddr), "r" (daddr), : "r" (saddr), "r" (daddr),
"0" (htonl(len)), "r" (htonl(proto)), "r" (sum)); "0" (htonl(len)), "r" (htonl(proto)), "r" (sum)
: "memory");
return csum_fold(sum); return csum_fold(sum);
} }

View File

@@ -36,7 +36,7 @@
static __always_inline bool arch_static_branch(struct static_key *key, bool branch) static __always_inline bool arch_static_branch(struct static_key *key, bool branch)
{ {
asm_volatile_goto("1:\t" B_INSN " 2f\n\t" asm goto("1:\t" B_INSN " 2f\n\t"
"2:\t.insn\n\t" "2:\t.insn\n\t"
".pushsection __jump_table, \"aw\"\n\t" ".pushsection __jump_table, \"aw\"\n\t"
WORD_INSN " 1b, %l[l_yes], %0\n\t" WORD_INSN " 1b, %l[l_yes], %0\n\t"
@@ -50,7 +50,7 @@ l_yes:
static __always_inline bool arch_static_branch_jump(struct static_key *key, bool branch) static __always_inline bool arch_static_branch_jump(struct static_key *key, bool branch)
{ {
asm_volatile_goto("1:\t" J_INSN " %l[l_yes]\n\t" asm goto("1:\t" J_INSN " %l[l_yes]\n\t"
".pushsection __jump_table, \"aw\"\n\t" ".pushsection __jump_table, \"aw\"\n\t"
WORD_INSN " 1b, %l[l_yes], %0\n\t" WORD_INSN " 1b, %l[l_yes], %0\n\t"
".popsection\n\t" ".popsection\n\t"

View File

@@ -24,7 +24,6 @@ config PARISC
select RTC_DRV_GENERIC select RTC_DRV_GENERIC
select INIT_ALL_POSSIBLE select INIT_ALL_POSSIBLE
select BUG select BUG
select BUILDTIME_TABLE_SORT
select HAVE_PCI select HAVE_PCI
select HAVE_PERF_EVENTS select HAVE_PERF_EVENTS
select HAVE_KERNEL_BZIP2 select HAVE_KERNEL_BZIP2

View File

@@ -576,6 +576,7 @@
.section __ex_table,"aw" ! \ .section __ex_table,"aw" ! \
.align 4 ! \ .align 4 ! \
.word (fault_addr - .), (except_addr - .) ! \ .word (fault_addr - .), (except_addr - .) ! \
or %r0,%r0,%r0 ! \
.previous .previous

View File

@@ -0,0 +1,64 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __PARISC_EXTABLE_H
#define __PARISC_EXTABLE_H
#include <asm/ptrace.h>
#include <linux/compiler.h>
/*
* The exception table consists of three addresses:
*
* - A relative address to the instruction that is allowed to fault.
* - A relative address at which the program should continue (fixup routine)
* - An asm statement which specifies which CPU register will
* receive -EFAULT when an exception happens if the lowest bit in
* the fixup address is set.
*
* Note: The register specified in the err_opcode instruction will be
* modified at runtime if a fault happens. Register %r0 will be ignored.
*
* Since relative addresses are used, 32bit values are sufficient even on
* 64bit kernel.
*/
struct pt_regs;
int fixup_exception(struct pt_regs *regs);
#define ARCH_HAS_RELATIVE_EXTABLE
struct exception_table_entry {
int insn; /* relative address of insn that is allowed to fault. */
int fixup; /* relative address of fixup routine */
int err_opcode; /* sample opcode with register which holds error code */
};
#define ASM_EXCEPTIONTABLE_ENTRY( fault_addr, except_addr, opcode )\
".section __ex_table,\"aw\"\n" \
".align 4\n" \
".word (" #fault_addr " - .), (" #except_addr " - .)\n" \
opcode "\n" \
".previous\n"
/*
* ASM_EXCEPTIONTABLE_ENTRY_EFAULT() creates a special exception table entry
* (with lowest bit set) for which the fault handler in fixup_exception() will
* load -EFAULT on fault into the register specified by the err_opcode instruction,
* and zeroes the target register in case of a read fault in get_user().
*/
#define ASM_EXCEPTIONTABLE_VAR(__err_var) \
int __err_var = 0
#define ASM_EXCEPTIONTABLE_ENTRY_EFAULT( fault_addr, except_addr, register )\
ASM_EXCEPTIONTABLE_ENTRY( fault_addr, except_addr + 1, "or %%r0,%%r0," register)
static inline void swap_ex_entry_fixup(struct exception_table_entry *a,
struct exception_table_entry *b,
struct exception_table_entry tmp,
int delta)
{
a->fixup = b->fixup + delta;
b->fixup = tmp.fixup - delta;
a->err_opcode = b->err_opcode;
b->err_opcode = tmp.err_opcode;
}
#define swap_ex_entry_fixup swap_ex_entry_fixup
#endif

View File

@@ -12,7 +12,7 @@
static __always_inline bool arch_static_branch(struct static_key *key, bool branch) static __always_inline bool arch_static_branch(struct static_key *key, bool branch)
{ {
asm_volatile_goto("1:\n\t" asm goto("1:\n\t"
"nop\n\t" "nop\n\t"
".pushsection __jump_table, \"aw\"\n\t" ".pushsection __jump_table, \"aw\"\n\t"
".align %1\n\t" ".align %1\n\t"
@@ -29,7 +29,7 @@ l_yes:
static __always_inline bool arch_static_branch_jump(struct static_key *key, bool branch) static __always_inline bool arch_static_branch_jump(struct static_key *key, bool branch)
{ {
asm_volatile_goto("1:\n\t" asm goto("1:\n\t"
"b,n %l[l_yes]\n\t" "b,n %l[l_yes]\n\t"
".pushsection __jump_table, \"aw\"\n\t" ".pushsection __jump_table, \"aw\"\n\t"
".align %1\n\t" ".align %1\n\t"

View File

@@ -8,7 +8,8 @@
"copy %%r0,%0\n" \ "copy %%r0,%0\n" \
"8:\tlpa %%r0(%1),%0\n" \ "8:\tlpa %%r0(%1),%0\n" \
"9:\n" \ "9:\n" \
ASM_EXCEPTIONTABLE_ENTRY(8b, 9b) \ ASM_EXCEPTIONTABLE_ENTRY(8b, 9b, \
"or %%r0,%%r0,%%r0") \
: "=&r" (pa) \ : "=&r" (pa) \
: "r" (va) \ : "r" (va) \
: "memory" \ : "memory" \
@@ -22,7 +23,8 @@
"copy %%r0,%0\n" \ "copy %%r0,%0\n" \
"8:\tlpa %%r0(%%sr3,%1),%0\n" \ "8:\tlpa %%r0(%%sr3,%1),%0\n" \
"9:\n" \ "9:\n" \
ASM_EXCEPTIONTABLE_ENTRY(8b, 9b) \ ASM_EXCEPTIONTABLE_ENTRY(8b, 9b, \
"or %%r0,%%r0,%%r0") \
: "=&r" (pa) \ : "=&r" (pa) \
: "r" (va) \ : "r" (va) \
: "memory" \ : "memory" \

View File

@@ -7,6 +7,7 @@
*/ */
#include <asm/page.h> #include <asm/page.h>
#include <asm/cache.h> #include <asm/cache.h>
#include <asm/extable.h>
#include <linux/bug.h> #include <linux/bug.h>
#include <linux/string.h> #include <linux/string.h>
@@ -26,37 +27,6 @@
#define STD_USER(sr, x, ptr) __put_user_asm(sr, "std", x, ptr) #define STD_USER(sr, x, ptr) __put_user_asm(sr, "std", x, ptr)
#endif #endif
/*
* The exception table contains two values: the first is the relative offset to
* the address of the instruction that is allowed to fault, and the second is
* the relative offset to the address of the fixup routine. Since relative
* addresses are used, 32bit values are sufficient even on 64bit kernel.
*/
#define ARCH_HAS_RELATIVE_EXTABLE
struct exception_table_entry {
int insn; /* relative address of insn that is allowed to fault. */
int fixup; /* relative address of fixup routine */
};
#define ASM_EXCEPTIONTABLE_ENTRY( fault_addr, except_addr )\
".section __ex_table,\"aw\"\n" \
".align 4\n" \
".word (" #fault_addr " - .), (" #except_addr " - .)\n\t" \
".previous\n"
/*
* ASM_EXCEPTIONTABLE_ENTRY_EFAULT() creates a special exception table entry
* (with lowest bit set) for which the fault handler in fixup_exception() will
* load -EFAULT into %r29 for a read or write fault, and zeroes the target
* register in case of a read fault in get_user().
*/
#define ASM_EXCEPTIONTABLE_REG 29
#define ASM_EXCEPTIONTABLE_VAR(__variable) \
register long __variable __asm__ ("r29") = 0
#define ASM_EXCEPTIONTABLE_ENTRY_EFAULT( fault_addr, except_addr )\
ASM_EXCEPTIONTABLE_ENTRY( fault_addr, except_addr + 1)
#define __get_user_internal(sr, val, ptr) \ #define __get_user_internal(sr, val, ptr) \
({ \ ({ \
ASM_EXCEPTIONTABLE_VAR(__gu_err); \ ASM_EXCEPTIONTABLE_VAR(__gu_err); \
@@ -83,7 +53,7 @@ struct exception_table_entry {
\ \
__asm__("1: " ldx " 0(%%sr%2,%3),%0\n" \ __asm__("1: " ldx " 0(%%sr%2,%3),%0\n" \
"9:\n" \ "9:\n" \
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 9b) \ ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 9b, "%1") \
: "=r"(__gu_val), "+r"(__gu_err) \ : "=r"(__gu_val), "+r"(__gu_err) \
: "i"(sr), "r"(ptr)); \ : "i"(sr), "r"(ptr)); \
\ \
@@ -115,8 +85,8 @@ struct exception_table_entry {
"1: ldw 0(%%sr%2,%3),%0\n" \ "1: ldw 0(%%sr%2,%3),%0\n" \
"2: ldw 4(%%sr%2,%3),%R0\n" \ "2: ldw 4(%%sr%2,%3),%R0\n" \
"9:\n" \ "9:\n" \
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 9b) \ ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 9b, "%1") \
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(2b, 9b) \ ASM_EXCEPTIONTABLE_ENTRY_EFAULT(2b, 9b, "%1") \
: "=&r"(__gu_tmp.l), "+r"(__gu_err) \ : "=&r"(__gu_tmp.l), "+r"(__gu_err) \
: "i"(sr), "r"(ptr)); \ : "i"(sr), "r"(ptr)); \
\ \
@@ -174,7 +144,7 @@ struct exception_table_entry {
__asm__ __volatile__ ( \ __asm__ __volatile__ ( \
"1: " stx " %1,0(%%sr%2,%3)\n" \ "1: " stx " %1,0(%%sr%2,%3)\n" \
"9:\n" \ "9:\n" \
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 9b) \ ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 9b, "%0") \
: "+r"(__pu_err) \ : "+r"(__pu_err) \
: "r"(x), "i"(sr), "r"(ptr)) : "r"(x), "i"(sr), "r"(ptr))
@@ -186,15 +156,14 @@ struct exception_table_entry {
"1: stw %1,0(%%sr%2,%3)\n" \ "1: stw %1,0(%%sr%2,%3)\n" \
"2: stw %R1,4(%%sr%2,%3)\n" \ "2: stw %R1,4(%%sr%2,%3)\n" \
"9:\n" \ "9:\n" \
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 9b) \ ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 9b, "%0") \
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(2b, 9b) \ ASM_EXCEPTIONTABLE_ENTRY_EFAULT(2b, 9b, "%0") \
: "+r"(__pu_err) \ : "+r"(__pu_err) \
: "r"(__val), "i"(sr), "r"(ptr)); \ : "r"(__val), "i"(sr), "r"(ptr)); \
} while (0) } while (0)
#endif /* !defined(CONFIG_64BIT) */ #endif /* !defined(CONFIG_64BIT) */
/* /*
* Complex access routines -- external declarations * Complex access routines -- external declarations
*/ */
@@ -216,7 +185,4 @@ unsigned long __must_check raw_copy_from_user(void *dst, const void __user *src,
#define INLINE_COPY_TO_USER #define INLINE_COPY_TO_USER
#define INLINE_COPY_FROM_USER #define INLINE_COPY_FROM_USER
struct pt_regs;
int fixup_exception(struct pt_regs *regs);
#endif /* __PARISC_UACCESS_H */ #endif /* __PARISC_UACCESS_H */

View File

@@ -1003,6 +1003,9 @@ static __init int qemu_print_iodc_data(struct device *lin_dev, void *data)
pr_info("\n"); pr_info("\n");
/* Prevent hung task messages when printing on serial console */
cond_resched();
pr_info("#define HPA_%08lx_DESCRIPTION \"%s\"\n", pr_info("#define HPA_%08lx_DESCRIPTION \"%s\"\n",
hpa, parisc_hardware_description(&dev->id)); hpa, parisc_hardware_description(&dev->id));

View File

@@ -118,8 +118,8 @@ static int emulate_ldh(struct pt_regs *regs, int toreg)
"2: ldbs 1(%%sr1,%3), %0\n" "2: ldbs 1(%%sr1,%3), %0\n"
" depw %2, 23, 24, %0\n" " depw %2, 23, 24, %0\n"
"3: \n" "3: \n"
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 3b) ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 3b, "%1")
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(2b, 3b) ASM_EXCEPTIONTABLE_ENTRY_EFAULT(2b, 3b, "%1")
: "+r" (val), "+r" (ret), "=&r" (temp1) : "+r" (val), "+r" (ret), "=&r" (temp1)
: "r" (saddr), "r" (regs->isr) ); : "r" (saddr), "r" (regs->isr) );
@@ -150,8 +150,8 @@ static int emulate_ldw(struct pt_regs *regs, int toreg, int flop)
" mtctl %2,11\n" " mtctl %2,11\n"
" vshd %0,%3,%0\n" " vshd %0,%3,%0\n"
"3: \n" "3: \n"
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 3b) ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 3b, "%1")
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(2b, 3b) ASM_EXCEPTIONTABLE_ENTRY_EFAULT(2b, 3b, "%1")
: "+r" (val), "+r" (ret), "=&r" (temp1), "=&r" (temp2) : "+r" (val), "+r" (ret), "=&r" (temp1), "=&r" (temp2)
: "r" (saddr), "r" (regs->isr) ); : "r" (saddr), "r" (regs->isr) );
@@ -187,8 +187,8 @@ static int emulate_ldd(struct pt_regs *regs, int toreg, int flop)
" mtsar %%r19\n" " mtsar %%r19\n"
" shrpd %0,%%r20,%%sar,%0\n" " shrpd %0,%%r20,%%sar,%0\n"
"3: \n" "3: \n"
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 3b) ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 3b, "%1")
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(2b, 3b) ASM_EXCEPTIONTABLE_ENTRY_EFAULT(2b, 3b, "%1")
: "=r" (val), "+r" (ret) : "=r" (val), "+r" (ret)
: "0" (val), "r" (saddr), "r" (regs->isr) : "0" (val), "r" (saddr), "r" (regs->isr)
: "r19", "r20" ); : "r19", "r20" );
@@ -207,9 +207,9 @@ static int emulate_ldd(struct pt_regs *regs, int toreg, int flop)
" vshd %0,%R0,%0\n" " vshd %0,%R0,%0\n"
" vshd %R0,%4,%R0\n" " vshd %R0,%4,%R0\n"
"4: \n" "4: \n"
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 4b) ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 4b, "%1")
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(2b, 4b) ASM_EXCEPTIONTABLE_ENTRY_EFAULT(2b, 4b, "%1")
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(3b, 4b) ASM_EXCEPTIONTABLE_ENTRY_EFAULT(3b, 4b, "%1")
: "+r" (val), "+r" (ret), "+r" (saddr), "=&r" (shift), "=&r" (temp1) : "+r" (val), "+r" (ret), "+r" (saddr), "=&r" (shift), "=&r" (temp1)
: "r" (regs->isr) ); : "r" (regs->isr) );
} }
@@ -242,8 +242,8 @@ static int emulate_sth(struct pt_regs *regs, int frreg)
"1: stb %1, 0(%%sr1, %3)\n" "1: stb %1, 0(%%sr1, %3)\n"
"2: stb %2, 1(%%sr1, %3)\n" "2: stb %2, 1(%%sr1, %3)\n"
"3: \n" "3: \n"
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 3b) ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 3b, "%0")
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(2b, 3b) ASM_EXCEPTIONTABLE_ENTRY_EFAULT(2b, 3b, "%0")
: "+r" (ret), "=&r" (temp1) : "+r" (ret), "=&r" (temp1)
: "r" (val), "r" (regs->ior), "r" (regs->isr) ); : "r" (val), "r" (regs->ior), "r" (regs->isr) );
@@ -283,8 +283,8 @@ static int emulate_stw(struct pt_regs *regs, int frreg, int flop)
" stw %%r20,0(%%sr1,%2)\n" " stw %%r20,0(%%sr1,%2)\n"
" stw %%r21,4(%%sr1,%2)\n" " stw %%r21,4(%%sr1,%2)\n"
"3: \n" "3: \n"
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 3b) ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 3b, "%0")
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(2b, 3b) ASM_EXCEPTIONTABLE_ENTRY_EFAULT(2b, 3b, "%0")
: "+r" (ret) : "+r" (ret)
: "r" (val), "r" (regs->ior), "r" (regs->isr) : "r" (val), "r" (regs->ior), "r" (regs->isr)
: "r19", "r20", "r21", "r22", "r1" ); : "r19", "r20", "r21", "r22", "r1" );
@@ -327,10 +327,10 @@ static int emulate_std(struct pt_regs *regs, int frreg, int flop)
"3: std %%r20,0(%%sr1,%2)\n" "3: std %%r20,0(%%sr1,%2)\n"
"4: std %%r21,8(%%sr1,%2)\n" "4: std %%r21,8(%%sr1,%2)\n"
"5: \n" "5: \n"
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 5b) ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 5b, "%0")
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(2b, 5b) ASM_EXCEPTIONTABLE_ENTRY_EFAULT(2b, 5b, "%0")
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(3b, 5b) ASM_EXCEPTIONTABLE_ENTRY_EFAULT(3b, 5b, "%0")
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(4b, 5b) ASM_EXCEPTIONTABLE_ENTRY_EFAULT(4b, 5b, "%0")
: "+r" (ret) : "+r" (ret)
: "r" (val), "r" (regs->ior), "r" (regs->isr) : "r" (val), "r" (regs->ior), "r" (regs->isr)
: "r19", "r20", "r21", "r22", "r1" ); : "r19", "r20", "r21", "r22", "r1" );
@@ -356,11 +356,11 @@ static int emulate_std(struct pt_regs *regs, int frreg, int flop)
"4: stw %%r1,4(%%sr1,%3)\n" "4: stw %%r1,4(%%sr1,%3)\n"
"5: stw %2,8(%%sr1,%3)\n" "5: stw %2,8(%%sr1,%3)\n"
"6: \n" "6: \n"
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 6b) ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 6b, "%0")
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(2b, 6b) ASM_EXCEPTIONTABLE_ENTRY_EFAULT(2b, 6b, "%0")
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(3b, 6b) ASM_EXCEPTIONTABLE_ENTRY_EFAULT(3b, 6b, "%0")
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(4b, 6b) ASM_EXCEPTIONTABLE_ENTRY_EFAULT(4b, 6b, "%0")
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(5b, 6b) ASM_EXCEPTIONTABLE_ENTRY_EFAULT(5b, 6b, "%0")
: "+r" (ret) : "+r" (ret)
: "r" (valh), "r" (vall), "r" (regs->ior), "r" (regs->isr) : "r" (valh), "r" (vall), "r" (regs->ior), "r" (regs->isr)
: "r19", "r20", "r21", "r1" ); : "r19", "r20", "r21", "r1" );

View File

@@ -150,11 +150,16 @@ int fixup_exception(struct pt_regs *regs)
* Fix up get_user() and put_user(). * Fix up get_user() and put_user().
* ASM_EXCEPTIONTABLE_ENTRY_EFAULT() sets the least-significant * ASM_EXCEPTIONTABLE_ENTRY_EFAULT() sets the least-significant
* bit in the relative address of the fixup routine to indicate * bit in the relative address of the fixup routine to indicate
* that gr[ASM_EXCEPTIONTABLE_REG] should be loaded with * that the register encoded in the "or %r0,%r0,register"
* -EFAULT to report a userspace access error. * opcode should be loaded with -EFAULT to report a userspace
* access error.
*/ */
if (fix->fixup & 1) { if (fix->fixup & 1) {
regs->gr[ASM_EXCEPTIONTABLE_REG] = -EFAULT; int fault_error_reg = fix->err_opcode & 0x1f;
if (!WARN_ON(!fault_error_reg))
regs->gr[fault_error_reg] = -EFAULT;
pr_debug("Unalignment fixup of register %d at %pS\n",
fault_error_reg, (void*)regs->iaoq[0]);
/* zero target register for get_user() */ /* zero target register for get_user() */
if (parisc_acctyp(0, regs->iir) == VM_READ) { if (parisc_acctyp(0, regs->iir) == VM_READ) {

View File

@@ -74,7 +74,7 @@
##__VA_ARGS__) ##__VA_ARGS__)
#define WARN_ENTRY(insn, flags, label, ...) \ #define WARN_ENTRY(insn, flags, label, ...) \
asm_volatile_goto( \ asm goto( \
"1: " insn "\n" \ "1: " insn "\n" \
EX_TABLE(1b, %l[label]) \ EX_TABLE(1b, %l[label]) \
_EMIT_BUG_ENTRY \ _EMIT_BUG_ENTRY \

View File

@@ -17,7 +17,7 @@
static __always_inline bool arch_static_branch(struct static_key *key, bool branch) static __always_inline bool arch_static_branch(struct static_key *key, bool branch)
{ {
asm_volatile_goto("1:\n\t" asm goto("1:\n\t"
"nop # arch_static_branch\n\t" "nop # arch_static_branch\n\t"
".pushsection __jump_table, \"aw\"\n\t" ".pushsection __jump_table, \"aw\"\n\t"
".long 1b - ., %l[l_yes] - .\n\t" ".long 1b - ., %l[l_yes] - .\n\t"
@@ -32,7 +32,7 @@ l_yes:
static __always_inline bool arch_static_branch_jump(struct static_key *key, bool branch) static __always_inline bool arch_static_branch_jump(struct static_key *key, bool branch)
{ {
asm_volatile_goto("1:\n\t" asm goto("1:\n\t"
"b %l[l_yes] # arch_static_branch_jump\n\t" "b %l[l_yes] # arch_static_branch_jump\n\t"
".pushsection __jump_table, \"aw\"\n\t" ".pushsection __jump_table, \"aw\"\n\t"
".long 1b - ., %l[l_yes] - .\n\t" ".long 1b - ., %l[l_yes] - .\n\t"

View File

@@ -14,7 +14,7 @@
#ifdef __KERNEL__ #ifdef __KERNEL__
#ifdef CONFIG_KASAN #if defined(CONFIG_KASAN) && CONFIG_THREAD_SHIFT < 15
#define MIN_THREAD_SHIFT (CONFIG_THREAD_SHIFT + 1) #define MIN_THREAD_SHIFT (CONFIG_THREAD_SHIFT + 1)
#else #else
#define MIN_THREAD_SHIFT CONFIG_THREAD_SHIFT #define MIN_THREAD_SHIFT CONFIG_THREAD_SHIFT

View File

@@ -72,7 +72,7 @@ __pu_failed: \
* are no aliasing issues. * are no aliasing issues.
*/ */
#define __put_user_asm_goto(x, addr, label, op) \ #define __put_user_asm_goto(x, addr, label, op) \
asm_volatile_goto( \ asm goto( \
"1: " op "%U1%X1 %0,%1 # put_user\n" \ "1: " op "%U1%X1 %0,%1 # put_user\n" \
EX_TABLE(1b, %l2) \ EX_TABLE(1b, %l2) \
: \ : \
@@ -85,7 +85,7 @@ __pu_failed: \
__put_user_asm_goto(x, ptr, label, "std") __put_user_asm_goto(x, ptr, label, "std")
#else /* __powerpc64__ */ #else /* __powerpc64__ */
#define __put_user_asm2_goto(x, addr, label) \ #define __put_user_asm2_goto(x, addr, label) \
asm_volatile_goto( \ asm goto( \
"1: stw%X1 %0, %1\n" \ "1: stw%X1 %0, %1\n" \
"2: stw%X1 %L0, %L1\n" \ "2: stw%X1 %L0, %L1\n" \
EX_TABLE(1b, %l2) \ EX_TABLE(1b, %l2) \
@@ -132,7 +132,7 @@ do { \
#ifdef CONFIG_CC_HAS_ASM_GOTO_OUTPUT #ifdef CONFIG_CC_HAS_ASM_GOTO_OUTPUT
#define __get_user_asm_goto(x, addr, label, op) \ #define __get_user_asm_goto(x, addr, label, op) \
asm_volatile_goto( \ asm_goto_output( \
"1: "op"%U1%X1 %0, %1 # get_user\n" \ "1: "op"%U1%X1 %0, %1 # get_user\n" \
EX_TABLE(1b, %l2) \ EX_TABLE(1b, %l2) \
: "=r" (x) \ : "=r" (x) \
@@ -145,7 +145,7 @@ do { \
__get_user_asm_goto(x, addr, label, "ld") __get_user_asm_goto(x, addr, label, "ld")
#else /* __powerpc64__ */ #else /* __powerpc64__ */
#define __get_user_asm2_goto(x, addr, label) \ #define __get_user_asm2_goto(x, addr, label) \
asm_volatile_goto( \ asm_goto_output( \
"1: lwz%X1 %0, %1\n" \ "1: lwz%X1 %0, %1\n" \
"2: lwz%X1 %L0, %L1\n" \ "2: lwz%X1 %L0, %L1\n" \
EX_TABLE(1b, %l2) \ EX_TABLE(1b, %l2) \

View File

@@ -8,7 +8,8 @@
#ifdef CONFIG_PPC64 #ifdef CONFIG_PPC64
#define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \ #define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
PPC_FEATURE_HAS_FPU | PPC_FEATURE_64) PPC_FEATURE_HAS_FPU | PPC_FEATURE_64 | \
PPC_FEATURE_BOOKE)
#else #else
#define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \ #define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
PPC_FEATURE_BOOKE) PPC_FEATURE_BOOKE)

View File

@@ -52,7 +52,8 @@ _ASM_NOKPROBE_SYMBOL(system_call_vectored_\name)
mr r10,r1 mr r10,r1
ld r1,PACAKSAVE(r13) ld r1,PACAKSAVE(r13)
std r10,0(r1) std r10,0(r1)
std r11,_NIP(r1) std r11,_LINK(r1)
std r11,_NIP(r1) /* Saved LR is also the next instruction */
std r12,_MSR(r1) std r12,_MSR(r1)
std r0,GPR0(r1) std r0,GPR0(r1)
std r10,GPR1(r1) std r10,GPR1(r1)
@@ -70,7 +71,6 @@ _ASM_NOKPROBE_SYMBOL(system_call_vectored_\name)
std r9,GPR13(r1) std r9,GPR13(r1)
SAVE_NVGPRS(r1) SAVE_NVGPRS(r1)
std r11,_XER(r1) std r11,_XER(r1)
std r11,_LINK(r1)
std r11,_CTR(r1) std r11,_CTR(r1)
li r11,\trapnr li r11,\trapnr

View File

@@ -230,7 +230,7 @@ again:
* This allows interrupts to be unmasked without hard disabling, and * This allows interrupts to be unmasked without hard disabling, and
* also without new hard interrupts coming in ahead of pending ones. * also without new hard interrupts coming in ahead of pending ones.
*/ */
asm_volatile_goto( asm goto(
"1: \n" "1: \n"
" lbz 9,%0(13) \n" " lbz 9,%0(13) \n"
" cmpwi 9,0 \n" " cmpwi 9,0 \n"

View File

@@ -64,6 +64,7 @@ int __init __weak kasan_init_region(void *start, size_t size)
if (ret) if (ret)
return ret; return ret;
k_start = k_start & PAGE_MASK;
block = memblock_alloc(k_end - k_start, PAGE_SIZE); block = memblock_alloc(k_end - k_start, PAGE_SIZE);
if (!block) if (!block)
return -ENOMEM; return -ENOMEM;

View File

@@ -660,8 +660,12 @@ u64 pseries_paravirt_steal_clock(int cpu)
{ {
struct lppaca *lppaca = &lppaca_of(cpu); struct lppaca *lppaca = &lppaca_of(cpu);
return be64_to_cpu(READ_ONCE(lppaca->enqueue_dispatch_tb)) + /*
be64_to_cpu(READ_ONCE(lppaca->ready_enqueue_tb)); * VPA steal time counters are reported at TB frequency. Hence do a
* conversion to ns before returning
*/
return tb_to_ns(be64_to_cpu(READ_ONCE(lppaca->enqueue_dispatch_tb)) +
be64_to_cpu(READ_ONCE(lppaca->ready_enqueue_tb)));
} }
#endif #endif

View File

@@ -17,7 +17,7 @@
static __always_inline bool arch_static_branch(struct static_key * const key, static __always_inline bool arch_static_branch(struct static_key * const key,
const bool branch) const bool branch)
{ {
asm_volatile_goto( asm goto(
" .align 2 \n\t" " .align 2 \n\t"
" .option push \n\t" " .option push \n\t"
" .option norelax \n\t" " .option norelax \n\t"
@@ -39,7 +39,7 @@ label:
static __always_inline bool arch_static_branch_jump(struct static_key * const key, static __always_inline bool arch_static_branch_jump(struct static_key * const key,
const bool branch) const bool branch)
{ {
asm_volatile_goto( asm goto(
" .align 2 \n\t" " .align 2 \n\t"
" .option push \n\t" " .option push \n\t"
" .option norelax \n\t" " .option norelax \n\t"

View File

@@ -25,7 +25,7 @@
*/ */
static __always_inline bool arch_static_branch(struct static_key *key, bool branch) static __always_inline bool arch_static_branch(struct static_key *key, bool branch)
{ {
asm_volatile_goto("0: brcl 0,%l[label]\n" asm goto("0: brcl 0,%l[label]\n"
".pushsection __jump_table,\"aw\"\n" ".pushsection __jump_table,\"aw\"\n"
".balign 8\n" ".balign 8\n"
".long 0b-.,%l[label]-.\n" ".long 0b-.,%l[label]-.\n"
@@ -39,7 +39,7 @@ label:
static __always_inline bool arch_static_branch_jump(struct static_key *key, bool branch) static __always_inline bool arch_static_branch_jump(struct static_key *key, bool branch)
{ {
asm_volatile_goto("0: brcl 15,%l[label]\n" asm goto("0: brcl 15,%l[label]\n"
".pushsection __jump_table,\"aw\"\n" ".pushsection __jump_table,\"aw\"\n"
".balign 8\n" ".balign 8\n"
".long 0b-.,%l[label]-.\n" ".long 0b-.,%l[label]-.\n"

View File

@@ -10,7 +10,7 @@
static __always_inline bool arch_static_branch(struct static_key *key, bool branch) static __always_inline bool arch_static_branch(struct static_key *key, bool branch)
{ {
asm_volatile_goto("1:\n\t" asm goto("1:\n\t"
"nop\n\t" "nop\n\t"
"nop\n\t" "nop\n\t"
".pushsection __jump_table, \"aw\"\n\t" ".pushsection __jump_table, \"aw\"\n\t"
@@ -26,7 +26,7 @@ l_yes:
static __always_inline bool arch_static_branch_jump(struct static_key *key, bool branch) static __always_inline bool arch_static_branch_jump(struct static_key *key, bool branch)
{ {
asm_volatile_goto("1:\n\t" asm goto("1:\n\t"
"b %l[l_yes]\n\t" "b %l[l_yes]\n\t"
"nop\n\t" "nop\n\t"
".pushsection __jump_table, \"aw\"\n\t" ".pushsection __jump_table, \"aw\"\n\t"

View File

@@ -118,7 +118,9 @@ archprepare:
$(Q)$(MAKE) $(build)=$(HOST_DIR)/um include/generated/user_constants.h $(Q)$(MAKE) $(build)=$(HOST_DIR)/um include/generated/user_constants.h
LINK-$(CONFIG_LD_SCRIPT_STATIC) += -static LINK-$(CONFIG_LD_SCRIPT_STATIC) += -static
LINK-$(CONFIG_LD_SCRIPT_DYN) += $(call cc-option, -no-pie) ifdef CONFIG_LD_SCRIPT_DYN
LINK-$(call gcc-min-version, 60100)$(CONFIG_CC_IS_CLANG) += -no-pie
endif
LINK-$(CONFIG_LD_SCRIPT_DYN_RPATH) += -Wl,-rpath,/lib LINK-$(CONFIG_LD_SCRIPT_DYN_RPATH) += -Wl,-rpath,/lib
CFLAGS_NO_HARDENING := $(call cc-option, -fno-PIC,) $(call cc-option, -fno-pic,) \ CFLAGS_NO_HARDENING := $(call cc-option, -fno-PIC,) $(call cc-option, -fno-pic,) \

View File

@@ -75,7 +75,7 @@ extern void setup_clear_cpu_cap(unsigned int bit);
*/ */
static __always_inline bool _static_cpu_has(u16 bit) static __always_inline bool _static_cpu_has(u16 bit)
{ {
asm_volatile_goto("1: jmp 6f\n" asm goto("1: jmp 6f\n"
"2:\n" "2:\n"
".skip -(((5f-4f) - (2b-1b)) > 0) * " ".skip -(((5f-4f) - (2b-1b)) > 0) * "
"((5f-4f) - (2b-1b)),0x90\n" "((5f-4f) - (2b-1b)),0x90\n"

View File

@@ -375,7 +375,7 @@ config X86_CMOV
config X86_MINIMUM_CPU_FAMILY config X86_MINIMUM_CPU_FAMILY
int int
default "64" if X86_64 default "64" if X86_64
default "6" if X86_32 && (MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MEFFICEON || MATOM || MCRUSOE || MCORE2 || MK7 || MK8) default "6" if X86_32 && (MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MEFFICEON || MATOM || MCORE2 || MK7 || MK8)
default "5" if X86_32 && X86_CMPXCHG64 default "5" if X86_32 && X86_CMPXCHG64
default "4" default "4"

View File

@@ -173,7 +173,7 @@ extern void clear_cpu_cap(struct cpuinfo_x86 *c, unsigned int bit);
*/ */
static __always_inline bool _static_cpu_has(u16 bit) static __always_inline bool _static_cpu_has(u16 bit)
{ {
asm_volatile_goto( asm goto(
ALTERNATIVE_TERNARY("jmp 6f", %P[feature], "", "jmp %l[t_no]") ALTERNATIVE_TERNARY("jmp 6f", %P[feature], "", "jmp %l[t_no]")
".pushsection .altinstr_aux,\"ax\"\n" ".pushsection .altinstr_aux,\"ax\"\n"
"6:\n" "6:\n"

View File

@@ -24,7 +24,7 @@
static __always_inline bool arch_static_branch(struct static_key *key, bool branch) static __always_inline bool arch_static_branch(struct static_key *key, bool branch)
{ {
asm_volatile_goto("1:" asm goto("1:"
"jmp %l[l_yes] # objtool NOPs this \n\t" "jmp %l[l_yes] # objtool NOPs this \n\t"
JUMP_TABLE_ENTRY JUMP_TABLE_ENTRY
: : "i" (key), "i" (2 | branch) : : l_yes); : : "i" (key), "i" (2 | branch) : : l_yes);
@@ -38,7 +38,7 @@ l_yes:
static __always_inline bool arch_static_branch(struct static_key * const key, const bool branch) static __always_inline bool arch_static_branch(struct static_key * const key, const bool branch)
{ {
asm_volatile_goto("1:" asm goto("1:"
".byte " __stringify(BYTES_NOP5) "\n\t" ".byte " __stringify(BYTES_NOP5) "\n\t"
JUMP_TABLE_ENTRY JUMP_TABLE_ENTRY
: : "i" (key), "i" (branch) : : l_yes); : : "i" (key), "i" (branch) : : l_yes);
@@ -52,7 +52,7 @@ l_yes:
static __always_inline bool arch_static_branch_jump(struct static_key * const key, const bool branch) static __always_inline bool arch_static_branch_jump(struct static_key * const key, const bool branch)
{ {
asm_volatile_goto("1:" asm goto("1:"
"jmp %l[l_yes]\n\t" "jmp %l[l_yes]\n\t"
JUMP_TABLE_ENTRY JUMP_TABLE_ENTRY
: : "i" (key), "i" (branch) : : l_yes); : : "i" (key), "i" (branch) : : l_yes);

View File

@@ -18,7 +18,7 @@
#define __GEN_RMWcc(fullop, _var, cc, clobbers, ...) \ #define __GEN_RMWcc(fullop, _var, cc, clobbers, ...) \
({ \ ({ \
bool c = false; \ bool c = false; \
asm_volatile_goto (fullop "; j" #cc " %l[cc_label]" \ asm goto (fullop "; j" #cc " %l[cc_label]" \
: : [var] "m" (_var), ## __VA_ARGS__ \ : : [var] "m" (_var), ## __VA_ARGS__ \
: clobbers : cc_label); \ : clobbers : cc_label); \
if (0) { \ if (0) { \

View File

@@ -155,7 +155,7 @@ extern int __get_user_bad(void);
#ifdef CONFIG_X86_32 #ifdef CONFIG_X86_32
#define __put_user_goto_u64(x, addr, label) \ #define __put_user_goto_u64(x, addr, label) \
asm_volatile_goto("\n" \ asm goto("\n" \
"1: movl %%eax,0(%1)\n" \ "1: movl %%eax,0(%1)\n" \
"2: movl %%edx,4(%1)\n" \ "2: movl %%edx,4(%1)\n" \
_ASM_EXTABLE_UA(1b, %l2) \ _ASM_EXTABLE_UA(1b, %l2) \
@@ -317,7 +317,7 @@ do { \
} while (0) } while (0)
#define __get_user_asm(x, addr, itype, ltype, label) \ #define __get_user_asm(x, addr, itype, ltype, label) \
asm_volatile_goto("\n" \ asm_goto_output("\n" \
"1: mov"itype" %[umem],%[output]\n" \ "1: mov"itype" %[umem],%[output]\n" \
_ASM_EXTABLE_UA(1b, %l2) \ _ASM_EXTABLE_UA(1b, %l2) \
: [output] ltype(x) \ : [output] ltype(x) \
@@ -397,7 +397,7 @@ do { \
__typeof__(_ptr) _old = (__typeof__(_ptr))(_pold); \ __typeof__(_ptr) _old = (__typeof__(_ptr))(_pold); \
__typeof__(*(_ptr)) __old = *_old; \ __typeof__(*(_ptr)) __old = *_old; \
__typeof__(*(_ptr)) __new = (_new); \ __typeof__(*(_ptr)) __new = (_new); \
asm_volatile_goto("\n" \ asm_goto_output("\n" \
"1: " LOCK_PREFIX "cmpxchg"itype" %[new], %[ptr]\n"\ "1: " LOCK_PREFIX "cmpxchg"itype" %[new], %[ptr]\n"\
_ASM_EXTABLE_UA(1b, %l[label]) \ _ASM_EXTABLE_UA(1b, %l[label]) \
: CC_OUT(z) (success), \ : CC_OUT(z) (success), \
@@ -416,7 +416,7 @@ do { \
__typeof__(_ptr) _old = (__typeof__(_ptr))(_pold); \ __typeof__(_ptr) _old = (__typeof__(_ptr))(_pold); \
__typeof__(*(_ptr)) __old = *_old; \ __typeof__(*(_ptr)) __old = *_old; \
__typeof__(*(_ptr)) __new = (_new); \ __typeof__(*(_ptr)) __new = (_new); \
asm_volatile_goto("\n" \ asm_goto_output("\n" \
"1: " LOCK_PREFIX "cmpxchg8b %[ptr]\n" \ "1: " LOCK_PREFIX "cmpxchg8b %[ptr]\n" \
_ASM_EXTABLE_UA(1b, %l[label]) \ _ASM_EXTABLE_UA(1b, %l[label]) \
: CC_OUT(z) (success), \ : CC_OUT(z) (success), \
@@ -499,7 +499,7 @@ struct __large_struct { unsigned long buf[100]; };
* aliasing issues. * aliasing issues.
*/ */
#define __put_user_goto(x, addr, itype, ltype, label) \ #define __put_user_goto(x, addr, itype, ltype, label) \
asm_volatile_goto("\n" \ asm goto("\n" \
"1: mov"itype" %0,%1\n" \ "1: mov"itype" %0,%1\n" \
_ASM_EXTABLE_UA(1b, %l2) \ _ASM_EXTABLE_UA(1b, %l2) \
: : ltype(x), "m" (__m(addr)) \ : : ltype(x), "m" (__m(addr)) \

View File

@@ -43,9 +43,9 @@ static inline int cpu_has_vmx(void)
*/ */
static inline int cpu_vmxoff(void) static inline int cpu_vmxoff(void)
{ {
asm_volatile_goto("1: vmxoff\n\t" asm goto("1: vmxoff\n\t"
_ASM_EXTABLE(1b, %l[fault]) _ASM_EXTABLE(1b, %l[fault])
::: "cc", "memory" : fault); ::: "cc", "memory" : fault);
cr4_clear_bits(X86_CR4_VMXE); cr4_clear_bits(X86_CR4_VMXE);
return 0; return 0;
@@ -129,9 +129,9 @@ static inline void cpu_svm_disable(void)
* case, GIF must already be set, otherwise the NMI would have * case, GIF must already be set, otherwise the NMI would have
* been blocked, so just eat the fault. * been blocked, so just eat the fault.
*/ */
asm_volatile_goto("1: stgi\n\t" asm goto("1: stgi\n\t"
_ASM_EXTABLE(1b, %l[fault]) _ASM_EXTABLE(1b, %l[fault])
::: "memory" : fault); ::: "memory" : fault);
fault: fault:
wrmsrl(MSR_EFER, efer & ~EFER_SVME); wrmsrl(MSR_EFER, efer & ~EFER_SVME);
} }

View File

@@ -274,12 +274,13 @@ static int __restore_fpregs_from_user(void __user *buf, u64 ufeatures,
* Attempt to restore the FPU registers directly from user memory. * Attempt to restore the FPU registers directly from user memory.
* Pagefaults are handled and any errors returned are fatal. * Pagefaults are handled and any errors returned are fatal.
*/ */
static bool restore_fpregs_from_user(void __user *buf, u64 xrestore, static bool restore_fpregs_from_user(void __user *buf, u64 xrestore, bool fx_only)
bool fx_only, unsigned int size)
{ {
struct fpu *fpu = &current->thread.fpu; struct fpu *fpu = &current->thread.fpu;
int ret; int ret;
/* Restore enabled features only. */
xrestore &= fpu->fpstate->user_xfeatures;
retry: retry:
fpregs_lock(); fpregs_lock();
/* Ensure that XFD is up to date */ /* Ensure that XFD is up to date */
@@ -309,7 +310,7 @@ retry:
if (ret != X86_TRAP_PF) if (ret != X86_TRAP_PF)
return false; return false;
if (!fault_in_readable(buf, size)) if (!fault_in_readable(buf, fpu->fpstate->user_size))
goto retry; goto retry;
return false; return false;
} }
@@ -339,7 +340,6 @@ static bool __fpu_restore_sig(void __user *buf, void __user *buf_fx,
struct user_i387_ia32_struct env; struct user_i387_ia32_struct env;
bool success, fx_only = false; bool success, fx_only = false;
union fpregs_state *fpregs; union fpregs_state *fpregs;
unsigned int state_size;
u64 user_xfeatures = 0; u64 user_xfeatures = 0;
if (use_xsave()) { if (use_xsave()) {
@@ -349,17 +349,14 @@ static bool __fpu_restore_sig(void __user *buf, void __user *buf_fx,
return false; return false;
fx_only = !fx_sw_user.magic1; fx_only = !fx_sw_user.magic1;
state_size = fx_sw_user.xstate_size;
user_xfeatures = fx_sw_user.xfeatures; user_xfeatures = fx_sw_user.xfeatures;
} else { } else {
user_xfeatures = XFEATURE_MASK_FPSSE; user_xfeatures = XFEATURE_MASK_FPSSE;
state_size = fpu->fpstate->user_size;
} }
if (likely(!ia32_fxstate)) { if (likely(!ia32_fxstate)) {
/* Restore the FPU registers directly from user memory. */ /* Restore the FPU registers directly from user memory. */
return restore_fpregs_from_user(buf_fx, user_xfeatures, fx_only, return restore_fpregs_from_user(buf_fx, user_xfeatures, fx_only);
state_size);
} }
/* /*

View File

@@ -8,7 +8,7 @@
#define svm_asm(insn, clobber...) \ #define svm_asm(insn, clobber...) \
do { \ do { \
asm_volatile_goto("1: " __stringify(insn) "\n\t" \ asm goto("1: " __stringify(insn) "\n\t" \
_ASM_EXTABLE(1b, %l[fault]) \ _ASM_EXTABLE(1b, %l[fault]) \
::: clobber : fault); \ ::: clobber : fault); \
return; \ return; \
@@ -18,7 +18,7 @@ fault: \
#define svm_asm1(insn, op1, clobber...) \ #define svm_asm1(insn, op1, clobber...) \
do { \ do { \
asm_volatile_goto("1: " __stringify(insn) " %0\n\t" \ asm goto("1: " __stringify(insn) " %0\n\t" \
_ASM_EXTABLE(1b, %l[fault]) \ _ASM_EXTABLE(1b, %l[fault]) \
:: op1 : clobber : fault); \ :: op1 : clobber : fault); \
return; \ return; \
@@ -28,7 +28,7 @@ fault: \
#define svm_asm2(insn, op1, op2, clobber...) \ #define svm_asm2(insn, op1, op2, clobber...) \
do { \ do { \
asm_volatile_goto("1: " __stringify(insn) " %1, %0\n\t" \ asm goto("1: " __stringify(insn) " %1, %0\n\t" \
_ASM_EXTABLE(1b, %l[fault]) \ _ASM_EXTABLE(1b, %l[fault]) \
:: op1, op2 : clobber : fault); \ :: op1, op2 : clobber : fault); \
return; \ return; \

View File

@@ -38,7 +38,7 @@ static int fixed_pmc_events[] = {1, 0, 7};
static void reprogram_fixed_counters(struct kvm_pmu *pmu, u64 data) static void reprogram_fixed_counters(struct kvm_pmu *pmu, u64 data)
{ {
struct kvm_pmc *pmc; struct kvm_pmc *pmc;
u8 old_fixed_ctr_ctrl = pmu->fixed_ctr_ctrl; u64 old_fixed_ctr_ctrl = pmu->fixed_ctr_ctrl;
int i; int i;
pmu->fixed_ctr_ctrl = data; pmu->fixed_ctr_ctrl = data;

View File

@@ -2469,10 +2469,10 @@ static int kvm_cpu_vmxon(u64 vmxon_pointer)
cr4_set_bits(X86_CR4_VMXE); cr4_set_bits(X86_CR4_VMXE);
asm_volatile_goto("1: vmxon %[vmxon_pointer]\n\t" asm goto("1: vmxon %[vmxon_pointer]\n\t"
_ASM_EXTABLE(1b, %l[fault]) _ASM_EXTABLE(1b, %l[fault])
: : [vmxon_pointer] "m"(vmxon_pointer) : : [vmxon_pointer] "m"(vmxon_pointer)
: : fault); : : fault);
return 0; return 0;
fault: fault:

View File

@@ -73,7 +73,7 @@ static __always_inline unsigned long __vmcs_readl(unsigned long field)
#ifdef CONFIG_CC_HAS_ASM_GOTO_OUTPUT #ifdef CONFIG_CC_HAS_ASM_GOTO_OUTPUT
asm_volatile_goto("1: vmread %[field], %[output]\n\t" asm_goto_output("1: vmread %[field], %[output]\n\t"
"jna %l[do_fail]\n\t" "jna %l[do_fail]\n\t"
_ASM_EXTABLE(1b, %l[do_exception]) _ASM_EXTABLE(1b, %l[do_exception])
@@ -166,7 +166,7 @@ static __always_inline unsigned long vmcs_readl(unsigned long field)
#define vmx_asm1(insn, op1, error_args...) \ #define vmx_asm1(insn, op1, error_args...) \
do { \ do { \
asm_volatile_goto("1: " __stringify(insn) " %0\n\t" \ asm goto("1: " __stringify(insn) " %0\n\t" \
".byte 0x2e\n\t" /* branch not taken hint */ \ ".byte 0x2e\n\t" /* branch not taken hint */ \
"jna %l[error]\n\t" \ "jna %l[error]\n\t" \
_ASM_EXTABLE(1b, %l[fault]) \ _ASM_EXTABLE(1b, %l[fault]) \
@@ -183,7 +183,7 @@ fault: \
#define vmx_asm2(insn, op1, op2, error_args...) \ #define vmx_asm2(insn, op1, op2, error_args...) \
do { \ do { \
asm_volatile_goto("1: " __stringify(insn) " %1, %0\n\t" \ asm goto("1: " __stringify(insn) " %1, %0\n\t" \
".byte 0x2e\n\t" /* branch not taken hint */ \ ".byte 0x2e\n\t" /* branch not taken hint */ \
"jna %l[error]\n\t" \ "jna %l[error]\n\t" \
_ASM_EXTABLE(1b, %l[fault]) \ _ASM_EXTABLE(1b, %l[fault]) \

View File

@@ -26,18 +26,31 @@ static int ident_pud_init(struct x86_mapping_info *info, pud_t *pud_page,
for (; addr < end; addr = next) { for (; addr < end; addr = next) {
pud_t *pud = pud_page + pud_index(addr); pud_t *pud = pud_page + pud_index(addr);
pmd_t *pmd; pmd_t *pmd;
bool use_gbpage;
next = (addr & PUD_MASK) + PUD_SIZE; next = (addr & PUD_MASK) + PUD_SIZE;
if (next > end) if (next > end)
next = end; next = end;
if (info->direct_gbpages) { /* if this is already a gbpage, this portion is already mapped */
if (pud_large(*pud))
continue;
/* Is using a gbpage allowed? */
use_gbpage = info->direct_gbpages;
/* Don't use gbpage if it maps more than the requested region. */
/* at the begining: */
use_gbpage &= ((addr & ~PUD_MASK) == 0);
/* ... or at the end: */
use_gbpage &= ((next & ~PUD_MASK) == 0);
/* Never overwrite existing mappings */
use_gbpage &= !pud_present(*pud);
if (use_gbpage) {
pud_t pudval; pud_t pudval;
if (pud_present(*pud))
continue;
addr &= PUD_MASK;
pudval = __pud((addr - info->offset) | info->page_flag); pudval = __pud((addr - info->offset) | info->page_flag);
set_pud(pud, pudval); set_pud(pud, pudval);
continue; continue;

View File

@@ -13,7 +13,7 @@
static __always_inline bool arch_static_branch(struct static_key *key, static __always_inline bool arch_static_branch(struct static_key *key,
bool branch) bool branch)
{ {
asm_volatile_goto("1:\n\t" asm goto("1:\n\t"
"_nop\n\t" "_nop\n\t"
".pushsection __jump_table, \"aw\"\n\t" ".pushsection __jump_table, \"aw\"\n\t"
".word 1b, %l[l_yes], %c0\n\t" ".word 1b, %l[l_yes], %c0\n\t"
@@ -38,7 +38,7 @@ static __always_inline bool arch_static_branch_jump(struct static_key *key,
* make it reachable and wrap both into a no-transform block * make it reachable and wrap both into a no-transform block
* to avoid any assembler interference with this. * to avoid any assembler interference with this.
*/ */
asm_volatile_goto("1:\n\t" asm goto("1:\n\t"
".begin no-transform\n\t" ".begin no-transform\n\t"
"_j %l[l_yes]\n\t" "_j %l[l_yes]\n\t"
"2:\n\t" "2:\n\t"

View File

@@ -747,11 +747,16 @@ static void req_bio_endio(struct request *rq, struct bio *bio,
/* /*
* Partial zone append completions cannot be supported as the * Partial zone append completions cannot be supported as the
* BIO fragments may end up not being written sequentially. * BIO fragments may end up not being written sequentially.
* For such case, force the completed nbytes to be equal to
* the BIO size so that bio_advance() sets the BIO remaining
* size to 0 and we end up calling bio_endio() before returning.
*/ */
if (bio->bi_iter.bi_size != nbytes) if (bio->bi_iter.bi_size != nbytes) {
bio->bi_status = BLK_STS_IOERR; bio->bi_status = BLK_STS_IOERR;
else nbytes = bio->bi_iter.bi_size;
} else {
bio->bi_iter.bi_sector = rq->__sector; bio->bi_iter.bi_sector = rq->__sector;
}
} }
bio_advance(bio, nbytes); bio_advance(bio, nbytes);

View File

@@ -481,6 +481,16 @@ binder_enqueue_thread_work_ilocked(struct binder_thread *thread,
{ {
WARN_ON(!list_empty(&thread->waiting_thread_node)); WARN_ON(!list_empty(&thread->waiting_thread_node));
binder_enqueue_work_ilocked(work, &thread->todo); binder_enqueue_work_ilocked(work, &thread->todo);
/* (e)poll-based threads require an explicit wakeup signal when
* queuing their own work; they rely on these events to consume
* messages without I/O block. Without it, threads risk waiting
* indefinitely without handling the work.
*/
if (thread->looper & BINDER_LOOPER_STATE_POLL &&
thread->pid == current->pid && !thread->process_todo)
wake_up_interruptible_sync(&thread->wait);
thread->process_todo = true; thread->process_todo = true;
} }

View File

@@ -337,10 +337,12 @@ static bool device_is_ancestor(struct device *dev, struct device *target)
return false; return false;
} }
#define DL_MARKER_FLAGS (DL_FLAG_INFERRED | \
DL_FLAG_CYCLE | \
DL_FLAG_MANAGED)
static inline bool device_link_flag_is_sync_state_only(u32 flags) static inline bool device_link_flag_is_sync_state_only(u32 flags)
{ {
return (flags & ~(DL_FLAG_INFERRED | DL_FLAG_CYCLE)) == return (flags & ~DL_MARKER_FLAGS) == DL_FLAG_SYNC_STATE_ONLY;
(DL_FLAG_SYNC_STATE_ONLY | DL_FLAG_MANAGED);
} }
/** /**
@@ -2054,9 +2056,14 @@ static int fw_devlink_create_devlink(struct device *con,
/* /*
* SYNC_STATE_ONLY device links don't block probing and supports cycles. * SYNC_STATE_ONLY device links don't block probing and supports cycles.
* So cycle detection isn't necessary and shouldn't be done. * So, one might expect that cycle detection isn't necessary for them.
* However, if the device link was marked as SYNC_STATE_ONLY because
* it's part of a cycle, then we still need to do cycle detection. This
* is because the consumer and supplier might be part of multiple cycles
* and we need to detect all those cycles.
*/ */
if (!(flags & DL_FLAG_SYNC_STATE_ONLY)) { if (!device_link_flag_is_sync_state_only(flags) ||
flags & DL_FLAG_CYCLE) {
device_links_write_lock(); device_links_write_lock();
if (__fw_devlink_relax_cycles(con, sup_handle)) { if (__fw_devlink_relax_cycles(con, sup_handle)) {
__fwnode_link_cycle(link); __fwnode_link_cycle(link);

View File

@@ -1052,7 +1052,7 @@ static int __init genpd_power_off_unused(void)
return 0; return 0;
} }
late_initcall(genpd_power_off_unused); late_initcall_sync(genpd_power_off_unused);
#ifdef CONFIG_PM_SLEEP #ifdef CONFIG_PM_SLEEP

View File

@@ -830,6 +830,12 @@ static void moxtet_remove(struct spi_device *spi)
mutex_destroy(&moxtet->lock); mutex_destroy(&moxtet->lock);
} }
static const struct spi_device_id moxtet_spi_ids[] = {
{ "moxtet" },
{ },
};
MODULE_DEVICE_TABLE(spi, moxtet_spi_ids);
static const struct of_device_id moxtet_dt_ids[] = { static const struct of_device_id moxtet_dt_ids[] = {
{ .compatible = "cznic,moxtet" }, { .compatible = "cznic,moxtet" },
{}, {},
@@ -841,6 +847,7 @@ static struct spi_driver moxtet_spi_driver = {
.name = "moxtet", .name = "moxtet",
.of_match_table = moxtet_dt_ids, .of_match_table = moxtet_dt_ids,
}, },
.id_table = moxtet_spi_ids,
.probe = moxtet_probe, .probe = moxtet_probe,
.remove = moxtet_remove, .remove = moxtet_remove,
}; };

View File

@@ -515,10 +515,16 @@ EXPORT_SYMBOL_GPL(sev_platform_init);
static int __sev_platform_shutdown_locked(int *error) static int __sev_platform_shutdown_locked(int *error)
{ {
struct sev_device *sev = psp_master->sev_data; struct psp_device *psp = psp_master;
struct sev_device *sev;
int ret; int ret;
if (!sev || sev->state == SEV_STATE_UNINIT) if (!psp || !psp->sev_data)
return 0;
sev = psp->sev_data;
if (sev->state == SEV_STATE_UNINIT)
return 0; return 0;
ret = __sev_do_cmd_locked(SEV_CMD_SHUTDOWN, NULL, error); ret = __sev_do_cmd_locked(SEV_CMD_SHUTDOWN, NULL, error);

View File

@@ -584,11 +584,11 @@ desc_get_errstat(struct ioatdma_chan *ioat_chan, struct ioat_ring_ent *desc)
} }
/** /**
* __cleanup - reclaim used descriptors * __ioat_cleanup - reclaim used descriptors
* @ioat_chan: channel (ring) to clean * @ioat_chan: channel (ring) to clean
* @phys_complete: zeroed (or not) completion address (from status) * @phys_complete: zeroed (or not) completion address (from status)
*/ */
static void __cleanup(struct ioatdma_chan *ioat_chan, dma_addr_t phys_complete) static void __ioat_cleanup(struct ioatdma_chan *ioat_chan, dma_addr_t phys_complete)
{ {
struct ioatdma_device *ioat_dma = ioat_chan->ioat_dma; struct ioatdma_device *ioat_dma = ioat_chan->ioat_dma;
struct ioat_ring_ent *desc; struct ioat_ring_ent *desc;
@@ -675,7 +675,7 @@ static void ioat_cleanup(struct ioatdma_chan *ioat_chan)
spin_lock_bh(&ioat_chan->cleanup_lock); spin_lock_bh(&ioat_chan->cleanup_lock);
if (ioat_cleanup_preamble(ioat_chan, &phys_complete)) if (ioat_cleanup_preamble(ioat_chan, &phys_complete))
__cleanup(ioat_chan, phys_complete); __ioat_cleanup(ioat_chan, phys_complete);
if (is_ioat_halted(*ioat_chan->completion)) { if (is_ioat_halted(*ioat_chan->completion)) {
u32 chanerr = readl(ioat_chan->reg_base + IOAT_CHANERR_OFFSET); u32 chanerr = readl(ioat_chan->reg_base + IOAT_CHANERR_OFFSET);
@@ -712,7 +712,7 @@ static void ioat_restart_channel(struct ioatdma_chan *ioat_chan)
ioat_quiesce(ioat_chan, 0); ioat_quiesce(ioat_chan, 0);
if (ioat_cleanup_preamble(ioat_chan, &phys_complete)) if (ioat_cleanup_preamble(ioat_chan, &phys_complete))
__cleanup(ioat_chan, phys_complete); __ioat_cleanup(ioat_chan, phys_complete);
__ioat_restart_chan(ioat_chan); __ioat_restart_chan(ioat_chan);
} }
@@ -786,7 +786,7 @@ static void ioat_eh(struct ioatdma_chan *ioat_chan)
/* cleanup so tail points to descriptor that caused the error */ /* cleanup so tail points to descriptor that caused the error */
if (ioat_cleanup_preamble(ioat_chan, &phys_complete)) if (ioat_cleanup_preamble(ioat_chan, &phys_complete))
__cleanup(ioat_chan, phys_complete); __ioat_cleanup(ioat_chan, phys_complete);
chanerr = readl(ioat_chan->reg_base + IOAT_CHANERR_OFFSET); chanerr = readl(ioat_chan->reg_base + IOAT_CHANERR_OFFSET);
pci_read_config_dword(pdev, IOAT_PCI_CHANERR_INT_OFFSET, &chanerr_int); pci_read_config_dword(pdev, IOAT_PCI_CHANERR_INT_OFFSET, &chanerr_int);
@@ -943,7 +943,7 @@ void ioat_timer_event(struct timer_list *t)
/* timer restarted in ioat_cleanup_preamble /* timer restarted in ioat_cleanup_preamble
* and IOAT_COMPLETION_ACK cleared * and IOAT_COMPLETION_ACK cleared
*/ */
__cleanup(ioat_chan, phys_complete); __ioat_cleanup(ioat_chan, phys_complete);
goto unlock_out; goto unlock_out;
} }

View File

@@ -100,10 +100,9 @@ static int textual_leaf_to_string(const u32 *block, char *buf, size_t size)
* @buf: where to put the string * @buf: where to put the string
* @size: size of @buf, in bytes * @size: size of @buf, in bytes
* *
* The string is taken from a minimal ASCII text descriptor leaf after * The string is taken from a minimal ASCII text descriptor leaf just after the entry with the
* the immediate entry with @key. The string is zero-terminated. * @key. The string is zero-terminated. An overlong string is silently truncated such that it
* An overlong string is silently truncated such that it and the * and the zero byte fit into @size.
* zero byte fit into @size.
* *
* Returns strlen(buf) or a negative error code. * Returns strlen(buf) or a negative error code.
*/ */

View File

@@ -4203,7 +4203,6 @@ int amdgpu_device_suspend(struct drm_device *dev, bool fbcon)
drm_fb_helper_set_suspend_unlocked(adev_to_drm(adev)->fb_helper, true); drm_fb_helper_set_suspend_unlocked(adev_to_drm(adev)->fb_helper, true);
cancel_delayed_work_sync(&adev->delayed_init_work); cancel_delayed_work_sync(&adev->delayed_init_work);
flush_delayed_work(&adev->gfx.gfx_off_delay_work);
amdgpu_ras_suspend(adev); amdgpu_ras_suspend(adev);

View File

@@ -585,8 +585,15 @@ void amdgpu_gfx_off_ctrl(struct amdgpu_device *adev, bool enable)
if (adev->gfx.gfx_off_req_count == 0 && if (adev->gfx.gfx_off_req_count == 0 &&
!adev->gfx.gfx_off_state) { !adev->gfx.gfx_off_state) {
schedule_delayed_work(&adev->gfx.gfx_off_delay_work, /* If going to s2idle, no need to wait */
if (adev->in_s0ix) {
if (!amdgpu_dpm_set_powergating_by_smu(adev,
AMD_IP_BLOCK_TYPE_GFX, true))
adev->gfx.gfx_off_state = true;
} else {
schedule_delayed_work(&adev->gfx.gfx_off_delay_work,
delay); delay);
}
} }
} else { } else {
if (adev->gfx.gfx_off_req_count == 0) { if (adev->gfx.gfx_off_req_count == 0) {

View File

@@ -6001,7 +6001,9 @@ create_stream_for_sink(struct amdgpu_dm_connector *aconnector,
if (recalculate_timing) { if (recalculate_timing) {
freesync_mode = get_highest_refresh_rate_mode(aconnector, false); freesync_mode = get_highest_refresh_rate_mode(aconnector, false);
drm_mode_copy(&saved_mode, &mode); drm_mode_copy(&saved_mode, &mode);
saved_mode.picture_aspect_ratio = mode.picture_aspect_ratio;
drm_mode_copy(&mode, freesync_mode); drm_mode_copy(&mode, freesync_mode);
mode.picture_aspect_ratio = saved_mode.picture_aspect_ratio;
} else { } else {
decide_crtc_timing_for_drm_display_mode( decide_crtc_timing_for_drm_display_mode(
&mode, preferred_mode, scale); &mode, preferred_mode, scale);

View File

@@ -60,11 +60,11 @@ ifdef CONFIG_DRM_AMD_DC_DCN
CFLAGS_$(AMDDALPATH)/dc/dml/display_mode_vba.o := $(dml_ccflags) CFLAGS_$(AMDDALPATH)/dc/dml/display_mode_vba.o := $(dml_ccflags)
CFLAGS_$(AMDDALPATH)/dc/dml/dcn10/dcn10_fpu.o := $(dml_ccflags) CFLAGS_$(AMDDALPATH)/dc/dml/dcn10/dcn10_fpu.o := $(dml_ccflags)
CFLAGS_$(AMDDALPATH)/dc/dml/dcn20/dcn20_fpu.o := $(dml_ccflags) CFLAGS_$(AMDDALPATH)/dc/dml/dcn20/dcn20_fpu.o := $(dml_ccflags)
CFLAGS_$(AMDDALPATH)/dc/dml/dcn20/display_mode_vba_20.o := $(dml_ccflags) CFLAGS_$(AMDDALPATH)/dc/dml/dcn20/display_mode_vba_20.o := $(dml_ccflags) $(frame_warn_flag)
CFLAGS_$(AMDDALPATH)/dc/dml/dcn20/display_rq_dlg_calc_20.o := $(dml_ccflags) CFLAGS_$(AMDDALPATH)/dc/dml/dcn20/display_rq_dlg_calc_20.o := $(dml_ccflags)
CFLAGS_$(AMDDALPATH)/dc/dml/dcn20/display_mode_vba_20v2.o := $(dml_ccflags) CFLAGS_$(AMDDALPATH)/dc/dml/dcn20/display_mode_vba_20v2.o := $(dml_ccflags) $(frame_warn_flag)
CFLAGS_$(AMDDALPATH)/dc/dml/dcn20/display_rq_dlg_calc_20v2.o := $(dml_ccflags) CFLAGS_$(AMDDALPATH)/dc/dml/dcn20/display_rq_dlg_calc_20v2.o := $(dml_ccflags)
CFLAGS_$(AMDDALPATH)/dc/dml/dcn21/display_mode_vba_21.o := $(dml_ccflags) CFLAGS_$(AMDDALPATH)/dc/dml/dcn21/display_mode_vba_21.o := $(dml_ccflags) $(frame_warn_flag)
CFLAGS_$(AMDDALPATH)/dc/dml/dcn21/display_rq_dlg_calc_21.o := $(dml_ccflags) CFLAGS_$(AMDDALPATH)/dc/dml/dcn21/display_rq_dlg_calc_21.o := $(dml_ccflags)
CFLAGS_$(AMDDALPATH)/dc/dml/dcn30/display_mode_vba_30.o := $(dml_ccflags) $(frame_warn_flag) CFLAGS_$(AMDDALPATH)/dc/dml/dcn30/display_mode_vba_30.o := $(dml_ccflags) $(frame_warn_flag)
CFLAGS_$(AMDDALPATH)/dc/dml/dcn30/display_rq_dlg_calc_30.o := $(dml_ccflags) CFLAGS_$(AMDDALPATH)/dc/dml/dcn30/display_rq_dlg_calc_30.o := $(dml_ccflags)

View File

@@ -828,7 +828,7 @@ struct sg_table *drm_prime_pages_to_sg(struct drm_device *dev,
if (max_segment == 0) if (max_segment == 0)
max_segment = UINT_MAX; max_segment = UINT_MAX;
err = sg_alloc_table_from_pages_segment(sg, pages, nr_pages, 0, err = sg_alloc_table_from_pages_segment(sg, pages, nr_pages, 0,
nr_pages << PAGE_SHIFT, (unsigned long)nr_pages << PAGE_SHIFT,
max_segment, GFP_KERNEL); max_segment, GFP_KERNEL);
if (err) { if (err) {
kfree(sg); kfree(sg);

View File

@@ -21,6 +21,8 @@ struct msm_iommu_pagetable {
struct msm_mmu base; struct msm_mmu base;
struct msm_mmu *parent; struct msm_mmu *parent;
struct io_pgtable_ops *pgtbl_ops; struct io_pgtable_ops *pgtbl_ops;
const struct iommu_flush_ops *tlb;
struct device *iommu_dev;
unsigned long pgsize_bitmap; /* Bitmap of page sizes in use */ unsigned long pgsize_bitmap; /* Bitmap of page sizes in use */
phys_addr_t ttbr; phys_addr_t ttbr;
u32 asid; u32 asid;
@@ -194,11 +196,33 @@ static const struct msm_mmu_funcs pagetable_funcs = {
static void msm_iommu_tlb_flush_all(void *cookie) static void msm_iommu_tlb_flush_all(void *cookie)
{ {
struct msm_iommu_pagetable *pagetable = cookie;
struct adreno_smmu_priv *adreno_smmu;
if (!pm_runtime_get_if_in_use(pagetable->iommu_dev))
return;
adreno_smmu = dev_get_drvdata(pagetable->parent->dev);
pagetable->tlb->tlb_flush_all((void *)adreno_smmu->cookie);
pm_runtime_put_autosuspend(pagetable->iommu_dev);
} }
static void msm_iommu_tlb_flush_walk(unsigned long iova, size_t size, static void msm_iommu_tlb_flush_walk(unsigned long iova, size_t size,
size_t granule, void *cookie) size_t granule, void *cookie)
{ {
struct msm_iommu_pagetable *pagetable = cookie;
struct adreno_smmu_priv *adreno_smmu;
if (!pm_runtime_get_if_in_use(pagetable->iommu_dev))
return;
adreno_smmu = dev_get_drvdata(pagetable->parent->dev);
pagetable->tlb->tlb_flush_walk(iova, size, granule, (void *)adreno_smmu->cookie);
pm_runtime_put_autosuspend(pagetable->iommu_dev);
} }
static void msm_iommu_tlb_add_page(struct iommu_iotlb_gather *gather, static void msm_iommu_tlb_add_page(struct iommu_iotlb_gather *gather,
@@ -206,7 +230,7 @@ static void msm_iommu_tlb_add_page(struct iommu_iotlb_gather *gather,
{ {
} }
static const struct iommu_flush_ops null_tlb_ops = { static const struct iommu_flush_ops tlb_ops = {
.tlb_flush_all = msm_iommu_tlb_flush_all, .tlb_flush_all = msm_iommu_tlb_flush_all,
.tlb_flush_walk = msm_iommu_tlb_flush_walk, .tlb_flush_walk = msm_iommu_tlb_flush_walk,
.tlb_add_page = msm_iommu_tlb_add_page, .tlb_add_page = msm_iommu_tlb_add_page,
@@ -254,10 +278,10 @@ struct msm_mmu *msm_iommu_pagetable_create(struct msm_mmu *parent)
/* The incoming cfg will have the TTBR1 quirk enabled */ /* The incoming cfg will have the TTBR1 quirk enabled */
ttbr0_cfg.quirks &= ~IO_PGTABLE_QUIRK_ARM_TTBR1; ttbr0_cfg.quirks &= ~IO_PGTABLE_QUIRK_ARM_TTBR1;
ttbr0_cfg.tlb = &null_tlb_ops; ttbr0_cfg.tlb = &tlb_ops;
pagetable->pgtbl_ops = alloc_io_pgtable_ops(ARM_64_LPAE_S1, pagetable->pgtbl_ops = alloc_io_pgtable_ops(ARM_64_LPAE_S1,
&ttbr0_cfg, iommu->domain); &ttbr0_cfg, pagetable);
if (!pagetable->pgtbl_ops) { if (!pagetable->pgtbl_ops) {
kfree(pagetable); kfree(pagetable);
@@ -282,6 +306,8 @@ struct msm_mmu *msm_iommu_pagetable_create(struct msm_mmu *parent)
/* Needed later for TLB flush */ /* Needed later for TLB flush */
pagetable->parent = parent; pagetable->parent = parent;
pagetable->tlb = ttbr1_cfg->tlb;
pagetable->iommu_dev = ttbr1_cfg->iommu_dev;
pagetable->pgsize_bitmap = ttbr0_cfg.pgsize_bitmap; pagetable->pgsize_bitmap = ttbr0_cfg.pgsize_bitmap;
pagetable->ttbr = ttbr0_cfg.arm_lpae_s1_cfg.ttbr; pagetable->ttbr = ttbr0_cfg.arm_lpae_s1_cfg.ttbr;

View File

@@ -997,7 +997,7 @@ nouveau_svm_fault_buffer_ctor(struct nouveau_svm *svm, s32 oclass, int id)
if (ret) if (ret)
return ret; return ret;
buffer->fault = kvcalloc(sizeof(*buffer->fault), buffer->entries, GFP_KERNEL); buffer->fault = kvcalloc(buffer->entries, sizeof(*buffer->fault), GFP_KERNEL);
if (!buffer->fault) if (!buffer->fault)
return -ENOMEM; return -ENOMEM;

View File

@@ -93,6 +93,7 @@ static int virtio_gpu_probe(struct virtio_device *vdev)
goto err_free; goto err_free;
} }
dma_set_max_seg_size(dev->dev, dma_max_mapping_size(dev->dev) ?: UINT_MAX);
ret = virtio_gpu_init(vdev, dev); ret = virtio_gpu_init(vdev, dev);
if (ret) if (ret)
goto err_free; goto err_free;

View File

@@ -80,6 +80,7 @@ static int i2c_hid_of_probe(struct i2c_client *client,
if (!ihid_of) if (!ihid_of)
return -ENOMEM; return -ENOMEM;
ihid_of->client = client;
ihid_of->ops.power_up = i2c_hid_of_power_up; ihid_of->ops.power_up = i2c_hid_of_power_up;
ihid_of->ops.power_down = i2c_hid_of_power_down; ihid_of->ops.power_down = i2c_hid_of_power_down;

View File

@@ -2080,7 +2080,7 @@ static int wacom_allocate_inputs(struct wacom *wacom)
return 0; return 0;
} }
static int wacom_register_inputs(struct wacom *wacom) static int wacom_setup_inputs(struct wacom *wacom)
{ {
struct input_dev *pen_input_dev, *touch_input_dev, *pad_input_dev; struct input_dev *pen_input_dev, *touch_input_dev, *pad_input_dev;
struct wacom_wac *wacom_wac = &(wacom->wacom_wac); struct wacom_wac *wacom_wac = &(wacom->wacom_wac);
@@ -2099,10 +2099,6 @@ static int wacom_register_inputs(struct wacom *wacom)
input_free_device(pen_input_dev); input_free_device(pen_input_dev);
wacom_wac->pen_input = NULL; wacom_wac->pen_input = NULL;
pen_input_dev = NULL; pen_input_dev = NULL;
} else {
error = input_register_device(pen_input_dev);
if (error)
goto fail;
} }
error = wacom_setup_touch_input_capabilities(touch_input_dev, wacom_wac); error = wacom_setup_touch_input_capabilities(touch_input_dev, wacom_wac);
@@ -2111,10 +2107,6 @@ static int wacom_register_inputs(struct wacom *wacom)
input_free_device(touch_input_dev); input_free_device(touch_input_dev);
wacom_wac->touch_input = NULL; wacom_wac->touch_input = NULL;
touch_input_dev = NULL; touch_input_dev = NULL;
} else {
error = input_register_device(touch_input_dev);
if (error)
goto fail;
} }
error = wacom_setup_pad_input_capabilities(pad_input_dev, wacom_wac); error = wacom_setup_pad_input_capabilities(pad_input_dev, wacom_wac);
@@ -2123,7 +2115,34 @@ static int wacom_register_inputs(struct wacom *wacom)
input_free_device(pad_input_dev); input_free_device(pad_input_dev);
wacom_wac->pad_input = NULL; wacom_wac->pad_input = NULL;
pad_input_dev = NULL; pad_input_dev = NULL;
} else { }
return 0;
}
static int wacom_register_inputs(struct wacom *wacom)
{
struct input_dev *pen_input_dev, *touch_input_dev, *pad_input_dev;
struct wacom_wac *wacom_wac = &(wacom->wacom_wac);
int error = 0;
pen_input_dev = wacom_wac->pen_input;
touch_input_dev = wacom_wac->touch_input;
pad_input_dev = wacom_wac->pad_input;
if (pen_input_dev) {
error = input_register_device(pen_input_dev);
if (error)
goto fail;
}
if (touch_input_dev) {
error = input_register_device(touch_input_dev);
if (error)
goto fail;
}
if (pad_input_dev) {
error = input_register_device(pad_input_dev); error = input_register_device(pad_input_dev);
if (error) if (error)
goto fail; goto fail;
@@ -2379,6 +2398,20 @@ static int wacom_parse_and_register(struct wacom *wacom, bool wireless)
goto fail; goto fail;
} }
error = wacom_setup_inputs(wacom);
if (error)
goto fail;
if (features->type == HID_GENERIC)
connect_mask |= HID_CONNECT_DRIVER;
/* Regular HID work starts now */
error = hid_hw_start(hdev, connect_mask);
if (error) {
hid_err(hdev, "hw start failed\n");
goto fail;
}
error = wacom_register_inputs(wacom); error = wacom_register_inputs(wacom);
if (error) if (error)
goto fail; goto fail;
@@ -2393,16 +2426,6 @@ static int wacom_parse_and_register(struct wacom *wacom, bool wireless)
goto fail; goto fail;
} }
if (features->type == HID_GENERIC)
connect_mask |= HID_CONNECT_DRIVER;
/* Regular HID work starts now */
error = hid_hw_start(hdev, connect_mask);
if (error) {
hid_err(hdev, "hw start failed\n");
goto fail;
}
if (!wireless) { if (!wireless) {
/* Note that if query fails it is not a hard failure */ /* Note that if query fails it is not a hard failure */
wacom_query_tablet_data(wacom); wacom_query_tablet_data(wacom);

View File

@@ -2571,7 +2571,14 @@ static void wacom_wac_pen_report(struct hid_device *hdev,
wacom_wac->hid_data.tipswitch); wacom_wac->hid_data.tipswitch);
input_report_key(input, wacom_wac->tool[0], sense); input_report_key(input, wacom_wac->tool[0], sense);
if (wacom_wac->serial[0]) { if (wacom_wac->serial[0]) {
input_event(input, EV_MSC, MSC_SERIAL, wacom_wac->serial[0]); /*
* xf86-input-wacom does not accept a serial number
* of '0'. Report the low 32 bits if possible, but
* if they are zero, report the upper ones instead.
*/
__u32 serial_lo = wacom_wac->serial[0] & 0xFFFFFFFFu;
__u32 serial_hi = wacom_wac->serial[0] >> 32;
input_event(input, EV_MSC, MSC_SERIAL, (int)(serial_lo ? serial_lo : serial_hi));
input_report_abs(input, ABS_MISC, sense ? id : 0); input_report_abs(input, ABS_MISC, sense ? id : 0);
} }

View File

@@ -89,10 +89,8 @@ obj-$(CONFIG_I2C_NPCM) += i2c-npcm7xx.o
obj-$(CONFIG_I2C_OCORES) += i2c-ocores.o obj-$(CONFIG_I2C_OCORES) += i2c-ocores.o
obj-$(CONFIG_I2C_OMAP) += i2c-omap.o obj-$(CONFIG_I2C_OMAP) += i2c-omap.o
obj-$(CONFIG_I2C_OWL) += i2c-owl.o obj-$(CONFIG_I2C_OWL) += i2c-owl.o
i2c-pasemi-objs := i2c-pasemi-core.o i2c-pasemi-pci.o obj-$(CONFIG_I2C_PASEMI) += i2c-pasemi-core.o i2c-pasemi-pci.o
obj-$(CONFIG_I2C_PASEMI) += i2c-pasemi.o obj-$(CONFIG_I2C_APPLE) += i2c-pasemi-core.o i2c-pasemi-platform.o
i2c-apple-objs := i2c-pasemi-core.o i2c-pasemi-platform.o
obj-$(CONFIG_I2C_APPLE) += i2c-apple.o
obj-$(CONFIG_I2C_PCA_PLATFORM) += i2c-pca-platform.o obj-$(CONFIG_I2C_PCA_PLATFORM) += i2c-pca-platform.o
obj-$(CONFIG_I2C_PNX) += i2c-pnx.o obj-$(CONFIG_I2C_PNX) += i2c-pnx.o
obj-$(CONFIG_I2C_PXA) += i2c-pxa.o obj-$(CONFIG_I2C_PXA) += i2c-pxa.o

View File

@@ -500,11 +500,10 @@ static int i801_block_transaction_by_block(struct i801_priv *priv,
/* Set block buffer mode */ /* Set block buffer mode */
outb_p(inb_p(SMBAUXCTL(priv)) | SMBAUXCTL_E32B, SMBAUXCTL(priv)); outb_p(inb_p(SMBAUXCTL(priv)) | SMBAUXCTL_E32B, SMBAUXCTL(priv));
inb_p(SMBHSTCNT(priv)); /* reset the data buffer index */
if (read_write == I2C_SMBUS_WRITE) { if (read_write == I2C_SMBUS_WRITE) {
len = data->block[0]; len = data->block[0];
outb_p(len, SMBHSTDAT0(priv)); outb_p(len, SMBHSTDAT0(priv));
inb_p(SMBHSTCNT(priv)); /* reset the data buffer index */
for (i = 0; i < len; i++) for (i = 0; i < len; i++)
outb_p(data->block[i+1], SMBBLKDAT(priv)); outb_p(data->block[i+1], SMBBLKDAT(priv));
} }
@@ -520,6 +519,7 @@ static int i801_block_transaction_by_block(struct i801_priv *priv,
return -EPROTO; return -EPROTO;
data->block[0] = len; data->block[0] = len;
inb_p(SMBHSTCNT(priv)); /* reset the data buffer index */
for (i = 0; i < len; i++) for (i = 0; i < len; i++)
data->block[i + 1] = inb_p(SMBBLKDAT(priv)); data->block[i + 1] = inb_p(SMBBLKDAT(priv));
} }

View File

@@ -356,3 +356,8 @@ int pasemi_i2c_common_probe(struct pasemi_smbus *smbus)
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(pasemi_i2c_common_probe);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Olof Johansson <olof@lixom.net>");
MODULE_DESCRIPTION("PA Semi PWRficient SMBus driver");

View File

@@ -605,20 +605,20 @@ static int geni_i2c_gpi_xfer(struct geni_i2c_dev *gi2c, struct i2c_msg msgs[], i
peripheral.addr = msgs[i].addr; peripheral.addr = msgs[i].addr;
if (msgs[i].flags & I2C_M_RD) {
ret = geni_i2c_gpi(gi2c, &msgs[i], &config,
&rx_addr, &rx_buf, I2C_READ, gi2c->rx_c);
if (ret)
goto err;
}
ret = geni_i2c_gpi(gi2c, &msgs[i], &config, ret = geni_i2c_gpi(gi2c, &msgs[i], &config,
&tx_addr, &tx_buf, I2C_WRITE, gi2c->tx_c); &tx_addr, &tx_buf, I2C_WRITE, gi2c->tx_c);
if (ret) if (ret)
goto err; goto err;
if (msgs[i].flags & I2C_M_RD) if (msgs[i].flags & I2C_M_RD) {
ret = geni_i2c_gpi(gi2c, &msgs[i], &config,
&rx_addr, &rx_buf, I2C_READ, gi2c->rx_c);
if (ret)
goto err;
dma_async_issue_pending(gi2c->rx_c); dma_async_issue_pending(gi2c->rx_c);
}
dma_async_issue_pending(gi2c->tx_c); dma_async_issue_pending(gi2c->tx_c);
timeout = wait_for_completion_timeout(&gi2c->done, XFER_TIMEOUT); timeout = wait_for_completion_timeout(&gi2c->done, XFER_TIMEOUT);

View File

@@ -219,10 +219,12 @@ config BMA400
config BMA400_I2C config BMA400_I2C
tristate tristate
select REGMAP_I2C
depends on BMA400 depends on BMA400
config BMA400_SPI config BMA400_SPI
tristate tristate
select REGMAP_SPI
depends on BMA400 depends on BMA400
config BMC150_ACCEL config BMC150_ACCEL

View File

@@ -8,6 +8,7 @@ config BOSCH_BNO055
config BOSCH_BNO055_SERIAL config BOSCH_BNO055_SERIAL
tristate "Bosch BNO055 attached via UART" tristate "Bosch BNO055 attached via UART"
depends on SERIAL_DEV_BUS depends on SERIAL_DEV_BUS
select REGMAP
select BOSCH_BNO055 select BOSCH_BNO055
help help
Enable this to support Bosch BNO055 IMUs attached via UART. Enable this to support Bosch BNO055 IMUs attached via UART.

View File

@@ -1601,10 +1601,13 @@ static int iio_device_register_sysfs(struct iio_dev *indio_dev)
ret = iio_device_register_sysfs_group(indio_dev, ret = iio_device_register_sysfs_group(indio_dev,
&iio_dev_opaque->chan_attr_group); &iio_dev_opaque->chan_attr_group);
if (ret) if (ret)
goto error_clear_attrs; goto error_free_chan_attrs;
return 0; return 0;
error_free_chan_attrs:
kfree(iio_dev_opaque->chan_attr_group.attrs);
iio_dev_opaque->chan_attr_group.attrs = NULL;
error_clear_attrs: error_clear_attrs:
iio_free_chan_devattr_list(&iio_dev_opaque->channel_attr_list); iio_free_chan_devattr_list(&iio_dev_opaque->channel_attr_list);

View File

@@ -228,6 +228,7 @@ static int als_capture_sample(struct hid_sensor_hub_device *hsdev,
case HID_USAGE_SENSOR_TIME_TIMESTAMP: case HID_USAGE_SENSOR_TIME_TIMESTAMP:
als_state->timestamp = hid_sensor_convert_timestamp(&als_state->common_attributes, als_state->timestamp = hid_sensor_convert_timestamp(&als_state->common_attributes,
*(s64 *)raw_data); *(s64 *)raw_data);
ret = 0;
break; break;
default: default:
break; break;

View File

@@ -530,6 +530,7 @@ int rm3100_common_probe(struct device *dev, struct regmap *regmap, int irq)
struct rm3100_data *data; struct rm3100_data *data;
unsigned int tmp; unsigned int tmp;
int ret; int ret;
int samp_rate_index;
indio_dev = devm_iio_device_alloc(dev, sizeof(*data)); indio_dev = devm_iio_device_alloc(dev, sizeof(*data));
if (!indio_dev) if (!indio_dev)
@@ -586,9 +587,14 @@ int rm3100_common_probe(struct device *dev, struct regmap *regmap, int irq)
ret = regmap_read(regmap, RM3100_REG_TMRC, &tmp); ret = regmap_read(regmap, RM3100_REG_TMRC, &tmp);
if (ret < 0) if (ret < 0)
return ret; return ret;
samp_rate_index = tmp - RM3100_TMRC_OFFSET;
if (samp_rate_index < 0 || samp_rate_index >= RM3100_SAMP_NUM) {
dev_err(dev, "The value read from RM3100_REG_TMRC is invalid!\n");
return -EINVAL;
}
/* Initializing max wait time, which is double conversion time. */ /* Initializing max wait time, which is double conversion time. */
data->conversion_time = rm3100_samp_rates[tmp - RM3100_TMRC_OFFSET][2] data->conversion_time = rm3100_samp_rates[samp_rate_index][2] * 2;
* 2;
/* Cycle count values may not be what we want. */ /* Cycle count values may not be what we want. */
if ((tmp - RM3100_TMRC_OFFSET) == 0) if ((tmp - RM3100_TMRC_OFFSET) == 0)

View File

@@ -2845,6 +2845,13 @@ static struct ib_mr *irdma_reg_user_mr(struct ib_pd *pd, u64 start, u64 len,
switch (req.reg_type) { switch (req.reg_type) {
case IRDMA_MEMREG_TYPE_QP: case IRDMA_MEMREG_TYPE_QP:
/* iWarp: Catch page not starting on OS page boundary */
if (!rdma_protocol_roce(&iwdev->ibdev, 1) &&
ib_umem_offset(iwmr->region)) {
err = -EINVAL;
goto error;
}
total = req.sq_pages + req.rq_pages + shadow_pgcnt; total = req.sq_pages + req.rq_pages + shadow_pgcnt;
if (total > iwmr->page_cnt) { if (total > iwmr->page_cnt) {
err = -EINVAL; err = -EINVAL;

View File

@@ -1387,6 +1387,7 @@ static struct qcom_icc_bcm bcm_mm0 = {
static struct qcom_icc_bcm bcm_co0 = { static struct qcom_icc_bcm bcm_co0 = {
.name = "CO0", .name = "CO0",
.keepalive = true,
.num_nodes = 1, .num_nodes = 1,
.nodes = { &slv_qns_cdsp_mem_noc } .nodes = { &slv_qns_cdsp_mem_noc }
}; };

View File

@@ -2,7 +2,7 @@
/* /*
* Generic Broadcom Set Top Box Level 2 Interrupt controller driver * Generic Broadcom Set Top Box Level 2 Interrupt controller driver
* *
* Copyright (C) 2014-2017 Broadcom * Copyright (C) 2014-2024 Broadcom
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
@@ -113,6 +113,9 @@ static void brcmstb_l2_intc_irq_handle(struct irq_desc *desc)
generic_handle_domain_irq(b->domain, irq); generic_handle_domain_irq(b->domain, irq);
} while (status); } while (status);
out: out:
/* Don't ack parent before all device writes are done */
wmb();
chained_irq_exit(chip, desc); chained_irq_exit(chip, desc);
} }

View File

@@ -3805,8 +3805,9 @@ static int its_vpe_set_affinity(struct irq_data *d,
bool force) bool force)
{ {
struct its_vpe *vpe = irq_data_get_irq_chip_data(d); struct its_vpe *vpe = irq_data_get_irq_chip_data(d);
int from, cpu = cpumask_first(mask_val); struct cpumask common, *table_mask;
unsigned long flags; unsigned long flags;
int from, cpu;
/* /*
* Changing affinity is mega expensive, so let's be as lazy as * Changing affinity is mega expensive, so let's be as lazy as
@@ -3822,19 +3823,22 @@ static int its_vpe_set_affinity(struct irq_data *d,
* taken on any vLPI handling path that evaluates vpe->col_idx. * taken on any vLPI handling path that evaluates vpe->col_idx.
*/ */
from = vpe_to_cpuid_lock(vpe, &flags); from = vpe_to_cpuid_lock(vpe, &flags);
table_mask = gic_data_rdist_cpu(from)->vpe_table_mask;
/*
* If we are offered another CPU in the same GICv4.1 ITS
* affinity, pick this one. Otherwise, any CPU will do.
*/
if (table_mask && cpumask_and(&common, mask_val, table_mask))
cpu = cpumask_test_cpu(from, &common) ? from : cpumask_first(&common);
else
cpu = cpumask_first(mask_val);
if (from == cpu) if (from == cpu)
goto out; goto out;
vpe->col_idx = cpu; vpe->col_idx = cpu;
/*
* GICv4.1 allows us to skip VMOVP if moving to a cpu whose RD
* is sharing its VPE table with the current one.
*/
if (gic_data_rdist_cpu(cpu)->vpe_table_mask &&
cpumask_test_cpu(from, gic_data_rdist_cpu(cpu)->vpe_table_mask))
goto out;
its_send_vmovp(vpe); its_send_vmovp(vpe);
its_vpe_db_proxy_move(vpe, from, cpu); its_vpe_db_proxy_move(vpe, from, cpu);

View File

@@ -242,7 +242,7 @@ static int eiointc_domain_alloc(struct irq_domain *domain, unsigned int virq,
int ret; int ret;
unsigned int i, type; unsigned int i, type;
unsigned long hwirq = 0; unsigned long hwirq = 0;
struct eiointc *priv = domain->host_data; struct eiointc_priv *priv = domain->host_data;
ret = irq_domain_translate_onecell(domain, arg, &hwirq, &type); ret = irq_domain_translate_onecell(domain, arg, &hwirq, &type);
if (ret) if (ret)

View File

@@ -21,6 +21,8 @@
#include "dm-ima.h" #include "dm-ima.h"
#define DM_RESERVED_MAX_IOS 1024 #define DM_RESERVED_MAX_IOS 1024
#define DM_MAX_TARGETS 1048576
#define DM_MAX_TARGET_PARAMS 1024
struct dm_io; struct dm_io;

View File

@@ -72,10 +72,8 @@ struct dm_crypt_io {
struct bio *base_bio; struct bio *base_bio;
u8 *integrity_metadata; u8 *integrity_metadata;
bool integrity_metadata_from_pool:1; bool integrity_metadata_from_pool:1;
bool in_tasklet:1;
struct work_struct work; struct work_struct work;
struct tasklet_struct tasklet;
struct convert_context ctx; struct convert_context ctx;
@@ -1729,7 +1727,6 @@ static void crypt_io_init(struct dm_crypt_io *io, struct crypt_config *cc,
io->ctx.r.req = NULL; io->ctx.r.req = NULL;
io->integrity_metadata = NULL; io->integrity_metadata = NULL;
io->integrity_metadata_from_pool = false; io->integrity_metadata_from_pool = false;
io->in_tasklet = false;
atomic_set(&io->io_pending, 0); atomic_set(&io->io_pending, 0);
} }
@@ -1738,12 +1735,6 @@ static void crypt_inc_pending(struct dm_crypt_io *io)
atomic_inc(&io->io_pending); atomic_inc(&io->io_pending);
} }
static void kcryptd_io_bio_endio(struct work_struct *work)
{
struct dm_crypt_io *io = container_of(work, struct dm_crypt_io, work);
bio_endio(io->base_bio);
}
/* /*
* One of the bios was finished. Check for completion of * One of the bios was finished. Check for completion of
* the whole request and correctly clean up the buffer. * the whole request and correctly clean up the buffer.
@@ -1767,20 +1758,6 @@ static void crypt_dec_pending(struct dm_crypt_io *io)
base_bio->bi_status = error; base_bio->bi_status = error;
/*
* If we are running this function from our tasklet,
* we can't call bio_endio() here, because it will call
* clone_endio() from dm.c, which in turn will
* free the current struct dm_crypt_io structure with
* our tasklet. In this case we need to delay bio_endio()
* execution to after the tasklet is done and dequeued.
*/
if (io->in_tasklet) {
INIT_WORK(&io->work, kcryptd_io_bio_endio);
queue_work(cc->io_queue, &io->work);
return;
}
bio_endio(base_bio); bio_endio(base_bio);
} }
@@ -2213,11 +2190,6 @@ static void kcryptd_crypt(struct work_struct *work)
kcryptd_crypt_write_convert(io); kcryptd_crypt_write_convert(io);
} }
static void kcryptd_crypt_tasklet(unsigned long work)
{
kcryptd_crypt((struct work_struct *)work);
}
static void kcryptd_queue_crypt(struct dm_crypt_io *io) static void kcryptd_queue_crypt(struct dm_crypt_io *io)
{ {
struct crypt_config *cc = io->cc; struct crypt_config *cc = io->cc;
@@ -2229,15 +2201,10 @@ static void kcryptd_queue_crypt(struct dm_crypt_io *io)
* irqs_disabled(): the kernel may run some IO completion from the idle thread, but * irqs_disabled(): the kernel may run some IO completion from the idle thread, but
* it is being executed with irqs disabled. * it is being executed with irqs disabled.
*/ */
if (in_hardirq() || irqs_disabled()) { if (!(in_hardirq() || irqs_disabled())) {
io->in_tasklet = true; kcryptd_crypt(&io->work);
tasklet_init(&io->tasklet, kcryptd_crypt_tasklet, (unsigned long)&io->work);
tasklet_schedule(&io->tasklet);
return; return;
} }
kcryptd_crypt(&io->work);
return;
} }
INIT_WORK(&io->work, kcryptd_crypt); INIT_WORK(&io->work, kcryptd_crypt);

View File

@@ -1872,7 +1872,8 @@ static int copy_params(struct dm_ioctl __user *user, struct dm_ioctl *param_kern
minimum_data_size - sizeof(param_kernel->version))) minimum_data_size - sizeof(param_kernel->version)))
return -EFAULT; return -EFAULT;
if (param_kernel->data_size < minimum_data_size) { if (unlikely(param_kernel->data_size < minimum_data_size) ||
unlikely(param_kernel->data_size > DM_MAX_TARGETS * DM_MAX_TARGET_PARAMS)) {
DMERR("Invalid data size in the ioctl structure: %u", DMERR("Invalid data size in the ioctl structure: %u",
param_kernel->data_size); param_kernel->data_size);
return -EINVAL; return -EINVAL;

View File

@@ -128,7 +128,12 @@ static int alloc_targets(struct dm_table *t, unsigned int num)
int dm_table_create(struct dm_table **result, fmode_t mode, int dm_table_create(struct dm_table **result, fmode_t mode,
unsigned int num_targets, struct mapped_device *md) unsigned int num_targets, struct mapped_device *md)
{ {
struct dm_table *t = kzalloc(sizeof(*t), GFP_KERNEL); struct dm_table *t;
if (num_targets > DM_MAX_TARGETS)
return -EOVERFLOW;
t = kzalloc(sizeof(*t), GFP_KERNEL);
if (!t) if (!t)
return -ENOMEM; return -ENOMEM;
@@ -142,7 +147,7 @@ int dm_table_create(struct dm_table **result, fmode_t mode,
if (!num_targets) { if (!num_targets) {
kfree(t); kfree(t);
return -ENOMEM; return -EOVERFLOW;
} }
if (alloc_targets(t, num_targets)) { if (alloc_targets(t, num_targets)) {

View File

@@ -634,23 +634,6 @@ static void verity_work(struct work_struct *w)
verity_finish_io(io, errno_to_blk_status(verity_verify_io(io))); verity_finish_io(io, errno_to_blk_status(verity_verify_io(io)));
} }
static void verity_tasklet(unsigned long data)
{
struct dm_verity_io *io = (struct dm_verity_io *)data;
int err;
io->in_tasklet = true;
err = verity_verify_io(io);
if (err == -EAGAIN || err == -ENOMEM) {
/* fallback to retrying with work-queue */
INIT_WORK(&io->work, verity_work);
queue_work(io->v->verify_wq, &io->work);
return;
}
verity_finish_io(io, errno_to_blk_status(err));
}
static void verity_end_io(struct bio *bio) static void verity_end_io(struct bio *bio)
{ {
struct dm_verity_io *io = bio->bi_private; struct dm_verity_io *io = bio->bi_private;
@@ -663,13 +646,8 @@ static void verity_end_io(struct bio *bio)
return; return;
} }
if (static_branch_unlikely(&use_tasklet_enabled) && io->v->use_tasklet) { INIT_WORK(&io->work, verity_work);
tasklet_init(&io->tasklet, verity_tasklet, (unsigned long)io); queue_work(io->v->verify_wq, &io->work);
tasklet_schedule(&io->tasklet);
} else {
INIT_WORK(&io->work, verity_work);
queue_work(io->v->verify_wq, &io->work);
}
} }
/* /*

View File

@@ -83,7 +83,6 @@ struct dm_verity_io {
struct bvec_iter iter; struct bvec_iter iter;
struct work_struct work; struct work_struct work;
struct tasklet_struct tasklet;
/* /*
* Three variably-size fields follow this struct: * Three variably-size fields follow this struct:

View File

@@ -963,9 +963,10 @@ void md_super_write(struct mddev *mddev, struct md_rdev *rdev,
return; return;
bio = bio_alloc_bioset(rdev->meta_bdev ? rdev->meta_bdev : rdev->bdev, bio = bio_alloc_bioset(rdev->meta_bdev ? rdev->meta_bdev : rdev->bdev,
1, 1,
REQ_OP_WRITE | REQ_SYNC | REQ_PREFLUSH | REQ_FUA, REQ_OP_WRITE | REQ_SYNC | REQ_IDLE | REQ_META
GFP_NOIO, &mddev->sync_set); | REQ_PREFLUSH | REQ_FUA,
GFP_NOIO, &mddev->sync_set);
atomic_inc(&rdev->nr_pending); atomic_inc(&rdev->nr_pending);

View File

@@ -559,7 +559,7 @@ static int rkisp1_probe(struct platform_device *pdev)
rkisp1->irqs[il] = irq; rkisp1->irqs[il] = irq;
} }
ret = devm_request_irq(dev, irq, info->isrs[i].isr, 0, ret = devm_request_irq(dev, irq, info->isrs[i].isr, IRQF_SHARED,
dev_driver_string(dev), dev); dev_driver_string(dev), dev);
if (ret) { if (ret) {
dev_err(dev, "request irq failed: %d\n", ret); dev_err(dev, "request irq failed: %d\n", ret);

View File

@@ -253,7 +253,7 @@ int lirc_prog_attach(const union bpf_attr *attr, struct bpf_prog *prog)
if (attr->attach_flags) if (attr->attach_flags)
return -EINVAL; return -EINVAL;
rcdev = rc_dev_get_from_fd(attr->target_fd); rcdev = rc_dev_get_from_fd(attr->target_fd, true);
if (IS_ERR(rcdev)) if (IS_ERR(rcdev))
return PTR_ERR(rcdev); return PTR_ERR(rcdev);
@@ -278,7 +278,7 @@ int lirc_prog_detach(const union bpf_attr *attr)
if (IS_ERR(prog)) if (IS_ERR(prog))
return PTR_ERR(prog); return PTR_ERR(prog);
rcdev = rc_dev_get_from_fd(attr->target_fd); rcdev = rc_dev_get_from_fd(attr->target_fd, true);
if (IS_ERR(rcdev)) { if (IS_ERR(rcdev)) {
bpf_prog_put(prog); bpf_prog_put(prog);
return PTR_ERR(rcdev); return PTR_ERR(rcdev);
@@ -303,7 +303,7 @@ int lirc_prog_query(const union bpf_attr *attr, union bpf_attr __user *uattr)
if (attr->query.query_flags) if (attr->query.query_flags)
return -EINVAL; return -EINVAL;
rcdev = rc_dev_get_from_fd(attr->query.target_fd); rcdev = rc_dev_get_from_fd(attr->query.target_fd, false);
if (IS_ERR(rcdev)) if (IS_ERR(rcdev))
return PTR_ERR(rcdev); return PTR_ERR(rcdev);

View File

@@ -332,6 +332,7 @@ static int irtoy_tx(struct rc_dev *rc, uint *txbuf, uint count)
sizeof(COMMAND_SMODE_EXIT), STATE_COMMAND_NO_RESP); sizeof(COMMAND_SMODE_EXIT), STATE_COMMAND_NO_RESP);
if (err) { if (err) {
dev_err(irtoy->dev, "exit sample mode: %d\n", err); dev_err(irtoy->dev, "exit sample mode: %d\n", err);
kfree(buf);
return err; return err;
} }
@@ -339,6 +340,7 @@ static int irtoy_tx(struct rc_dev *rc, uint *txbuf, uint count)
sizeof(COMMAND_SMODE_ENTER), STATE_COMMAND); sizeof(COMMAND_SMODE_ENTER), STATE_COMMAND);
if (err) { if (err) {
dev_err(irtoy->dev, "enter sample mode: %d\n", err); dev_err(irtoy->dev, "enter sample mode: %d\n", err);
kfree(buf);
return err; return err;
} }

View File

@@ -814,7 +814,7 @@ void __exit lirc_dev_exit(void)
unregister_chrdev_region(lirc_base_dev, RC_DEV_MAX); unregister_chrdev_region(lirc_base_dev, RC_DEV_MAX);
} }
struct rc_dev *rc_dev_get_from_fd(int fd) struct rc_dev *rc_dev_get_from_fd(int fd, bool write)
{ {
struct fd f = fdget(fd); struct fd f = fdget(fd);
struct lirc_fh *fh; struct lirc_fh *fh;
@@ -828,6 +828,9 @@ struct rc_dev *rc_dev_get_from_fd(int fd)
return ERR_PTR(-EINVAL); return ERR_PTR(-EINVAL);
} }
if (write && !(f.file->f_mode & FMODE_WRITE))
return ERR_PTR(-EPERM);
fh = f.file->private_data; fh = f.file->private_data;
dev = fh->rc; dev = fh->rc;

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