@@ -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++) {
Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com> --- hw/ppc/spapr.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)