Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
81c3882
percpu: Sanitize __percpu_qual include hell
Apr 10, 2026
8cfa3f6
x86: Cleanup include recursion hell
Apr 10, 2026
18fb3b4
x86/apm: Remove last LATCH usage
Apr 10, 2026
cc281a3
x86: Use PIT_TICK_RATE instead of CLOCK_TICK_RATE
Apr 10, 2026
95c0b67
treewide: Remove CLOCK_TICK_RATE
Apr 10, 2026
b98cab9
calibrate: Rework delay timer calibration
Apr 10, 2026
390bb6f
treewide: Consolidate cycles_t
Apr 10, 2026
fc4336d
x86/tsc: Use rdtsc() instead of get_cycles()
Apr 10, 2026
b686b0e
iommu/vt-d: Use sched_clock() instead of get_cycles()
Apr 10, 2026
fb55b2b
arcnet: Remove function timing code
Apr 10, 2026
14b8c4f
misc: sgi-gru: Remove get_cycles() [ab]use
Apr 10, 2026
0ddd9de
wifi: wil6210: Replace get_cyles() usage
Apr 10, 2026
3235436
crypto: tcrypt: Replace get_cycles() with ktime_get()
Apr 10, 2026
f17c1af
slub: Use prandom instead of get_cycles()
Apr 10, 2026
fe424fe
ptp: ptp_vmclock: Replace get_cycles() usage
Apr 10, 2026
5be8f12
fbdev: udlfb: Replace get_cycles() with ktime_get()
Apr 10, 2026
308283d
ext4: Replace get_cycles() usage with ktime_get()
Apr 10, 2026
8f29a9b
lib/tests: Replace get_cycles() with ktime_get()
Apr 10, 2026
1ec87a3
kcsan: Replace get_cycles() usage
Apr 10, 2026
78b32d9
kasan: sw_tags: Replace get_cycles() by random_get_entropy()
Apr 10, 2026
71b4504
hamradio: baycom_epp: Remove BAYCOM_DEBUG
Apr 10, 2026
82423de
random: Provide CONFIG_ARCH_HAS_RANDOM_ENTROPY
Apr 10, 2026
39038d0
alpha: Select ARCH_HAS_RANDOM_ENTROPY
Apr 10, 2026
e4fbdef
ARM: Select ARCH_HAS_RANDOM_ENTROPY
Apr 10, 2026
550ffe3
arm64: Select ARCH_HAS_RANDOM_ENTROPY
Apr 10, 2026
2c5276a
loongarch: Select ARCH_HAS_RANDOM_ENTROPY
Apr 10, 2026
96d7dda
m68k: Select ARCH_HAS_RANDOM_ENTROPY
Apr 10, 2026
00b849e
mips: Select ARCH_HAS_RANDOM_ENTROPY
Apr 10, 2026
2ec5836
nios2: Select ARCH_HAS_RANDOM_ENTROPY
Apr 10, 2026
3f2576f
openrisc: Select ARCH_HAS_RANDOM_ENTROPY
Apr 10, 2026
fe6a6f2
parisc: Select ARCH_HAS_RANDOM_ENTROPY
Apr 10, 2026
61b93e3
powerpc/spufs: Use mftb() directly
Apr 10, 2026
a0bf943
powerpc: Select ARCH_HAS_RANDOM_ENTROPY
Apr 10, 2026
acee9e6
riscv: Select ARCH_HAS_RANDOM_ENTROPY
Apr 10, 2026
478f5a9
s390: Select ARCH_HAS_RANDOM_ENTROPY
Apr 10, 2026
bf813a9
sparc: Select ARCH_HAS_RANDOM_ENTROPY for SPARC64
Apr 10, 2026
5a9bbb7
x86: Select ARCH_HAS_RANDOM_ENTROPY
Apr 10, 2026
737c7fa
treewide: Remove asm/timex.h includes from generic code
Apr 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Documentation/fb/udlfb.rst
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ metrics_bytes_sent 32-bit count of how many bytes were transferred over
USB to communicate the resulting changed pixels to the
hardware. Includes compression and protocol overhead

metrics_cpu_kcycles_used 32-bit count of CPU cycles used in processing the
above pixels (in thousands of cycles).
metrics_cpu_kcycles_used 32-bit count of microseconds used in processing the
above pixels

metrics_reset Write-only. Any write to this file resets all metrics
above to zero. Note that the 32-bit counters above
Expand Down
10 changes: 10 additions & 0 deletions arch/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -360,9 +360,19 @@ config ARCH_HAS_DMA_SET_UNCACHED
config ARCH_HAS_DMA_CLEAR_UNCACHED
bool

# cycles_t is always 64bit wide
config ARCH_HAS_CYCLES_T_64
bool

config ARCH_HAS_CPU_FINALIZE_INIT
bool

config ARCH_HAS_DELAY_TIMER
bool

config ARCH_HAS_RANDOM_ENTROPY
bool

