From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: mingo@elte.hu
Cc: linux-kernel@vger.kernel.org, linux-embedded@vger.kernel.org,
tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com,
michael@free-electrons.com, thomas.petazzoni@free-electrons.com
Subject: [PATCH] [x86] Make movsl_mask definition non-CPU specific
Date: Mon, 18 Aug 2008 12:33:20 +0200 [thread overview]
Message-ID: <1219055602-8046-1-git-send-email-thomas.petazzoni@free-electrons.com> (raw)
In-Reply-To: <>
In-Reply-To: <20080815143843.GA519@elte.hu>
movsl_mask is currently defined in arch/x86/kernel/cpu/intel.c, which
contains code specific to Intel CPUs. However, movsl_mask is used in
the non-CPU specific code in arch/x86/lib/usercopy_32.c, which breaks
the compilation when support for Intel CPUs is compiled out.
This patch solves this problem by moving movsl_mask's definition close
to its users in arch/x86/lib/usercopy_32.c.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
arch/x86/kernel/cpu/intel.c | 7 -------
arch/x86/lib/usercopy_32.c | 7 +++++++
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c
index b75f256..5c8959b 100644
--- a/arch/x86/kernel/cpu/intel.c
+++ b/arch/x86/kernel/cpu/intel.c
@@ -23,13 +23,6 @@
#include <mach_apic.h>
#endif
-#ifdef CONFIG_X86_INTEL_USERCOPY
-/*
- * Alignment at which movsl is preferred for bulk memory copies.
- */
-struct movsl_mask movsl_mask __read_mostly;
-#endif
-
static void __cpuinit early_init_intel(struct cpuinfo_x86 *c)
{
/* Netburst reports 64 bytes clflush size, but does IO in 128 bytes */
diff --git a/arch/x86/lib/usercopy_32.c b/arch/x86/lib/usercopy_32.c
index 24e6094..9e68075 100644
--- a/arch/x86/lib/usercopy_32.c
+++ b/arch/x86/lib/usercopy_32.c
@@ -14,6 +14,13 @@
#include <asm/uaccess.h>
#include <asm/mmx.h>
+#ifdef CONFIG_X86_INTEL_USERCOPY
+/*
+ * Alignment at which movsl is preferred for bulk memory copies.
+ */
+struct movsl_mask movsl_mask __read_mostly;
+#endif
+
static inline int __movsl_is_ok(unsigned long a1, unsigned long a2, unsigned long n)
{
#ifdef CONFIG_X86_INTEL_USERCOPY
--
1.5.4.3
next prev parent reply other threads:[~2008-08-18 10:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-05 9:45 [PATCH 1/1] [x86] Configuration options to compile out x86 CPU support code Thomas Petazzoni
2008-08-15 14:18 ` Ingo Molnar
2008-08-15 14:38 ` Ingo Molnar
2008-08-18 10:33 ` Thomas Petazzoni [this message]
2008-08-18 10:33 ` [PATCH] [x86] Move cmpxchg fallbacks to a generic place Thomas Petazzoni
2008-08-18 14:07 ` Ingo Molnar
2008-08-15 20:36 ` [PATCH 1/1] [x86] Configuration options to compile out x86 CPU support code H. Peter Anvin
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=1219055602-8046-1-git-send-email-thomas.petazzoni@free-electrons.com \
--to=thomas.petazzoni@free-electrons.com \
--cc=hpa@zytor.com \
--cc=linux-embedded@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael@free-electrons.com \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®