arch/x86/include/asm/clock_inlined.h

Source file repositories/reference/linux-study-clean/arch/x86/include/asm/clock_inlined.h

File Facts

System
Linux kernel
Corpus path
arch/x86/include/asm/clock_inlined.h
Extension
.h
Size
465 bytes
Lines
23
Domain
Architecture Layer
Bucket
arch/x86
Inferred role
Architecture Layer: implementation source
Status
source implementation candidate

Why This File Exists

CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.

Dependency Surface

Detected Declarations

Annotated Snippet

#ifndef _ASM_X86_CLOCK_INLINED_H
#define _ASM_X86_CLOCK_INLINED_H

#include <asm/tsc.h>

struct clocksource;

static __always_inline u64 arch_inlined_clocksource_read(struct clocksource *cs)
{
	return (u64)rdtsc_ordered();
}

struct clock_event_device;

static __always_inline void
arch_inlined_clockevent_set_next_coupled(u64 cycles, struct clock_event_device *evt)
{
	native_wrmsrq(MSR_IA32_TSC_DEADLINE, cycles);
}

#endif

Annotation

Implementation Notes