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-devel

[Xen-devel] [PATCH 3 of 6] moduleparam: fix ia64 compile failure

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH 3 of 6] moduleparam: fix ia64 compile failure
From: Aron Griffis <aron@xxxxxx>
Date: Sat, 01 Mar 2008 12:26:04 -0500
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, Alex Williamson <alex.williamson@xxxxxx>, xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Sat, 01 Mar 2008 09:31:05 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1204392361@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
1 file changed, 11 insertions(+), 1 deletion(-)
include/linux/moduleparam.h |   12 +++++++++++-


# HG changeset patch
# User Aron Griffis <aron@xxxxxx>
# Date 1204392186 18000
# Node ID 48139104906664e9ee9c83a53a45a0c1c61a1200
# Parent  af1aa1f9d90899ef8026332d6c67175721666a1c
moduleparam: fix ia64 compile failure

Backport from git 91d35dd93e14c34539a8005183ea500f25caad02

Signed-off-by: Aron Griffis <aron@xxxxxx>

diff -r af1aa1f9d908 -r 481391049066 include/linux/moduleparam.h
--- a/include/linux/moduleparam.h       Sat Mar 01 12:23:06 2008 -0500
+++ b/include/linux/moduleparam.h       Sat Mar 01 12:23:06 2008 -0500
@@ -58,13 +58,23 @@ struct kparam_array
        void *elem;
 };
 
+/* On alpha, ia64 and ppc64 relocations to global data cannot go into
+   read-only sections (which is part of respective UNIX ABI on these
+   platforms). So 'const' makes no sense and even causes compile failures
+   with some compilers. */
+#if defined(CONFIG_ALPHA) || defined(CONFIG_IA64) || defined(CONFIG_PPC64)
+#define __moduleparam_const
+#else
+#define __moduleparam_const const
+#endif
+
 /* This is the fundamental function for registering boot/module
    parameters.  perm sets the visibility in driverfs: 000 means it's
    not there, read bits mean it's readable, write bits mean it's
    writable. */
 #define __module_param_call(prefix, name, set, get, arg, perm)         \
        static char __param_str_##name[] = prefix #name;                \
-       static struct kernel_param const __param_##name                 \
+       static struct kernel_param __moduleparam_const __param_##name   \
        __attribute_used__                                              \
     __attribute__ ((unused,__section__ ("__param"),aligned(sizeof(void *)))) \
        = { __param_str_##name, perm, set, get, arg }



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