ia64/linux-2.6.18-xen.hg

changeset 461:bdbe4fc53488

moduleparam: fix ia64 compile failure

Backport from git 91d35dd93e14c34539a8005183ea500f25caad02

Signed-off-by: Aron Griffis <aron@hp.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Mar 03 11:01:28 2008 +0000 (2008-03-03)
parents 3225d01294ee
children 6aa0b10efed6
files include/linux/moduleparam.h
line diff
     1.1 --- a/include/linux/moduleparam.h	Mon Mar 03 11:01:11 2008 +0000
     1.2 +++ b/include/linux/moduleparam.h	Mon Mar 03 11:01:28 2008 +0000
     1.3 @@ -58,13 +58,23 @@ struct kparam_array
     1.4  	void *elem;
     1.5  };
     1.6  
     1.7 +/* On alpha, ia64 and ppc64 relocations to global data cannot go into
     1.8 +   read-only sections (which is part of respective UNIX ABI on these
     1.9 +   platforms). So 'const' makes no sense and even causes compile failures
    1.10 +   with some compilers. */
    1.11 +#if defined(CONFIG_ALPHA) || defined(CONFIG_IA64) || defined(CONFIG_PPC64)
    1.12 +#define __moduleparam_const
    1.13 +#else
    1.14 +#define __moduleparam_const const
    1.15 +#endif
    1.16 +
    1.17  /* This is the fundamental function for registering boot/module
    1.18     parameters.  perm sets the visibility in driverfs: 000 means it's
    1.19     not there, read bits mean it's readable, write bits mean it's
    1.20     writable. */
    1.21  #define __module_param_call(prefix, name, set, get, arg, perm)		\
    1.22  	static char __param_str_##name[] = prefix #name;		\
    1.23 -	static struct kernel_param const __param_##name			\
    1.24 +	static struct kernel_param __moduleparam_const __param_##name	\
    1.25  	__attribute_used__						\
    1.26      __attribute__ ((unused,__section__ ("__param"),aligned(sizeof(void *)))) \
    1.27  	= { __param_str_##name, perm, set, get, arg }