Skip to content

Commit

Permalink
hdat: fix parsing of P8 hdat
Browse files Browse the repository at this point in the history
Also fixes hdat_to_dt test cases.

Fixes: ad48408
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
  • Loading branch information
stewartsmith committed Sep 18, 2017
1 parent 398a981 commit 6f3c619
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions hdata/iohub.c
Expand Up @@ -798,8 +798,6 @@ static void io_parse_slots(const void *sp_iohubs, int hub_id)
const struct slot_map_entry *entry;
unsigned int i, count;

dt_slots = get_slot_node();

ioslot_arr = HDIF_child_arr(sp_iohubs, CECHUB_CHILD_IOSLOTS);
if (!ioslot_arr)
return;
Expand All @@ -808,6 +806,8 @@ static void io_parse_slots(const void *sp_iohubs, int hub_id)
if (!count)
return;

dt_slots = get_slot_node();

prlog(PR_DEBUG, "CEC: Found slot map for IOHUB %d\n", hub_id);
if (count > 1)
prerror("CEC: Multiple IOSLOTs found for IO HUB %d\n", hub_id);
Expand Down Expand Up @@ -846,9 +846,6 @@ static void io_parse_fru(const void *sp_iohubs)
unsigned int size, hub_id;
uint32_t chip_id;

if(i > 0)
break;

hub = HDIF_get_iarray_item(sp_iohubs, CECHUB_FRU_IO_HUBS,
i, &size);
if (!hub || size < CECHUB_IOHUB_MIN_SIZE) {
Expand Down
2 changes: 1 addition & 1 deletion hdata/test/stubs.c
Expand Up @@ -97,7 +97,6 @@ STUB(op_display);
STUB(fsp_preload_lid);
STUB(fsp_wait_lid_loaded);
STUB(fsp_adjust_lid_side);
STUB(backtrace);

/* Add HW specific stubs here */
static bool true_stub(void) { return true; }
Expand All @@ -117,4 +116,5 @@ NOOP_STUB(mem_reserve_fw);
NOOP_STUB(mem_reserve_hwbuf);
NOOP_STUB(add_chip_dev_associativity);
NOOP_STUB(enable_mambo_console);
NOOP_STUB(backtrace);

0 comments on commit 6f3c619

Please sign in to comment.