linux/arch/um/include/asm
Thomas Weißschuh 64f74d8f72 um: Use asm-generic/timex.h over the host architecture one
The removal of the architecture-specific asm/timex.h was meant to fall back to
asm-generic/timex.h. However on UML, the host architecture headers are earlier
on the include path and therefore asm/timex.h from the host architecture is
used.

On x86 that header in turn requires the generation of cpufeaturemasks.h, which
is not set up for UML and the build fails.

  In file included from ../arch/x86/include/asm/tsc.h:9,
                   from ../arch/x86/include/asm/timex.h:6,
                   from ../include/linux/timex.h:67,
                   from ../include/linux/time32.h:13,
                   from ../include/linux/time.h:60,
                   from ../include/linux/jiffies.h:10,
                   from ../include/linux/ktime.h:25,
                   from ../include/linux/timer.h:6,
                   from ../include/linux/uprobes.h:18,
                   from ../include/linux/mm_types.h:16,
                   from ../include/linux/mmzone.h:22,
                   from ../include/linux/gfp.h:7,
                   from ../include/linux/slab.h:17,
                   from ../include/linux/crypto.h:18,
                   from ../arch/um/kernel/asm-offsets.c:6:
  arch/x86/include/asm/tsc.h: In function ‘get_cycles’:
  arch/um/include/asm/cpufeature.h:52:39: error: implicit declaration of function ‘DISABLED_MASK_BIT_SET’ [-Wimplicit-function-declaration]
     52 |         (__builtin_constant_p(bit) && DISABLED_MASK_BIT_SET(bit) ? 0 : _static_cpu_has(bit))
        |                                       ^~~~~~~~~~~~~~~~~~~~~
  arch/x86/include/asm/tsc.h:79:14: note: in expansion of macro ‘cpu_feature_enabled’
     79 |         if (!cpu_feature_enabled(X86_FEATURE_TSC))
        |              ^~~~~~~~~~~~~~~~~~~
  arch/um/include/asm/cpufeature.h:115:17: error: implicit declaration of function ‘_static_cpu_has’ [-Wimplicit-function-declaration]
    115 |                 _static_cpu_has(bit)                            \
        |                 ^~~~~~~~~~~~~~~
  ...

The x86-specific timex.h also doesn't make sense on UML in general.

Reintroduce the UML-specific asm/timex.h and add a comment to document
its necessity.

  [ bp: Improve that comment to actually state why stuff is there. ]

Fixes: 3ed403bbc9 ("treewide: Remove CLOCK_TICK_RATE")
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: David Gow <david@davidgow.net>
Link: https://patch.msgid.link/20260819-uml-timex-fix-v1-1-f690b514fc9f@linutronix.de
2026-08-24 17:10:35 -07:00
..
fpu um: Include linux/types.h in asm/fpu/api.h 2025-05-07 16:45:40 +08:00
archrandom.h random: handle archrandom with multiple longs 2022-07-25 13:26:14 +02:00
asm-prototypes.h um: Add cmpxchg8b_emu and checksum functions to asm-prototypes.h 2025-05-05 10:22:07 +02:00
bpf_perf_event.h um: don't generate asm/bpf_perf_event.h 2024-07-10 14:23:30 +02:00
cache.h
cacheflush.h um: implement flush_cache_vmap/flush_cache_vunmap 2021-06-17 22:04:40 +02:00
common.lds.S UML: add support for KASAN under x86_64 2022-07-17 23:35:22 +02:00
cpufeature.h x86/cpu: Hide and rename static_cpu_has() 2026-07-06 21:34:26 -07:00
current.h um: Add initial SMP support 2025-10-27 16:41:15 +01:00
delay.h um: fix ndelay/udelay defines 2021-12-21 21:13:43 +01:00
dma.h
futex.h um: add a UML specific futex implementation 2021-06-17 22:01:45 +02:00
hardirq.h um: Add initial SMP support 2025-10-27 16:41:15 +01:00
io.h um: add PCI over virtio emulation driver 2021-06-17 21:45:43 +02:00
irq.h um: Track userspace children dying in SECCOMP mode 2025-06-02 15:17:19 +02:00
irqflags.h um: Turn signals_* into thread-local variables 2025-10-27 16:41:15 +01:00
kasan.h um: Disable KASAN_INLINE when STATIC_LINK is selected 2025-12-01 11:54:50 +01:00
Kbuild Locking updates for v7.2: 2026-06-15 14:21:14 +05:30
kvm_para.h
mmu_context.h um: Stop tracking virtual CPUs via mm_cpumask() 2025-09-10 14:23:53 +02:00
mmu.h um: Add initial SMP support 2025-10-27 16:41:15 +01:00
msi.h um: add PCI over virtio emulation driver 2021-06-17 21:45:43 +02:00
page.h treewide: provide a generic clear_user_page() variant 2026-01-20 19:24:39 -08:00
pci.h PCI/MSI: Get rid of PCI_MSI_IRQ_DOMAIN 2022-11-17 15:15:19 +01:00
pgalloc.h mm: pgtable: convert some architectures to use tlb_remove_ptdesc() 2025-04-01 15:17:13 -07:00
pgtable-2level.h um: remove custom definition of mk_pte() 2025-05-11 17:48:03 -07:00
pgtable-4level.h um: remove custom definition of mk_pte() 2025-05-11 17:48:03 -07:00
pgtable.h Mostly cleanups and small things, notably: 2026-04-20 16:36:46 -07:00
processor-generic.h um: Remove unused ipi_pipe field from cpuinfo_um 2025-09-10 14:23:58 +02:00
ptrace-generic.h um: Replace __ASSEMBLY__ with __ASSEMBLER__ in the usermode headers 2025-07-22 17:12:45 +02:00
sections.h
setup.h
smp.h um: Add initial SMP support 2025-10-27 16:41:15 +01:00
stacktrace.h
syscall-generic.h syscall.h: introduce syscall_set_nr() 2025-05-11 17:48:15 -07:00
thread_info.h um: Replace __ASSEMBLY__ with __ASSEMBLER__ in the usermode headers 2025-07-22 17:12:45 +02:00
timex.h um: Use asm-generic/timex.h over the host architecture one 2026-08-24 17:10:35 -07:00
tlb.h um: implement flush_cache_vmap/flush_cache_vunmap 2021-06-17 22:04:40 +02:00
tlbflush.h um: Abandon the _PAGE_NEWPROT bit 2024-10-23 09:52:49 +02:00
uaccess.h uaccess: unify inline vs outline copy_{from,to}_user() selection 2026-05-28 21:24:44 -07:00
unwind.h
vmalloc.h mm/vmalloc: Add empty <asm/vmalloc.h> headers and use them from <linux/vmalloc.h> 2019-12-10 10:12:55 +01:00
vmlinux.lds.h