[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-161b0275e2311b8bd9609d5f32e2b703cf5d70a8@git.kernel.org>
Date: Wed, 6 Oct 2010 06:04:48 GMT
From: tip-bot for Jeremy Fitzhardinge <jeremy@...p.org>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, jeremy@...p.org, hpa@...or.com,
mingo@...hat.com, tglx@...utronix.de,
jeremy.fitzhardinge@...rix.com
Subject: [tip:x86/mm] x86, mm: Add RESERVE_BRK_ARRAY() helper
Commit-ID: 161b0275e2311b8bd9609d5f32e2b703cf5d70a8
Gitweb: http://git.kernel.org/tip/161b0275e2311b8bd9609d5f32e2b703cf5d70a8
Author: Jeremy Fitzhardinge <jeremy@...p.org>
AuthorDate: Thu, 2 Sep 2010 19:35:22 -0700
Committer: H. Peter Anvin <hpa@...or.com>
CommitDate: Tue, 5 Oct 2010 22:16:54 -0700
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@...rix.com>
LKML-Reference: <4C805EEA.1080205@...p.org>
Signed-off-by: H. Peter Anvin <hpa@...or.com>
---
arch/x86/include/asm/setup.h | 5 +++++
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..d6763b1 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);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists