From 93be99e7d181d4472e2cba4d7e26f72cfaee7c23 Mon Sep 17 00:00:00 2001 From: Ivan Kokshaysky Date: Sat, 10 Aug 2002 02:03:21 -0700 Subject: [PATCH] alpha: misc fixes [9/10] Set of small fixes: - pcibios_init() must be int; - fls() - ctlz on ev67, generic on others. This was required for something several kernel releases back, now it seems to be unused. Anyway, it shouldn't hurt, so included here. - missing #includes, missing #if RTC_IRQ in drivers/char/rtc.c; - define USER_HZ; From Jeff Wiedemeier: - rename alpha-specific config section 'General setup' to 'System setup' to avoid confusion with generic 'General setup'; - fix the 'bootpfile' build. --- include/asm-alpha/bitops.h | 14 ++++++++++++++ include/asm-alpha/param.h | 2 ++ include/asm-alpha/pgalloc.h | 1 + 3 files changed, 17 insertions(+) (limited to 'include') diff --git a/include/asm-alpha/bitops.h b/include/asm-alpha/bitops.h index d76bcde410da..1e1e49eccaa7 100644 --- a/include/asm-alpha/bitops.h +++ b/include/asm-alpha/bitops.h @@ -315,6 +315,20 @@ static inline int ffs(int word) return word ? result+1 : 0; } +/* + * fls: find last bit set. + */ +#if defined(__alpha_cix__) && defined(__alpha_fix__) +static inline int fls(int word) +{ + long result; + __asm__("ctlz %1,%0" : "=r"(result) : "r"(word & 0xffffffff)); + return 64 - result; +} +#else +#define fls generic_fls +#endif + /* Compute powers of two for the given integer. */ static inline int floor_log2(unsigned long word) { diff --git a/include/asm-alpha/param.h b/include/asm-alpha/param.h index af39a19f1c77..c9d5f9156489 100644 --- a/include/asm-alpha/param.h +++ b/include/asm-alpha/param.h @@ -15,6 +15,8 @@ # endif #endif +#define USER_HZ HZ + #define EXEC_PAGESIZE 8192 #ifndef NGROUPS diff --git a/include/asm-alpha/pgalloc.h b/include/asm-alpha/pgalloc.h index 254a1f5a166e..6feaa69c0893 100644 --- a/include/asm-alpha/pgalloc.h +++ b/include/asm-alpha/pgalloc.h @@ -2,6 +2,7 @@ #define _ALPHA_PGALLOC_H #include +#include /* * Allocate and free page tables. The xxx_kernel() versions are -- cgit v1.2.3