Merge 5.4.287 into android11-5.4-lts

Changes in 5.4.287
	netlink: terminate outstanding dump on socket close
	net/mlx5: fs, lock FTE when checking if active
	net/mlx5e: kTLS, Fix incorrect page refcounting
	ocfs2: uncache inode which has failed entering the group
	KVM: VMX: Bury Intel PT virtualization (guest/host mode) behind CONFIG_BROKEN
	nilfs2: fix null-ptr-deref in block_touch_buffer tracepoint
	ocfs2: fix UBSAN warning in ocfs2_verify_volume()
	nilfs2: fix null-ptr-deref in block_dirty_buffer tracepoint
	Revert "mmc: dw_mmc: Fix IDMAC operation with pages bigger than 4K"
	media: dvbdev: fix the logic when DVB_DYNAMIC_MINORS is not set
	kbuild: Use uname for LINUX_COMPILE_HOST detection
	mm: revert "mm: shmem: fix data-race in shmem_getattr()"
	ASoC: Intel: bytcr_rt5640: Add DMI quirk for Vexia Edu Atla 10 tablet
	mac80211: fix user-power when emulating chanctx
	selftests/watchdog-test: Fix system accidentally reset after watchdog-test
	ALSA: hda/realtek: Add subwoofer quirk for Infinix ZERO BOOK 13
	x86/amd_nb: Fix compile-testing without CONFIG_AMD_NB
	net: usb: qmi_wwan: add Quectel RG650V
	soc: qcom: Add check devm_kasprintf() returned value
	regulator: rk808: Add apply_bit for BUCK3 on RK809
	ASoC: stm: Prevent potential division by zero in stm32_sai_mclk_round_rate()
	ASoC: stm: Prevent potential division by zero in stm32_sai_get_clk_div()
	proc/softirqs: replace seq_printf with seq_put_decimal_ull_width
	ipmr: Fix access to mfc_cache_list without lock held
	cifs: Fix buffer overflow when parsing NFS reparse points
	NFSD: Force all NFSv4.2 COPY requests to be synchronous
	nvme: fix metadata handling in nvme-passthrough
	x86/xen/pvh: Annotate indirect branch as safe
	mips: asm: fix warning when disabling MIPS_FP_SUPPORT
	initramfs: avoid filename buffer overrun
	nvme-pci: fix freeing of the HMB descriptor table
	m68k: mvme147: Fix SCSI controller IRQ numbers
	m68k: mvme16x: Add and use "mvme16x.h"
	m68k: mvme147: Reinstate early console
	acpi/arm64: Adjust error handling procedure in gtdt_parse_timer_block()
	s390/syscalls: Avoid creation of arch/arch/ directory
	hfsplus: don't query the device logical block size multiple times
	firmware: google: Unregister driver_info on failure and exit in gsmi
	firmware: google: Unregister driver_info on failure
	EDAC/bluefield: Fix potential integer overflow
	EDAC/fsl_ddr: Fix bad bit shift operations
	crypto: pcrypt - Call crypto layer directly when padata_do_parallel() return -EBUSY
	crypto: cavium - Fix the if condition to exit loop after timeout
	crypto: bcm - add error check in the ahash_hmac_init function
	crypto: cavium - Fix an error handling path in cpt_ucode_load_fw()
	time: Fix references to _msecs_to_jiffies() handling of values
	soc: ti: smartreflex: Use IRQF_NO_AUTOEN flag in request_irq()
	soc: qcom: geni-se: fix array underflow in geni_se_clk_tbl_get()
	mmc: mmc_spi: drop buggy snprintf()
	efi/tpm: Pass correct address to memblock_reserve
	tpm: fix signed/unsigned bug when checking event logs
	ARM: dts: cubieboard4: Fix DCDC5 regulator constraints
	regmap: irq: Set lockdep class for hierarchical IRQ domains
	firmware: arm_scpi: Check the DVFS OPP count returned by the firmware
	drm/mm: Mark drm_mm_interval_tree*() functions with __maybe_unused
	wifi: ath9k: add range check for conn_rsp_epid in htc_connect_service()
	drm/omap: Fix locking in omap_gem_new_dmabuf()
	wifi: p54: Use IRQF_NO_AUTOEN flag in request_irq()
	wifi: mwifiex: Use IRQF_NO_AUTOEN flag in request_irq()
	drm/imx/ipuv3: Use IRQF_NO_AUTOEN flag in request_irq()
	dt-bindings: vendor-prefixes: Add NeoFidelity, Inc
	ASoC: fsl_micfil: Drop unnecessary register read
	ASoC: fsl_micfil: do not define SHIFT/MASK for single bits
	ASoC: fsl_micfil: use GENMASK to define register bit fields
	ASoC: fsl_micfil: fix regmap_write_bits usage
	bpf: Fix the xdp_adjust_tail sample prog issue
	wifi: mwifiex: Fix memcpy() field-spanning write warning in mwifiex_config_scan()
	drm/panfrost: Remove unused id_mask from struct panfrost_model
	drm/msm/adreno: Use IRQF_NO_AUTOEN flag in request_irq()
	drm/etnaviv: dump: fix sparse warnings
	drm/etnaviv: fix power register offset on GC300
	drm/etnaviv: hold GPU lock across perfmon sampling
	bpf, sockmap: Several fixes to bpf_msg_push_data
	bpf, sockmap: Several fixes to bpf_msg_pop_data
	bpf, sockmap: Fix sk_msg_reset_curr
	selftests: net: really check for bg process completion
	net: rfkill: gpio: Add check for clk_enable()
	ALSA: us122l: Use snd_card_free_when_closed() at disconnection
	ALSA: caiaq: Use snd_card_free_when_closed() at disconnection
	ALSA: 6fire: Release resources at card release
	netpoll: Use rcu_access_pointer() in netpoll_poll_lock
	trace/trace_event_perf: remove duplicate samples on the first tracepoint event
	powerpc/vdso: Flag VDSO64 entry points as functions
	mfd: tps65010: Use IRQF_NO_AUTOEN flag in request_irq() to fix race
	mfd: da9052-spi: Change read-mask to write-mask
	mfd: intel_soc_pmic_bxtwc: Use dev_err_probe()
	mfd: intel_soc_pmic_bxtwc: Use IRQ domain for USB Type-C device
	mfd: intel_soc_pmic_bxtwc: Use IRQ domain for TMU device
	mfd: intel_soc_pmic_bxtwc: Use IRQ domain for PMIC devices
	cpufreq: loongson2: Unregister platform_driver on failure
	mtd: rawnand: atmel: Fix possible memory leak
	RDMA/bnxt_re: Check cqe flags to know imm_data vs inv_irkey
	mfd: rt5033: Fix missing regmap_del_irq_chip()
	scsi: bfa: Fix use-after-free in bfad_im_module_exit()
	scsi: fusion: Remove unused variable 'rc'
	scsi: qedf: Fix a possible memory leak in qedf_alloc_and_init_sb()
	scsi: qedi: Fix a possible memory leak in qedi_alloc_and_init_sb()
	ocfs2: fix uninitialized value in ocfs2_file_read_iter()
	powerpc/sstep: make emulate_vsx_load and emulate_vsx_store static
	fbdev/sh7760fb: Alloc DMA memory from hardware device
	fbdev: sh7760fb: Fix a possible memory leak in sh7760fb_alloc_mem()
	dt-bindings: clock: adi,axi-clkgen: convert old binding to yaml format
	dt-bindings: clock: axi-clkgen: include AXI clk
	clk: axi-clkgen: use devm_platform_ioremap_resource() short-hand
	clk: clk-axi-clkgen: make sure to enable the AXI bus clock
	perf cs-etm: Don't flush when packet_queue fills up
	perf probe: Correct demangled symbols in C++ program
	PCI: cpqphp: Use PCI_POSSIBLE_ERROR() to check config reads
	PCI: cpqphp: Fix PCIBIOS_* return value confusion
	m68k: mcfgpio: Fix incorrect register offset for CONFIG_M5441x
	m68k: coldfire/device.c: only build FEC when HW macros are defined
	perf trace: Do not lose last events in a race
	perf trace: Avoid garbage when not printing a syscall's arguments
	rpmsg: glink: Add TX_DATA_CONT command while sending
	rpmsg: glink: Send READ_NOTIFY command in FIFO full case
	rpmsg: glink: Fix GLINK command prefix
	rpmsg: glink: use only lower 16-bits of param2 for CMD_OPEN name length
	NFSD: Prevent NULL dereference in nfsd4_process_cb_update()
	NFSD: Cap the number of bytes copied by nfs4_reset_recoverydir()
	NFSD: Fix nfsd4_shutdown_copy()
	vfio/pci: Properly hide first-in-list PCIe extended capability
	power: supply: core: Remove might_sleep() from power_supply_put()
	net: usb: lan78xx: Fix memory leak on device unplug by freeing PHY device
	tg3: Set coherent DMA mask bits to 31 for BCM57766 chipsets
	net: usb: lan78xx: Fix refcounting and autosuspend on invalid WoL configuration
	marvell: pxa168_eth: fix call balance of pep->clk handling routines
	net: stmmac: dwmac-socfpga: Set RX watchdog interrupt as broken
	ipmr: convert /proc handlers to rcu_read_lock()
	ipmr: fix tables suspicious RCU usage
	usb: using mutex lock and supporting O_NONBLOCK flag in iowarrior_read()
	usb: yurex: make waiting on yurex_write interruptible
	USB: chaoskey: fail open after removal
	USB: chaoskey: Fix possible deadlock chaoskey_list_lock
	misc: apds990x: Fix missing pm_runtime_disable()
	staging: greybus: uart: clean up TIOCGSERIAL
	apparmor: fix 'Do simple duplicate message elimination'
	usb: ehci-spear: fix call balance of sehci clk handling routines
	cgroup: Make operations on the cgroup root_list RCU safe
	cgroup: Move rcu_head up near the top of cgroup_root
	soc: qcom: socinfo: fix revision check in qcom_socinfo_probe()
	ALSA: usb-audio: Fix potential out-of-bound accesses for Extigy and Mbox devices
	ext4: supress data-race warnings in ext4_free_inodes_{count,set}()
	ext4: fix FS_IOC_GETFSMAP handling
	jfs: xattr: check invalid xattr size more strictly
	ASoC: codecs: Fix atomicity violation in snd_soc_component_get_drvdata()
	PCI: Fix use-after-free of slot->bus on hot remove
	comedi: Flush partial mappings in error case
	tty: ldsic: fix tty_ldisc_autoload sysctl's proc_handler
	Bluetooth: Fix type of len in rfcomm_sock_getsockopt{,_old}()
	Revert "usb: gadget: composite: fix OS descriptors w_value logic"
	serial: sh-sci: Clean sci_ports[0] after at earlycon exit
	Revert "serial: sh-sci: Clean sci_ports[0] after at earlycon exit"
	netfilter: ipset: add missing range check in bitmap_ip_uadt
	spi: Fix acpi deferred irq probe
	ubi: wl: Put source PEB into correct list if trying locking LEB failed
	um: ubd: Do not use drvdata in release
	um: net: Do not use drvdata in release
	serial: 8250: omap: Move pm_runtime_get_sync
	um: vector: Do not use drvdata in release
	sh: cpuinfo: Fix a warning for CONFIG_CPUMASK_OFFSTACK
	arm64: tls: Fix context-switching of tpidrro_el0 when kpti is enabled
	block: fix ordering between checking BLK_MQ_S_STOPPED request adding
	HID: wacom: Interpret tilt data from Intuos Pro BT as signed values
	media: wl128x: Fix atomicity violation in fmc_send_cmd()
	ALSA: hda/realtek: Update ALC225 depop procedure
	ALSA: hda/realtek: Set PCBeep to default value for ALC274
	ALSA: hda/realtek: Fix Internal Speaker and Mic boost of Infinix Y4 Max
	ALSA: hda/realtek: Apply quirk for Medion E15433
	usb: dwc3: gadget: Fix checking for number of TRBs left
	lib: string_helpers: silence snprintf() output truncation warning
	NFSD: Prevent a potential integer overflow
	SUNRPC: make sure cache entry active before cache_show
	rpmsg: glink: Propagate TX failures in intentless mode as well
	um: Fix potential integer overflow during physmem setup
	um: Fix the return value of elf_core_copy_task_fpregs
	um/sysrq: remove needless variable sp
	um: add show_stack_loglvl()
	um: Clean up stacktrace dump
	um: Always dump trace for specified task in show_stack
	NFSv4.0: Fix a use-after-free problem in the asynchronous open()
	rtc: st-lpc: Use IRQF_NO_AUTOEN flag in request_irq()
	rtc: abx80x: Fix WDT bit position of the status register
	rtc: check if __rtc_read_time was successful in rtc_timer_do_work()
	ubifs: Correct the total block count by deducting journal reservation
	ubi: fastmap: Fix duplicate slab cache names while attaching
	ubifs: authentication: Fix use-after-free in ubifs_tnc_end_commit
	jffs2: fix use of uninitialized variable
	block: return unsigned int from bdev_io_min
	9p/xen: fix init sequence
	9p/xen: fix release of IRQ
	rtc: ab-eoz9: don't fail temperature reads on undervoltage notification
	modpost: remove incorrect code in do_eisa_entry()
	SUNRPC: correct error code comment in xs_tcp_setup_socket()
	SUNRPC: Replace internal use of SOCKWQ_ASYNC_NOSPACE
	sunrpc: clear XPRT_SOCK_UPD_TIMEOUT when reset transport
	sh: intc: Fix use-after-free bug in register_intc_controller()
	ASoC: fsl_micfil: fix the naming style for mask definition
	quota: flush quota_release_work upon quota writeback
	btrfs: ref-verify: fix use-after-free after invalid ref action
	media: i2c: tc358743: Fix crash in the probe error path when using polling
	media: ts2020: fix null-ptr-deref in ts2020_probe()
	media: venus: Fix pm_runtime_set_suspended() with runtime pm enabled
	media: gspca: ov534-ov772x: Fix off-by-one error in set_frame_rate()
	media: platform: allegro-dvt: Fix possible memory leak in allocate_buffers_internal()
	ovl: Filter invalid inodes with missing lookup function
	ftrace: Fix regression with module command in stack_trace_filter
	clk: qcom: gcc-qcs404: fix initial rate of GPLL3
	ad7780: fix division by zero in ad7780_write_raw()
	util_macros.h: fix/rework find_closest() macros
	i3c: master: Fix miss free init_dyn_addr at i3c_master_put_i3c_addrs()
	dm thin: Add missing destroy_work_on_stack()
	nfsd: make sure exp active before svc_export_show
	nfsd: fix nfs4_openowner leak when concurrent nfsd4_open occur
	drm/etnaviv: flush shader L1 cache after user commandstream
	iTCO_wdt: mask NMI_NOW bit for update_no_reboot_bit() call
	watchdog: mediatek: Make sure system reset gets asserted in mtk_wdt_restart()
	can: sun4i_can: sun4i_can_err(): call can_change_state() even if cf is NULL
	can: sun4i_can: sun4i_can_err(): fix {rx,tx}_errors statistics
	ipvs: fix UB due to uninitialized stack access in ip_vs_protocol_init()
	netfilter: x_tables: fix LED ID check in led_tg_check()
	net/sched: tbf: correct backlog statistic for GSO packets
	can: j1939: j1939_session_new(): fix skb reference counting
	net/ipv6: release expired exception dst cached in socket
	dccp: Fix memory leak in dccp_feat_change_recv
	tipc: add reference counter to bearer
	tipc: enable creating a "preliminary" node
	tipc: add new AEAD key structure for user API
	tipc: Fix use-after-free of kernel socket in cleanup_bearer().
	net/qed: allow old cards not supporting "num_images" to work
	igb: Fix potential invalid memory access in igb_init_module()
	netfilter: ipset: Hold module reference while requesting a module
	netfilter: nft_set_hash: skip duplicated elements pending gc run
	xen/xenbus: reference count registered modules
	xenbus/backend: Add memory pressure handler callback
	xenbus/backend: Protect xenbus callback with lock
	xen/xenbus: fix locking
	xen: Fix the issue of resource not being properly released in xenbus_dev_probe()
	x86/asm: Reorder early variables
	crypto: x86/aegis128 - access 32-bit arguments as 32-bit
	gpio: grgpio: use a helper variable to store the address of ofdev->dev
	gpio: grgpio: Add NULL check in grgpio_probe
	drm/sti: Add __iomem for mixer_dbg_mxn's parameter
	tcp_bpf: Fix the sk_mem_uncharge logic in tcp_bpf_sendmsg
	spi: mpc52xx: Add cancel_work_sync before module remove
	ocfs2: free inode when ocfs2_get_init_inode() fails
	bpf: Handle BPF_EXIST and BPF_NOEXIST for LPM trie
	bpf: Fix exact match conditions in trie_get_next_key()
	HID: wacom: fix when get product name maybe null pointer
	tracing: Fix cmp_entries_dup() to respect sort() comparison rules
	ocfs2: update seq_file index in ocfs2_dlm_seq_next
	scsi: qla2xxx: Fix NVMe and NPIV connect issue
	scsi: qla2xxx: Supported speed displayed incorrectly for VPorts
	scsi: qla2xxx: Remove check req_sg_cnt should be equal to rsp_sg_cnt
	nilfs2: fix potential out-of-bounds memory access in nilfs_find_entry()
	bcache: revert replacing IS_ERR_OR_NULL with IS_ERR again
	dma-buf: fix dma_fence_array_signaled v4
	regmap: detach regmap from dev on regmap_exit
	mmc: core: Further prevent card detect during shutdown
	s390/cpum_sf: Handle CPU hotplug remove during sampling
	media: uvcvideo: Add a quirk for the Kaiweets KTI-W02 infrared camera
	media: cx231xx: Add support for Dexatek USB Video Grabber 1d19:6108
	drm: panel-orientation-quirks: Add quirk for AYA NEO 2 model
	drm/mcde: Enable module autoloading
	drm/radeon/r600_cs: Fix possible int overflow in r600_packet3_check()
	samples/bpf: Fix a resource leak
	net: fec_mpc52xx_phy: Use %pa to format resource_size_t
	net: ethernet: fs_enet: Use %pa to format resource_size_t
	net/sched: cbs: Fix integer overflow in cbs_set_port_rate()
	af_packet: avoid erroring out after sock_init_data() in packet_create()
	Bluetooth: L2CAP: do not leave dangling sk pointer on error in l2cap_sock_create()
	net: af_can: do not leave a dangling sk pointer in can_create()
	net: ieee802154: do not leave a dangling sk pointer in ieee802154_create()
	net: inet: do not leave a dangling sk pointer in inet_create()
	net: inet6: do not leave a dangling sk pointer in inet6_create()
	wifi: ath5k: add PCI ID for SX76X
	wifi: ath5k: add PCI ID for Arcadyan devices
	jfs: array-index-out-of-bounds fix in dtReadFirst
	jfs: fix shift-out-of-bounds in dbSplit
	jfs: fix array-index-out-of-bounds in jfs_readdir
	jfs: add a check to prevent array-index-out-of-bounds in dbAdjTree
	drm/amdgpu: set the right AMDGPU sg segment limitation
	wifi: ipw2x00: libipw_rx_any(): fix bad alignment
	wifi: brcmfmac: Fix oops due to NULL pointer dereference in brcmf_sdiod_sglist_rw()
	Bluetooth: btusb: Add RTL8852BE device 0489:e123 to device tables
	ASoC: hdmi-codec: reorder channel allocation list
	rocker: fix link status detection in rocker_carrier_init()
	net/neighbor: clear error in case strict check is not set
	netpoll: Use rcu_access_pointer() in __netpoll_setup
	tracing: Use atomic64_inc_return() in trace_clock_counter()
	leds: class: Protect brightness_show() with led_cdev->led_access mutex
	scsi: st: Don't modify unknown block number in MTIOCGET
	scsi: st: Add MTIOCGET and MTLOAD to ioctls allowed after device reset
	pinctrl: qcom-pmic-gpio: add support for PM8937
	nvdimm: rectify the illogical code within nd_dax_probe()
	f2fs: fix f2fs_bug_on when uninstalling filesystem call f2fs_evict_inode.
	PCI: Add 'reset_subordinate' to reset hierarchy below bridge
	PCI: Add ACS quirk for Wangxun FF5xxx NICs
	i3c: Use i3cdev->desc->info instead of calling i3c_device_get_info() to avoid deadlock
	usb: chipidea: udc: handle USB Error Interrupt if IOC not set
	powerpc/prom_init: Fixup missing powermac #size-cells
	misc: eeprom: eeprom_93cx6: Add quirk for extra read clock cycle
	xdp: Simplify devmap cleanup
	bpf: fix OOB devmap writes when deleting elements
	Revert "unicode: Don't special case ignorable code points"
	perf/x86/intel/pt: Fix buffer full but size is 0 case
	KVM: arm64: vgic-its: Add a data length check in vgic_its_save_*
	KVM: arm64: vgic-its: Clear DTE when MAPD unmaps a device
	KVM: arm64: vgic-its: Clear ITE when DISCARD frees an ITE
	jffs2: Prevent rtime decompress memory corruption
	jffs2: Fix rtime decompressor
	ocfs2: Revert "ocfs2: fix the la space leak when unmounting an ocfs2 volume"
	modpost: Add .irqentry.text to OTHER_SECTIONS
	Revert "drm/amdgpu: add missing size check in amdgpu_debugfs_gprwave_read()"
	PCI: rockchip-ep: Fix address translation unit programming
	ALSA: usb-audio: Fix out of bounds reads when finding clock sources
	bpf, xdp: Update devmap comments to reflect napi/rcu usage
	Linux 5.4.287

Change-Id: Ib48a7a0e01226c0f910efae2139893c6a139b9b5
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Greg Kroah-Hartman 2024-12-15 07:36:43 +00:00
commit ad8d63bdc6
300 changed files with 2373 additions and 1416 deletions

View file

@ -125,6 +125,17 @@ Description:
will be present in sysfs. Writing 1 to this file
will perform reset.
What: /sys/bus/pci/devices/.../reset_subordinate
Date: October 2024
Contact: linux-pci@vger.kernel.org
Description:
This is visible only for bridge devices. If you want to reset
all devices attached through the subordinate bus of a specific
bridge device, writing 1 to this will try to do it. This will
affect all devices attached to the system through this bridge
similiar to writing 1 to their individual "reset" file, so use
with caution.
What: /sys/bus/pci/devices/.../vpd
Date: February 2008
Contact: Ben Hutchings <bwh@kernel.org>

View file

@ -0,0 +1,67 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/clock/adi,axi-clkgen.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Binding for Analog Devices AXI clkgen pcore clock generator
maintainers:
- Lars-Peter Clausen <lars@metafoo.de>
- Michael Hennerich <michael.hennerich@analog.com>
description: |
The axi_clkgen IP core is a software programmable clock generator,
that can be synthesized on various FPGA platforms.
Link: https://wiki.analog.com/resources/fpga/docs/axi_clkgen
properties:
compatible:
enum:
- adi,axi-clkgen-2.00.a
clocks:
description:
Specifies the reference clock(s) from which the output frequency is
derived. This must either reference one clock if only the first clock
input is connected or two if both clock inputs are connected. The last
clock is the AXI bus clock that needs to be enabled so we can access the
core registers.
minItems: 2
maxItems: 3
clock-names:
oneOf:
- items:
- const: clkin1
- const: s_axi_aclk
- items:
- const: clkin1
- const: clkin2
- const: s_axi_aclk
'#clock-cells':
const: 0
reg:
maxItems: 1
required:
- compatible
- reg
- clocks
- clock-names
- '#clock-cells'
additionalProperties: false
examples:
- |
clock-controller@ff000000 {
compatible = "adi,axi-clkgen-2.00.a";
#clock-cells = <0>;
reg = <0xff000000 0x1000>;
clocks = <&osc 1>, <&clkc 15>;
clock-names = "clkin1", "s_axi_aclk";
};

View file

@ -1,25 +0,0 @@
Binding for the axi-clkgen clock generator
This binding uses the common clock binding[1].
[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
Required properties:
- compatible : shall be "adi,axi-clkgen-1.00.a" or "adi,axi-clkgen-2.00.a".
- #clock-cells : from common clock binding; Should always be set to 0.
- reg : Address and length of the axi-clkgen register set.
- clocks : Phandle and clock specifier for the parent clock(s). This must
either reference one clock if only the first clock input is connected or two
if both clock inputs are connected. For the later case the clock connected
to the first input must be specified first.
Optional properties:
- clock-output-names : From common clock binding.
Example:
clock@ff000000 {
compatible = "adi,axi-clkgen";
#clock-cells = <0>;
reg = <0xff000000 0x1000>;
clocks = <&osc 1>;
};

View file

@ -633,6 +633,8 @@ patternProperties:
description: National Semiconductor
"^nec,.*":
description: NEC LCD Technologies, Ltd.
"^neofidelity,.*":
description: Neofidelity Inc.
"^neonode,.*":
description: Neonode Inc.
"^netgear,.*":

View file

@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 5
PATCHLEVEL = 4
SUBLEVEL = 286
SUBLEVEL = 287
EXTRAVERSION =
NAME = Kleptomaniac Octopus

View file

@ -280,8 +280,8 @@
reg_dcdc5: dcdc5 {
regulator-always-on;
regulator-min-microvolt = <1425000>;
regulator-max-microvolt = <1575000>;
regulator-min-microvolt = <1450000>;
regulator-max-microvolt = <1550000>;
regulator-name = "vcc-dram";
};

View file

@ -433,7 +433,7 @@ static void tls_thread_switch(struct task_struct *next)
if (is_compat_thread(task_thread_info(next)))
write_sysreg(next->thread.uw.tp_value, tpidrro_el0);
else if (!arm64_kernel_unmapped_at_el0())
else
write_sysreg(0, tpidrro_el0);
write_sysreg(*task_user_tls(next), tpidr_el0);

View file

@ -92,7 +92,7 @@ static struct platform_device mcf_uart = {
.dev.platform_data = mcf_uart_platform_data,
};
#if IS_ENABLED(CONFIG_FEC)
#ifdef MCFFEC_BASE0
#ifdef CONFIG_M5441x
#define FEC_NAME "enet-fec"
@ -144,6 +144,7 @@ static struct platform_device mcf_fec0 = {
.platform_data = FEC_PDATA,
}
};
#endif /* MCFFEC_BASE0 */
#ifdef MCFFEC_BASE1
static struct resource mcf_fec1_resources[] = {
@ -181,7 +182,6 @@ static struct platform_device mcf_fec1 = {
}
};
#endif /* MCFFEC_BASE1 */
#endif /* CONFIG_FEC */
#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
/*
@ -556,12 +556,12 @@ static struct platform_device mcf_edma = {
static struct platform_device *mcf_devices[] __initdata = {
&mcf_uart,
#if IS_ENABLED(CONFIG_FEC)
#ifdef MCFFEC_BASE0
&mcf_fec0,
#endif
#ifdef MCFFEC_BASE1
&mcf_fec1,
#endif
#endif
#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
&mcf_qspi,
#endif

View file

@ -144,7 +144,7 @@ static inline void gpio_free(unsigned gpio)
* read-modify-write as well as those controlled by the EPORT and GPIO modules.
*/
#define MCFGPIO_SCR_START 40
#elif defined(CONFIGM5441x)
#elif defined(CONFIG_M5441x)
/* The m5441x EPORT doesn't have its own GPIO port, uses PORT C */
#define MCFGPIO_SCR_START 0
#else

