@@ -879,7 +879,7 @@ static int its_alloc_tables(const char *node_name, struct its_node *its)
if (alloc_pages > GITS_BASER_PAGES_MAX) {
alloc_pages = GITS_BASER_PAGES_MAX;
order = get_order(GITS_BASER_PAGES_MAX * psz);
- pr_warn("%s: Device Table too large, reduce its page order to %u (%u pages)\n",
+ pr_warn("%s: Table too large, reduce its page order to %u (%u pages)\n",
node_name, order, alloc_pages);
}
@@ -911,6 +911,13 @@ retry_baser:
break;
}
+ alloc_pages = (alloc_size / psz);
+ if (alloc_pages > GITS_BASER_PAGES_MAX) {
+ alloc_pages = GITS_BASER_PAGES_MAX;
+ pr_warn("%s: Table too large, reduce its page number to %u pages\n",
+ node_name, alloc_pages);
+ }
+
val |= alloc_pages - 1;
writeq_relaxed(val, its->base + GITS_BASER + i * 8);