arch/sh/kernel/time.c
Source file repositories/reference/linux-study-clean/arch/sh/kernel/time.c
File Facts
- System
- Linux kernel
- Corpus path
arch/sh/kernel/time.c- Extension
.c- Size
- 1243 bytes
- Lines
- 46
- Domain
- Architecture Layer
- Bucket
- arch/sh
- Inferred role
- Architecture Layer: implementation source
- Status
- source implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
Dependency Surface
linux/kernel.hlinux/init.hlinux/profile.hlinux/timex.hlinux/sched.hlinux/clockchips.hlinux/platform_device.hlinux/smp.hlinux/rtc.hasm/clock.hasm/rtc.hasm/platform_early.h
Detected Declarations
function Copyrightfunction time_init
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
/*
* arch/sh/kernel/time.c
*
* Copyright (C) 1999 Tetsuya Okada & Niibe Yutaka
* Copyright (C) 2000 Philipp Rumpf <prumpf@tux.org>
* Copyright (C) 2002 - 2009 Paul Mundt
* Copyright (C) 2002 M. R. Brown <mrbrown@linux-sh.org>
*/
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/profile.h>
#include <linux/timex.h>
#include <linux/sched.h>
#include <linux/clockchips.h>
#include <linux/platform_device.h>
#include <linux/smp.h>
#include <linux/rtc.h>
#include <asm/clock.h>
#include <asm/rtc.h>
#include <asm/platform_early.h>
static void __init sh_late_time_init(void)
{
/*
* Make sure all compiled-in early timers register themselves.
*
* Run probe() for two "earlytimer" devices, these will be the
* clockevents and clocksource devices respectively. In the event
* that only a clockevents device is available, we -ENODEV on the
* clocksource and the jiffies clocksource is used transparently
* instead. No error handling is necessary here.
*/
sh_early_platform_driver_register_all("earlytimer");
sh_early_platform_driver_probe("earlytimer", 2, 0);
}
void __init time_init(void)
{
timer_probe();
clk_init();
late_time_init = sh_late_time_init;
}
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/init.h`, `linux/profile.h`, `linux/timex.h`, `linux/sched.h`, `linux/clockchips.h`, `linux/platform_device.h`, `linux/smp.h`.
- Detected declarations: `function Copyright`, `function time_init`.
- Atlas domain: Architecture Layer / arch/sh.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.