View file

@ -93,8 +93,8 @@ struct pcc_regs {
#define M147_SCC_B_ADDR 0xfffe3000
#define M147_SCC_PCLK 5000000
#define MVME147_IRQ_SCSI_PORT (IRQ_USER+0x45)
#define MVME147_IRQ_SCSI_DMA (IRQ_USER+0x46)
#define MVME147_IRQ_SCSI_PORT (IRQ_USER + 5)
#define MVME147_IRQ_SCSI_DMA (IRQ_USER + 6)
/* SCC interrupts, for MVME147 */

View file

@ -12,8 +12,9 @@
#include <linux/string.h>
#include <asm/setup.h>
extern void mvme16x_cons_write(struct console *co,
const char *str, unsigned count);
#include "../mvme147/mvme147.h"
#include "../mvme16x/mvme16x.h"
asmlinkage void __init debug_cons_nputs(const char *s, unsigned n);
@ -22,7 +23,9 @@ static void __ref debug_cons_write(struct console *c,
{
#if !(defined(CONFIG_SUN3) || defined(CONFIG_M68000) || \
defined(CONFIG_COLDFIRE))
if (MACH_IS_MVME16x)
if (MACH_IS_MVME147)
mvme147_scc_write(c, s, n);
else if (MACH_IS_MVME16x)
mvme16x_cons_write(c, s, n);
else
debug_cons_nputs(s, n);

View file

@ -36,6 +36,7 @@
#include <asm/machdep.h>
#include <asm/mvme147hw.h>
#include "mvme147.h"
static void mvme147_get_model(char *model);
extern void mvme147_sched_init(irq_handler_t handler);
@ -189,3 +190,32 @@ int mvme147_hwclk(int op, struct rtc_time *t)
}
return 0;
}
static void scc_delay(void)
{
__asm__ __volatile__ ("nop; nop;");
}
static void scc_write(char ch)
{
do {
scc_delay();
} while (!(in_8(M147_SCC_A_ADDR) & BIT(2)));
scc_delay();
out_8(M147_SCC_A_ADDR, 8);
scc_delay();
out_8(M147_SCC_A_ADDR, ch);
}
void mvme147_scc_write(struct console *co, const char *str, unsigned int count)
{
unsigned long flags;
local_irq_save(flags);
while (count--) {
if (*str == '\n')
scc_write('\r');
scc_write(*str++);
}
local_irq_restore(flags);
}

View file

@ -0,0 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
struct console;
/* config.c */
void mvme147_scc_write(struct console *co, const char *str, unsigned int count);

View file

@ -39,6 +39,8 @@
#include <asm/machdep.h>
#include <asm/mvme16xhw.h>
#include "mvme16x.h"
extern t_bdid mvme_bdid;
static MK48T08ptr_t volatile rtc = (MK48T08ptr_t)MVME_RTC_BASE;

View file

@ -0,0 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
struct console;
/* config.c */
void mvme16x_cons_write(struct console *co, const char *str, unsigned count);

View file

@ -97,7 +97,7 @@ do { \
} \
} while (0)
#else
# define __sanitize_fcr31(next)
# define __sanitize_fcr31(next) do { (void) (next); } while (0)
#endif
/*

View file

@ -160,9 +160,4 @@ extern int emulate_step(struct pt_regs *regs, unsigned int instr);
*/
extern int emulate_loadstore(struct pt_regs *regs, struct instruction_op *op);
extern void emulate_vsx_load(struct instruction_op *op, union vsx_reg *reg,
const void *mem, bool cross_endian);
extern void emulate_vsx_store(struct instruction_op *op,
const union vsx_reg *reg, void *mem,
bool cross_endian);
extern int emulate_dcbz(unsigned long ea, struct pt_regs *regs);

View file

@ -49,6 +49,7 @@ int vdso_getcpu_init(void);
#define V_FUNCTION_BEGIN(name) \
.globl name; \
.type name,@function; \
name: \
#define V_FUNCTION_END(name) \

View file

@ -2856,7 +2856,7 @@ static void __init fixup_device_tree_chrp(void)
#endif
#if defined(CONFIG_PPC64) && defined(CONFIG_PPC_PMAC)
static void __init fixup_device_tree_pmac(void)
static void __init fixup_device_tree_pmac64(void)
{
phandle u3, i2c, mpic;
u32 u3_rev;
@ -2896,7 +2896,31 @@ static void __init fixup_device_tree_pmac(void)
&parent, sizeof(parent));
}
#else
#define fixup_device_tree_pmac()
#define fixup_device_tree_pmac64()
#endif
#ifdef CONFIG_PPC_PMAC
static void __init fixup_device_tree_pmac(void)
{
__be32 val = 1;
char type[8];
phandle node;
// Some pmacs are missing #size-cells on escc nodes
for (node = 0; prom_next_node(&node); ) {
type[0] = '\0';
prom_getprop(node, "device_type", type, sizeof(type));
if (prom_strcmp(type, "escc"))
continue;
if (prom_getproplen(node, "#size-cells") != PROM_ERROR)
continue;
prom_setprop(node, NULL, "#size-cells", &val, sizeof(val));
}
}
#else
static inline void fixup_device_tree_pmac(void) { }
#endif
#ifdef CONFIG_PPC_EFIKA
@ -3121,6 +3145,7 @@ static void __init fixup_device_tree(void)
fixup_device_tree_maple_memory_controller();
fixup_device_tree_chrp();
fixup_device_tree_pmac();
fixup_device_tree_pmac64();
fixup_device_tree_efika();
fixup_device_tree_pasemi();
}

View file

