[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC PATCH v0 04/15] ppc: Make creation of DRC entries in F
From: |
Bharata B Rao |
Subject: |
[Qemu-devel] [RFC PATCH v0 04/15] ppc: Make creation of DRC entries in FDT endian safe |
Date: |
Thu, 4 Sep 2014 11:36:14 +0530 |
Signed-off-by: Bharata B Rao <address@hidden>
---
hw/ppc/spapr.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 29b7de4..bdbda1f 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -397,10 +397,10 @@ static void spapr_create_drc_dt_entries(void *fdt)
/* ibm,drc-indexes */
memset(int_buf, 0, sizeof(int_buf));
- int_buf[0] = SPAPR_DRC_PHB_TABLE_SIZE;
+ int_buf[0] = cpu_to_be32(SPAPR_DRC_PHB_TABLE_SIZE);
for (i = 1; i <= SPAPR_DRC_PHB_TABLE_SIZE; i++) {
- int_buf[i] = spapr->drc_table[i-1].drc_index;
+ int_buf[i] = cpu_to_be32(spapr->drc_table[i-1].drc_index);
}
ret = fdt_setprop(fdt, fdt_offset, "ibm,drc-indexes", int_buf,
@@ -411,10 +411,10 @@ static void spapr_create_drc_dt_entries(void *fdt)
/* ibm,drc-power-domains */
memset(int_buf, 0, sizeof(int_buf));
- int_buf[0] = SPAPR_DRC_PHB_TABLE_SIZE;
+ int_buf[0] = cpu_to_be32(SPAPR_DRC_PHB_TABLE_SIZE);
for (i = 1; i <= SPAPR_DRC_PHB_TABLE_SIZE; i++) {
- int_buf[i] = 0xffffffff;
+ int_buf[i] = cpu_to_be32(0xffffffff);
}
ret = fdt_setprop(fdt, fdt_offset, "ibm,drc-power-domains", int_buf,
@@ -426,7 +426,7 @@ static void spapr_create_drc_dt_entries(void *fdt)
/* ibm,drc-names */
memset(char_buf, 0, sizeof(char_buf));
entries = (uint32_t *)&char_buf[0];
- *entries = SPAPR_DRC_PHB_TABLE_SIZE;
+ *entries = cpu_to_be32(SPAPR_DRC_PHB_TABLE_SIZE);
offset = sizeof(*entries);
for (i = 0; i < SPAPR_DRC_PHB_TABLE_SIZE; i++) {
@@ -442,7 +442,7 @@ static void spapr_create_drc_dt_entries(void *fdt)
/* ibm,drc-types */
memset(char_buf, 0, sizeof(char_buf));
entries = (uint32_t *)&char_buf[0];
- *entries = SPAPR_DRC_PHB_TABLE_SIZE;
+ *entries = cpu_to_be32(SPAPR_DRC_PHB_TABLE_SIZE);
offset = sizeof(*entries);
for (i = 0; i < SPAPR_DRC_PHB_TABLE_SIZE; i++) {
--
1.7.11.7
- [Qemu-devel] [RFC PATCH v0 00/15] CPU hotplug support of PowerPC sPAPR guests, Bharata B Rao, 2014/09/04
- [Qemu-devel] [RFC PATCH v0 03/15] ppc: Rename sPAPRDrcEntry.phb_buid to sPAPRDrcEntry.id, Bharata B Rao, 2014/09/04
- [Qemu-devel] [RFC PATCH v0 01/15] ppc: Store dr entity state bits at the right bit offset, Bharata B Rao, 2014/09/04
- [Qemu-devel] [RFC PATCH v0 09/15] ppc: Consider max_cpus during xics initialization, Bharata B Rao, 2014/09/04
- [Qemu-devel] [RFC PATCH v0 07/15] ppc: Initialize DRC table before initializing CPUs, Bharata B Rao, 2014/09/04
- [Qemu-devel] [RFC PATCH v0 06/15] ppc: stop after getting first unused DR slot in DRC table, Bharata B Rao, 2014/09/04
- [Qemu-devel] [RFC PATCH v0 04/15] ppc: Make creation of DRC entries in FDT endian safe,
Bharata B Rao <=
- [Qemu-devel] [RFC PATCH v0 05/15] ppc: Accommodate CPU DRC entries in DRC table, Bharata B Rao, 2014/09/04
- [Qemu-devel] [RFC PATCH v0 14/15] ppc: Add CPU hotplug support for sPAPR guests, Bharata B Rao, 2014/09/04
- [Qemu-devel] [RFC PATCH v0 12/15] ppc: Support ibm, lrdr-capacity device tree property, Bharata B Rao, 2014/09/04
- [Qemu-devel] [RFC PATCH v0 10/15] ppc: Factor out CPU initialization code to a new routine, Bharata B Rao, 2014/09/04
- [Qemu-devel] [RFC PATCH v0 13/15] ppc: Make ibm, configure-connector endian-safe, Bharata B Rao, 2014/09/04
- [Qemu-devel] [RFC PATCH v0 11/15] ppc: Move RTAS indicator defines to a header file, Bharata B Rao, 2014/09/04