From: tip-bot for Jeremy Fitzhardinge <jeremy@goop.org>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, jeremy@goop.org, hpa@zytor.com,
mingo@redhat.com, tglx@linutronix.de,
jeremy.fitzhardinge@citrix.com
Subject: [tip:x86/mm] x86, mm: Add RESERVE_BRK_ARRAY() helper
Date: Wed, 6 Oct 2010 06:04:48 GMT [thread overview]
Message-ID: <tip-161b0275e2311b8bd9609d5f32e2b703cf5d70a8@git.kernel.org> (raw)
In-Reply-To: <4C805EEA.1080205@goop.org>
Commit-ID: 161b0275e2311b8bd9609d5f32e2b703cf5d70a8
Gitweb: http://git.kernel.org/tip/161b0275e2311b8bd9609d5f32e2b703cf5d70a8
Author: Jeremy Fitzhardinge <jeremy@goop.org>
AuthorDate: Thu, 2 Sep 2010 19:35:22 -0700
Committer: H. Peter Anvin <hpa@zytor.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@citrix.com>
LKML-Reference: <4C805EEA.1080205@goop.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.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);
prev parent reply other threads:[~2010-10-06 6:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-03 2:35 [PATCH] x86: add " Jeremy Fitzhardinge
2010-10-06 6:04 ` tip-bot for Jeremy Fitzhardinge [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-161b0275e2311b8bd9609d5f32e2b703cf5d70a8@git.kernel.org \
--to=jeremy@goop.org \
--cc=hpa@zytor.com \
--cc=jeremy.fitzhardinge@citrix.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome