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] [linux-2.6.18-xen] moduleparam: fix ia64 compile failure

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] moduleparam: fix ia64 compile failure
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 03 Mar 2008 07:30:50 -0800
Delivery-date: Mon, 03 Mar 2008 07:33:24 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 1204542088 0
# Node ID bdbe4fc53488c7404bd35e88109425f8c35bbcfc
# Parent  3225d01294ee394347ea955abe0b2d0025780578
moduleparam: fix ia64 compile failure

Backport from git 91d35dd93e14c34539a8005183ea500f25caad02

Signed-off-by: Aron Griffis <aron@xxxxxx>
---
 include/linux/moduleparam.h |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletion(-)

diff -r 3225d01294ee -r bdbe4fc53488 include/linux/moduleparam.h
--- a/include/linux/moduleparam.h       Mon Mar 03 11:01:11 2008 +0000
+++ b/include/linux/moduleparam.h       Mon Mar 03 11:01:28 2008 +0000
@@ -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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] moduleparam: fix ia64 compile failure, Xen patchbot-linux-2.6.18-xen <=