X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=arch%2Farch.h;h=3ee5ac43e563eb0b5e3c72576e18d8729139ce3c;hb=41fa20ec4b70d727128b0aa72640e53817d12cda;hp=00163570f82c04f9de2825af424fae28b5d43a2d;hpb=69ebbd397e80b23ec4281c99e9f7242a089cc771;p=fio.git diff --git a/arch/arch.h b/arch/arch.h index 00163570..3ee5ac43 100644 --- a/arch/arch.h +++ b/arch/arch.h @@ -1,8 +1,14 @@ #ifndef ARCH_H #define ARCH_H +#ifdef __WORDSIZE +#define BITS_PER_LONG __WORDSIZE +#else +#define BITS_PER_LONG 32 +#endif + enum { - arch_x86_64, + arch_x86_64 = 1, arch_i386, arch_ppc, arch_ia64, @@ -10,13 +16,28 @@ enum { arch_alpha, arch_sparc, arch_sparc64, + arch_arm, + arch_sh, + arch_hppa, + arch_mips, + + arch_generic, + + arch_nr, +}; + +enum { + ARCH_FLAG_1 = 1 << 0, + ARCH_FLAG_2 = 1 << 1, + ARCH_FLAG_3 = 1 << 2, + ARCH_FLAG_4 = 1 << 3, }; #if defined(__i386__) #include "arch-x86.h" #elif defined(__x86_64__) #include "arch-x86_64.h" -#elif defined(__powerpc__) || defined(__powerpc64__) +#elif defined(__powerpc__) || defined(__powerpc64__) || defined(__ppc__) #include "arch-ppc.h" #elif defined(__ia64__) #include "arch-ia64.h" @@ -28,8 +49,17 @@ enum { #include "arch-sparc.h" #elif defined(__sparc64__) #include "arch-sparc64.h" +#elif defined(__arm__) +#include "arch-arm.h" +#elif defined(__mips__) || defined(__mips64__) +#include "arch-mips.h" +#elif defined(__sh__) +#include "arch-sh.h" +#elif defined(__hppa__) +#include "arch-hppa.h" #else -#error "Unsupported arch" +#warning "Unknown architecture, attempting to use generic model." +#include "arch-generic.h" #endif #ifdef ARCH_HAVE_FFZ @@ -38,9 +68,11 @@ enum { #include "../lib/ffz.h" #endif -static inline void spin_lock_init(spinlock_t *lock) +#ifndef ARCH_HAVE_INIT +static inline int arch_init(char *envp[]) { - lock->lock = 0; + return 0; } +#endif #endif