#ifdef __x86_64__'s added where needed
Subsystems (11)
PATCH 5/11 #ifdef __x86_64__'s added where needed
Hi!
This patch adds __x86_64__ #ifdefs where necessary so that the drivers do compile on this architecture and don't complain of unknown architecture.
drivers/atm/eni.c +1 -1
@@ -32,7 +32,7 @@#include "suni.h" #include "eni.h" -#ifndef __i386__ +#if !defined(__i386__) && !defined(__x86_64__)#ifndef ioremap_nocache#define ioremap_nocache (X ,Y ) ioremap(X,Y)#endif
drivers/atm/zatm.c +6 -0
@@ -52,6 +52,12 @@ #define DPRINTK(format,args...)#endif +#ifndef __i386__ +#ifdef CONFIG_ATM_ZATM_EXACT_TS +#warning Precise timestamping only available on i386 platform +#undef CONFIG_ATM_ZATM_EXACT_TS +#endif +#endif #ifndef CONFIG_ATM_ZATM_DEBUG
drivers/char/agp/agpgart_be.c +1 -1
@@ -65,7 +65,7 @@static inline void flush_cache (void ) { -#if defined(__i386__) +#if defined(__i386__) || defined(__x86_64__) asmvolatile ("wbinvd" :::"memory" );#elif defined(__alpha__) || defined(__ia64__) || defined(__sparc__)/* ??? I wonder if we'll really need to flush caches, or if the
drivers/char/ftape/lowlevel/ftape-calibr.c +9 -9
@@ -31,7 +31,7 @@#include <asm/io.h> #if defined(__alpha__)# include <asm/hwrpb.h> -#elif defined(__i386__) +#elif defined(__i386__) || defined(__x86_64__)# include <linux/timex.h> #endif #include <linux/ftape.h>
@@ -41,7 +41,7 @@#undef DEBUG -#if !defined(__alpha__) && !defined(__i386__) +#if !defined(__alpha__) && !defined(__i386__) && !defined(__x86_64__)# error Ftape is not implemented for this architecture!#endif
@@ -70,7 +70,7 @@ asmvolatile ("rpcc %0" :"=r" (r));return r; -#elif defined(__i386__) +#elif defined(__i386__) || defined(__x86_64__)unsigned long flags;__u16 lo;__u16 hi;
@@ -90,7 +90,7 @@ {#if defined(__alpha__)return ftape_timestamp (); -#elif defined(__i386__) +#elif defined(__i386__) || defined(__x86_64__)unsigned int count;unsigned long flags;
@@ -108,7 +108,7 @@ {#if defined(__alpha__)return (t1 <= t0) ? t1 + (1UL <<32 ) - t0 : t1 - t0; -#elif defined(__i386__) +#elif defined(__i386__) || defined(__x86_64__)/* * This is tricky: to work for both short and full ftape_timestamps * we'll have to discriminate between these.
@@ -124,7 +124,7 @@ {#if defined(__alpha__)return (ps_per_cycle * count) /1000000UL ; -#elif defined(__i386__) +#elif defined(__i386__) || defined(__x86_64__)return (10000 * count) / ((CLOCK_TICK_RATE +50 ) /100 );#endif }
@@ -164,7 +164,7 @@static void init_clock (void ) { -#if defined(__i386__) +#if defined(__i386__) || defined(__x86_64__)unsigned int t;int i;TRACE_FUN (ft_t_any);
@@ -214,7 +214,7 @@unsigned int tc =0 ;unsigned int count;unsigned int time; -#if defined(__i386__) +#if defined(__i386__) || defined(__x86_64__)unsigned int old_tc =0 ;unsigned int old_count =1 ;unsigned int old_time =1 ;
@@ -265,7 +265,7 @@if (time >=100 *1000 ) {break ; } -#elif defined(__i386__) +#elif defined(__i386__) || defined(__x86_64__)/* * increase the count until the resulting time nears 2/HZ, * then the tc will drop sharply because we lose LATCH counts.
drivers/char/nvram.c +1 -1
@@ -43,7 +43,7 @@/* select machine configuration */ #if defined(CONFIG_ATARI )#define MACH ATARI -#elif defined(__i386__) || defined(__arm__)/* and others?? */ +#elif defined(__i386__) || defined(__x86_64__) || defined(__arm__)/* and others?? */ #define MACH PC#else #error Cannot build nvram driver for this machine configuration.
drivers/char/tpqic02.c +2 -1
@@ -762,10 +762,11 @@static int get_status (volatile struct tpstatus *stp) {int stat =rdstatus ((char *) stp,TPSTATSIZE ,QCMD_RD_STAT ); -#ifdef __i386__ +#if defined(__i386__) || defined (__x86_64__)byte_swap_w (&(stp->dec));byte_swap_w (&(stp->urc));#else +#warning Undefined architecture/* should probably swap status bytes #definition */ #endif return stat;
drivers/mtd/devices/docprobe.c +1 -1
@@ -70,7 +70,7 @@static unsigned long __initdata doc_locations[] = { -#if defined (__alpha__) || defined(__i386__) +#if defined (__alpha__) || defined(__i386__) || defined(__x86_64__) #ifdef CONFIG_MTD_DOCPROBE_HIGH 0xfffc8000, 0xfffca000, 0xfffcc000, 0xfffce000, 0xfffd0000, 0xfffd2000, 0xfffd4000, 0xfffd6000,
drivers/net/fealnx.c +1 -1
@@ -892,7 +892,7 @@// np->bcrvalue=0x04 | 0x0x38; /* big-endian, 256 burst length */ np->bcrvalue =0x04 |0x10 ;/* big-endian, tx 8 burst length */ np->crvalue =0xe00 ;/* rx 128 burst length */ -#elif defined(__alpha__) +#elif defined(__alpha__) || defined(__x86_64__)// 89/9/1 modify, // np->bcrvalue=0x38; /* little-endian, 256 burst length */ np->bcrvalue =0x10 ;/* little-endian, 8 burst length */
drivers/net/pcmcia/xircom_tulip_cb.c +1 -1
@@ -67,7 +67,7 @@ToDo: Non-Intel setting could be better. */ -#if defined(__alpha__) +#if defined(__alpha__) || defined(__ia64__) || defined(__x86_64__)static int csr0 =0x01A00000 |0xE000 ;#elif defined(__powerpc__)static int csr0 =0x01B00000 |0x8000 ;
drivers/net/tulip/tulip_core.c +1 -1
@@ -77,7 +77,7 @@ToDo: Non-Intel setting could be better. */ -#if defined(__alpha__) || defined(__ia64__) +#if defined(__alpha__) || defined(__ia64__) || defined(__x86_64__)static int csr0 =0x01A00000 |0xE000 ;#elif defined(__i386__) || defined(__powerpc__)static int csr0 =0x01A00000 |0x8000 ;
drivers/net/winbond-840.c +1 -1
@@ -952,7 +952,7 @@ } else { i |=0xE000 ; } -#elif defined(__powerpc__) || defined(__i386__) || defined(__alpha) || defined(__ia64__) +#elif defined(__powerpc__) || defined(__i386__) || defined(__alpha__) || defined(__ia64__) || defined(__x86_64__) i |=0xE000 ;#elif defined(__sparc__) i |=0x4800 ;
drivers/scsi/NCR53C9x.h +3 -3
@@ -140,7 +140,7 @@* Yet, they all live within the same IO space. */ -#ifndef __i386__ +#if !defined(__i386__) && !defined(__x86_64__)#ifndef MULTIPLE_PAD_SIZES
@@ -232,7 +232,7 @@#endif -#else /* !defined __i386__ */ +#else /* !defined(__i386__) && !defined(__x86_64__) */ #define esp_write (__reg, __val) outb((__val), (__reg))#define esp_read (__reg) inb((__reg))
@@ -267,7 +267,7 @@#define esp_fgrnd io_addr + 15/* rw Data base for fifo 0x3c */ }; -#endif /* !defined(__i386__) */ +#endif /* !defined(__i386__) && !defined(__x86_64__) */ /* Various revisions of the ESP board. */ enum esp_rev {
drivers/scsi/aic7xxx/aic7xxx_osm.h +1 -1
@@ -580,7 +580,7 @@/***************************** Low Level I/O **********************************/ -#if defined(__powerpc__) || defined(__i386__) || defined(__ia64__) +#if defined(__powerpc__) || defined(__i386__) || defined(__ia64__) || defined(__x86_64__)#define MMAPIO #endif
drivers/scsi/aic7xxx_old.c +1 -1
@@ -283,7 +283,7 @@# define FALSE 0#endif -#if defined(__powerpc__) || defined(__i386__) +#if defined(__powerpc__) || defined(__i386__) || defined(__x86_64__)# define MMAPIO #endif
drivers/scsi/seagate.c +4 -0
@@ -129,6 +129,10 @@#error Please use -DCONTROLLER=SEAGATE or -DCONTROLLER=FD to override controller type#endif +#ifndef __i386__ +#undef SEAGATE_USE_ASM +#endif +/* Thanks to Brian Antoine for the example code in his Messy-Loss ST-01 driver, and Mitsugu Suzuki for information on the ST-01
drivers/scsi/sym53c8xx_defs.h +1 -1
@@ -455,7 +455,7 @@* We want to be paranoid for ppc and ia64. :) */ -#if defined __i386__ +#if defined(__i386__) || defined(__x86_64__)#define MEMORY_BARRIER () do { ; } while(0)#elif defined __powerpc__#define MEMORY_BARRIER () __asm__ volatile("eieio; sync" : : : "memory")
drivers/video/cyber2000fb.c +1 -1
@@ -1285,7 +1285,7 @@ cfb->mclk_div = cyber2000_grphr(MCLK_DIV); }#endif -#ifdef __i386__ +#if defined(__i386__) || defined(__x86_64__)/* * x86 is simple, we just do regular outb's instead of * cyber2000_outb.
drivers/video/fbmem.c +1 -1
@@ -593,7 +593,7 @@pgprot_val (vma->vm_page_prot) |= _PAGE_NO_CACHE|_PAGE_GUARDED;#elif defined(__alpha__)/* Caching is off in the I/O space quadrant by design. */ -#elif defined(__i386__) +#elif defined(__i386__) || defined(__x86_64__)if (boot_cpu_data.x86 >3 )pgprot_val (vma->vm_page_prot) |= _PAGE_PCD;#elif defined(__mips__)
drivers/video/matrox/matroxfb_base.h +2 -2
@@ -102,7 +102,7 @@#endif /* MATROXFB_DEBUG */ -#ifndef __i386__ +#if !defined(__i386__) && !defined(__x86_64__)#ifndef ioremap_nocache#define ioremap_nocache (X ,Y ) ioremap(X,Y)#endif
@@ -117,7 +117,7 @@/* I benchmarked PII/350MHz with G200... MEMCPY, MEMCPYTOIO and WRITEL are on same speed ( <2% diff) */ /* so that means that G200 speed (or AGP speed?) is our limit... I do not have benchmark to test, how */ /* much of PCI bandwidth is used during transfers... */ -#if defined(__i386__) +#if defined(__i386__) || defined(__x86_64__)#define MEMCPYTOIO_MEMCPY #else #define MEMCPYTOIO_WRITEL
include/linux/brlock.h +1 -1
@@ -45,7 +45,7 @@#include <linux/cache.h> #include <linux/spinlock.h> -#if defined(__i386__) || defined(__ia64__) +#if defined(__i386__) || defined(__ia64__) || defined(__x86_64__)#define __BRLOCK_USE_ATOMICS#else #undef __BRLOCK_USE_ATOMICS
include/linux/mtd/doc2000.h +1 -1
@@ -58,7 +58,7 @@#endif -#if defined(__i386__) +#if defined(__i386__) || defined(__x86_64__)#define USE_MEMCPY #endif
include/linux/raid/md_compatible.h +3 -1
@@ -27,12 +27,14 @@/* 000 */ #define md__get_free_pages (x,y) __get_free_pages(x,y) -#ifdef __i386__ +#if defined(__i386__) || defined(__x86_64__)/* 001 */ static __inline__int md_cpu_has_mmx (void ) {return test_bit (X86_FEATURE_MMX , &boot_cpu_data.x86_capability); } +#else +#define md_cpu_has_mmx (x) (0)#endif /* 002 */
scripts/mkdep.c +1 -1
@@ -291,7 +291,7 @@* Thus, there is one memory access per sizeof(unsigned long) characters. */ -#if defined(__alpha__) || defined(__i386__) || defined(__ia64__) || defined(__MIPSEL__) \ +#if defined(__alpha__) || defined(__i386__) || defined(__ia64__) || defined(__x86_64__) || defined(__MIPSEL__) \ || defined(__arm__)#define LE_MACHINE #endif
Signature · 2 lines
Vojtech Pavlik SuSE Labs