time.h (a4c5a355422920bcbfe3fd1f01aead2d3a2a820c) time.h (6601ec1c2ba929430f5585ce7f9d9960b0e0a01d)
1/* SPDX-License-Identifier: GPL-2.0-or-later */
2/*
3 * Common time prototypes and such for all ppc machines.
4 *
5 * Written by Cort Dougan (cort@cs.nmt.edu) to merge
6 * Paul Mackerras' version and mine for PReP and Pmac.
7 */
8

--- 71 unchanged lines hidden (view full) ---

80 tblo = get_tbl();
81 tbhi2 = get_tbu();
82 } while (tbhi != tbhi2);
83
84 return ((u64)tbhi << 32) | tblo;
85}
86#endif /* !CONFIG_PPC64 */
87
1/* SPDX-License-Identifier: GPL-2.0-or-later */
2/*
3 * Common time prototypes and such for all ppc machines.
4 *
5 * Written by Cort Dougan (cort@cs.nmt.edu) to merge
6 * Paul Mackerras' version and mine for PReP and Pmac.
7 */
8

--- 71 unchanged lines hidden (view full) ---

80 tblo = get_tbl();
81 tbhi2 = get_tbu();
82 } while (tbhi != tbhi2);
83
84 return ((u64)tbhi << 32) | tblo;
85}
86#endif /* !CONFIG_PPC64 */
87
88static inline u64 get_tb_or_rtc(void)
89{
90 return get_tb();
91}
92
93static inline void set_tb(unsigned int upper, unsigned int lower)
94{
95 mtspr(SPRN_TBWL, 0);
96 mtspr(SPRN_TBWU, upper);
97 mtspr(SPRN_TBWL, lower);
98}
99
100/* Accessor functions for the decrementer register.

--- 62 unchanged lines hidden ---
88static inline void set_tb(unsigned int upper, unsigned int lower)
89{
90 mtspr(SPRN_TBWL, 0);
91 mtspr(SPRN_TBWU, upper);
92 mtspr(SPRN_TBWL, lower);
93}
94
95/* Accessor functions for the decrementer register.

--- 62 unchanged lines hidden ---