summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHarald Koerfgen <hkoerfg@web.de>1999-07-01 20:01:45 +0000
committerHarald Koerfgen <hkoerfg@web.de>1999-07-01 20:01:45 +0000
commit70144bd759c9dfed330bb20d2a5341f7fe0fb036 (patch)
treeded5e44d81a4813738f84a38248a1d3efb9743ff /include
parentf7daca613c975ee4e698ddbb113ee698a3b28829 (diff)
Fix for HZ != 100 on DECstations
Diffstat (limited to 'include')
-rw-r--r--include/asm-alpha/param.h1
-rw-r--r--include/asm-arm/arch-ebsa110/param.h1
-rw-r--r--include/asm-arm/arch-ebsa285/param.h1
-rw-r--r--include/asm-arm/arch-nexuspci/param.h1
-rw-r--r--include/asm-arm/arch-rpc/param.h1
-rw-r--r--include/asm-arm/proc-armo/param.h1
-rw-r--r--include/asm-i386/param.h1
-rw-r--r--include/asm-m68k/param.h1
-rw-r--r--include/asm-mips/param.h30
-rw-r--r--include/asm-ppc/param.h1
-rw-r--r--include/asm-sparc/param.h1
-rw-r--r--include/asm-sparc64/param.h1
12 files changed, 40 insertions, 1 deletions
diff --git a/include/asm-alpha/param.h b/include/asm-alpha/param.h
index 07382f5f1..3b586974f 100644
--- a/include/asm-alpha/param.h
+++ b/include/asm-alpha/param.h
@@ -3,6 +3,7 @@
#ifndef HZ
# define HZ 1024
+# define HZ_TO_STD(a) (a)
#endif
#define EXEC_PAGESIZE 8192
diff --git a/include/asm-arm/arch-ebsa110/param.h b/include/asm-arm/arch-ebsa110/param.h
index 865d8cc7a..46cff02d8 100644
--- a/include/asm-arm/arch-ebsa110/param.h
+++ b/include/asm-arm/arch-ebsa110/param.h
@@ -6,3 +6,4 @@
*/
#define HZ 100
+#define HZ_TO_STD(a) (a)
diff --git a/include/asm-arm/arch-ebsa285/param.h b/include/asm-arm/arch-ebsa285/param.h
index 021282dd7..1efdf79a2 100644
--- a/include/asm-arm/arch-ebsa285/param.h
+++ b/include/asm-arm/arch-ebsa285/param.h
@@ -6,3 +6,4 @@
*/
#define HZ 100
+#define HZ_TO_STD(a) (a)
diff --git a/include/asm-arm/arch-nexuspci/param.h b/include/asm-arm/arch-nexuspci/param.h
index f663d01f2..cb3e53ea1 100644
--- a/include/asm-arm/arch-nexuspci/param.h
+++ b/include/asm-arm/arch-nexuspci/param.h
@@ -6,3 +6,4 @@
*/
#define HZ 100
+#define HZ_TO_STD(a) (a)
diff --git a/include/asm-arm/arch-rpc/param.h b/include/asm-arm/arch-rpc/param.h
index bd1279f60..c71625c93 100644
--- a/include/asm-arm/arch-rpc/param.h
+++ b/include/asm-arm/arch-rpc/param.h
@@ -6,3 +6,4 @@
*/
#define HZ 100
+#define HZ_TO_STD(a) (a)
diff --git a/include/asm-arm/proc-armo/param.h b/include/asm-arm/proc-armo/param.h
index 230511003..9ffb72f18 100644
--- a/include/asm-arm/proc-armo/param.h
+++ b/include/asm-arm/proc-armo/param.h
@@ -9,6 +9,7 @@
#ifndef HZ
#define HZ 100
+#define HZ_TO_STD(a) (a)
#endif
#define EXEC_PAGESIZE 32768
diff --git a/include/asm-i386/param.h b/include/asm-i386/param.h
index f821b8643..8477d5c7a 100644
--- a/include/asm-i386/param.h
+++ b/include/asm-i386/param.h
@@ -3,6 +3,7 @@
#ifndef HZ
#define HZ 100
+#define HZ_TO_STD(a) (a)
#endif
#define EXEC_PAGESIZE 4096
diff --git a/include/asm-m68k/param.h b/include/asm-m68k/param.h
index 475002cef..27c9834e9 100644
--- a/include/asm-m68k/param.h
+++ b/include/asm-m68k/param.h
@@ -3,6 +3,7 @@
#ifndef HZ
#define HZ 100
+#define HZ_TO_STD(a) (a)
#endif
#define EXEC_PAGESIZE 4096
diff --git a/include/asm-mips/param.h b/include/asm-mips/param.h
index 09000b46a..09380c849 100644
--- a/include/asm-mips/param.h
+++ b/include/asm-mips/param.h
@@ -2,7 +2,35 @@
#define __ASM_MIPS_PARAM_H
#ifndef HZ
-#define HZ 100
+
+#include <linux/config.h>
+
+#ifdef CONFIG_DECSTATION
+ /*
+ * log2(HZ), change this here if you want another
+ * HZ value. This is also used in dec_time_init.
+ * Minimum is 1, Maximum is 15.
+ */
+# define LOG_2_HZ 7
+# define HZ (1 << LOG_2_HZ)
+ /*
+ * Ye olde division-by-multiplication trick.
+ *
+ * This works only if 100 / HZ <= 1
+ */
+# define QUOTIENT ((1UL << (32 - LOG_2_HZ)) * 100)
+# define HZ_TO_STD(a) \
+ ({ int __res; \
+ __asm__( \
+ "multu\t%0,%2\n\t" \
+ "mfhi\t%0" \
+ : "=r" (__res): "0" (a), "r" (QUOTIENT)); \
+ __res;})
+#else
+# define HZ 100
+# define HZ_TO_STD(a) (a)
+#endif
+
#endif
#define EXEC_PAGESIZE 4096
diff --git a/include/asm-ppc/param.h b/include/asm-ppc/param.h
index 0cdcc660e..35ad254d6 100644
--- a/include/asm-ppc/param.h
+++ b/include/asm-ppc/param.h
@@ -3,6 +3,7 @@
#ifndef HZ
#define HZ 100
+#define HZ_TO_STD(a) (a)
#endif
#define EXEC_PAGESIZE 4096
diff --git a/include/asm-sparc/param.h b/include/asm-sparc/param.h
index 7e14a410e..639675feb 100644
--- a/include/asm-sparc/param.h
+++ b/include/asm-sparc/param.h
@@ -4,6 +4,7 @@
#ifndef HZ
#define HZ 100
+#define HZ_TO_STD(a) (a)
#endif
#define EXEC_PAGESIZE 8192 /* Thanks for sun4's we carry baggage... */
diff --git a/include/asm-sparc64/param.h b/include/asm-sparc64/param.h
index 6d8bd6269..457db4933 100644
--- a/include/asm-sparc64/param.h
+++ b/include/asm-sparc64/param.h
@@ -4,6 +4,7 @@
#ifndef HZ
#define HZ 100
+#define HZ_TO_STD(a) (a)
#endif
#define EXEC_PAGESIZE 8192 /* Thanks for sun4's we carry baggage... */