Commit 175967cf authored by Anton Blanchard's avatar Anton Blanchard

ppc64: firmware flash fix from Olof Johansson

parent 3ded9b7a
...@@ -216,7 +216,11 @@ rtas_flash_firmware(void) ...@@ -216,7 +216,11 @@ rtas_flash_firmware(void)
image_size += f->blocks[i].length; image_size += f->blocks[i].length;
} }
next = f->next; next = f->next;
f->next = (struct flash_block_list *)virt_to_absolute((unsigned long)f->next); /* Don't translate NULL pointer for last entry */
if(f->next)
f->next = (struct flash_block_list *)virt_to_absolute((unsigned long)f->next);
else
f->next = 0LL;
/* make num_blocks into the version/length field */ /* make num_blocks into the version/length field */
f->num_blocks = (FLASH_BLOCK_LIST_VERSION << 56) | ((f->num_blocks+1)*16); f->num_blocks = (FLASH_BLOCK_LIST_VERSION << 56) | ((f->num_blocks+1)*16);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment