linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dave Hansen <haveblue@us.ibm.com>
To: linux-mm@kvack.org
Cc: linux-ia64@vger.kernel.org, rdunlap@xenotime.net,
	lethal@linux-sh.org, Dave Hansen <haveblue@us.ibm.com>
Subject: [RFC][PATCH 01/10] put alignment macros in align.h
Date: Tue, 29 Aug 2006 13:19:34 -0700	[thread overview]
Message-ID: <20060829201934.A5363374@localhost.localdomain> (raw)
In-Reply-To: <20060829201934.47E63D1F@localhost.localdomain>

There are several definitions of alignment macros.  We'll take this
one out of kernel.h and put it in align.h for now.  We can't just
include kernel.h because it has many other definitions, and we'll
get circular dependencies.

Signed-off-by: Dave Hansen <haveblue@us.ibm.com>
---

 threadalloc-dave/include/linux/kernel.h |    2 +-
 threadalloc-dave/include/linux/align.h  |   17 +++++++++++++++++
 2 files changed, 18 insertions(+), 1 deletion(-)

diff -puN include/linux/kernel.h~align-h include/linux/kernel.h
--- threadalloc/include/linux/kernel.h~align-h	2006-08-29 13:14:49.000000000 -0700
+++ threadalloc-dave/include/linux/kernel.h	2006-08-29 13:14:50.000000000 -0700
@@ -13,6 +13,7 @@
 #include <linux/types.h>
 #include <linux/compiler.h>
 #include <linux/bitops.h>
+#include <linux/align.h>
 #include <asm/byteorder.h>
 #include <asm/bug.h>
 
@@ -31,7 +32,6 @@ extern const char linux_banner[];
 #define STACK_MAGIC	0xdeadbeef
 
 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
-#define ALIGN(x,a) (((x)+(a)-1)&~((a)-1))
 #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f))
 #define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y))
 
diff -puN /dev/null include/linux/align.h
--- /dev/null	2005-03-30 22:36:15.000000000 -0800
+++ threadalloc-dave/include/linux/align.h	2006-08-29 13:14:50.000000000 -0700
@@ -0,0 +1,17 @@
+#ifndef _LINUX_ALIGN_H
+#define _LINUX_ALIGN_H
+
+/*
+ * This file should only contain macros which have no outside
+ * dependencies, and can be used safely from any other header.
+ */
+
+/*
+ * ALIGN is special.  There's a linkage.h as well that
+ * has a quite different meaning.
+ */
+#ifndef __ASSEMBLY__
+#define ALIGN(x,a) (((x)+(a)-1)&~((a)-1))
+#endif
+
+#endif /* _LINUX_ALIGN_H */
_

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2006-08-29 20:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-29 20:19 [RFC][PATCH 00/10] generic PAGE_SIZE infrastructure (v3) Dave Hansen
2006-08-29 20:19 ` Dave Hansen [this message]
2006-08-29 20:19 ` [RFC][PATCH 02/10] conditionally define generic get_order() (ARCH_HAS_GET_ORDER) Dave Hansen
2006-08-30 10:20   ` Paul Mundt
2006-08-29 20:19 ` [RFC][PATCH 03/10] actual generic PAGE_SIZE infrastructure Dave Hansen
2006-08-29 20:19 ` [RFC][PATCH 04/10] replace _ALIGN() Dave Hansen
2006-08-29 20:19 ` [RFC][PATCH 05/10] ia64 generic PAGE_SIZE Dave Hansen
2006-08-29 20:19 ` [RFC][PATCH 06/10] sparc64 " Dave Hansen
2006-08-29 21:33   ` Dave Hansen
2006-08-29 20:19 ` [RFC][PATCH 07/10] mips " Dave Hansen
2006-08-29 20:19 ` [RFC][PATCH 09/10] powerpc " Dave Hansen
2006-08-29 20:19 ` [RFC][PATCH 08/10] parisc " Dave Hansen
2006-08-29 20:19 ` [RFC][PATCH 10/10] convert the "easy" architectures to " Dave Hansen
2006-08-30 10:05   ` Paul Mundt
2006-08-30 14:56     ` Dave Hansen

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=20060829201934.A5363374@localhost.localdomain \
    --to=haveblue@us.ibm.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=rdunlap@xenotime.net \
    /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