Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

UAPI: Rearrange definition of HZ in asm-generic/param.h

Rearrange the definition of HZ in asm-generic/param.h so that the user-specific
is declared before the kernel-specific one. We then explicitly #undef the
userspace HZ value and replace it with the kernel HZ value.

This allows the userspace params to be excised into a separate header as part
of the UAPI header split.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>

+7 -6
+7 -6
include/asm-generic/param.h
··· 1 1 #ifndef __ASM_GENERIC_PARAM_H 2 2 #define __ASM_GENERIC_PARAM_H 3 3 4 - #ifdef __KERNEL__ 5 - # define HZ CONFIG_HZ /* Internal kernel timer frequency */ 6 - # define USER_HZ 100 /* some user interfaces are */ 7 - # define CLOCKS_PER_SEC (USER_HZ) /* in "ticks" like times() */ 8 - #endif 9 - 10 4 #ifndef HZ 11 5 #define HZ 100 12 6 #endif ··· 14 20 #endif 15 21 16 22 #define MAXHOSTNAMELEN 64 /* max length of hostname */ 23 + 24 + #ifdef __KERNEL__ 25 + # undef HZ 26 + # define HZ CONFIG_HZ /* Internal kernel timer frequency */ 27 + # define USER_HZ 100 /* some user interfaces are */ 28 + # define CLOCKS_PER_SEC (USER_HZ) /* in "ticks" like times() */ 29 + #endif 17 30 18 31 #endif /* __ASM_GENERIC_PARAM_H */