Skip to content

Commit b79dec9

Browse files
committed
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: Arnd Bergmann <arnd@arndb.de>
2 parents 24138ec + a49e482 commit b79dec9

4 files changed

Lines changed: 22 additions & 16 deletions

File tree

MAINTAINERS

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7065,7 +7065,6 @@ F: Documentation/gpu/xen-front.rst
70657065
F: drivers/gpu/drm/xen/
70667066

70677067
DRM DRIVERS FOR XILINX
7068-
M: Hyun Kwon <hyun.kwon@xilinx.com>
70697068
M: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
70707069
L: dri-devel@lists.freedesktop.org
70717070
S: Maintained
@@ -23119,7 +23118,7 @@ F: Documentation/devicetree/bindings/iio/adc/xlnx,zynqmp-ams.yaml
2311923118
F: drivers/iio/adc/xilinx-ams.c
2312023119

2312123120
XILINX AXI ETHERNET DRIVER
23122-
M: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
23121+
M: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
2312323122
S: Maintained
2312423123
F: drivers/net/ethernet/xilinx/xilinx_axienet*
2312523124

@@ -23138,8 +23137,8 @@ F: drivers/soc/xilinx/xlnx_event_manager.c
2313823137
F: include/linux/firmware/xlnx-event-manager.h
2313923138

2314023139
XILINX GPIO DRIVER
23141-
M: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
23142-
R: Srinivas Neeli <srinivas.neeli@xilinx.com>
23140+
M: Shubhrajyoti Datta <shubhrajyoti.datta@amd.com>
23141+
R: Srinivas Neeli <srinivas.neeli@amd.com>
2314323142
R: Michal Simek <michal.simek@amd.com>
2314423143
S: Maintained
2314523144
F: Documentation/devicetree/bindings/gpio/gpio-zynq.yaml
@@ -23154,8 +23153,8 @@ F: drivers/pwm/pwm-xilinx.c
2315423153
F: include/clocksource/timer-xilinx.h
2315523154

2315623155
XILINX SD-FEC IP CORES
23157-
M: Derek Kiernan <derek.kiernan@xilinx.com>
23158-
M: Dragan Cvetic <dragan.cvetic@xilinx.com>
23156+
M: Derek Kiernan <derek.kiernan@amd.com>
23157+
M: Dragan Cvetic <dragan.cvetic@amd.com>
2315923158
S: Maintained
2316023159
F: Documentation/devicetree/bindings/misc/xlnx,sd-fec.txt
2316123160
F: Documentation/misc-devices/xilinx_sdfec.rst
@@ -23171,7 +23170,6 @@ S: Maintained
2317123170
F: drivers/tty/serial/uartlite.c
2317223171

2317323172
XILINX VIDEO IP CORES
23174-
M: Hyun Kwon <hyun.kwon@xilinx.com>
2317523173
M: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2317623174
L: linux-media@vger.kernel.org
2317723175
S: Supported
@@ -23200,7 +23198,6 @@ F: include/linux/dma/amd_xdma.h
2320023198
F: include/linux/platform_data/amd_xdma.h
2320123199

2320223200
XILINX ZYNQMP DPDMA DRIVER
23203-
M: Hyun Kwon <hyun.kwon@xilinx.com>
2320423201
M: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2320523202
L: dmaengine@vger.kernel.org
2320623203
S: Supported
@@ -23216,7 +23213,6 @@ F: Documentation/devicetree/bindings/memory-controllers/xlnx,zynqmp-ocmc-1.0.yam
2321623213
F: drivers/edac/zynqmp_edac.c
2321723214

2321823215
XILINX ZYNQMP PSGTR PHY DRIVER
23219-
M: Anurag Kumar Vulisha <anurag.kumar.vulisha@xilinx.com>
2322023216
M: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2322123217
L: linux-kernel@vger.kernel.org
2322223218
S: Supported
@@ -23225,7 +23221,7 @@ F: Documentation/devicetree/bindings/phy/xlnx,zynqmp-psgtr.yaml
2322523221
F: drivers/phy/xilinx/phy-zynqmp.c
2322623222

2322723223
XILINX ZYNQMP SHA3 DRIVER
23228-
M: Harsha <harsha.harsha@xilinx.com>
23224+
M: Harsha <harsha.harsha@amd.com>
2322923225
S: Maintained
2323023226
F: drivers/crypto/xilinx/zynqmp-sha.c
2323123227

drivers/firmware/xilinx/zynqmp.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -942,8 +942,16 @@ EXPORT_SYMBOL_GPL(zynqmp_pm_reset_get_status);
942942
*/
943943
int zynqmp_pm_fpga_load(const u64 address, const u32 size, const u32 flags)
944944
{
945-
return zynqmp_pm_invoke_fn(PM_FPGA_LOAD, lower_32_bits(address),
946-
upper_32_bits(address), size, flags, NULL);
945+
u32 ret_payload[PAYLOAD_ARG_CNT];
946+
int ret;
947+
948+
ret = zynqmp_pm_invoke_fn(PM_FPGA_LOAD, lower_32_bits(address),
949+
upper_32_bits(address), size, flags,
950+
ret_payload);
951+
if (ret_payload[0])
952+
return -ret_payload[0];
953+
954+
return ret;
947955
}
948956
EXPORT_SYMBOL_GPL(zynqmp_pm_fpga_load);
949957

drivers/soc/xilinx/xlnx_event_manager.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,11 +192,12 @@ static int xlnx_remove_cb_for_suspend(event_cb_func_t cb_fun)
192192
struct registered_event_data *eve_data;
193193
struct agent_cb *cb_pos;
194194
struct agent_cb *cb_next;
195+
struct hlist_node *tmp;
195196

196197
is_need_to_unregister = false;
197198

198199
/* Check for existing entry in hash table for given cb_type */
199-
hash_for_each_possible(reg_driver_map, eve_data, hentry, PM_INIT_SUSPEND_CB) {
200+
hash_for_each_possible_safe(reg_driver_map, eve_data, tmp, hentry, PM_INIT_SUSPEND_CB) {
200201
if (eve_data->cb_type == PM_INIT_SUSPEND_CB) {
201202
/* Delete the list of callback */
202203
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,
228229
u64 key = ((u64)node_id << 32U) | (u64)event;
229230
struct agent_cb *cb_pos;
230231
struct agent_cb *cb_next;
232+
struct hlist_node *tmp;
231233

232234
is_need_to_unregister = false;
233235

234236
/* Check for existing entry in hash table for given key id */
235-
hash_for_each_possible(reg_driver_map, eve_data, hentry, key) {
237+
hash_for_each_possible_safe(reg_driver_map, eve_data, tmp, hentry, key) {
236238
if (eve_data->key == key) {
237239
/* Delete the list of callback */
238240
list_for_each_entry_safe(cb_pos, cb_next, &eve_data->cb_list_head, list) {

drivers/soc/xilinx/zynqmp_power.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ static int zynqmp_pm_probe(struct platform_device *pdev)
218218
} else if (ret != -EACCES && ret != -ENODEV) {
219219
dev_err(&pdev->dev, "Failed to Register with Xilinx Event manager %d\n", ret);
220220
return ret;
221-
} else if (of_find_property(pdev->dev.of_node, "mboxes", NULL)) {
221+
} else if (of_property_present(pdev->dev.of_node, "mboxes")) {
222222
zynqmp_pm_init_suspend_work =
223223
devm_kzalloc(&pdev->dev,
224224
sizeof(struct zynqmp_pm_work_struct),
@@ -240,7 +240,7 @@ static int zynqmp_pm_probe(struct platform_device *pdev)
240240
dev_err(&pdev->dev, "Failed to request rx channel\n");
241241
return PTR_ERR(rx_chan);
242242
}
243-
} else if (of_find_property(pdev->dev.of_node, "interrupts", NULL)) {
243+
} else if (of_property_present(pdev->dev.of_node, "interrupts")) {
244244
irq = platform_get_irq(pdev, 0);
245245
if (irq <= 0)
246246
return -ENXIO;

0 commit comments

Comments
 (0)