// SPDX-License-Identifier: GPL-2.0-only /* * linux/arch/m68k/kernel/time.c * * Copyright (C) 1991, 1992, 1995 Linus Torvalds * * This file contains the m68k-specific time handling details. * Most of the stuff is located in the machine specific files. * * 1997-09-10 Updated NTP code according to technical memorandum Jan '96 * "A Kernel Model for Precision Timekeeping" by Dave Mills
*/
#ifdef CONFIG_HEARTBEAT void timer_heartbeat(void)
{ /* use power LED as a heartbeat instead -- much more useful
for debugging -- based on the version for PReP by Cort */ /* acts like an actual heart beat -- ie thump-thump-pause... */ if (mach_heartbeat) { staticunsigned cnt = 0, period = 0, dist = 0;
if (++cnt > period) {
cnt = 0; /* The hyperbolic function below modifies the heartbeat period * length in dependency of the current (5min) load. It goes * through the points f(0)=126, f(1)=86, f(5)=51,
* f(inf)->30. */
period = ((672<<FSHIFT)/(5*avenrun[0]+(7<<FSHIFT))) + 30;
dist = period / 4;
}
}
} #endif/* CONFIG_HEARTBEAT */
int (*mach_get_rtc_pll)(struct rtc_pll_info *); int (*mach_set_rtc_pll)(struct rtc_pll_info *);
EXPORT_SYMBOL(mach_get_rtc_pll);
EXPORT_SYMBOL(mach_set_rtc_pll);
switch (cmd) { case RTC_PLL_GET: if (!mach_get_rtc_pll || mach_get_rtc_pll(&pll)) return -EINVAL; return copy_to_user(argp, &pll, sizeof pll) ? -EFAULT : 0;
case RTC_PLL_SET: if (!mach_set_rtc_pll) return -EINVAL; if (!capable(CAP_SYS_TIME)) return -EACCES; if (copy_from_user(&pll, argp, sizeof(pll))) return -EFAULT; return mach_set_rtc_pll(&pll);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.