Unverified Commit b79dec95 authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

Merge tag 'zynqmp-soc-for-v6.5' of https://github.com/Xilinx/linux-xlnx into soc/drivers

arm64: ZynqMP SoC changes for v6.5

soc-power
- Use of_property_present() instead of of_find_property()

soc-event
- Avoid use after free eve_data in event manager code

firmware:
- Extend zynqmp_pm_fpga_load() interface

MAINTAINERS:
- Clean xilinx records

* tag 'zynqmp-soc-for-v6.5' of https://github.com/Xilinx/linux-xlnx:
  MAINTAINERS: Switch to @amd.com emails
  MAINTAINERS: Remove Hyun and Anurag from maintainer list
  firmware: xilinx: Update the zynqmp_pm_fpga_load() API
  driver: soc: xilinx: use _safe loop iterator to avoid a use after free
  soc: xilinx: Use of_property_present() for testing DT property presence

Link: https://lore.kernel.org/r/411aee78-e7e8-5966-cbe8-40ff45e27ba2@monstr.eu


Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parents 24138ec0 a49e482c
Loading
Loading
Loading
Loading
+6 −10
Original line number Diff line number Diff line
@@ -7065,7 +7065,6 @@ F: Documentation/gpu/xen-front.rst
F:	drivers/gpu/drm/xen/
DRM DRIVERS FOR XILINX
M:	Hyun Kwon <hyun.kwon@xilinx.com>
M:	Laurent Pinchart <laurent.pinchart@ideasonboard.com>
L:	dri-devel@lists.freedesktop.org
S:	Maintained
@@ -23119,7 +23118,7 @@ F: Documentation/devicetree/bindings/iio/adc/xlnx,zynqmp-ams.yaml
F:	drivers/iio/adc/xilinx-ams.c
XILINX AXI ETHERNET DRIVER
M:	Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
M:	Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
S:	Maintained
F:	drivers/net/ethernet/xilinx/xilinx_axienet*
@@ -23138,8 +23137,8 @@ F: drivers/soc/xilinx/xlnx_event_manager.c
F:	include/linux/firmware/xlnx-event-manager.h
XILINX GPIO DRIVER
M:	Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
R:	Srinivas Neeli <srinivas.neeli@xilinx.com>
M:	Shubhrajyoti Datta <shubhrajyoti.datta@amd.com>
R:	Srinivas Neeli <srinivas.neeli@amd.com>
R:	Michal Simek <michal.simek@amd.com>
S:	Maintained
F:	Documentation/devicetree/bindings/gpio/gpio-zynq.yaml
@@ -23154,8 +23153,8 @@ F: drivers/pwm/pwm-xilinx.c
F:	include/clocksource/timer-xilinx.h
XILINX SD-FEC IP CORES
M:	Derek Kiernan <derek.kiernan@xilinx.com>
M:	Dragan Cvetic <dragan.cvetic@xilinx.com>
M:	Derek Kiernan <derek.kiernan@amd.com>
M:	Dragan Cvetic <dragan.cvetic@amd.com>
S:	Maintained
F:	Documentation/devicetree/bindings/misc/xlnx,sd-fec.txt
F:	Documentation/misc-devices/xilinx_sdfec.rst
@@ -23171,7 +23170,6 @@ S: Maintained
F:	drivers/tty/serial/uartlite.c
XILINX VIDEO IP CORES
M:	Hyun Kwon <hyun.kwon@xilinx.com>
M:	Laurent Pinchart <laurent.pinchart@ideasonboard.com>
L:	linux-media@vger.kernel.org
S:	Supported
@@ -23200,7 +23198,6 @@ F: include/linux/dma/amd_xdma.h
F:	include/linux/platform_data/amd_xdma.h
XILINX ZYNQMP DPDMA DRIVER
M:	Hyun Kwon <hyun.kwon@xilinx.com>
M:	Laurent Pinchart <laurent.pinchart@ideasonboard.com>
L:	dmaengine@vger.kernel.org
S:	Supported
@@ -23216,7 +23213,6 @@ F: Documentation/devicetree/bindings/memory-controllers/xlnx,zynqmp-ocmc-1.0.yam
F:	drivers/edac/zynqmp_edac.c
XILINX ZYNQMP PSGTR PHY DRIVER
M:	Anurag Kumar Vulisha <anurag.kumar.vulisha@xilinx.com>
M:	Laurent Pinchart <laurent.pinchart@ideasonboard.com>
L:	linux-kernel@vger.kernel.org
S:	Supported
@@ -23225,7 +23221,7 @@ F: Documentation/devicetree/bindings/phy/xlnx,zynqmp-psgtr.yaml
F:	drivers/phy/xilinx/phy-zynqmp.c
XILINX ZYNQMP SHA3 DRIVER
M:	Harsha <harsha.harsha@xilinx.com>
M:	Harsha <harsha.harsha@amd.com>
S:	Maintained
F:	drivers/crypto/xilinx/zynqmp-sha.c
+10 −2
Original line number Diff line number Diff line
@@ -942,8 +942,16 @@ EXPORT_SYMBOL_GPL(zynqmp_pm_reset_get_status);
 */
