aboutsummaryrefslogtreecommitdiff
path: root/arch/tile/mm
diff options
context:
space:
mode:
authorChris Metcalf <cmetcalf@tilera.com>2012-05-09 12:26:30 -0400
committerChris Metcalf <cmetcalf@tilera.com>2012-07-18 16:40:11 -0400
commiteef015c8aa74451f848307fe5f65485070533bbb (patch)
tree7fca680be2246812c14920c0fb44fbe717786dc6 /arch/tile/mm
parentbbaa22c3a0d0be4406d26e5a73d1e8e504787986 (diff)
arch/tile: enable ZONE_DMA for tilegx
This is required for PCI root complex legacy support and USB OHCI root complex support. With this change tilegx now supports allocating memory whose PA fits in 32 bits. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Diffstat (limited to 'arch/tile/mm')
-rw-r--r--arch/tile/mm/init.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/arch/tile/mm/init.c b/arch/tile/mm/init.c
index a2417a0a822..ef29d6c5e10 100644
--- a/arch/tile/mm/init.c
+++ b/arch/tile/mm/init.c
@@ -733,16 +733,15 @@ static void __init set_non_bootmem_pages_init(void)
for_each_zone(z) {
unsigned long start, end;
int nid = z->zone_pgdat->node_id;
+#ifdef CONFIG_HIGHMEM
int idx = zone_idx(z);
+#endif
start = z->zone_start_pfn;
- if (start == 0)
- continue; /* bootmem */
end = start + z->spanned_pages;
- if (idx == ZONE_NORMAL) {
- BUG_ON(start != node_start_pfn[nid]);
- start = node_free_pfn[nid];
- }
+ start = max(start, node_free_pfn[nid]);
+ start = max(start, max_low_pfn);
+
#ifdef CONFIG_HIGHMEM
if (idx == ZONE_HIGHMEM)
totalhigh_pages += z->spanned_pages;