]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
arch/tile: Add a warning if we try to allocate too much vmalloc memory.
authorChris Metcalf <cmetcalf@tilera.com>
Thu, 14 Oct 2010 18:47:35 +0000 (14:47 -0400)
committerChris Metcalf <cmetcalf@tilera.com>
Thu, 14 Oct 2010 18:47:35 +0000 (14:47 -0400)
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
arch/tile/kernel/setup.c

index e7d54c73d5c125e3ccc220b8552e4c012a8aeae3..c1a697e685465dc798dfe440b2002525f191d2c3 100644 (file)
@@ -1334,6 +1334,10 @@ static void __init pcpu_fc_populate_pte(unsigned long addr)
        pte_t *pte;
 
        BUG_ON(pgd_addr_invalid(addr));
+       if (addr < VMALLOC_START || addr >= VMALLOC_END)
+               panic("PCPU addr %#lx outside vmalloc range %#lx..%#lx;"
+                     " try increasing CONFIG_VMALLOC_RESERVE\n",
+                     addr, VMALLOC_START, VMALLOC_END);
 
        pgd = swapper_pg_dir + pgd_index(addr);
        pud = pud_offset(pgd, addr);