# The architecture has a per-task state that includes the mm's PASID
config ARCH_HAS_CPU_PASID
bool
Expand Down
1 change: 1 addition & 0 deletions arch/alpha/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ config ALPHA
select ARCH_32BIT_USTAT_F_TINODE
select ARCH_HAS_CURRENT_STACK_POINTER
select ARCH_HAS_DMA_OPS if PCI
select ARCH_HAS_RANDOM_ENTROPY
select ARCH_MIGHT_HAVE_PC_PARPORT
select ARCH_MIGHT_HAVE_PC_SERIO
select ARCH_MODULE_NEEDS_WEAK_PER_CPU if SMP
Expand Down
14 changes: 14 additions & 0 deletions arch/alpha/include/asm/random.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _ASMALPHA_RANDOM_H
#define _ASMALPHA_RANDOM_H

/* Use the cycle counter for entropy. */
static inline unsigned long random_get_entropy(void)
{
unsigned long ret;

__asm__ __volatile__ ("rpcc %0" : "=r"(ret));
return ret;
}

#endif
33 changes: 0 additions & 33 deletions arch/alpha/include/asm/timex.h

This file was deleted.

15 changes: 0 additions & 15 deletions arch/arc/include/asm/timex.h

This file was deleted.

2 changes: 2 additions & 0 deletions arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ config ARM
select ARCH_HAS_CPU_FINALIZE_INIT if MMU
select ARCH_HAS_CURRENT_STACK_POINTER
select ARCH_HAS_DEBUG_VIRTUAL if MMU
select ARCH_HAS_DELAY_TIMER
select ARCH_HAS_DMA_ALLOC if MMU
select ARCH_HAS_DMA_OPS
select ARCH_HAS_DMA_WRITE_COMBINE if !ARM_DMA_MEM_BUFFERABLE
Expand All @@ -21,6 +22,7 @@ config ARM
select ARCH_HAS_MEMBARRIER_SYNC_CORE
select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
select ARCH_HAS_PTE_SPECIAL if ARM_LPAE
select ARCH_HAS_RANDOM_ENTROPY
select ARCH_HAS_SETUP_DMA_OPS
select ARCH_HAS_SET_MEMORY
select ARCH_STACKWALK
Expand Down
1 change: 0 additions & 1 deletion arch/arm/include/asm/delay.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ extern void __loop_udelay(unsigned long usecs);
extern void __loop_const_udelay(unsigned long);

/* Delay-loop timer registration. */
#define ARCH_HAS_READ_CURRENT_TIMER
extern void register_current_timer_delay(const struct delay_timer *timer);

#endif /* __ASSEMBLY__ */
Expand Down
14 changes: 14 additions & 0 deletions arch/arm/include/asm/random.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef _ASMARM_RANDOM_H
#define _ASMARM_RANDOM_H

bool delay_read_timer(unsigned long *t);

static inline unsigned long random_get_entropy(void)
{
unsigned long t;

return delay_read_timer(&t) ? t : random_get_entropy_fallback();
}

#endif
16 changes: 0 additions & 16 deletions arch/arm/include/asm/timex.h

This file was deleted.

14 changes: 6 additions & 8 deletions arch/arm/lib/delay.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/timex.h>

/*
* Default to the loop-based delay implementation.
Expand All @@ -27,15 +26,14 @@ static const struct delay_timer *delay_timer;
static bool delay_calibrated;
static u64 delay_res;

int read_current_timer(unsigned long *timer_val)
bool delay_read_timer(unsigned long *timer_val)
{
if (!delay_timer)
return -ENXIO;

return false;
*timer_val = delay_timer->read_current_timer();
return 0;
return true;
}
EXPORT_SYMBOL_GPL(read_current_timer);
EXPORT_SYMBOL_GPL(delay_read_timer);

static inline u64 cyc_to_ns(u64 cyc, u32 mult, u32 shift)
{
Expand All @@ -44,9 +42,9 @@ static inline u64 cyc_to_ns(u64 cyc, u32 mult, u32 shift)

static void __timer_delay(unsigned long cycles)
{
cycles_t start = get_cycles();
cycles_t start = delay_timer->read_current_timer();

while ((get_cycles() - start) < cycles)
while ((delay_timer->read_current_timer() - start) < cycles)
cpu_relax();
}

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap1/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ config OMAP_32K_TIMER
currently only available for OMAP16XX, 24XX, 34XX, OMAP4/5 and DRA7XX.

On OMAP2PLUS this value is only used for CONFIG_HZ and
CLOCK_TICK_RATE compile time calculation.
timer frequency compile time calculation.
The actual timer selection is done in the board file
through the (DT_)MACHINE_START structure.

Expand Down
2 changes: 2 additions & 0 deletions arch/arm64/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ config ARM64
select ARCH_HAS_PREEMPT_LAZY
select ARCH_HAS_PTDUMP
select ARCH_HAS_PTE_SPECIAL
select ARCH_HAS_RANDOM_ENTROPY
select ARCH_HAS_HW_PTE_YOUNG
select ARCH_HAS_SETUP_DMA_OPS
select ARCH_HAS_SET_DIRECT_MAP
Expand Down Expand Up @@ -112,6 +113,7 @@ config ARM64
select ARCH_SUPPORTS_SCHED_SMT
select ARCH_SUPPORTS_SCHED_CLUSTER
select ARCH_SUPPORTS_SCHED_MC
select ARCH_SUPPORTS_PTP_VMCLOCK if ARCH_SUPPORTS_INT128
select ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH
select ARCH_WANT_COMPAT_IPC_PARSE_VERSION if COMPAT
select ARCH_WANT_DEFAULT_BPF_JIT
Expand Down
5 changes: 3 additions & 2 deletions arch/arm64/include/asm/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,13 @@ static __always_inline u64 __raw_readq(const volatile void __iomem *addr)
({ \
unsigned long tmp; \
\
dma_rmb(); \
dma_rmb(); \
\
/* \
* Create a dummy control dependency from the IO read to any \
* later instructions. This ensures that a subsequent call to \
* udelay() will be ordered due to the ISB in get_cycles(). \
* udelay() will be ordered due to the ISB in \
* arm_timer_read_counter(). \
*/ \
asm volatile("eor %0, %1, %1\n" \
"cbnz %0, ." \
Expand Down
12 changes: 12 additions & 0 deletions arch/arm64/include/asm/ptp_vmclock.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef __ASM_PTP_VMCLOCK_H
#define __ASM_PTP_VMCLOCK_H

#include <asm/arch_timer.h>

static inline u64 ptp_vmclock_read_cpu_counter(void)
{
return arch_timer_read_counter();
}

#endif
11 changes: 11 additions & 0 deletions arch/arm64/include/asm/random.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (C) 2012 ARM Ltd.
*/
#ifndef __ASM_RANDOM_H
#define __ASM_RANDOM_H

/* Out of line to avoid recursive include hell */
unsigned long random_get_entropy(void);

#endif
1 change: 1 addition & 0 deletions arch/arm64/include/asm/rqspinlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#ifndef _ASM_RQSPINLOCK_H
#define _ASM_RQSPINLOCK_H

#include <asm/arch_timer.h>
#include <asm/barrier.h>

/*
Expand Down
18 changes: 0 additions & 18 deletions arch/arm64/include/asm/timex.h

This file was deleted.

6 changes: 6 additions & 0 deletions arch/arm64/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

#include <clocksource/arm_arch_timer.h>

#include <asm/arch_timer.h>
#include <asm/thread_info.h>
#include <asm/paravirt.h>

Expand All @@ -52,6 +53,11 @@ unsigned long profile_pc(struct pt_regs *regs)
}
EXPORT_SYMBOL(profile_pc);

static unsigned long random_get_entropy(void)
{
return arch_timer_read_counter();
}

void __init time_init(void)
{
u32 arch_timer_rate;
Expand Down
1 change: 1 addition & 0 deletions arch/arm64/kernel/topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <linux/sched/isolation.h>
#include <linux/xarray.h>

#include <asm/arch_timer.h>
#include <asm/cpu.h>
#include <asm/cputype.h>
#include <asm/topology.h>
Expand Down
1 change: 1 addition & 0 deletions arch/arm64/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include <linux/ubsan.h>
#include <linux/cfi.h>

#include <asm/arch_timer.h>
#include <asm/atomic.h>
#include <asm/bug.h>
#include <asm/cpufeature.h>
Expand Down
1 change: 1 addition & 0 deletions arch/arm64/kvm/emulate-nested.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <linux/kvm.h>
#include <linux/kvm_host.h>

#include <asm/arch_timer.h>
#include <asm/kvm_emulate.h>
#include <asm/kvm_nested.h>

Expand Down
1 change: 1 addition & 0 deletions arch/arm64/kvm/hyp/include/hyp/switch.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

#include <kvm/arm_psci.h>

#include <asm/arch_timer.h>
#include <asm/barrier.h>
#include <asm/cpufeature.h>
#include <asm/extable.h>
Expand Down
1 change: 1 addition & 0 deletions arch/arm64/lib/delay.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <linux/timex.h>

#include <clocksource/arm_arch_timer.h>
#include <asm/arch_timer.h>

#define USECS_TO_CYCLES(time_usecs) \
xloops_to_cycles((time_usecs) * 0x10C7UL)
Expand Down
1 change: 1 addition & 0 deletions arch/hexagon/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ comment "Linux Kernel Configuration for Hexagon"
config HEXAGON
def_bool y
select ARCH_32BIT_OFF_T
select ARCH_HAS_DELAY_TIMER
select ARCH_HAS_SYNC_DMA_FOR_DEVICE
select ARCH_NO_PREEMPT
select ARCH_WANT_FRAME_POINTERS
Expand Down
23 changes: 0 additions & 23 deletions arch/hexagon/include/asm/timex.h

This file was deleted.

Loading
Loading