diff --git a/common_linux.h b/common_linux.h index 45a688d23..8d9019a0d 100644 --- a/common_linux.h +++ b/common_linux.h @@ -68,8 +68,12 @@ extern long int syscall (long int __sysno, ...); static inline int my_mbind(void *addr, unsigned long len, int mode, unsigned long *nodemask, unsigned long maxnode, unsigned flags) { -#if defined (LOONGSON3B) +#if defined (LOONGSON3B) +#if defined (__64BIT__) return syscall(SYS_mbind, addr, len, mode, nodemask, maxnode, flags); +#else + return 0; //NULL Implementation on Loongson 3B 32bit. +#endif #else //Fixed randomly SEGFAULT when nodemask==NULL with above Linux 2.6.34 unsigned long null_nodemask=0; diff --git a/common_mips64.h b/common_mips64.h index 560f2c372..85348377e 100644 --- a/common_mips64.h +++ b/common_mips64.h @@ -120,6 +120,7 @@ static inline unsigned int rpcc(void){ } #if defined(LOONGSON3A) || defined(LOONGSON3B) +#ifndef NO_AFFINITY #define WHEREAMI static inline int WhereAmI(void){ int ret=0; @@ -131,6 +132,7 @@ static inline int WhereAmI(void){ } #endif +#endif static inline int blas_quickdivide(blasint x, blasint y){ return x / y;