aboutsummaryrefslogtreecommitdiffstats
path: root/arch/tile/mm/init.c
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/init.c
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/init.c')
-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 a2417a0a8222..ef29d6c5e10e 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)
733 for_each_zone(z) { 733 for_each_zone(z) {
734 unsigned long start, end; 734 unsigned long start, end;
735 int nid = z->zone_pgdat->node_id; 735 int nid = z->zone_pgdat->node_id;
736#ifdef CONFIG_HIGHMEM
736 int idx = zone_idx(z); 737 int idx = zone_idx(z);
738#endif
737 739
738 start = z->zone_start_pfn; 740 start = z->zone_start_pfn;
739 if (start == 0)
740 continue; /* bootmem */
741 end = start + z->spanned_pages; 741 end = start + z->spanned_pages;
742 if (idx == ZONE_NORMAL) { 742 start = max(start, node_free_pfn[nid]);
743 BUG_ON(start != node_start_pfn[nid]); 743 start = max(start, max_low_pfn);
744 start = node_free_pfn[nid]; 744
745 }
746#ifdef CONFIG_HIGHMEM 745#ifdef CONFIG_HIGHMEM
747 if (idx == ZONE_HIGHMEM) 746 if (idx == ZONE_HIGHMEM)
748 totalhigh_pages += z->spanned_pages; 747 totalhigh_pages += z->spanned_pages;