From: Jeremy Fitzhardinge Date: Fri, 3 Sep 2010 02:35:22 +0000 (-0700) Subject: x86, mm: Add RESERVE_BRK_ARRAY() helper X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=161b0275e2311b8bd9609d5f32e2b703cf5d70a8;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git x86, mm: Add RESERVE_BRK_ARRAY() helper This is useful when converting static arrays into boot-time brk allocated objects. Signed-off-by: Jeremy Fitzhardinge LKML-Reference: <4C805EEA.1080205@goop.org> Signed-off-by: H. Peter Anvin --- diff --git a/arch/x86/include/asm/setup.h b/arch/x86/include/asm/setup.h index ef292c792d74..d6763b139a84 100644 --- a/arch/x86/include/asm/setup.h +++ b/arch/x86/include/asm/setup.h @@ -93,6 +93,11 @@ void *extend_brk(size_t size, size_t align); : : "i" (sz)); \ } +/* Helper for reserving space for arrays of things */ +#define RESERVE_BRK_ARRAY(type, name, entries) \ + type *name; \ + RESERVE_BRK(name, sizeof(type) * entries) + #ifdef __i386__ void __init i386_start_kernel(void);