Skip to contentSkip to conversation

versal-ospi fix

PATCH Superseded Sai Pavan Boddu 2 participants 4 messages Dec 5, 2023 – Dec 14, 2023

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover versal-ospi fix

Disable reentrancy on iomem_dac memory-region.

Sai Pavan Boddu (1):
xlnx-versal-ospi: disable reentrancy detection for iomem_dac

 hw/ssi/xlnx-versal-ospi.c | 1 +
 1 file changed, 1 insertion(+)
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/1 xlnx-versal-ospi: disable reentrancy detection for iomem_dac

The OSPI DMA reads flash data through the OSPI linear address space (the iomem_dac region), because of this the reentrancy guard introduced in commit a2e1753b ("memory: prevent dma-reentracy issues") is disabled for the memory region.

---
 hw/ssi/xlnx-versal-ospi.c | 1 +
 1 file changed, 1 insertion(+)
hw/ssi/xlnx-versal-ospi.c +1 -0
index 1a61679c2f..5123e7dde7 100644
@@ -1772,6 +1772,7 @@ static void xlnx_versal_ospi_init(Object *obj)
     memory_region_init_io(&s->iomem_dac, obj, &ospi_dac_ops, s,
                           TYPE_XILINX_VERSAL_OSPI "-dac", 0x20000000);
     sysbus_init_mmio(sbd, &s->iomem_dac);
+    s->iomem_dac.disable_reentrancy_guard = true;
 
     sysbus_init_irq(sbd, &s->irq);
 
Signature · 1 line
2.25.1
#2 lore raw

Re: [PATCH 1/1] xlnx-versal-ospi: disable reentrancy detection for iomem_dac

Quoted 16 lines · Sai Pavan Boddu

The OSPI DMA reads flash data through the OSPI linear address space (the iomem_dac region), because of this the reentrancy guard introduced in commit a2e1753b ("memory: prevent dma-reentracy issues") is disabled for the memory region.

---
 hw/ssi/xlnx-versal-ospi.c | 1 +
 1 file changed, 1 insertion(+)
hw/ssi/xlnx-versal-ospi.c +0 -0
index 1a61679c2f..5123e7dde7 100644

hw/ssi/xlnx-versal-ospi.c static void xlnx_versal_ospi_init(Object *obj) · line 1775

Quoted 4 lines
hw/ssi/xlnx-versal-ospi.c +1 -0
@@ -1772,6 +1772,7 @@ static void xlnx_versal_ospi_init(Object *obj)
     memory_region_init_io(&s->iomem_dac, obj, &ospi_dac_ops, s,
                           TYPE_XILINX_VERSAL_OSPI "-dac", 0x20000000);
     sysbus_init_mmio(sbd, &s->iomem_dac);
+    s->iomem_dac.disable_reentrancy_guard = true;

Where we set this flag we should have a comment explaining why we need to do it, please.

PS: for a single patch you don't need to use a separate cover letter; cover letters are only needed for multi-patch series.

thanks
-- PMM

#3 lore raw

RE: [PATCH 1/1] xlnx-versal-ospi: disable reentrancy detection for iomem_dac

Hi Peter,

Quoted 24 lines

-----Original Message-----
From: Peter Maydell <[email protected]>
Sent: Tuesday, December 12, 2023 10:12 PM
To: Boddu, Sai Pavan <[email protected]>
Cc: [email protected]; [email protected]; qemu- [email protected]; Alistair Francis <[email protected]>; Edgar E. Iglesias <[email protected]>; Kevin Wolf <[email protected]>; Francisco Iglesias <[email protected]>; [email protected]
Subject: Re: [PATCH 1/1] xlnx-versal-ospi: disable reentrancy detection for iomem_dac

Quoted 11 lines · Sai Pavan Boddu

The OSPI DMA reads flash data through the OSPI linear address space (the iomem_dac region), because of this the reentrancy guard introduced in commit a2e1753b ("memory: prevent dma-reentracy issues") is disabled for the memory region.

---
 hw/ssi/xlnx-versal-ospi.c | 1 +
 1 file changed, 1 insertion(+)
Quoted 12 lines

hw/ssi/xlnx-versal-ospi.c static void xlnx_versal_ospi_init(Object *obj) · line 1775

Quoted 9 lines
hw/ssi/xlnx-versal-ospi.c +1 -0
index 1a61679c2f..5123e7dde7 100644
@@ -1772,6 +1772,7 @@ static void xlnx_versal_ospi_init(Object *obj)
     memory_region_init_io(&s->iomem_dac, obj, &ospi_dac_ops, s,
                           TYPE_XILINX_VERSAL_OSPI "-dac", 0x20000000);
     sysbus_init_mmio(sbd, &s->iomem_dac);
+    s->iomem_dac.disable_reentrancy_guard = true;

Where we set this flag we should have a comment explaining why we need to do it, please.

[Boddu, Sai Pavan] Sure, I will send a V2 on this.

Regards,
Sai pavan

Quoted 6 lines

PS: for a single patch you don't need to use a separate cover letter; cover letters are only needed for multi-patch series.

thanks
-- PMM