mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00

The only reason why alpha can't do what sparc et.al. are doing is that include/asm-generic/param.h relies upon the value of HZ set for userland header in uapi/asm/param.h being 100. We need that value to define USER_HZ and we need that definition to outlive the redefinition of HZ kernel-side. And alpha needs it to be 1024, not 100 like everybody else. So let's add __USER_HZ to uapi/asm-generic/param.h, defaulting to 100 and used to define HZ. That way include/asm-generic/param.h can use that thing instead of open-coding it - it won't be affected by undefining and redefining HZ. That done, alpha asm/param.h can be removed and uapi/asm/param.h switched to defining __USER_HZ and EXEC_PAGESIZE and then including <asm-generic/param.h> - asm/param.h will resolve to uapi/asm/param.h, which pulls <asm-generic/param.h>, which will do the right thing both in the kernel and userland contexts. Reviewed-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
11 lines
372 B
C
11 lines
372 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __ASM_GENERIC_PARAM_H
|
|
#define __ASM_GENERIC_PARAM_H
|
|
|
|
#include <uapi/asm-generic/param.h>
|
|
|
|
# undef HZ
|
|
# define HZ CONFIG_HZ /* Internal kernel timer frequency */
|
|
# define USER_HZ __USER_HZ /* some user interfaces are */
|
|
# define CLOCKS_PER_SEC (USER_HZ) /* in "ticks" like times() */
|
|
#endif /* __ASM_GENERIC_PARAM_H */
|