arch_timer_select_ppi(9)
π arch_timer_select_ppi β like, the kernel API manual, bestie
okay so this is the page for arch_timer_select_ppi(9) from the Kernel API Manual and honestly it's short but it ate. it's the function that picks which PPI your current system should be using for its arch timer. let's get into it π
β¨ NAME β¨
arch_timer_select_ppi β selects a suitable PPI for the current system. that's it. that's the whole job. iconic honestly π
π¦ SYNOPSIS π¦
enum arch_timer_ppi_nr arch_timer_select_ppi (void );
so yeah, it returns an enum arch_timer_ppi_nr and it takes literally nothing. no cap β¨
πΈ ARGUMENTS πΈ
voidβ no arguments. nothing. zero. she works alone, main character energy π
π₯ DESCRIPTION π₯
okay so here's the tea, bestie π΅
On AArch32, if HYP mode is available, we know that the physical timer has been configured to be accessible from PL1. so we use it, so that a guest can use the virtual timer instead (though KVM host support has long been removed β yeah, it's giving deprecated, rip π).
On ARMv8.1 with FEAT_VHE, the kernel runs in EL2. accesses to CNTV_*_EL1 registers are silently redirected to their CNTHV_*_EL2 counterparts, and the timer uses a different PPI number. similar thing happens when using the EL2 physical timer. note that a bunch of DTs out there omit the virtual EL2 timer, so we fallback gracefully on the physical timer π«Ά
Without VHE, if no interrupt is provided for the virtual timer, we'll have to stick to the physical timer. it'd better be accessible... π (that "..." is carrying so much weight fr fr)
For arm64 we never use the secure interrupt. periodt π
β RETURN β
it returns a suitable PPI type for the current system. slay π
π§ SEE ALSO π§
- Kernel file
./drivers/clocksource/arm_arch_timer.cβ go read it, iykyk π
and that's the whole page, bestie! this little beauty lives over in ./drivers/clocksource and it's dated October 2026, so likeβ¦ a whole vibe from the future π¦β¨ mwah, go forth and select your PPIs ππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms