linux/include/vdso
Arnd Bergmann cffaefd15a vdso: Use CONFIG_PAGE_SHIFT in vdso/datapage.h
Both the vdso rework and the CONFIG_PAGE_SHIFT changes were merged during
the v6.9 merge window, so it is now possible to use CONFIG_PAGE_SHIFT
instead of including asm/page.h in the vdso.

This avoids the workaround for arm64 - commit 8b3843ae36 ("vdso/datapage:
Quick fix - use asm/page-def.h for ARM64") and addresses a build warning
for powerpc64:

In file included from <built-in>:4:
In file included from /home/arnd/arm-soc/arm-soc/lib/vdso/gettimeofday.c:5:
In file included from ../include/vdso/datapage.h:25:
arch/powerpc/include/asm/page.h:230:9: error: result of comparison of constant 13835058055282163712 with expression of type 'unsigned long' is always true [-Werror,-Wtautological-constant-out-of-range-compare]
  230 |         return __pa(kaddr) >> PAGE_SHIFT;
      |                ^~~~~~~~~~~
arch/powerpc/include/asm/page.h:217:37: note: expanded from macro '__pa'
  217 |         VIRTUAL_WARN_ON((unsigned long)(x) < PAGE_OFFSET);              \
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
arch/powerpc/include/asm/page.h:202:73: note: expanded from macro 'VIRTUAL_WARN_ON'
  202 | #define VIRTUAL_WARN_ON(x)      WARN_ON(IS_ENABLED(CONFIG_DEBUG_VIRTUAL) && (x))
      |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
arch/powerpc/include/asm/bug.h:88:25: note: expanded from macro 'WARN_ON'
   88 |         int __ret_warn_on = !!(x);                              \
      |                                ^

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Kees Cook <keescook@chromium.org>
Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
Link: https://lore.kernel.org/r/20240320180228.136371-1-arnd@kernel.org
2024-04-03 21:50:04 +02:00
..
bits.h vdso/bits.h: Add BIT_ULL() for the sake of consistency 2023-01-31 14:42:10 +01:00
clocksource.h vdso: Fix clocksource.h macro detection 2020-03-23 18:51:08 +01:00
const.h linux/const.h: Extract common header for vDSO 2020-03-21 15:23:53 +01:00
datapage.h vdso: Use CONFIG_PAGE_SHIFT in vdso/datapage.h 2024-04-03 21:50:04 +02:00
gettime.h arch: vdso: consolidate gettime prototypes 2023-11-23 11:32:32 +01:00
helpers.h vdso/helpers: Fix grammar in comments 2024-02-20 20:56:00 +01:00
jiffies.h linux/jiffies.h: Extract common header for vDSO 2020-03-21 15:23:58 +01:00
ktime.h linux/ktime.h: Extract common header for vDSO 2020-03-21 15:23:59 +01:00
limits.h linux/limits.h: Extract common header for vDSO 2020-03-21 15:23:54 +01:00
math64.h linux/math64.h: Extract common header for vDSO 2020-03-21 15:23:56 +01:00
processor.h common: Introduce processor.h 2020-03-21 15:23:59 +01:00
time32.h linux/time32.h: Extract common header for vDSO 2020-03-21 15:23:57 +01:00
time64.h time64.h: Consolidated PSEC_PER_SEC definition 2021-04-06 16:32:17 -07:00
time.h linux/time.h: Extract common header for vDSO 2020-03-21 15:23:57 +01:00
vsyscall.h timekeeping/vsyscall: Provide vdso_update_begin/end() 2020-08-06 10:57:30 +02:00