aboutsummaryrefslogtreecommitdiff
path: root/core/flash.c
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2016-10-25 15:54:58 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-10-25 16:43:39 +1100
commit8652ced003f7977e1126149b8011c184b88fe24e (patch)
tree5c73a04fb13b109d9f730507d86cb913ba90715d /core/flash.c
parent26895ba411d5d4d86cbb377862cd2e43fcc07cf8 (diff)
downloadskiboot-8652ced003f7977e1126149b8011c184b88fe24e.zip
skiboot-8652ced003f7977e1126149b8011c184b88fe24e.tar.gz
skiboot-8652ced003f7977e1126149b8011c184b88fe24e.tar.bz2
core/flash-subpartition: compute partition size from subpartition struct
From the subpartition structure, we have the ability to compute the full partition size. Do that. This lets us only read the amount of a subpartition that is valid and needed to be read, rather than having to read the entire thing. We continue the current behaviour of loading flash partitions though. Based-on-patch-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'core/flash.c')
-rw-r--r--core/flash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/flash.c b/core/flash.c
index 4b7f4b3..2299f45 100644
--- a/core/flash.c
+++ b/core/flash.c
@@ -459,7 +459,7 @@ static int flash_find_subpartition(struct blocklevel_device *bl, uint32_t subid,
goto end;
}
- rc = flash_subpart_info(header, partsize, subid, &offset, &size);
+ rc = flash_subpart_info(header, partsize, partsize, NULL, subid, &offset, &size);
if (rc)
goto end;