summaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>2010-08-26 15:31:36 -0700
committerJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>2010-10-22 12:57:17 -0700
commit5e941c093989dfb6b67148d2410d79b1be8debfe (patch)
tree0212db2e9b446f91ba04707b8bc5e12a73d2b795 /arch/x86
parentcd07202cc8262e1669edff0d97715f3dd9260917 (diff)
downloadop-kernel-dev-5e941c093989dfb6b67148d2410d79b1be8debfe.zip
op-kernel-dev-5e941c093989dfb6b67148d2410d79b1be8debfe.tar.gz
x86: add RESERVE_BRK_ARRAY() helper
Useful when converting static arrays into boottime brk allocated objects. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Diffstat (limited to 'arch/x86')
-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 ef292c7..d6763b139a 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