From 63ba49fd5fedc2b36eb69e46bedc644e1010ae09 Mon Sep 17 00:00:00 2001 From: "Jayachandran C." Date: Thu, 29 Jul 2010 13:52:46 +0000 Subject: [PATCH] Fix RQB_FFS for 64 bit, we need to use ffsl() for 64bit. Use 'ifdef __mips_n64' instead of 'if defined' to be consistant with other usage. --- sys/mips/include/runq.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/mips/include/runq.h b/sys/mips/include/runq.h index c19cbb98cd1..56d6e2f3505 100644 --- a/sys/mips/include/runq.h +++ b/sys/mips/include/runq.h @@ -30,7 +30,7 @@ #ifndef _MACHINE_RUNQ_H_ #define _MACHINE_RUNQ_H_ -#if defined(__mips_n64) +#ifdef __mips_n64 #define RQB_LEN (1) /* Number of priority status words. */ #define RQB_L2BPW (6) /* Log2(sizeof(rqb_word_t) * NBBY)). */ #else @@ -42,12 +42,16 @@ #define RQB_BIT(pri) (1ul << ((pri) & (RQB_BPW - 1))) #define RQB_WORD(pri) ((pri) >> RQB_L2BPW) +#ifdef __mips_n64 +#define RQB_FFS(word) (ffsl(word) - 1) +#else #define RQB_FFS(word) (ffs(word) - 1) +#endif /* * Type of run queue status word. */ -#if defined(__mips_n64) +#ifdef __mips_n64 typedef u_int64_t rqb_word_t; #else typedef u_int32_t rqb_word_t;