WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Boot parameter definition adjustments

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Boot parameter definition adjustments
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 28 Oct 2009 04:05:29 -0700
Delivery-date: Wed, 28 Oct 2009 04:05:39 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1256727317 0
# Node ID ae942a3117bb776a7822d1d0a5c55d6c8a3aa2a7
# Parent  5a224e101cb314592e1c63cb5287ad2ab970b7ab
Boot parameter definition adjustments

Consolidate the various attributes into macros, and tell the compiler
not to needlessly waste spec for aligning strings used at most once.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 xen/include/xen/init.h |   38 ++++++++++++++++++++------------------
 1 files changed, 20 insertions(+), 18 deletions(-)

diff -r 5a224e101cb3 -r ae942a3117bb xen/include/xen/init.h
--- a/xen/include/xen/init.h    Wed Oct 28 10:54:50 2009 +0000
+++ b/xen/include/xen/init.h    Wed Oct 28 10:55:17 2009 +0000
@@ -92,30 +92,32 @@ struct kernel_param {
 
 extern struct kernel_param __setup_start, __setup_end;
 
+#define __setup_str static __initdata __attribute__((__aligned__(1))) char
+#define __kparam static __attribute_used__ __initsetup struct kernel_param
+
 #define custom_param(_name, _var) \
-    static char __setup_str_##_var[] __initdata = _name; \
-    static struct kernel_param __setup_##_var __attribute_used__ \
-        __initsetup = { __setup_str_##_var, OPT_CUSTOM, &_var, 0 }
+    __setup_str __setup_str_##_var[] = _name; \
+    __kparam __setup_##_var = { __setup_str_##_var, OPT_CUSTOM, _var, 0 }
 #define boolean_param(_name, _var) \
-    static char __setup_str_##_var[] __initdata = _name; \
-    static struct kernel_param __setup_##_var __attribute_used__ \
-        __initsetup = { __setup_str_##_var, OPT_BOOL, &_var, sizeof(_var) }
+    __setup_str __setup_str_##_var[] = _name; \
+    __kparam __setup_##_var = \
+        { __setup_str_##_var, OPT_BOOL, &_var, sizeof(_var) }
 #define invbool_param(_name, _var) \
-    static char __setup_str_##_var[] __initdata = _name; \
-    static struct kernel_param __setup_##_var __attribute_used__ \
-        __initsetup = { __setup_str_##_var, OPT_INVBOOL, &_var, sizeof(_var) }
+    __setup_str __setup_str_##_var[] = _name; \
+    __kparam __setup_##_var = \
+        { __setup_str_##_var, OPT_INVBOOL, &_var, sizeof(_var) }
 #define integer_param(_name, _var) \
-    static char __setup_str_##_var[] __initdata = _name; \
-    static struct kernel_param __setup_##_var __attribute_used__ \
-        __initsetup = { __setup_str_##_var, OPT_UINT, &_var, sizeof(_var) }
+    __setup_str __setup_str_##_var[] = _name; \
+    __kparam __setup_##_var = \
+        { __setup_str_##_var, OPT_UINT, &_var, sizeof(_var) }
 #define size_param(_name, _var) \
-    static char __setup_str_##_var[] __initdata = _name; \
-    static struct kernel_param __setup_##_var __attribute_used__ \
-        __initsetup = { __setup_str_##_var, OPT_SIZE, &_var, sizeof(_var) }
+    __setup_str __setup_str_##_var[] = _name; \
+    __kparam __setup_##_var = \
+        { __setup_str_##_var, OPT_SIZE, &_var, sizeof(_var) }
 #define string_param(_name, _var) \
-    static char __setup_str_##_var[] __initdata = _name; \
-    static struct kernel_param __setup_##_var __attribute_used__ \
-        __initsetup = { __setup_str_##_var, OPT_STR, &_var, sizeof(_var) }
+    __setup_str __setup_str_##_var[] = _name; \
+    __kparam __setup_##_var = \
+        { __setup_str_##_var, OPT_STR, &_var, sizeof(_var) }
 
 /* Make sure obsolete cmdline params don't break the build. */
 #define __setup(_name, _fn) static void * __attribute_used__ _dummy_##_fn = _fn

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Boot parameter definition adjustments, Xen patchbot-unstable <=