Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

parisc: Detect 64-bit free running platform counter

Signed-off-by: Helge Deller <deller@gmx.de>

+20
+20
arch/parisc/kernel/time.c
··· 16 16 #include <linux/rtc.h> 17 17 #include <linux/platform_device.h> 18 18 #include <asm/processor.h> 19 + #include <asm/pdcpat.h> 19 20 20 21 static u64 cr16_clock_freq; 21 22 static unsigned long clocktick; ··· 98 97 cd->event_handler = parisc_event_handler; 99 98 100 99 clockevents_config_and_register(cd, cr16_clock_freq, min_delta, max_delta); 100 + } 101 + 102 + static void parisc_find_64bit_counter(void) 103 + { 104 + #ifdef CONFIG_64BIT 105 + uint64_t *pclock; 106 + unsigned long freq, unique; 107 + int ret; 108 + 109 + ret = pdc_pat_pd_get_platform_counter(&pclock, &freq, &unique); 110 + if (ret == PDC_OK) 111 + pr_info("64-bit counter found at %px, freq: %lu, unique: %lu\n", 112 + pclock, freq, unique); 113 + else 114 + pr_info("64-bit counter not found.\n"); 115 + #endif 101 116 } 102 117 103 118 unsigned long notrace profile_pc(struct pt_regs *regs) ··· 229 212 sched_clock_register(read_cr16_sched_clock, BITS_PER_LONG, cr16_clock_freq); 230 213 231 214 parisc_clockevent_init(); 215 + 216 + /* check for free-running 64-bit platform counter */ 217 + parisc_find_64bit_counter(); 232 218 233 219 /* register at clocksource framework */ 234 220 clocksource_register_hz(&clocksource_cr16, cr16_clock_freq);