All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <matthew@wil.cx>
To: "Luck, Tony" <tony.luck@intel.com>
Cc: Randy Dunlap <randy.dunlap@oracle.com>,
	Andi Kleen <ak@novell.com>,
	Arthur Jones <arthur.jones@qlogic.com>,
	Vasily Tarasov <vtaras@openvz.org>,
	linux-kernel@vger.kernel.org, Jan Kara <jack@ucw.cz>,
	linux-arch@vger.kernel.org
Subject: Re: build fix for x86_64...
Date: Fri, 20 Jul 2007 10:48:50 -0600	[thread overview]
Message-ID: <20070720164850.GE14791@parisc-linux.org> (raw)
In-Reply-To: <617E1C2C70743745A92448908E030B2A01FA46A9@scsmsx411.amr.corp.intel.com>

On Fri, Jul 20, 2007 at 09:20:15AM -0700, Luck, Tony wrote:
> Which is better.  But if we unconditionally set this CONFIG variable, then the
> code in fs/quota.c will have to read:
> 
> #if defined(CONFIG_COMPAT) && defined(CONFIG_COMPAT_FOR_U64_ALIGNMENT)
> 
> We can keep it simpler if the Kconfig file does the conditional for us:
> 
> config COMPAT_FOR_U64_ALIGNMENT
> 	def_bool y
> 	depends on COMPAT

Ah, but you can do better:

config COMPAT_FOR_U64_ALIGNMENT
	def_bool COMPAT

I hand-edited your patch:

diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 36c7b96..36c1582 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 14bf8ce..c77510b 100644
--- a/arch/x86_64/Kconfig
+++ b/arch/x86_64/Kconfig
@@ -753,6 +753,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.

-- 
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."

  reply	other threads:[~2007-07-20 16:48 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-19 22:24 build fix for x86_64 Arthur Jones
2007-07-19 23:09 ` Andi Kleen
2007-07-19 23:54   ` Luck, Tony
2007-07-19 23:54     ` Luck, Tony
2007-07-20  8:32     ` Andi Kleen
2007-07-20 15:55       ` Randy Dunlap
2007-07-20 16:20         ` Luck, Tony
2007-07-20 16:20           ` Luck, Tony
2007-07-20 16:48           ` Matthew Wilcox [this message]
2007-07-20 17:03           ` H. Peter Anvin
2007-07-20 17:25             ` Andi Kleen
2007-07-20 17:38               ` H. Peter Anvin
2007-07-20 17:40             ` Andreas Schwab
2007-07-20 17:45               ` H. Peter Anvin
2007-07-20 18:13                 ` Andi Kleen
2007-07-20 19:29                   ` H. Peter Anvin
2007-07-20 22:08                     ` Luck, Tony
2007-07-20 22:08                       ` Luck, Tony
2007-07-20 22:34                       ` H. Peter Anvin
2007-07-20 18:27                 ` Andreas Schwab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070720164850.GE14791@parisc-linux.org \
    --to=matthew@wil.cx \
    --cc=ak@novell.com \
    --cc=arthur.jones@qlogic.com \
    --cc=jack@ucw.cz \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=randy.dunlap@oracle.com \
    --cc=tony.luck@intel.com \
    --cc=vtaras@openvz.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.