Commit 9a3f1f54 authored by Brian Gerst's avatar Brian Gerst Committed by Linus Torvalds

[PATCH] cpu_has_mmx

This patch takes the cpu_has_mmx macro introduced in the xor.h header
and puts it in the proper place.  It also converts the ov511 driver to
use the new macro.
parent 4c5378a9
......@@ -227,7 +227,11 @@ static struct ov51x_decomp_ops *ov518_mmx_decomp_ops;
static int i2c_detect_tries = 5;
/* MMX support is present in kernel and CPU. Checked upon decomp module load. */
static int ov51x_mmx_available;
#if defined(__i386__) || defined(__x86_64__)
#define ov51x_mmx_available (cpu_has_mmx)
#else
#define ov51x_mmx_available (0)
#endif
static __devinitdata struct usb_device_id device_table [] = {
{ USB_DEVICE(VEND_OMNIVISION, PROD_OV511) },
......@@ -6473,11 +6477,6 @@ usb_ov511_init(void)
if (usb_register(&ov511_driver) < 0)
return -1;
#if defined (__i386__)
if (test_bit(X86_FEATURE_MMX, boot_cpu_data.x86_capability))
ov51x_mmx_available = 1;
#endif
info(DRIVER_VERSION " : " DRIVER_DESC);
return 0;
......
......@@ -84,6 +84,7 @@ extern struct cpuinfo_x86 cpu_data[];
#define cpu_has_de (test_bit(X86_FEATURE_DE, boot_cpu_data.x86_capability))
#define cpu_has_vme (test_bit(X86_FEATURE_VME, boot_cpu_data.x86_capability))
#define cpu_has_fxsr (test_bit(X86_FEATURE_FXSR, boot_cpu_data.x86_capability))
#define cpu_has_mmx (test_bit(X86_FEATURE_MMX, boot_cpu_data.x86_capability))
#define cpu_has_xmm (test_bit(X86_FEATURE_XMM, boot_cpu_data.x86_capability))
#define cpu_has_fpu (test_bit(X86_FEATURE_FPU, boot_cpu_data.x86_capability))
#define cpu_has_apic (test_bit(X86_FEATURE_APIC, boot_cpu_data.x86_capability))
......
......@@ -839,8 +839,6 @@ static struct xor_block_template xor_block_pIII_sse = {
/* Also try the generic routines. */
#include <asm-generic/xor.h>
#define cpu_has_mmx (test_bit(X86_FEATURE_MMX, boot_cpu_data.x86_capability))
#undef XOR_TRY_TEMPLATES
#define XOR_TRY_TEMPLATES \
do { \
......
......@@ -91,6 +91,7 @@ extern struct cpuinfo_x86 cpu_data[];
#define cpu_has_de 1
#define cpu_has_vme 1
#define cpu_has_fxsr 1
#define cpu_has_mmx 1
#define cpu_has_xmm 1
#define cpu_has_apic 1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment