summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorIvan Kokshaysky <ink@jurassic.park.msu.ru>2002-08-10 02:03:21 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2002-08-10 02:03:21 -0700
commit93be99e7d181d4472e2cba4d7e26f72cfaee7c23 (patch)
tree04f8bfa0738f09487a43e2d8524273d3da254124 /include
parent74b4e814033ca2ccb2fac84b18dd89e3dac10a21 (diff)
[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.
Diffstat (limited to 'include')
-rw-r--r--include/asm-alpha/bitops.h14
-rw-r--r--include/asm-alpha/param.h2
-rw-r--r--include/asm-alpha/pgalloc.h1
3 files changed, 17 insertions, 0 deletions
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 <linux/config.h>
+#include <linux/mm.h>
/*
* Allocate and free page tables. The xxx_kernel() versions are