File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616#include <linux/rtc.h>
1717#include <linux/platform_device.h>
1818#include <asm/processor.h>
19+ #include <asm/pdcpat.h>
1920
2021static u64 cr16_clock_freq ;
2122static unsigned long clocktick ;
@@ -99,6 +100,22 @@ void parisc_clockevent_init(void)
99100 clockevents_config_and_register (cd , cr16_clock_freq , min_delta , max_delta );
100101}
101102
103+ static void parisc_find_64bit_counter (void )
104+ {
105+ #ifdef CONFIG_64BIT
106+ uint64_t * pclock ;
107+ unsigned long freq , unique ;
108+ int ret ;
109+
110+ ret = pdc_pat_pd_get_platform_counter (& pclock , & freq , & unique );
111+ if (ret == PDC_OK )
112+ pr_info ("64-bit counter found at %px, freq: %lu, unique: %lu\n" ,
113+ pclock , freq , unique );
114+ else
115+ pr_info ("64-bit counter not found.\n" );
116+ #endif
117+ }
118+
102119unsigned long notrace profile_pc (struct pt_regs * regs )
103120{
104121 unsigned long pc = instruction_pointer (regs );
@@ -213,6 +230,9 @@ void __init time_init(void)
213230
214231 parisc_clockevent_init ();
215232
233+ /* check for free-running 64-bit platform counter */
234+ parisc_find_64bit_counter ();
235+
216236 /* register at clocksource framework */
217237 clocksource_register_hz (& clocksource_cr16 , cr16_clock_freq );
218238}
You can’t perform that action at this time.
0 commit comments