1/* 2 * This file is subject to the terms and conditions of the GNU General Public 3 * License. See the file "COPYING" in the main directory of this archive 4 * for more details. 5 * 6 * Copyright 1994 - 2000 Ralf Baechle (ralf@gnu.org) 7 * Copyright 2000 Silicon Graphics, Inc. 8 */ 9#ifndef _ASM_PARAM_H 10#define _ASM_PARAM_H 11 12#ifndef HZ 13 14#ifdef __KERNEL__ 15 16/* Safeguard against user stupidity */ 17#ifdef _SYS_PARAM_H 18#error Do not include <asm/param.h> with __KERNEL__ defined! 19#endif 20 21#include <linux/config.h> 22 23#ifdef CONFIG_DECSTATION 24 /* 25 * log2(HZ), change this here if you want another HZ value. This is also 26 * used in dec_time_init. Minimum is 1, Maximum is 15. 27 */ 28# define LOG_2_HZ 7 29# define HZ (1 << LOG_2_HZ) 30 /* 31 * Ye olde division-by-multiplication trick. 32 * This works only if 100 / HZ <= 1 33 */ 34# define QUOTIENT ((1UL << (64 - LOG_2_HZ)) * 100) 35# define hz_to_std(a) \ 36 ({ unsigned long __res; \ 37 unsigned long __lo; \ 38 __asm__("dmultu\t%2,%3\n\t" \ 39 :"=h" (__res), "=l" (__lo) \ 40 :"r" (a), "r" (QUOTIENT)); \ 41 (__typeof__(a)) __res;}) 42 43#else /* Not a DECstation */ 44 45/* This is the internal value of HZ, that is the rate at which the jiffies 46 counter is increasing. This value is independent from the external value 47 and can be changed in order to suit the hardware and application 48 requirements. */ 49# define HZ 100 50# define hz_to_std(a) (a) 51 52#endif /* Not a DECstation */ 53 54#else /* defined(__KERNEL__) */ 55 56/* This is the external value of HZ as seen by user programs. Don't change 57 unless you know what you're doing - changing breaks binary compatibility. */ 58#define HZ 100 59 60#endif /* defined(__KERNEL__) */ 61#endif /* defined(HZ) */ 62 63#define EXEC_PAGESIZE 4096 64 65#ifndef NGROUPS 66#define NGROUPS 32 67#endif 68 69#ifndef NOGROUP 70#define NOGROUP (-1) 71#endif 72 73#define MAXHOSTNAMELEN 64 /* max length of hostname */ 74 75#ifdef __KERNEL__ 76# define CLOCKS_PER_SEC 100 /* frequency at which times() counts */ 77#endif 78 79#endif /* _ASM_PARAM_H */ 80