|
@@ -875,6 +875,7 @@ static int its_alloc_tables(const char *node_name, struct its_node *its)
|
|
|
}
|
|
|
|
|
|
alloc_size = (1 << order) * PAGE_SIZE;
|
|
|
+retry_alloc_baser:
|
|
|
alloc_pages = (alloc_size / psz);
|
|
|
if (alloc_pages > GITS_BASER_PAGES_MAX) {
|
|
|
alloc_pages = GITS_BASER_PAGES_MAX;
|
|
@@ -938,13 +939,16 @@ retry_baser:
|
|
|
* size and retry. If we reach 4K, then
|
|
|
* something is horribly wrong...
|
|
|
*/
|
|
|
+ free_pages((unsigned long)base, order);
|
|
|
+ its->tables[i] = NULL;
|
|
|
+
|
|
|
switch (psz) {
|
|
|
case SZ_16K:
|
|
|
psz = SZ_4K;
|
|
|
- goto retry_baser;
|
|
|
+ goto retry_alloc_baser;
|
|
|
case SZ_64K:
|
|
|
psz = SZ_16K;
|
|
|
- goto retry_baser;
|
|
|
+ goto retry_alloc_baser;
|
|
|
}
|
|
|
}
|
|
|
|