diff options
| author | Helge Deller <deller@gmx.de> | 2026-02-06 21:59:56 +0100 |
|---|---|---|
| committer | Helge Deller <deller@gmx.de> | 2026-02-07 00:45:19 +0100 |
| commit | 62c544bc108caa4ce68bfb9864a2500c4480ff56 (patch) | |
| tree | bf9fccd400e25ed279a3f54ddf05fc35a17afabd | |
| parent | e3217ddf29cb2fe7c9c12978aac89ee1651599f1 (diff) | |
parisc: Detect 64-bit free running platform counter
Signed-off-by: Helge Deller <deller@gmx.de>
| -rw-r--r-- | arch/parisc/kernel/time.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/parisc/kernel/time.c b/arch/parisc/kernel/time.c index c17e2249115f..94dc48455dc6 100644 --- a/arch/parisc/kernel/time.c +++ b/arch/parisc/kernel/time.c @@ -16,6 +16,7 @@ #include <linux/rtc.h> #include <linux/platform_device.h> #include <asm/processor.h> +#include <asm/pdcpat.h> static u64 cr16_clock_freq; static unsigned long clocktick; @@ -99,6 +100,22 @@ void parisc_clockevent_init(void) clockevents_config_and_register(cd, cr16_clock_freq, min_delta, max_delta); } +static void parisc_find_64bit_counter(void) +{ +#ifdef CONFIG_64BIT + uint64_t *pclock; + unsigned long freq, unique; + int ret; + + ret = pdc_pat_pd_get_platform_counter(&pclock, &freq, &unique); + if (ret == PDC_OK) + pr_info("64-bit counter found at %px, freq: %lu, unique: %lu\n", + pclock, freq, unique); + else + pr_info("64-bit counter not found.\n"); +#endif +} + unsigned long notrace profile_pc(struct pt_regs *regs) { unsigned long pc = instruction_pointer(regs); @@ -213,6 +230,9 @@ void __init time_init(void) parisc_clockevent_init(); + /* check for free-running 64-bit platform counter */ + parisc_find_64bit_counter(); + /* register at clocksource framework */ clocksource_register_hz(&clocksource_cr16, cr16_clock_freq); } |
