History

alpha: regularize the situation with asm/param.h

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.

Al Viro committed 1 year ago

Commit f65bbf01 parent 674e55e4 files · +8 −21Browse files

Showing the changes to include/uapi (1 of 4 files). Show all

Unified · Split

include/uapi/asm-generic/param.h+5−1
@@ -2,8 +2,12 @@ · 1 unmodified line
22 #ifndef _UAPI__ASM_GENERIC_PARAM_H
33 #define _UAPI__ASM_GENERIC_PARAM_H
44
5+#ifndef __USER_HZ
6+#define __USER_HZ 100
7+#endif
8+
59 #ifndef HZ
6−#define HZ 100
10+#define HZ __USER_HZ
711 #endif
812
913 #ifndef EXEC_PAGESIZE