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

Configure Feed

Select the types of activity you want to include in your feed.

vdso: Fix powerpc build U64_MAX undeclared error

U64_MAX is not in include/vdso/limits.h, although that isn't noticed on x86
because x86 includes include/linux/limits.h indirectly. However powerpc is
more selective, resulting in the following build error:

In file included from <command-line>:
lib/vdso/gettimeofday.c: In function 'vdso_calc_ns':
lib/vdso/gettimeofday.c:11:33: error: 'U64_MAX' undeclared
11 | # define VDSO_DELTA_MASK(vd) U64_MAX
| ^~~~~~~

Use ULLONG_MAX instead which will work just as well and is in
include/vdso/limits.h.

Fixes: c8e3a8b6f2e6 ("vdso: Consolidate vdso_calc_delta()")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20240409062639.3393-1-adrian.hunter@intel.com
Closes: https://lore.kernel.org/all/20240409124905.6816db37@canb.auug.org.au/

authored by

Adrian Hunter and committed by
Thomas Gleixner
8ff1e6c5 98fe0fcb

+1 -1
+1 -1
lib/vdso/gettimeofday.c
··· 8 8 #ifndef vdso_calc_ns 9 9 10 10 #ifdef VDSO_DELTA_NOMASK 11 - # define VDSO_DELTA_MASK(vd) U64_MAX 11 + # define VDSO_DELTA_MASK(vd) ULLONG_MAX 12 12 #else 13 13 # define VDSO_DELTA_MASK(vd) (vd->mask) 14 14 #endif