List Info

Thread: RE: ia64: fix build failure on fs/quota.c




RE: ia64: fix build failure on fs/quota.c
user name
2007-07-26 16:24:19
This issue wandered off onto a long thread "build fix
for x86_64" which
died out without a final patch.  Here's the summary:

> +#if defined(CONFIG_X86_64) || (defined(CONFIG_IA64)
&& defined(CONFIG_COMPAT))

It was pointed out that x86-64 also has a CONFIG_COMPAT, so
the "right"
#ifdef mess would be:

#if defined(CONFIG_COMPAT) && (defined(CONFIG_IA64)
|| defined(CONFIG_X86_64))

But this was thought too ugly.  Andi Kleen proposed making a
new CONFIG
variable for this situation: CONFIG_COMPAT_FOR_U64_ALIGMNENT
which could
be set in ia64 and x86-64 Kconfig files with:

config COMPAT_FOR_U64_ALIGMNENT
	def_bool COMPAT

So the C-code would simply have:

#if defined(COMPAT_COMPAT_FOR_U64_ALIGMNENT)

(IIRC the syntax correctly).  Peter Anvin had some worries
about future
issues ... but I think he agreed that this was Ok.

Anyone still have any objections to this?

Signed-off-by: Tony Luck <tony.luckintel.com>

diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 36c7b96..21aa4fc 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
 -425,6
+425,9  config COMPAT
 	depends on IA32_SUPPORT
 	default y
 
+config COMPAT_FOR_U64_ALIGNMENT
+	def_bool COMPAT
+
 config IA64_MCA_RECOVERY
 	tristate "MCA recovery from errors other than
TLB."
 
diff --git a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig
index 45f82ae..ffa0364 100644
--- a/arch/x86_64/Kconfig
+++ b/arch/x86_64/Kconfig
 -765,6
+765,9  config COMPAT
 	depends on IA32_EMULATION
 	default y
 
+config COMPAT_FOR_U64_ALIGNMENT
+	def_bool COMPAT
+
 config SYSVIPC_COMPAT
 	bool
 	depends on COMPAT && SYSVIPC
diff --git a/fs/quota.c b/fs/quota.c
index e6577ac..99b24b5 100644
--- a/fs/quota.c
+++ b/fs/quota.c
 -387,7
+387,7  asmlinkage long sys_quotactl(unsigned int cmd, const
char __user *special, qid_t
 	return ret;
 }
 
-#if defined(CONFIG_X86_64) || defined(CONFIG_IA64)
+#if defined(CONFIG_COMPAT_FOR_U64_ALIGNMENT)
 /*
  * This code works only for 32 bit quota tools over 64 bit
OS (x86_64, ia64)
  * and is necessary due to alignment problems.
-
To unsubscribe from this list: send the line
"unsubscribe linux-ia64" in
the body of a message to majordomovger.kernel.org
More majordomo info at  http://vge
r.kernel.org/majordomo-info.html

RE: ia64: fix build failure on fs/quota.c
country flaguser name
United States
2007-07-26 16:58:45
On Thu, 2007-07-26 at 14:24 -0700, Luck, Tony wrote:
> This issue wandered off onto a long thread "build
fix for x86_64" which
> died out without a final patch.  Here's the summary:
> 

Ahh, thanks, I had not seen that thread.


> > +#if defined(CONFIG_X86_64) ||
(defined(CONFIG_IA64) && defined(CONFIG_COMPAT))
> 
> It was pointed out that x86-64 also has a
CONFIG_COMPAT, so the "right"
> #ifdef mess would be:
> 
> #if defined(CONFIG_COMPAT) &&
(defined(CONFIG_IA64) || defined(CONFIG_X86_64))
> 
> But this was thought too ugly.  Andi Kleen proposed
making a new CONFIG
> variable for this situation:
CONFIG_COMPAT_FOR_U64_ALIGMNENT which could
> be set in ia64 and x86-64 Kconfig files with:
> 
> config COMPAT_FOR_U64_ALIGMNENT
> 	def_bool COMPAT
> 
> So the C-code would simply have:
> 
> #if defined(COMPAT_COMPAT_FOR_U64_ALIGMNENT)
> 
> (IIRC the syntax correctly).  Peter Anvin had some
worries about future
> issues ... but I think he agreed that this was Ok.
> 
> Anyone still have any objections to this?

No objections here.  I just tried this patch and it does fix
my ia64
build issue.  I agree it is a bit cleaner than the long
#ifdef.

thanks,

- Doug


-
To unsubscribe from this list: send the line
"unsubscribe linux-ia64" in
the body of a message to majordomovger.kernel.org
More majordomo info at  http://vge
r.kernel.org/majordomo-info.html

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )