public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ia64: fix build failure on fs/quota.c
@ 2007-07-19 17:15 Doug Chapman
  2007-07-26 17:48 ` Doug Chapman
  2007-07-26 21:24 ` Luck, Tony
  0 siblings, 2 replies; 4+ messages in thread
From: Doug Chapman @ 2007-07-19 17:15 UTC (permalink / raw)
  To: linux-kernel, linux-ia64, vtaras


Fix ia64 build failure on fs/qutoa.c.  A recent patch used the
type compat_u64 which on ia64 is only available if CONFIG_COMPAT
is defined.


From: Tony Luck <tony.luck@intel.com>
Signed-off-by: Doug Chapman <doug.chapman@hp.com>

--

--- 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_X86_64) || (defined(CONFIG_IA64) && defined(CONFIG_COMPAT))
 /*
  * This code works only for 32 bit quota tools over 64 bit OS (x86_64, ia64)
  * and is necessary due to alignment problems.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ia64: fix build failure on fs/quota.c
  2007-07-19 17:15 [PATCH] ia64: fix build failure on fs/quota.c Doug Chapman
@ 2007-07-26 17:48 ` Doug Chapman
  2007-07-26 21:24 ` Luck, Tony
  1 sibling, 0 replies; 4+ messages in thread
From: Doug Chapman @ 2007-07-26 17:48 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-ia64, vtaras

On Thu, 2007-07-19 at 13:15 -0400, Doug Chapman wrote:
> Fix ia64 build failure on fs/qutoa.c.  A recent patch used the
> type compat_u64 which on ia64 is only available if CONFIG_COMPAT
> is defined.
> 
> 
> From: Tony Luck <tony.luck@intel.com>
> Signed-off-by: Doug Chapman <doug.chapman@hp.com>
> 
> --
> 
> --- 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_X86_64) || (defined(CONFIG_IA64) && defined(CONFIG_COMPAT))
>  /*
>   * This code works only for 32 bit quota tools over 64 bit OS (x86_64, ia64)
>   * and is necessary due to alignment problems.
> 
> 

I see that this patch has not been pulled in yet.  I am wondering if I
confused things by sending it to both linux-kernel and linux-ia64 lists
and each expected the other to pull it in?  Sorry if that breaks the
process, I am somewhat new to submitting patches.

Can we see about getting this in?  It will break the build used by
fedora/RHEL for certain and I expect other distro's as well.

thanks,

- Doug



^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH] ia64: fix build failure on fs/quota.c
  2007-07-19 17:15 [PATCH] ia64: fix build failure on fs/quota.c Doug Chapman
  2007-07-26 17:48 ` Doug Chapman
@ 2007-07-26 21:24 ` Luck, Tony
  2007-07-26 21:58   ` Doug Chapman
  1 sibling, 1 reply; 4+ messages in thread
From: Luck, Tony @ 2007-07-26 21:24 UTC (permalink / raw)
  To: Doug Chapman, linux-kernel; +Cc: linux-ia64, vtaras, H. Peter Anvin, Andi Kleen

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.luck@intel.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.

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* RE: [PATCH] ia64: fix build failure on fs/quota.c
  2007-07-26 21:24 ` Luck, Tony
@ 2007-07-26 21:58   ` Doug Chapman
  0 siblings, 0 replies; 4+ messages in thread
From: Doug Chapman @ 2007-07-26 21:58 UTC (permalink / raw)
  To: Luck, Tony; +Cc: linux-kernel, linux-ia64, vtaras, H. Peter Anvin, Andi Kleen

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



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-07-26 21:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-19 17:15 [PATCH] ia64: fix build failure on fs/quota.c Doug Chapman
2007-07-26 17:48 ` Doug Chapman
2007-07-26 21:24 ` Luck, Tony
2007-07-26 21:58   ` Doug Chapman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox