Skip to content

Commit

Permalink
arch/tile: Add a warning if we try to allocate too much vmalloc memory.
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
  • Loading branch information
Chris Metcalf committed Oct 14, 2010
1 parent d6f0f22 commit 77d2330
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arch/tile/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 77d2330

Please sign in to comment.