int zynqmp_pm_fpga_load(const u64 address, const u32 size, const u32 flags)
{
	return zynqmp_pm_invoke_fn(PM_FPGA_LOAD, lower_32_bits(address),
				   upper_32_bits(address), size, flags, NULL);
	u32 ret_payload[PAYLOAD_ARG_CNT];
	int ret;

	ret = zynqmp_pm_invoke_fn(PM_FPGA_LOAD, lower_32_bits(address),
				  upper_32_bits(address), size, flags,
				  ret_payload);
	if (ret_payload[0])
		return -ret_payload[0];

	return ret;
}
EXPORT_SYMBOL_GPL(zynqmp_pm_fpga_load);

+4 −2
Original line number Diff line number Diff line
@@ -192,11 +192,12 @@ static int xlnx_remove_cb_for_suspend(event_cb_func_t cb_fun)
	struct registered_event_data *eve_data;
	struct agent_cb *cb_pos;
	struct agent_cb *cb_next;
	struct hlist_node *tmp;

	is_need_to_unregister = false;

	/* Check for existing entry in hash table for given cb_type */
	hash_for_each_possible(reg_driver_map, eve_data, hentry, PM_INIT_SUSPEND_CB) {
	hash_for_each_possible_safe(reg_driver_map, eve_data, tmp, hentry, PM_INIT_SUSPEND_CB) {
		if (eve_data->cb_type == PM_INIT_SUSPEND_CB) {
			/* Delete the list of callback */
			list_for_each_entry_safe(cb_pos, cb_next, &eve_data->cb_list_head, list) {
@@ -228,11 +229,12 @@ static int xlnx_remove_cb_for_notify_event(const u32 node_id, const u32 event,
	u64 key = ((u64)node_id << 32U) | (u64)event;
	struct agent_cb *cb_pos;
	struct agent_cb *cb_next;
	struct hlist_node *tmp;

	is_need_to_unregister = false;

	/* Check for existing entry in hash table for given key id */
	hash_for_each_possible(reg_driver_map, eve_data, hentry, key) {
	hash_for_each_possible_safe(reg_driver_map, eve_data, tmp, hentry, key) {
		if (eve_data->key == key) {
			/* Delete the list of callback */
			list_for_each_entry_safe(cb_pos, cb_next, &eve_data->cb_list_head, list) {
+2 −2
Original line number Diff line number Diff line
@@ -218,7 +218,7 @@ static int zynqmp_pm_probe(struct platform_device *pdev)
	} else if (ret != -EACCES && ret != -ENODEV) {
		dev_err(&pdev->dev, "Failed to Register with Xilinx Event manager %d\n", ret);
		return ret;
	} else if (of_find_property(pdev->dev.of_node, "mboxes", NULL)) {
	} else if (of_property_present(pdev->dev.of_node, "mboxes")) {
		zynqmp_pm_init_suspend_work =
			devm_kzalloc(&pdev->dev,
				     sizeof(struct zynqmp_pm_work_struct),
@@ -240,7 +240,7 @@ static int zynqmp_pm_probe(struct platform_device *pdev)
			dev_err(&pdev->dev, "Failed to request rx channel\n");
			return PTR_ERR(rx_chan);
		}
	} else if (of_find_property(pdev->dev.of_node, "interrupts", NULL)) {
	} else if (of_property_present(pdev->dev.of_node, "interrupts")) {
		irq = platform_get_irq(pdev, 0);
		if (irq <= 0)
			return -ENXIO;