arch/mips/loongson64/time.c

Source file repositories/reference/linux-study-clean/arch/mips/loongson64/time.c

File Facts

System
Linux kernel
Corpus path
arch/mips/loongson64/time.c
Extension
.c
Size
929 bytes
Lines
48
Domain
Architecture Layer
Bucket
arch/mips
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.

Dependency Surface

Detected Declarations

Annotated Snippet

if (!np) {
			pr_err("Failed to get CPU node\n");
			return;
		}

		clk = of_clk_get(np, 0);
		if (IS_ERR(clk)) {
			pr_err("Failed to get CPU clock: %ld\n", PTR_ERR(clk));
			return;
		}

		cpu_clock_freq = clk_get_rate(clk);
		clk_put(clk);
	}

	/* setup mips r4k timer */
	mips_hpt_frequency = cpu_clock_freq / 2;

#ifdef CONFIG_RS780_HPET
	setup_hpet_timer();
#endif
}

Annotation

Implementation Notes