@ -663,8 +663,8 @@ static nokprobe_inline int emulate_stq(struct pt_regs *regs, unsigned long ea,
#endif /* __powerpc64 */
#ifdef CONFIG_VSX
void emulate_vsx_load(struct instruction_op *op, union vsx_reg *reg,
const void *mem, bool rev)
static nokprobe_inline void emulate_vsx_load(struct instruction_op *op, union vsx_reg *reg,
const void *mem, bool rev)
{
int size, read_size;
int i, j;
@ -744,11 +744,9 @@ void emulate_vsx_load(struct instruction_op *op, union vsx_reg *reg,
break;
}
}
EXPORT_SYMBOL_GPL(emulate_vsx_load);
NOKPROBE_SYMBOL(emulate_vsx_load);
void emulate_vsx_store(struct instruction_op *op, const union vsx_reg *reg,
void *mem, bool rev)
static nokprobe_inline void emulate_vsx_store(struct instruction_op *op, const union vsx_reg *reg,
void *mem, bool rev)
{
int size, write_size;
int i, j;
@ -820,8 +818,6 @@ void emulate_vsx_store(struct instruction_op *op, const union vsx_reg *reg,
break;
}
}
EXPORT_SYMBOL_GPL(emulate_vsx_store);
NOKPROBE_SYMBOL(emulate_vsx_store);
static nokprobe_inline int do_vsx_load(struct instruction_op *op,
unsigned long ea, struct pt_regs *regs,

View file

@ -1862,7 +1862,9 @@ static void cpumsf_pmu_stop(struct perf_event *event, int flags)
event->hw.state |= PERF_HES_STOPPED;
if ((flags & PERF_EF_UPDATE) && !(event->hw.state & PERF_HES_UPTODATE)) {
hw_perf_event_update(event, 1);
/* CPU hotplug off removes SDBs. No samples to extract. */
if (cpuhw->flags & PMU_F_RESERVED)
hw_perf_event_update(event, 1);
event->hw.state |= PERF_HES_UPTODATE;
}
perf_pmu_enable(event->pmu);

View file

@ -12,7 +12,7 @@ kapi-hdrs-y := $(kapi)/unistd_nr.h
uapi-hdrs-y := $(uapi)/unistd_32.h
uapi-hdrs-y += $(uapi)/unistd_64.h
targets += $(addprefix ../../../,$(gen-y) $(kapi-hdrs-y) $(uapi-hdrs-y))
targets += $(addprefix ../../../../,$(gen-y) $(kapi-hdrs-y) $(uapi-hdrs-y))
PHONY += kapi uapi

View file

@ -133,7 +133,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
static void *c_start(struct seq_file *m, loff_t *pos)
{
return *pos < NR_CPUS ? cpu_data + *pos : NULL;
return *pos < nr_cpu_ids ? cpu_data + *pos : NULL;
}
static void *c_next(struct seq_file *m, void *v, loff_t *pos)
{

View file

@ -347,7 +347,7 @@ static struct platform_driver uml_net_driver = {
static void net_device_release(struct device *dev)
{
struct uml_net *device = dev_get_drvdata(dev);
struct uml_net *device = container_of(dev, struct uml_net, pdev.dev);
struct net_device *netdev = device->dev;
struct uml_net_private *lp = netdev_priv(netdev);

View file

@ -860,7 +860,7 @@ static int ubd_open_dev(struct ubd *ubd_dev)
static void ubd_device_release(struct device *dev)
{
struct ubd *ubd_dev = dev_get_drvdata(dev);
struct ubd *ubd_dev = container_of(dev, struct ubd, pdev.dev);
blk_cleanup_queue(ubd_dev->queue);
blk_mq_free_tag_set(&ubd_dev->tag_set);

View file

@ -802,7 +802,8 @@ static struct platform_driver uml_net_driver = {
static void vector_device_release(struct device *dev)
{
struct vector_device *device = dev_get_drvdata(dev);
struct vector_device *device =
container_of(dev, struct vector_device, pdev.dev);
struct net_device *netdev = device->dev;
list_del(&device->list);

View file

@ -80,10 +80,10 @@ void __init setup_physmem(unsigned long start, unsigned long reserve_end,
unsigned long len, unsigned long long highmem)
{
unsigned long reserve = reserve_end - start;
long map_size = len - reserve;
unsigned long map_size = len - reserve;
int err;
if(map_size <= 0) {
if (len <= reserve) {
os_warn("Too few physical memory! Needed=%lu, given=%lu\n",
reserve, len);
exit(1);
@ -94,7 +94,7 @@ void __init setup_physmem(unsigned long start, unsigned long reserve_end,
err = os_map_memory((void *) reserve_end, physmem_fd, reserve,
map_size, 1, 1, 1);
if (err < 0) {
os_warn("setup_physmem - mapping %ld bytes of memory at 0x%p "
os_warn("setup_physmem - mapping %lu bytes of memory at 0x%p "
"failed - errno = %d\n", map_size,
(void *) reserve_end, err);
exit(1);

View file

@ -444,6 +444,6 @@ int elf_core_copy_fpregs(struct task_struct *t, elf_fpregset_t *fpu)
{
int cpu = current_thread_info()->cpu;
return save_i387_registers(userspace_pid[cpu], (unsigned long *) fpu);
return save_i387_registers(userspace_pid[cpu], (unsigned long *) fpu) == 0;
}

View file

@ -17,7 +17,9 @@
static void _print_addr(void *data, unsigned long address, int reliable)
{
pr_info(" [<%08lx>] %s%pS\n", address, reliable ? "" : "? ",
const char *loglvl = data;
printk("%s [<%08lx>] %s%pS\n", loglvl, address, reliable ? "" : "? ",
(void *)address);
}
@ -25,9 +27,9 @@ static const struct stacktrace_ops stackops = {
.address = _print_addr
};
void show_stack(struct task_struct *task, unsigned long *stack)
void show_stack_loglvl(struct task_struct *task, unsigned long *stack,
const char *loglvl)
{
unsigned long *sp = stack;
struct pt_regs *segv_regs = current->thread.segv_regs;
int i;
@ -38,10 +40,9 @@ void show_stack(struct task_struct *task, unsigned long *stack)
}
if (!stack)
sp = get_stack_pointer(task, segv_regs);
stack = get_stack_pointer(task, segv_regs);
pr_info("Stack:\n");
stack = sp;
printk("%sStack:\n", loglvl);
for (i = 0; i < 3 * STACKSLOTS_PER_LINE; i++) {
if (kstack_end(stack))
break;
@ -49,9 +50,12 @@ void show_stack(struct task_struct *task, unsigned long *stack)
pr_cont("\n");
pr_cont(" %08lx", *stack++);
}
pr_cont("\n");
pr_info("Call Trace:\n");
dump_trace(current, &stackops, NULL);
pr_info("\n");
printk("%sCall Trace:\n", loglvl);
dump_trace(task ?: current, &stackops, (void *)loglvl);
}
void show_stack(struct task_struct *task, unsigned long *stack)
{
show_stack_loglvl(task, stack, KERN_INFO);
}

View file

@ -20,7 +20,7 @@
#define T1 %xmm7
#define STATEP %rdi
#define LEN %rsi
#define LEN %esi
#define SRC %rdx
#define DST %rcx
@ -75,32 +75,32 @@ __load_partial:
xor %r9d, %r9d
pxor MSG, MSG
mov LEN, %r8
mov LEN, %r8d
and $0x1, %r8
jz .Lld_partial_1
mov LEN, %r8
mov LEN, %r8d
and $0x1E, %r8
add SRC, %r8
mov (%r8), %r9b
.Lld_partial_1:
mov LEN, %r8
mov LEN, %r8d
and $0x2, %r8
jz .Lld_partial_2
mov LEN, %r8
mov LEN, %r8d
and $0x1C, %r8
add SRC, %r8
shl $0x10, %r9
mov (%r8), %r9w
.Lld_partial_2:
mov LEN, %r8
mov LEN, %r8d
and $0x4, %r8
jz .Lld_partial_4
mov LEN, %r8
mov LEN, %r8d
and $0x18, %r8
add SRC, %r8
shl $32, %r9
@ -110,11 +110,11 @@ __load_partial:
.Lld_partial_4:
movq %r9, MSG
mov LEN, %r8
mov LEN, %r8d
and $0x8, %r8
jz .Lld_partial_8
mov LEN, %r8
mov LEN, %r8d
and $0x10, %r8
add SRC, %r8
pslldq $8, MSG
@ -138,7 +138,7 @@ ENDPROC(__load_partial)
* %r10
*/
__store_partial:
mov LEN, %r8
mov LEN, %r8d
mov DST, %r9
movq T0, %r10
@ -676,7 +676,7 @@ ENTRY(crypto_aegis128_aesni_dec_tail)
call __store_partial
/* mask with byte count: */
movq LEN, T0
movd LEN, T0
punpcklbw T0, T0
punpcklbw T0, T0
punpcklbw T0, T0
@ -701,7 +701,8 @@ ENDPROC(crypto_aegis128_aesni_dec_tail)
/*
* void crypto_aegis128_aesni_final(void *state, void *tag_xor,
* u64 assoclen, u64 cryptlen);
* unsigned int assoclen,
* unsigned int cryptlen);
*/
ENTRY(crypto_aegis128_aesni_final)
FRAME_BEGIN
@ -714,8 +715,8 @@ ENTRY(crypto_aegis128_aesni_final)
movdqu 0x40(STATEP), STATE4
/* prepare length block: */
movq %rdx, MSG
movq %rcx, T0
movd %edx, MSG
movd %ecx, T0
pslldq $8, T0
pxor T0, MSG
psllq $3, MSG /* multiply by 8 (to get bit count) */

View file

@ -782,11 +782,13 @@ static void pt_buffer_advance(struct pt_buffer *buf)
buf->cur_idx++;
if (buf->cur_idx == buf->cur->last) {
if (buf->cur == buf->last)
if (buf->cur == buf->last) {
buf->cur = buf->first;
else
buf->wrapped = true;
} else {
buf->cur = list_entry(buf->cur->list.next, struct topa,
list);
}
buf->cur_idx = 0;
}
}
@ -800,8 +802,11 @@ static void pt_buffer_advance(struct pt_buffer *buf)
static void pt_update_head(struct pt *pt)
{
struct pt_buffer *buf = perf_get_aux(&pt->handle);
bool wrapped = buf->wrapped;
u64 topa_idx, base, old;
buf->wrapped = false;
/* offset of the first region in this table from the beginning of buf */
base = buf->cur->offset + buf->output_off;
@ -814,7 +819,7 @@ static void pt_update_head(struct pt *pt)
} else {
old = (local64_xchg(&buf->head, base) &
((buf->nr_pages << PAGE_SHIFT) - 1));
if (base < old)
if (base < old || (base == old && wrapped))
base += buf->nr_pages << PAGE_SHIFT;
local_add(base - old, &buf->data_size);

View file

@ -64,6 +64,7 @@ struct pt_pmu {
* @lost: if data was lost/truncated
* @head: logical write offset inside the buffer
* @snapshot: if this is for a snapshot/overwrite counter
* @wrapped: buffer advance wrapped back to the first topa table
* @stop_pos: STOP topa entry index
* @intr_pos: INT topa entry index
* @stop_te: STOP topa entry pointer
@ -80,6 +81,7 @@ struct pt_buffer {
local_t data_size;
local64_t head;
bool snapshot;
bool wrapped;
long stop_pos, intr_pos;
struct topa_entry *stop_te, *intr_te;
void **data_pages;

View file

@ -118,7 +118,10 @@ static inline bool amd_gart_present(void)
#define amd_nb_num(x) 0
#define amd_nb_has_feature(x) false
#define node_to_amd_nb(x) NULL
static inline struct amd_northbridge *node_to_amd_nb(int node)
{
return NULL;
}
#define amd_gart_present(x) false
#endif

View file

@ -335,12 +335,6 @@ early_idt_handler_common:
jmp restore_regs_and_return_to_kernel
END(early_idt_handler_common)
__INITDATA
.balign 4
GLOBAL(early_recursion_flag)
.long 0
#define NEXT_PAGE(name) \
.balign PAGE_SIZE; \
GLOBAL(name)
@ -375,6 +369,8 @@ GLOBAL(name)
.endr
__INITDATA
.balign 4
NEXT_PGD_PAGE(early_top_pgt)
.fill 512,8,0
.fill PTI_USER_PGD_FILL,8,0
@ -382,6 +378,9 @@ NEXT_PGD_PAGE(early_top_pgt)
NEXT_PAGE(early_dynamic_pgts)
.fill 512*EARLY_DYNAMIC_PAGE_TABLES,8,0
GLOBAL(early_recursion_flag)
.long 0
.data
#if defined(CONFIG_XEN_PV) || defined(CONFIG_PVH)

View file

@ -179,9 +179,11 @@ module_param(ple_window_shrink, uint, 0444);
static unsigned int ple_window_max = KVM_VMX_DEFAULT_PLE_WINDOW_MAX;
module_param(ple_window_max, uint, 0444);
/* Default is SYSTEM mode, 1 for host-guest mode */
/* Default is SYSTEM mode, 1 for host-guest mode (which is BROKEN) */
int __read_mostly pt_mode = PT_MODE_SYSTEM;
#ifdef CONFIG_BROKEN
module_param(pt_mode, int, S_IRUGO);
#endif
static DEFINE_STATIC_KEY_FALSE(vmx_l1d_should_flush);
static DEFINE_STATIC_KEY_FALSE(vmx_l1d_flush_cond);

View file

@ -16,6 +16,7 @@
#include <asm/boot.h>
#include <asm/processor-flags.h>
#include <asm/msr.h>
#include <asm/nospec-branch.h>
#include <xen/interface/elfnote.h>
__HEAD
@ -105,6 +106,7 @@ ENTRY(pvh_start_xen)
/* startup_64 expects boot_params in %rsi. */
mov $_pa(pvh_bootparams), %rsi
mov $_pa(startup_64), %rax
ANNOTATE_RETPOLINE_SAFE
jmp *%rax
#else /* CONFIG_X86_64 */

View file

@ -1652,6 +1652,12 @@ void blk_mq_start_stopped_hw_queue(struct blk_mq_hw_ctx *hctx, bool async)
return;
clear_bit(BLK_MQ_S_STOPPED, &hctx->state);
/*
* Pairs with the smp_mb() in blk_mq_hctx_stopped() to order the
* clearing of BLK_MQ_S_STOPPED above and the checking of dispatch
* list in the subsequent routine.
*/
smp_mb__after_atomic();
blk_mq_run_hw_queue(hctx, async);
}
EXPORT_SYMBOL_GPL(blk_mq_start_stopped_hw_queue);

View file

@ -178,6 +178,19 @@ static inline struct blk_mq_tags *blk_mq_tags_from_data(struct blk_mq_alloc_data
static inline bool blk_mq_hctx_stopped(struct blk_mq_hw_ctx *hctx)
{
/* Fast path: hardware queue is not stopped most of the time. */
if (likely(!test_bit(BLK_MQ_S_STOPPED, &hctx->state)))
return false;
/*
* This barrier is used to order adding of dispatch list before and
* the test of BLK_MQ_S_STOPPED below. Pairs with the memory barrier
* in blk_mq_start_stopped_hw_queue() so that dispatch code could
* either see BLK_MQ_S_STOPPED is cleared or dispatch list is not
* empty to avoid missing dispatching requests.
*/
smp_mb();
return test_bit(BLK_MQ_S_STOPPED, &hctx->state);
}

View file

@ -118,8 +118,10 @@ static int pcrypt_aead_encrypt(struct aead_request *req)
err = padata_do_parallel(ictx->psenc, padata, &ctx->cb_cpu);
if (!err)
return -EINPROGRESS;
if (err == -EBUSY)
return -EAGAIN;
if (err == -EBUSY) {
/* try non-parallel mode */
return crypto_aead_encrypt(creq);
}
return err;
}
@ -167,8 +169,10 @@ static int pcrypt_aead_decrypt(struct aead_request *req)
err = padata_do_parallel(ictx->psdec, padata, &ctx->cb_cpu);
if (!err)
return -EINPROGRESS;
if (err == -EBUSY)
return -EAGAIN;
if (err == -EBUSY) {
/* try non-parallel mode */
return crypto_aead_decrypt(creq);
}
return err;
}

View file

@ -283,7 +283,7 @@ error:
if (frame->virt_irq > 0)
acpi_unregister_gsi(gtdt_frame->virtual_timer_interrupt);
frame->virt_irq = 0;
} while (i-- >= 0 && gtdt_frame--);
} while (i-- > 0 && gtdt_frame--);
return -EINVAL;
}

View file

@ -522,12 +522,16 @@ exit:
return IRQ_NONE;
}
static struct lock_class_key regmap_irq_lock_class;
static struct lock_class_key regmap_irq_request_class;
static int regmap_irq_map(struct irq_domain *h, unsigned int virq,
irq_hw_number_t hw)
{
struct regmap_irq_chip_data *data = h->host_data;
irq_set_chip_data(virq, data);
irq_set_lockdep_class(virq, &regmap_irq_lock_class, &regmap_irq_request_class);
irq_set_chip(virq, &data->irq_chip);
irq_set_nested_thread(virq, 1);
irq_set_parent(virq, data->irq);

View file

@ -603,6 +603,17 @@ int regmap_attach_dev(struct device *dev, struct regmap *map,
}
EXPORT_SYMBOL_GPL(regmap_attach_dev);
static int dev_get_regmap_match(struct device *dev, void *res, void *data);
static int regmap_detach_dev(struct device *dev, struct regmap *map)
{
if (!dev)
return 0;
return devres_release(dev, dev_get_regmap_release,
dev_get_regmap_match, (void *)map->name);
}
static enum regmap_endian regmap_get_reg_endian(const struct regmap_bus *bus,
const struct regmap_config *config)
{
@ -1331,6 +1342,7 @@ void regmap_exit(struct regmap *map)
{
struct regmap_async *async;
regmap_detach_dev(map->dev, map);
regcache_exit(map);
regmap_debugfs_exit(map);
regmap_range_exit(map);

View file

@ -372,6 +372,8 @@ static const struct usb_device_id blacklist_table[] = {
BTUSB_WIDEBAND_SPEECH },
{ USB_DEVICE(0x13d3, 0x3591), .driver_info = BTUSB_REALTEK |
BTUSB_WIDEBAND_SPEECH },
{ USB_DEVICE(0x0489, 0xe123), .driver_info = BTUSB_REALTEK |
BTUSB_WIDEBAND_SPEECH },
{ USB_DEVICE(0x0489, 0xe125), .driver_info = BTUSB_REALTEK |
BTUSB_WIDEBAND_SPEECH },

View file

@ -7,6 +7,7 @@
*/
#include <linux/platform_device.h>
#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/slab.h>
#include <linux/io.h>
@ -412,7 +413,7 @@ static int axi_clkgen_probe(struct platform_device *pdev)
struct clk_init_data init;
const char *parent_names[2];
const char *clk_name;
struct resource *mem;
struct clk *axi_clk;
unsigned int i;
int ret;
@ -427,14 +428,29 @@ static int axi_clkgen_probe(struct platform_device *pdev)
if (!axi_clkgen)
return -ENOMEM;
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
axi_clkgen->base = devm_ioremap_resource(&pdev->dev, mem);
axi_clkgen->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(axi_clkgen->base))
return PTR_ERR(axi_clkgen->base);
init.num_parents = of_clk_get_parent_count(pdev->dev.of_node);
if (init.num_parents < 1 || init.num_parents > 2)
return -EINVAL;
axi_clk = devm_clk_get_enabled(&pdev->dev, "s_axi_aclk");
if (!IS_ERR(axi_clk)) {
if (init.num_parents < 2 || init.num_parents > 3)
return -EINVAL;
init.num_parents -= 1;
} else {
/*
* Legacy... So that old DTs which do not have clock-names still
* work. In this case we don't explicitly enable the AXI bus
* clock.
*/
if (PTR_ERR(axi_clk) != -ENOENT)
return PTR_ERR(axi_clk);
if (init.num_parents < 1 || init.num_parents > 2)
return -EINVAL;
}
for (i = 0; i < init.num_parents; i++) {
parent_names[i] = of_clk_get_parent_name(pdev->dev.of_node, i);

View file

@ -337,6 +337,7 @@ static struct clk_alpha_pll gpll1_out_main = {
/* 930MHz configuration */
static const struct alpha_pll_config gpll3_config = {
.l = 48,
.alpha_hi = 0x70,
.alpha = 0x0,
.alpha_en_mask = BIT(24),
.post_div_mask = 0xf << 8,

View file

@ -167,7 +167,9 @@ static int __init cpufreq_init(void)
ret = cpufreq_register_driver(&loongson2_cpufreq_driver);
if (!ret && !nowait) {
if (ret) {
platform_driver_unregister(&platform_driver);
} else if (!nowait) {
saved_cpu_wait = cpu_wait;
cpu_wait = loongson2_cpu_wait;
}

View file

@ -2478,6 +2478,7 @@ static int ahash_hmac_setkey(struct crypto_ahash *ahash, const u8 *key,
static int ahash_hmac_init(struct ahash_request *req)
{
int ret;
struct iproc_reqctx_s *rctx = ahash_request_ctx(req);
struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
struct iproc_ctx_s *ctx = crypto_ahash_ctx(tfm);
@ -2487,7 +2488,9 @@ static int ahash_hmac_init(struct ahash_request *req)
flow_log("ahash_hmac_init()\n");
/* init the context as a hash */
ahash_init(req);
ret = ahash_init(req);
if (ret)
return ret;
if (!spu_no_incr_hash(ctx)) {
/* SPU-M can do incr hashing but needs sw for outer HMAC */

View file

@ -45,7 +45,7 @@ static void cpt_disable_cores(struct cpt_device *cpt, u64 coremask,
dev_err(dev, "Cores still busy %llx", coremask);
grp = cpt_read_csr64(cpt->reg_base,
CPTX_PF_EXEC_BUSY(0));
if (timeout--)
if (!timeout--)
break;
udelay(CSR_DELAY);
@ -303,6 +303,8 @@ static int cpt_ucode_load_fw(struct cpt_device *cpt, const u8 *fw, bool is_ae)
ret = do_cpt_init(cpt, mcode);
if (ret) {
dma_free_coherent(&cpt->pdev->dev, mcode->code_size,
mcode->code, mcode->phys_base);
dev_err(dev, "do_cpt_init failed with ret: %d\n", ret);
goto fw_release;
}
@ -395,7 +397,7 @@ static void cpt_disable_all_cores(struct cpt_device *cpt)
dev_err(dev, "Cores still busy");
grp = cpt_read_csr64(cpt->reg_base,
CPTX_PF_EXEC_BUSY(0));
if (timeout--)
if (!timeout--)
break;
udelay(CSR_DELAY);

View file

@ -103,10 +103,36 @@ static bool dma_fence_array_enable_signaling(struct dma_fence *fence)
static bool dma_fence_array_signaled(struct dma_fence *fence)
{
struct dma_fence_array *array = to_dma_fence_array(fence);
int num_pending;
unsigned int i;
if (atomic_read(&array->num_pending) > 0)
/*
* We need to read num_pending before checking the enable_signal bit
* to avoid racing with the enable_signaling() implementation, which
* might decrement the counter, and cause a partial check.
* atomic_read_acquire() pairs with atomic_dec_and_test() in
* dma_fence_array_enable_signaling()
*
* The !--num_pending check is here to account for the any_signaled case
* if we race with enable_signaling(), that means the !num_pending check
* in the is_signalling_enabled branch might be outdated (num_pending
* might have been decremented), but that's fine. The user will get the
* right value when testing again later.
*/
num_pending = atomic_read_acquire(&array->num_pending);
if (test_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT, &array->base.flags)) {
if (num_pending <= 0)
goto signal;
return false;
}
for (i = 0; i < array->num_fences; ++i) {
if (dma_fence_is_signaled(array->fences[i]) && !--num_pending)
goto signal;
}
return false;
signal:
dma_fence_array_clear_pending_error(array);
return true;
}

View file

@ -180,7 +180,7 @@ static void bluefield_edac_check(struct mem_ctl_info *mci)
static void bluefield_edac_init_dimms(struct mem_ctl_info *mci)
{
struct bluefield_edac_priv *priv = mci->pvt_info;
int mem_ctrl_idx = mci->mc_idx;
u64 mem_ctrl_idx = mci->mc_idx;
struct dimm_info *dimm;
u64 smc_info, smc_arg;
int is_empty = 1, i;

View file

@ -331,21 +331,25 @@ static void fsl_mc_check(struct mem_ctl_info *mci)
* TODO: Add support for 32-bit wide buses
*/
if ((err_detect & DDR_EDE_SBE) && (bus_width == 64)) {
u64 cap = (u64)cap_high << 32 | cap_low;
u32 s = syndrome;
sbe_ecc_decode(cap_high, cap_low, syndrome,
&bad_data_bit, &bad_ecc_bit);
if (bad_data_bit != -1)
fsl_mc_printk(mci, KERN_ERR,
"Faulty Data bit: %d\n", bad_data_bit);
if (bad_ecc_bit != -1)
fsl_mc_printk(mci, KERN_ERR,
"Faulty ECC bit: %d\n", bad_ecc_bit);
if (bad_data_bit >= 0) {
fsl_mc_printk(mci, KERN_ERR, "Faulty Data bit: %d\n", bad_data_bit);
cap ^= 1ULL << bad_data_bit;
}
if (bad_ecc_bit >= 0) {
fsl_mc_printk(mci, KERN_ERR, "Faulty ECC bit: %d\n", bad_ecc_bit);
s ^= 1 << bad_ecc_bit;
}
fsl_mc_printk(mci, KERN_ERR,
"Expected Data / ECC:\t%#8.8x_%08x / %#2.2x\n",
cap_high ^ (1 << (bad_data_bit - 32)),
cap_low ^ (1 << bad_data_bit),
syndrome ^ (1 << bad_ecc_bit));
upper_32_bits(cap), lower_32_bits(cap), s);
}
fsl_mc_printk(mci, KERN_ERR,

View file

@ -627,6 +627,9 @@ static struct scpi_dvfs_info *scpi_dvfs_get_info(u8 domain)
if (ret)
return ERR_PTR(ret);
if (!buf.opp_count)
return ERR_PTR(-ENOENT);
info = kmalloc(sizeof(*info), GFP_KERNEL);
if (!info)
return ERR_PTR(-ENOMEM);

View file

@ -40,7 +40,8 @@ int __init efi_tpm_eventlog_init(void)
{
struct linux_efi_tpm_eventlog *log_tbl;
struct efi_tcg2_final_events_table *final_tbl;
int tbl_size;
unsigned int tbl_size;
int final_tbl_size;
int ret = 0;
if (efi.tpm_log == EFI_INVALID_TABLE_ADDR) {
@ -80,26 +81,26 @@ int __init efi_tpm_eventlog_init(void)
goto out;
}
tbl_size = 0;
final_tbl_size = 0;
if (final_tbl->nr_events != 0) {
void *events = (void *)efi.tpm_final_log
+ sizeof(final_tbl->version)
+ sizeof(final_tbl->nr_events);
tbl_size = tpm2_calc_event_log_size(events,
final_tbl->nr_events,
log_tbl->log);
final_tbl_size = tpm2_calc_event_log_size(events,
final_tbl->nr_events,
log_tbl->log);
}
if (tbl_size < 0) {
if (final_tbl_size < 0) {
pr_err(FW_BUG "Failed to parse event in TPM Final Events Log\n");
ret = -EINVAL;
goto out_calc;
}
memblock_reserve((unsigned long)final_tbl,
tbl_size + sizeof(*final_tbl));
efi_tpm_final_log_size = tbl_size;
memblock_reserve(efi.tpm_final_log,
final_tbl_size + sizeof(*final_tbl));
efi_tpm_final_log_size = final_tbl_size;
out_calc:
early_memunmap(final_tbl, sizeof(*final_tbl));

View file

@ -898,7 +898,8 @@ static __init int gsmi_init(void)
gsmi_dev.pdev = platform_device_register_full(&gsmi_dev_info);
if (IS_ERR(gsmi_dev.pdev)) {
printk(KERN_ERR "gsmi: unable to register platform device\n");
return PTR_ERR(gsmi_dev.pdev);
ret = PTR_ERR(gsmi_dev.pdev);
goto out_unregister;
}
/* SMI access needs to be serialized */
@ -1025,6 +1026,10 @@ out_err:
gsmi_buf_free(gsmi_dev.name_buf);
dma_pool_destroy(gsmi_dev.dma_pool);
platform_device_unregister(gsmi_dev.pdev);
out_unregister:
#ifdef CONFIG_PM
platform_driver_unregister(&gsmi_driver_info);
#endif
pr_info("gsmi: failed to load: %d\n", ret);
return ret;
}
@ -1047,6 +1052,9 @@ static void __exit gsmi_exit(void)
gsmi_buf_free(gsmi_dev.name_buf);
dma_pool_destroy(gsmi_dev.dma_pool);
platform_device_unregister(gsmi_dev.pdev);
#ifdef CONFIG_PM
platform_driver_unregister(&gsmi_driver_info);
#endif
}
module_init(gsmi_init);

View file

@ -328,6 +328,7 @@ static const struct irq_domain_ops grgpio_irq_domain_ops = {
static int grgpio_probe(struct platform_device *ofdev)
{
struct device_node *np = ofdev->dev.of_node;
struct device *dev = &ofdev->dev;
void __iomem *regs;
struct gpio_chip *gc;
struct grgpio_priv *priv;
@ -337,7 +338,7 @@ static int grgpio_probe(struct platform_device *ofdev)
int size;
int i;
priv = devm_kzalloc(&ofdev->dev, sizeof(*priv), GFP_KERNEL);
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
if (!priv)
return -ENOMEM;
@ -346,29 +347,32 @@ static int grgpio_probe(struct platform_device *ofdev)
return PTR_ERR(regs);
gc = &priv->gc;
err = bgpio_init(gc, &ofdev->dev, 4, regs + GRGPIO_DATA,
err = bgpio_init(gc, dev, 4, regs + GRGPIO_DATA,
regs + GRGPIO_OUTPUT, NULL, regs + GRGPIO_DIR, NULL,
BGPIOF_BIG_ENDIAN_BYTE_ORDER);
if (err) {
dev_err(&ofdev->dev, "bgpio_init() failed\n");
dev_err(dev, "bgpio_init() failed\n");
return err;
}
priv->regs = regs;
priv->imask = gc->read_reg(regs + GRGPIO_IMASK);
priv->dev = &ofdev->dev;
priv->dev = dev;
gc->of_node = np;
gc->owner = THIS_MODULE;
gc->to_irq = grgpio_to_irq;
gc->label = devm_kasprintf(&ofdev->dev, GFP_KERNEL, "%pOF", np);
gc->label = devm_kasprintf(dev, GFP_KERNEL, "%pOF", np);
if (!gc->label)
return -ENOMEM;
gc->base = -1;
err = of_property_read_u32(np, "nbits", &prop);
if (err || prop <= 0 || prop > GRGPIO_MAX_NGPIO) {
gc->ngpio = GRGPIO_MAX_NGPIO;
dev_dbg(&ofdev->dev,
"No or invalid nbits property: assume %d\n", gc->ngpio);
dev_dbg(dev, "No or invalid nbits property: assume %d\n",
gc->ngpio);
} else {
gc->ngpio = prop;
}
@ -380,7 +384,7 @@ static int grgpio_probe(struct platform_device *ofdev)
irqmap = (s32 *)of_get_property(np, "irqmap", &size);
if (irqmap) {
if (size < gc->ngpio) {
dev_err(&ofdev->dev,
dev_err(dev,
"irqmap shorter than ngpio (%d < %d)\n",
size, gc->ngpio);
return -EINVAL;
@ -390,7 +394,7 @@ static int grgpio_probe(struct platform_device *ofdev)
&grgpio_irq_domain_ops,
priv);
if (!priv->domain) {
dev_err(&ofdev->dev, "Could not add irq domain\n");
dev_err(dev, "Could not add irq domain\n");
return -EINVAL;
}
@ -420,13 +424,13 @@ static int grgpio_probe(struct platform_device *ofdev)
err = gpiochip_add_data(gc, priv);
if (err) {
dev_err(&ofdev->dev, "Could not add gpiochip\n");
dev_err(dev, "Could not add gpiochip\n");
if (priv->domain)
irq_domain_remove(priv->domain);
return err;
}
dev_info(&ofdev->dev, "regs=0x%p, base=%d, ngpio=%d, irqs=%s\n",
dev_info(dev, "regs=0x%p, base=%d, ngpio=%d, irqs=%s\n",
priv->regs, gc->base, gc->ngpio, priv->domain ? "on" : "off");
return 0;

View file

@ -395,7 +395,7 @@ static ssize_t amdgpu_debugfs_regs_smc_read(struct file *f, char __user *buf,
if (!adev->smc_rreg)
return -EOPNOTSUPP;
if (size > 4096 || size & 0x3 || *pos & 0x3)
if (size & 0x3 || *pos & 0x3)
return -EINVAL;
while (size) {

View file

@ -1678,6 +1678,7 @@ int amdgpu_ttm_init(struct amdgpu_device *adev)
mutex_init(&adev->mman.gtt_window_lock);
dma_set_max_seg_size(adev->dev, UINT_MAX);
/* No others user of address space so set it to 0 */
r = ttm_bo_device_init(&adev->mman.bdev,
&amdgpu_bo_driver,

View file

@ -154,7 +154,7 @@ static void show_leaks(struct drm_mm *mm) { }
INTERVAL_TREE_DEFINE(struct drm_mm_node, rb,
u64, __subtree_last,
START, LAST, static inline, drm_mm_interval_tree)
START, LAST, static inline __maybe_unused, drm_mm_interval_tree)
struct drm_mm_node *
__drm_mm_interval_first(const struct drm_mm *mm, u64 start, u64 last)

View file

@ -166,6 +166,12 @@ static const struct dmi_system_id orientation_data[] = {
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T103HAF"),
},
.driver_data = (void *)&lcd800x1280_rightside_up,
}, { /* AYA NEO AYANEO 2 */
.matches = {
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "AYANEO"),
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "AYANEO 2"),
},
.driver_data = (void *)&lcd1200x1920_rightside_up,
}, { /* AYA NEO 2021 */
.matches = {
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "AYADEVICE"),

View file

@ -481,7 +481,8 @@ void etnaviv_buffer_queue(struct etnaviv_gpu *gpu, u32 exec_state,
} else {
CMD_LOAD_STATE(buffer, VIVS_GL_FLUSH_CACHE,
VIVS_GL_FLUSH_CACHE_DEPTH |
VIVS_GL_FLUSH_CACHE_COLOR);
VIVS_GL_FLUSH_CACHE_COLOR |
VIVS_GL_FLUSH_CACHE_SHADER_L1);
if (has_blt) {
CMD_LOAD_STATE(buffer, VIVS_BLT_ENABLE, 0x1);
CMD_LOAD_STATE(buffer, VIVS_BLT_SET_COMMAND, 0x1);

View file

@ -75,7 +75,7 @@ static void etnaviv_core_dump_header(struct core_dump_iterator *iter,
hdr->file_size = cpu_to_le32(data_end - iter->data);
iter->hdr++;
iter->data += hdr->file_size;
iter->data += le32_to_cpu(hdr->file_size);
}
static void etnaviv_core_dump_registers(struct core_dump_iterator *iter,
@ -83,10 +83,15 @@ static void etnaviv_core_dump_registers(struct core_dump_iterator *iter,
{
struct etnaviv_dump_registers *reg = iter->data;
unsigned int i;
u32 read_addr;
for (i = 0; i < ARRAY_SIZE(etnaviv_dump_registers); i++, reg++) {
reg->reg = etnaviv_dump_registers[i];
reg->value = gpu_read(gpu, etnaviv_dump_registers[i]);
read_addr = etnaviv_dump_registers[i];
if (read_addr >= VIVS_PM_POWER_CONTROLS &&
read_addr <= VIVS_PM_PULSE_EATER)
read_addr = gpu_fix_power_address(gpu, read_addr);
reg->reg = cpu_to_le32(etnaviv_dump_registers[i]);
reg->value = cpu_to_le32(gpu_read(gpu, read_addr));
}
etnaviv_core_dump_header(iter, ETDUMP_BUF_REG, reg);
@ -207,7 +212,7 @@ void etnaviv_core_dump(struct etnaviv_gem_submit *submit)
if (!IS_ERR(pages)) {
int j;
iter.hdr->data[0] = bomap - bomap_start;
iter.hdr->data[0] = cpu_to_le32((bomap - bomap_start));
for (j = 0; j < obj->base.size >> PAGE_SHIFT; j++)
*bomap++ = cpu_to_le64(page_to_phys(*pages++));

View file

@ -566,7 +566,7 @@ static void etnaviv_gpu_enable_mlcg(struct etnaviv_gpu *gpu)
u32 pmc, ppc;
/* enable clock gating */
ppc = gpu_read(gpu, VIVS_PM_POWER_CONTROLS);
ppc = gpu_read_power(gpu, VIVS_PM_POWER_CONTROLS);
ppc |= VIVS_PM_POWER_CONTROLS_ENABLE_MODULE_CLOCK_GATING;
/* Disable stall module clock gating for 4.3.0.1 and 4.3.0.2 revs */
@ -574,9 +574,9 @@ static void etnaviv_gpu_enable_mlcg(struct etnaviv_gpu *gpu)
gpu->identity.revision == 0x4302)
ppc |= VIVS_PM_POWER_CONTROLS_DISABLE_STALL_MODULE_CLOCK_GATING;
gpu_write(gpu, VIVS_PM_POWER_CONTROLS, ppc);
gpu_write_power(gpu, VIVS_PM_POWER_CONTROLS, ppc);
pmc = gpu_read(gpu, VIVS_PM_MODULE_CONTROLS);
pmc = gpu_read_power(gpu, VIVS_PM_MODULE_CONTROLS);
/* Disable PA clock gating for GC400+ without bugfix except for GC420 */
if (gpu->identity.model >= chipModel_GC400 &&
@ -605,7 +605,7 @@ static void etnaviv_gpu_enable_mlcg(struct etnaviv_gpu *gpu)
pmc |= VIVS_PM_MODULE_CONTROLS_DISABLE_MODULE_CLOCK_GATING_RA_HZ;
pmc |= VIVS_PM_MODULE_CONTROLS_DISABLE_MODULE_CLOCK_GATING_RA_EZ;
gpu_write(gpu, VIVS_PM_MODULE_CONTROLS, pmc);
gpu_write_power(gpu, VIVS_PM_MODULE_CONTROLS, pmc);
}
void etnaviv_gpu_start_fe(struct etnaviv_gpu *gpu, u32 address, u16 prefetch)
@ -665,11 +665,11 @@ static void etnaviv_gpu_setup_pulse_eater(struct etnaviv_gpu *gpu)
(gpu->identity.features & chipFeatures_PIPE_3D))
{
/* Performance fix: disable internal DFS */
pulse_eater = gpu_read(gpu, VIVS_PM_PULSE_EATER);
pulse_eater = gpu_read_power(gpu, VIVS_PM_PULSE_EATER);
pulse_eater |= BIT(18);
}
gpu_write(gpu, VIVS_PM_PULSE_EATER, pulse_eater);
gpu_write_power(gpu, VIVS_PM_PULSE_EATER, pulse_eater);
}
static void etnaviv_gpu_hw_init(struct etnaviv_gpu *gpu)
@ -1236,10 +1236,12 @@ static void sync_point_perfmon_sample_pre(struct etnaviv_gpu *gpu,
{
u32 val;
mutex_lock(&gpu->lock);
/* disable clock gating */
val = gpu_read(gpu, VIVS_PM_POWER_CONTROLS);
val = gpu_read_power(gpu, VIVS_PM_POWER_CONTROLS);
val &= ~VIVS_PM_POWER_CONTROLS_ENABLE_MODULE_CLOCK_GATING;
gpu_write(gpu, VIVS_PM_POWER_CONTROLS, val);
gpu_write_power(gpu, VIVS_PM_POWER_CONTROLS, val);
/* enable debug register */
val = gpu_read(gpu, VIVS_HI_CLOCK_CONTROL);
@ -1247,6 +1249,8 @@ static void sync_point_perfmon_sample_pre(struct etnaviv_gpu *gpu,
gpu_write(gpu, VIVS_HI_CLOCK_CONTROL, val);
sync_point_perfmon_sample(gpu, event, ETNA_PM_PROCESS_PRE);
mutex_unlock(&gpu->lock);
}
static void sync_point_perfmon_sample_post(struct etnaviv_gpu *gpu,
@ -1256,23 +1260,27 @@ static void sync_point_perfmon_sample_post(struct etnaviv_gpu *gpu,
unsigned int i;
u32 val;
mutex_lock(&gpu->lock);
sync_point_perfmon_sample(gpu, event, ETNA_PM_PROCESS_POST);
for (i = 0; i < submit->nr_pmrs; i++) {
const struct etnaviv_perfmon_request *pmr = submit->pmrs + i;
*pmr->bo_vma = pmr->sequence;
}
/* disable debug register */
val = gpu_read(gpu, VIVS_HI_CLOCK_CONTROL);
val |= VIVS_HI_CLOCK_CONTROL_DISABLE_DEBUG_REGISTERS;
gpu_write(gpu, VIVS_HI_CLOCK_CONTROL, val);
/* enable clock gating */
val = gpu_read(gpu, VIVS_PM_POWER_CONTROLS);
val = gpu_read_power(gpu, VIVS_PM_POWER_CONTROLS);
val |= VIVS_PM_POWER_CONTROLS_ENABLE_MODULE_CLOCK_GATING;
gpu_write(gpu, VIVS_PM_POWER_CONTROLS, val);
gpu_write_power(gpu, VIVS_PM_POWER_CONTROLS, val);
mutex_unlock(&gpu->lock);
for (i = 0; i < submit->nr_pmrs; i++) {
const struct etnaviv_perfmon_request *pmr = submit->pmrs + i;
*pmr->bo_vma = pmr->sequence;
}
}

View file

@ -10,6 +10,7 @@
#include "etnaviv_gem.h"
#include "etnaviv_mmu.h"
#include "etnaviv_drv.h"
#include "common.xml.h"
struct etnaviv_gem_submit;
struct etnaviv_vram_mapping;
@ -158,6 +159,26 @@ static inline u32 gpu_read(struct etnaviv_gpu *gpu, u32 reg)
return readl(gpu->mmio + reg);
}
static inline u32 gpu_fix_power_address(struct etnaviv_gpu *gpu, u32 reg)
{
/* Power registers in GC300 < 2.0 are offset by 0x100 */
if (gpu->identity.model == chipModel_GC300 &&
gpu->identity.revision < 0x2000)
reg += 0x100;
return reg;
}
static inline void gpu_write_power(struct etnaviv_gpu *gpu, u32 reg, u32 data)
{
writel(data, gpu->mmio + gpu_fix_power_address(gpu, reg));
}
static inline u32 gpu_read_power(struct etnaviv_gpu *gpu, u32 reg)
{
return readl(gpu->mmio + gpu_fix_power_address(gpu, reg));
}
int etnaviv_gpu_get_param(struct etnaviv_gpu *gpu, u32 param, u64 *value);
int etnaviv_gpu_init(struct etnaviv_gpu *gpu);

View file

@ -411,14 +411,12 @@ static int ipu_crtc_init(struct ipu_crtc *ipu_crtc,
}
ipu_crtc->irq = ipu_plane_irq(ipu_crtc->plane[0]);
ret = devm_request_irq(ipu_crtc->dev, ipu_crtc->irq, ipu_irq_handler, 0,
"imx_drm", ipu_crtc);
ret = devm_request_irq(ipu_crtc->dev, ipu_crtc->irq, ipu_irq_handler,
IRQF_NO_AUTOEN, "imx_drm", ipu_crtc);
if (ret < 0) {
dev_err(ipu_crtc->dev, "irq request failed with %d.\n", ret);
goto err_put_plane1_res;
}
/* Only enable IRQ when we actually need it to trigger work. */
disable_irq(ipu_crtc->irq);
return 0;

View file

@ -533,6 +533,7 @@ static const struct of_device_id mcde_of_match[] = {
},
{},
};
MODULE_DEVICE_TABLE(of, mcde_of_match);
static struct platform_driver mcde_driver = {
.driver = {

View file

@ -1152,15 +1152,13 @@ static int a6xx_gmu_get_irq(struct a6xx_gmu *gmu, struct platform_device *pdev,
irq = platform_get_irq_byname(pdev, name);
ret = request_irq(irq, handler, IRQF_TRIGGER_HIGH, name, gmu);
ret = request_irq(irq, handler, IRQF_TRIGGER_HIGH | IRQF_NO_AUTOEN, name, gmu);
if (ret) {
DRM_DEV_ERROR(&pdev->dev, "Unable to get interrupt %s %d\n",
name, ret);
return ret;
}
disable_irq(irq);
return irq;
}

View file

@ -1244,8 +1244,6 @@ struct drm_gem_object *omap_gem_new_dmabuf(struct drm_device *dev, size_t size,
omap_obj = to_omap_bo(obj);
mutex_lock(&omap_obj->lock);
omap_obj->sgt = sgt;
if (sgt->orig_nents == 1) {
@ -1261,8 +1259,7 @@ struct drm_gem_object *omap_gem_new_dmabuf(struct drm_device *dev, size_t size,
pages = kcalloc(npages, sizeof(*pages), GFP_KERNEL);
if (!pages) {
omap_gem_free_object(obj);
obj = ERR_PTR(-ENOMEM);
goto done;
return ERR_PTR(-ENOMEM);
}
omap_obj->pages = pages;
@ -1275,13 +1272,10 @@ struct drm_gem_object *omap_gem_new_dmabuf(struct drm_device *dev, size_t size,
if (WARN_ON(i != npages)) {
omap_gem_free_object(obj);
obj = ERR_PTR(-ENOMEM);
goto done;
return ERR_PTR(-ENOMEM);
}
}
done:
mutex_unlock(&omap_obj->lock);
return obj;
}

View file

@ -153,7 +153,6 @@ static void panfrost_gpu_init_quirks(struct panfrost_device *pfdev)
struct panfrost_model {
const char *name;
u32 id;
u32 id_mask;
u64 features;
u64 issues;
struct {

View file

@ -2104,7 +2104,7 @@ static int r600_packet3_check(struct radeon_cs_parser *p,
return -EINVAL;
}
offset = radeon_get_ib_value(p, idx+1) << 8;
offset = (u64)radeon_get_ib_value(p, idx+1) << 8;
if (offset != track->vgt_strmout_bo_offset[idx_value]) {
DRM_ERROR("bad STRMOUT_BASE_UPDATE, bo offset does not match: 0x%llx, 0x%x\n",
offset, track->vgt_strmout_bo_offset[idx_value]);

View file

@ -137,7 +137,7 @@ static void mixer_dbg_crb(struct seq_file *s, int val)
}
}
static void mixer_dbg_mxn(struct seq_file *s, void *addr)
static void mixer_dbg_mxn(struct seq_file *s, void __iomem *addr)
{
int i;

View file

@ -2242,7 +2242,8 @@ static void wacom_update_name(struct wacom *wacom, const char *suffix)
if (hid_is_usb(wacom->hdev)) {
struct usb_interface *intf = to_usb_interface(wacom->hdev->dev.parent);
struct usb_device *dev = interface_to_usbdev(intf);
product_name = dev->product;
if (dev->product != NULL)
product_name = dev->product;
}
if (wacom->hdev->bus == BUS_I2C) {

View file

@ -1394,9 +1394,9 @@ static void wacom_intuos_pro2_bt_pen(struct wacom_wac *wacom)
rotation -= 1800;
input_report_abs(pen_input, ABS_TILT_X,
(char)frame[7]);
(signed char)frame[7]);
input_report_abs(pen_input, ABS_TILT_Y,
(char)frame[8]);
(signed char)frame[8]);
input_report_abs(pen_input, ABS_Z, rotation);
input_report_abs(pen_input, ABS_WHEEL,
get_unaligned_le16(&frame[11]));

View file

@ -257,7 +257,8 @@ static int i3c_device_uevent(struct device *dev, struct kobj_uevent_env *env)
struct i3c_device_info devinfo;
u16 manuf, part, ext;
i3c_device_get_info(i3cdev, &devinfo);
if (i3cdev->desc)
devinfo = i3cdev->desc->info;
manuf = I3C_PID_MANUF_ID(devinfo.pid);
part = I3C_PID_PART_ID(devinfo.pid);
ext = I3C_PID_EXTRA_INFO(devinfo.pid);
@ -1263,7 +1264,7 @@ static void i3c_master_put_i3c_addrs(struct i3c_dev_desc *dev)
I3C_ADDR_SLOT_FREE);
if (dev->boardinfo && dev->boardinfo->init_dyn_addr)
i3c_bus_set_addr_slot_status(&master->bus, dev->info.dyn_addr,
i3c_bus_set_addr_slot_status(&master->bus, dev->boardinfo->init_dyn_addr,
I3C_ADDR_SLOT_FREE);
}

View file

@ -152,7 +152,7 @@ static int ad7780_write_raw(struct iio_dev *indio_dev,
switch (m) {
case IIO_CHAN_INFO_SCALE:
if (val != 0)
if (val != 0 || val2 == 0)
return -EINVAL;
vref = st->int_vref_mv * 1000000LL;

View file

@ -3250,7 +3250,7 @@ static void bnxt_re_process_res_shadow_qp_wc(struct bnxt_re_qp *gsi_sqp,
wc->byte_len = orig_cqe->length;
wc->qp = &gsi_qp->ib_qp;
wc->ex.imm_data = cpu_to_be32(le32_to_cpu(orig_cqe->immdata));
wc->ex.imm_data = cpu_to_be32(orig_cqe->immdata);
wc->src_qp = orig_cqe->src_qp;
memcpy(wc->smac, orig_cqe->smac, ETH_ALEN);
if (bnxt_re_is_vlan_pkt(orig_cqe, &vlan_id, &sl)) {
@ -3391,7 +3391,10 @@ int bnxt_re_poll_cq(struct ib_cq *ib_cq, int num_entries, struct ib_wc *wc)
continue;
}
wc->qp = &qp->ib_qp;
wc->ex.imm_data = cpu_to_be32(le32_to_cpu(cqe->immdata));
if (cqe->flags & CQ_RES_RC_FLAGS_IMM)
wc->ex.imm_data = cpu_to_be32(cqe->immdata);
else
wc->ex.invalidate_rkey = cqe->invrkey;
wc->src_qp = cqe->src_qp;
memcpy(wc->smac, cqe->smac, ETH_ALEN);
wc->port_num = 1;

View file

@ -350,7 +350,7 @@ struct bnxt_qplib_cqe {
u16 cfa_meta;
u64 wr_id;
union {
__le32 immdata;
u32 immdata;
u32 invrkey;
};
u64 qp_handle;

View file

@ -27,11 +27,14 @@ static ssize_t brightness_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct led_classdev *led_cdev = dev_get_drvdata(dev);
unsigned int brightness;
/* no lock needed for this */
mutex_lock(&led_cdev->led_access);
led_update_brightness(led_cdev);
brightness = led_cdev->brightness;
mutex_unlock(&led_cdev->led_access);
return sprintf(buf, "%u\n", led_cdev->brightness);
return sprintf(buf, "%u\n", brightness);
}
static ssize_t brightness_store(struct device *dev,
@ -68,8 +71,13 @@ static ssize_t max_brightness_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct led_classdev *led_cdev = dev_get_drvdata(dev);
unsigned int max_brightness;
return sprintf(buf, "%u\n", led_cdev->max_brightness);
mutex_lock(&led_cdev->led_access);
max_brightness = led_cdev->max_brightness;
mutex_unlock(&led_cdev->led_access);
return sprintf(buf, "%u\n", max_brightness);
}
static DEVICE_ATTR_RO(max_brightness);

View file

@ -1635,7 +1635,7 @@ static void cache_set_flush(struct closure *cl)
if (!IS_ERR_OR_NULL(c->gc_thread))
kthread_stop(c->gc_thread);
if (!IS_ERR(c->root))
if (!IS_ERR_OR_NULL(c->root))
list_add(&c->root->list, &c->btree_cache);
/*

View file

@ -2477,6 +2477,7 @@ static void pool_work_wait(struct pool_work *pw, struct pool *pool,
init_completion(&pw->complete);
queue_work(pool->wq, &pw->worker);
wait_for_completion(&pw->complete);
destroy_work_on_stack(&pw->worker);
}
/*----------------------------------------------------------------*/

View file

@ -544,6 +544,9 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
for (minor = 0; minor < MAX_DVB_MINORS; minor++)
if (dvb_minors[minor] == NULL)
break;
#else
minor = nums2minor(adap->num, type, id);
#endif
if (minor >= MAX_DVB_MINORS) {
if (new_node) {
list_del (&new_node->list_head);
@ -557,17 +560,7 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
mutex_unlock(&dvbdev_register_lock);
return -EINVAL;
}
#else
minor = nums2minor(adap->num, type, id);
if (minor >= MAX_DVB_MINORS) {
dvb_media_device_free(dvbdev);
list_del(&dvbdev->list_head);
kfree(dvbdev);
*pdvbdev = NULL;
mutex_unlock(&dvbdev_register_lock);
return ret;
}
#endif
dvbdev->minor = minor;
dvb_minors[minor] = dvb_device_get(dvbdev);
up_write(&minor_rwsem);

View file

@ -554,13 +554,19 @@ static int ts2020_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
struct ts2020_config *pdata = client->dev.platform_data;
struct dvb_frontend *fe = pdata->fe;
struct dvb_frontend *fe;
struct ts2020_priv *dev;
int ret;
u8 u8tmp;
unsigned int utmp;
char *chip_str;
if (!pdata) {
dev_err(&client->dev, "platform data is mandatory\n");
return -EINVAL;
}
fe = pdata->fe;
dev = kzalloc(sizeof(*dev), GFP_KERNEL);
if (!dev) {
ret = -ENOMEM;

View file

@ -2175,8 +2175,10 @@ static int tc358743_probe(struct i2c_client *client)
err_work_queues:
cec_unregister_adapter(state->cec_adap);
if (!state->i2c_client->irq)
if (!state->i2c_client->irq) {
del_timer(&state->timer);
flush_work(&state->work_i2c_poll);
}
cancel_delayed_work(&state->delayed_work_enable_hotplug);
mutex_destroy(&state->confctl_mutex);
err_hdl:

View file

@ -335,8 +335,8 @@ err_of_depopulate:
of_platform_depopulate(dev);
err_runtime_disable:
pm_runtime_put_noidle(dev);
pm_runtime_set_suspended(dev);
pm_runtime_disable(dev);
pm_runtime_set_suspended(dev);
hfi_destroy(core);
return ret;
}

View file

@ -463,11 +463,12 @@ int fmc_send_cmd(struct fmdev *fmdev, u8 fm_op, u16 type, void *payload,
jiffies_to_msecs(FM_DRV_TX_TIMEOUT) / 1000);
return -ETIMEDOUT;
}
spin_lock_irqsave(&fmdev->resp_skb_lock, flags);
if (!fmdev->resp_skb) {
spin_unlock_irqrestore(&fmdev->resp_skb_lock, flags);
fmerr("Response SKB is missing\n");
return -EFAULT;
}
spin_lock_irqsave(&fmdev->resp_skb_lock, flags);
skb = fmdev->resp_skb;
fmdev->resp_skb = NULL;
spin_unlock_irqrestore(&fmdev->resp_skb_lock, flags);

View file

@ -994,6 +994,8 @@ const unsigned int cx231xx_bcount = ARRAY_SIZE(cx231xx_boards);
/* table of devices that work with this driver */
struct usb_device_id cx231xx_id_table[] = {
{USB_DEVICE(0x1D19, 0x6108),
.driver_info = CX231XX_BOARD_PV_XCAPTURE_USB},
{USB_DEVICE(0x1D19, 0x6109),
.driver_info = CX231XX_BOARD_PV_XCAPTURE_USB},
{USB_DEVICE(0x0572, 0x5A3C),

View file

@ -847,7 +847,7 @@ static void set_frame_rate(struct gspca_dev *gspca_dev)
r = rate_1;
i = ARRAY_SIZE(rate_1);
}
while (--i > 0) {
while (--i >= 0) {
if (sd->frame_rate >= r->fps)
break;
r++;

View file

@ -2425,6 +2425,8 @@ static const struct uvc_device_info uvc_quirk_force_y8 = {
* The Logitech cameras listed below have their interface class set to
* VENDOR_SPEC because they don't announce themselves as UVC devices, even
* though they are compliant.
*
* Sort these by vendor/product ID.
*/
static const struct usb_device_id uvc_ids[] = {
/* LogiLink Wireless Webcam */
@ -2893,6 +2895,15 @@ static const struct usb_device_id uvc_ids[] = {
.bInterfaceProtocol = 0,
.driver_info = UVC_INFO_QUIRK(UVC_QUIRK_PROBE_MINMAX
| UVC_QUIRK_IGNORE_SELECTOR_UNIT) },
/* NXP Semiconductors IR VIDEO */
{ .match_flags = USB_DEVICE_ID_MATCH_DEVICE
| USB_DEVICE_ID_MATCH_INT_INFO,
.idVendor = 0x1fc9,
.idProduct = 0x009b,
.bInterfaceClass = USB_CLASS_VIDEO,
.bInterfaceSubClass = 1,
.bInterfaceProtocol = 0,
.driver_info = (kernel_ulong_t)&uvc_quirk_probe_minmax },
/* Oculus VR Positional Tracker DK2 */
{ .match_flags = USB_DEVICE_ID_MATCH_DEVICE
| USB_DEVICE_ID_MATCH_INT_INFO,

View file

@ -4205,10 +4205,8 @@ mptsas_find_phyinfo_by_phys_disk_num(MPT_ADAPTER *ioc, u8 phys_disk_num,
static void
mptsas_reprobe_lun(struct scsi_device *sdev, void *data)
{
int rc;
sdev->no_uld_attach = data ? 1 : 0;
rc = scsi_device_reprobe(sdev);
WARN_ON(scsi_device_reprobe(sdev));
}
static void

View file

@ -37,7 +37,7 @@ static int da9052_spi_probe(struct spi_device *spi)
spi_set_drvdata(spi, da9052);
config = da9052_regmap_config;
config.read_flag_mask = 1;
config.write_flag_mask = 1;
config.reg_bits = 7;
config.pad_bits = 1;
config.val_bits = 8;

View file

@ -226,16 +226,46 @@ static struct resource tmu_resources[] = {
};
static struct mfd_cell bxt_wc_dev[] = {
{
.name = "bxt_wcove_gpadc",
.num_resources = ARRAY_SIZE(adc_resources),
.resources = adc_resources,
},
{
.name = "bxt_wcove_thermal",
.num_resources = ARRAY_SIZE(thermal_resources),
.resources = thermal_resources,
},
{
.name = "bxt_wcove_gpio",
.num_resources = ARRAY_SIZE(gpio_resources),
.resources = gpio_resources,
},
{
.name = "bxt_wcove_region",
},
};
static const struct mfd_cell bxt_wc_tmu_dev[] = {
{
.name = "bxt_wcove_tmu",
.num_resources = ARRAY_SIZE(tmu_resources),
.resources = tmu_resources,
},
};
static const struct mfd_cell bxt_wc_bcu_dev[] = {
{
.name = "bxt_wcove_bcu",
.num_resources = ARRAY_SIZE(bcu_resources),
.resources = bcu_resources,
},
};
static const struct mfd_cell bxt_wc_adc_dev[] = {
{
.name = "bxt_wcove_gpadc",
.num_resources = ARRAY_SIZE(adc_resources),
.resources = adc_resources,
},
};
static struct mfd_cell bxt_wc_chgr_dev[] = {
{
.name = "bxt_wcove_usbc",
.num_resources = ARRAY_SIZE(usbc_resources),
@ -246,25 +276,6 @@ static struct mfd_cell bxt_wc_dev[] = {
.num_resources = ARRAY_SIZE(charger_resources),
.resources = charger_resources,
},
{
.name = "bxt_wcove_bcu",
.num_resources = ARRAY_SIZE(bcu_resources),
.resources = bcu_resources,
},
{
.name = "bxt_wcove_tmu",
.num_resources = ARRAY_SIZE(tmu_resources),
.resources = tmu_resources,
},
{
.name = "bxt_wcove_gpio",
.num_resources = ARRAY_SIZE(gpio_resources),
.resources = gpio_resources,
},
{
.name = "bxt_wcove_region",
},
};
static int regmap_ipc_byte_reg_read(void *context, unsigned int reg,
@ -414,19 +425,37 @@ static int bxtwc_add_chained_irq_chip(struct intel_soc_pmic *pmic,
int irq;
irq = regmap_irq_get_virq(pdata, pirq);
if (irq < 0) {
dev_err(pmic->dev,
"Failed to get parent vIRQ(%d) for chip %s, ret:%d\n",
pirq, chip->name, irq);
return irq;
}
if (irq < 0)
return dev_err_probe(pmic->dev, irq, "Failed to get parent vIRQ(%d) for chip %s\n",
pirq, chip->name);
return devm_regmap_add_irq_chip(pmic->dev, pmic->regmap, irq, irq_flags,
0, chip, data);
}
static int bxtwc_add_chained_devices(struct intel_soc_pmic *pmic,
const struct mfd_cell *cells, int n_devs,
struct regmap_irq_chip_data *pdata,
int pirq, int irq_flags,
const struct regmap_irq_chip *chip,
struct regmap_irq_chip_data **data)
{
struct device *dev = pmic->dev;
struct irq_domain *domain;
int ret;
ret = bxtwc_add_chained_irq_chip(pmic, pdata, pirq, irq_flags, chip, data);
if (ret)
return dev_err_probe(dev, ret, "Failed to add %s IRQ chip\n", chip->name);
domain = regmap_irq_get_domain(*data);
return devm_mfd_add_devices(dev, PLATFORM_DEVID_NONE, cells, n_devs, NULL, 0, domain);
}
static int bxtwc_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
int ret;
acpi_handle handle;
acpi_status status;
@ -435,15 +464,10 @@ static int bxtwc_probe(struct platform_device *pdev)
handle = ACPI_HANDLE(&pdev->dev);
status = acpi_evaluate_integer(handle, "_HRV", NULL, &hrv);
if (ACPI_FAILURE(status)) {
dev_err(&pdev->dev, "Failed to get PMIC hardware revision\n");
return -ENODEV;
}
if (hrv != BROXTON_PMIC_WC_HRV) {
dev_err(&pdev->dev, "Invalid PMIC hardware revision: %llu\n",
hrv);
return -ENODEV;
}
if (ACPI_FAILURE(status))
return dev_err_probe(dev, -ENODEV, "Failed to get PMIC hardware revision\n");
if (hrv != BROXTON_PMIC_WC_HRV)
return dev_err_probe(dev, -ENODEV, "Invalid PMIC hardware revision: %llu\n", hrv);
pmic = devm_kzalloc(&pdev->dev, sizeof(*pmic), GFP_KERNEL);
if (!pmic)
@ -459,79 +483,59 @@ static int bxtwc_probe(struct platform_device *pdev)
pmic->regmap = devm_regmap_init(&pdev->dev, NULL, pmic,
&bxtwc_regmap_config);
if (IS_ERR(pmic->regmap)) {
ret = PTR_ERR(pmic->regmap);
dev_err(&pdev->dev, "Failed to initialise regmap: %d\n", ret);
return ret;
}
if (IS_ERR(pmic->regmap))
return dev_err_probe(dev, PTR_ERR(pmic->regmap), "Failed to initialise regmap\n");
ret = devm_regmap_add_irq_chip(&pdev->dev, pmic->regmap, pmic->irq,
IRQF_ONESHOT | IRQF_SHARED,
0, &bxtwc_regmap_irq_chip,
&pmic->irq_chip_data);
if (ret) {
dev_err(&pdev->dev, "Failed to add IRQ chip\n");
if (ret)
return dev_err_probe(dev, ret, "Failed to add IRQ chip\n");
ret = bxtwc_add_chained_devices(pmic, bxt_wc_tmu_dev, ARRAY_SIZE(bxt_wc_tmu_dev),
pmic->irq_chip_data,
BXTWC_TMU_LVL1_IRQ,
IRQF_ONESHOT,
&bxtwc_regmap_irq_chip_tmu,
&pmic->irq_chip_data_tmu);
if (ret)
return ret;
}
ret = bxtwc_add_chained_irq_chip(pmic, pmic->irq_chip_data,
BXTWC_PWRBTN_LVL1_IRQ,
IRQF_ONESHOT,
&bxtwc_regmap_irq_chip_pwrbtn,
&pmic->irq_chip_data_pwrbtn);
if (ret) {
dev_err(&pdev->dev, "Failed to add PWRBTN IRQ chip\n");
if (ret)
return dev_err_probe(dev, ret, "Failed to add PWRBTN IRQ chip\n");
ret = bxtwc_add_chained_devices(pmic, bxt_wc_bcu_dev, ARRAY_SIZE(bxt_wc_bcu_dev),
pmic->irq_chip_data,
BXTWC_BCU_LVL1_IRQ,
IRQF_ONESHOT,
&bxtwc_regmap_irq_chip_bcu,
&pmic->irq_chip_data_bcu);
if (ret)
return ret;
}
ret = bxtwc_add_chained_irq_chip(pmic, pmic->irq_chip_data,
BXTWC_TMU_LVL1_IRQ,
IRQF_ONESHOT,
&bxtwc_regmap_irq_chip_tmu,
&pmic->irq_chip_data_tmu);
if (ret) {
dev_err(&pdev->dev, "Failed to add TMU IRQ chip\n");
ret = bxtwc_add_chained_devices(pmic, bxt_wc_adc_dev, ARRAY_SIZE(bxt_wc_adc_dev),
pmic->irq_chip_data,
BXTWC_ADC_LVL1_IRQ,
IRQF_ONESHOT,
&bxtwc_regmap_irq_chip_adc,
&pmic->irq_chip_data_adc);
if (ret)
return ret;
}
/* Add chained IRQ handler for BCU IRQs */
ret = bxtwc_add_chained_irq_chip(pmic, pmic->irq_chip_data,
BXTWC_BCU_LVL1_IRQ,
IRQF_ONESHOT,
&bxtwc_regmap_irq_chip_bcu,
&pmic->irq_chip_data_bcu);
if (ret) {
dev_err(&pdev->dev, "Failed to add BUC IRQ chip\n");
ret = bxtwc_add_chained_devices(pmic, bxt_wc_chgr_dev, ARRAY_SIZE(bxt_wc_chgr_dev),
pmic->irq_chip_data,
BXTWC_CHGR_LVL1_IRQ,
IRQF_ONESHOT,
&bxtwc_regmap_irq_chip_chgr,
&pmic->irq_chip_data_chgr);
if (ret)
return ret;
}
/* Add chained IRQ handler for ADC IRQs */
ret = bxtwc_add_chained_irq_chip(pmic, pmic->irq_chip_data,
BXTWC_ADC_LVL1_IRQ,
IRQF_ONESHOT,
&bxtwc_regmap_irq_chip_adc,
&pmic->irq_chip_data_adc);
if (ret) {
dev_err(&pdev->dev, "Failed to add ADC IRQ chip\n");
return ret;
}
/* Add chained IRQ handler for CHGR IRQs */
ret = bxtwc_add_chained_irq_chip(pmic, pmic->irq_chip_data,
BXTWC_CHGR_LVL1_IRQ,
IRQF_ONESHOT,
&bxtwc_regmap_irq_chip_chgr,
&pmic->irq_chip_data_chgr);
if (ret) {
dev_err(&pdev->dev, "Failed to add CHGR IRQ chip\n");
return ret;
}
/* Add chained IRQ handler for CRIT IRQs */
ret = bxtwc_add_chained_irq_chip(pmic, pmic->irq_chip_data,
@ -539,19 +543,13 @@ static int bxtwc_probe(struct platform_device *pdev)
IRQF_ONESHOT,
&bxtwc_regmap_irq_chip_crit,
&pmic->irq_chip_data_crit);
if (ret) {
dev_err(&pdev->dev, "Failed to add CRIT IRQ chip\n");
return ret;
}
if (ret)
return dev_err_probe(dev, ret, "Failed to add CRIT IRQ chip\n");
ret = devm_mfd_add_devices(&pdev->dev, PLATFORM_DEVID_NONE, bxt_wc_dev,
ARRAY_SIZE(bxt_wc_dev), NULL, 0, NULL);
if (ret) {
dev_err(&pdev->dev, "Failed to add devices\n");
return ret;
}
if (ret)
return dev_err_probe(dev, ret, "Failed to add devices\n");
ret = sysfs_create_group(&pdev->dev.kobj, &bxtwc_group);
if (ret) {

View file

@ -82,8 +82,8 @@ static int rt5033_i2c_probe(struct i2c_client *i2c,
}
dev_info(&i2c->dev, "Device found Device ID: %04x\n", dev_id);
ret = regmap_add_irq_chip(rt5033->regmap, rt5033->irq,
IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
ret = devm_regmap_add_irq_chip(rt5033->dev, rt5033->regmap,
rt5033->irq, IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
0, &rt5033_irq_chip, &rt5033->irq_data);
if (ret) {
dev_err(&i2c->dev, "Failed to request IRQ %d: %d\n",

View file

@ -550,17 +550,13 @@ static int tps65010_probe(struct i2c_client *client,
*/
if (client->irq > 0) {
status = request_irq(client->irq, tps65010_irq,
IRQF_TRIGGER_FALLING, DRIVER_NAME, tps);
IRQF_TRIGGER_FALLING | IRQF_NO_AUTOEN,
DRIVER_NAME, tps);
if (status < 0) {
dev_dbg(&client->dev, "can't get IRQ %d, err %d\n",
client->irq, status);
return status;
}
/* annoying race here, ideally we'd have an option
* to claim the irq now and enable it later.
* FIXME genirq IRQF_NOAUTOEN now solves that ...
*/
disable_irq(client->irq);
set_bit(FLAG_IRQ_ENABLE, &tps->flags);
} else
dev_warn(&client->dev, "IRQ not configured!\n");

View file

@ -1148,7 +1148,7 @@ static int apds990x_probe(struct i2c_client *client,
err = chip->pdata->setup_resources();
if (err) {
err = -EINVAL;
goto fail3;
goto fail4;
}
}
@ -1156,7 +1156,7 @@ static int apds990x_probe(struct i2c_client *client,
apds990x_attribute_group);
if (err < 0) {
dev_err(&chip->client->dev, "Sysfs registration failed\n");
goto fail4;
goto fail5;
}
err = request_threaded_irq(client->irq, NULL,
@ -1167,15 +1167,17 @@ static int apds990x_probe(struct i2c_client *client,
if (err) {
dev_err(&client->dev, "could not get IRQ %d\n",
client->irq);
goto fail5;
goto fail6;
}
return err;
fail5:
fail6:
sysfs_remove_group(&chip->client->dev.kobj,
&apds990x_attribute_group[0]);
fail4:
fail5:
if (chip->pdata && chip->pdata->release_resources)
chip->pdata->release_resources();
fail4:
pm_runtime_disable(&client->dev);
fail3:
regulator_bulk_disable(ARRAY_SIZE(chip->regs), chip->regs);
fail2:

View file

@ -186,6 +186,11 @@ void eeprom_93cx6_read(struct eeprom_93cx6 *eeprom, const u8 word,
eeprom_93cx6_write_bits(eeprom, command,
PCI_EEPROM_WIDTH_OPCODE + eeprom->width);
if (has_quirk_extra_read_cycle(eeprom)) {
eeprom_93cx6_pulse_high(eeprom);
eeprom_93cx6_pulse_low(eeprom);
}
/*
* Read the requested 16 bits.
*/
@ -252,6 +257,11 @@ void eeprom_93cx6_readb(struct eeprom_93cx6 *eeprom, const u8 byte,
eeprom_93cx6_write_bits(eeprom, command,
PCI_EEPROM_WIDTH_OPCODE + eeprom->width + 1);
if (has_quirk_extra_read_cycle(eeprom)) {
eeprom_93cx6_pulse_high(eeprom);
eeprom_93cx6_pulse_low(eeprom);
}
/*
* Read the requested 8 bits.
*/

View file

@ -134,6 +134,8 @@ static void mmc_bus_shutdown(struct device *dev)
if (dev->driver && drv->shutdown)
drv->shutdown(card);
__mmc_stop_host(host);
if (host->bus_ops->shutdown) {
ret = host->bus_ops->shutdown(host);
if (ret)

View file

@ -2382,6 +2382,9 @@ void mmc_start_host(struct mmc_host *host)
void __mmc_stop_host(struct mmc_host *host)
{
if (host->rescan_disable)
return;
if (host->slot.cd_irq >= 0) {
mmc_gpio_set_cd_wake(host, false);
disable_irq(host->slot.cd_irq);

View file

@ -2831,8 +2831,8 @@ static int dw_mci_init_slot(struct dw_mci *host)
if (host->use_dma == TRANS_MODE_IDMAC) {
mmc->max_segs = host->ring_size;
mmc->max_blk_size = 65535;
mmc->max_req_size = DW_MCI_DESC_DATA_LENGTH * host->ring_size;
mmc->max_seg_size = mmc->max_req_size;
mmc->max_seg_size = 0x1000;
mmc->max_req_size = mmc->max_seg_size * host->ring_size;
mmc->max_blk_count = mmc->max_req_size / 512;
} else if (host->use_dma == TRANS_MODE_EDMAC) {
mmc->max_segs = 64;

View file

@ -255,10 +255,6 @@ static int mmc_spi_response_get(struct mmc_spi_host *host,
u8 leftover = 0;
unsigned short rotator;
int i;
char tag[32];
snprintf(tag, sizeof(tag), " ... CMD%d response SPI_%s",
cmd->opcode, maptype(cmd));
/* Except for data block reads, the whole response will already
* be stored in the scratch buffer. It's somewhere after the
@ -408,8 +404,9 @@ checkstatus:
}
if (value < 0)
dev_dbg(&host->spi->dev, "%s: resp %04x %08x\n",
tag, cmd->resp[0], cmd->resp[1]);
dev_dbg(&host->spi->dev,
" ... CMD%d response SPI_%s: resp %04x %08x\n",
cmd->opcode, maptype(cmd), cmd->resp[0], cmd->resp[1]);
/* disable chipselect on errors and some success cases */
if (value >= 0 && cs_on)

View file

@ -362,7 +362,7 @@ atmel_pmecc_create_user(struct atmel_pmecc *pmecc,
size = ALIGN(size, sizeof(s32));
size += (req->ecc.strength + 1) * sizeof(s32) * 3;
user = kzalloc(size, GFP_KERNEL);
user = devm_kzalloc(pmecc->dev, size, GFP_KERNEL);
if (!user)
return ERR_PTR(-ENOMEM);
@ -408,12 +408,6 @@ atmel_pmecc_create_user(struct atmel_pmecc *pmecc,
}
EXPORT_SYMBOL_GPL(atmel_pmecc_create_user);
void atmel_pmecc_destroy_user(struct atmel_pmecc_user *user)
{
kfree(user);
}
EXPORT_SYMBOL_GPL(atmel_pmecc_destroy_user);
static int get_strength(struct atmel_pmecc_user *user)
{
const int *strengths = user->pmecc->caps->strengths;

View file

@ -55,8 +55,6 @@ struct atmel_pmecc *devm_atmel_pmecc_get(struct device *dev);
struct atmel_pmecc_user *
atmel_pmecc_create_user(struct atmel_pmecc *pmecc,
struct atmel_pmecc_user_req *req);
void atmel_pmecc_destroy_user(struct atmel_pmecc_user *user);
void atmel_pmecc_reset(struct atmel_pmecc *pmecc);
int atmel_pmecc_enable(struct atmel_pmecc_user *user, int op);
void atmel_pmecc_disable(struct atmel_pmecc_user *user);

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