Skip to contentSkip to conversation

hw/cadence_gem: Make rx_desc_addr and tx_desc_addr uint32_t

PATCH In review Peter Maydell 2 participants 3 messages May 22, 2012 – Jun 20, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw/cadence_gem: Make rx_desc_addr and tx_desc_addr uint32_t

Make the state fields rx_desc_addr and tx_desc_addr uint32_t; this matches the VMStateDescription, and also conforms to how hardware works: the registers don't magically become larger if the device is attached to a CPU with a larger physical address size. It also fixes a compile failure if the target_phys_addr_t type is changed to 64 bits.

---
I'm going through fixing problems with moving target-arm to a larger physical address width so we can support the A15 Large Physical Address Extensions...

 hw/cadence_gem.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
hw/cadence_gem.c +2 -2
index e2140ae..e563409 100644
@@ -339,8 +339,8 @@ typedef struct {
     uint8_t phy_loop; /* Are we in phy loopback? */
 
     /* The current DMA descriptor pointers */
-    target_phys_addr_t rx_desc_addr;
-    target_phys_addr_t tx_desc_addr;
+    uint32_t rx_desc_addr;
+    uint32_t tx_desc_addr;
 
 } GemState;
 
Signature · 1 line
1.7.1
#1 lore raw

Peter C: ping? I was hoping for a review or ack for this one before I stick it into an arm-devs pullreq.

thanks
-- PMM

Quoted 33 lines · Peter Maydell

Make the state fields rx_desc_addr and tx_desc_addr uint32_t; this matches the VMStateDescription, and also conforms to how hardware works: the registers don't magically become larger if the device is attached to a CPU with a larger physical address size. It also fixes a compile failure if the target_phys_addr_t type is changed to 64 bits.

---
I'm going through fixing problems with moving target-arm to a larger physical address width so we can support the A15 Large Physical Address Extensions...

 hw/cadence_gem.c |    4 ++--

 1 files changed, 2 insertions(+), 2 deletions(-)
hw/cadence_gem.c +0 -0
index e2140ae..e563409 100644
@@ -339,8 +339,8 @@ typedef struct {

    uint8_t phy_loop; /* Are we in phy loopback? */

    /* The current DMA descriptor pointers */
-    target_phys_addr_t rx_desc_addr;
-    target_phys_addr_t tx_desc_addr;
+    uint32_t rx_desc_addr;
+    uint32_t tx_desc_addr;

 } GemState;

--
1.7.1

Reviewed-by on v1 1/1
#2 lore raw
In reply to Peter Maydell
Quoted 8 lines · Peter Maydell

Make the state fields rx_desc_addr and tx_desc_addr uint32_t; this matches the VMStateDescription, and also conforms to how hardware works: the registers don't magically become larger if the device is attached to a CPU with a larger physical address size. It also fixes a compile failure if the target_phys_addr_t type is changed to 64 bits.

Quoted 26 lines

---
I'm going through fixing problems with moving target-arm to a larger physical address width so we can support the A15 Large Physical Address Extensions...

 hw/cadence_gem.c |    4 ++--

 1 files changed, 2 insertions(+), 2 deletions(-)
hw/cadence_gem.c +0 -0
index e2140ae..e563409 100644
@@ -339,8 +339,8 @@ typedef struct {

    uint8_t phy_loop; /* Are we in phy loopback? */

    /* The current DMA descriptor pointers */
-    target_phys_addr_t rx_desc_addr;
-    target_phys_addr_t tx_desc_addr;
+    uint32_t rx_desc_addr;
+    uint32_t tx_desc_addr;

 } GemState;

--
1.7.1