summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2010-09-02 19:35:22 -0700
committerH. Peter Anvin <hpa@zytor.com>2010-10-05 22:16:54 -0700
commit161b0275e2311b8bd9609d5f32e2b703cf5d70a8 (patch)
tree3fd31302464ad7a0582fd54433c997c4750b08da
parent3ee48b6af49cf534ca2f481ecc484b156a41451d (diff)
downloadblackbird-op-linux-161b0275e2311b8bd9609d5f32e2b703cf5d70a8.tar.gz
blackbird-op-linux-161b0275e2311b8bd9609d5f32e2b703cf5d70a8.zip
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 <jeremy.fitzhardinge@citrix.com> LKML-Reference: <4C805EEA.1080205@goop.org> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--arch/x86/include/asm/setup.h5
1 files changed, 5 insertions, 0 deletions
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);
OpenPOWER on IntegriCloud