/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _ASM_POWERPC_TIMEX_H #define _ASM_POWERPC_TIMEX_H #ifdef __KERNEL__ /* * PowerPC architecture timex specifications */ #include <asm/cputable.h> #include <asm/reg.h> #define CLOCK_TICK_RATE 1024000 /* Underlying HZ */ typedef unsigned long cycles_t;
static inline cycles_t get_cycles(void) { #ifdef __powerpc64__ return mftb(); #else cycles_t ret; /* * For the "cycle" counter we use the timebase lower half. * Currently only used on SMP. */ ret = 0; __asm__ __volatile__( #ifdef CONFIG_PPC_8xx "97: mftb %0\n" #else "97: mfspr %0, %2\n" #endif "99:\n" ".section __ftr_fixup,\"a\"\n" ".align 2\n" "98:\n" " .long %1\n" " .long 0\n" " .long 97b-98b\n" " .long 99b-98b\n" " .long 0\n" " .long 0\n" ".previous" : "=r" (ret) : "i" (CPU_FTR_601), "i" (SPRN_TBRL)); return ret; #endif }Contributors
Person | Tokens | Prop | Commits | CommitProp |
Christophe Leroy | 12 | 27.27% | 3 | 42.86% |
Linus Torvalds (pre-git) | 11 | 25.00% | 1 | 14.29% |
Jon Loeliger | 10 | 22.73% | 1 | 14.29% |
Benjamin Herrenschmidt | 9 | 20.45% | 1 | 14.29% |
Linus Torvalds | 2 | 4.55% | 1 | 14.29% |
Total | 44 | 100.00% | 7 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Linus Torvalds (pre-git) | 30 | 38.96% | 4 | 33.33% |
Jon Loeliger | 18 | 23.38% | 1 | 8.33% |
Benjamin Herrenschmidt | 13 | 16.88% | 2 | 16.67% |
Christophe Leroy | 12 | 15.58% | 3 | 25.00% |
Linus Torvalds | 3 | 3.90% | 1 | 8.33% |
Greg Kroah-Hartman | 1 | 1.30% | 1 | 8.33% |
Total | 77 | 100.00% | 12 | 100.00% |