arch_timer_select_ppi(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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