arch/xtensa/kernel/platform.c

Source file repositories/reference/linux-study-clean/arch/xtensa/kernel/platform.c

File Facts

System
Linux kernel
Corpus path
arch/xtensa/kernel/platform.c
Extension
.c
Size
1007 bytes
Lines
46
Domain
Architecture Layer
Bucket
arch/xtensa
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

#include <linux/printk.h>
#include <linux/types.h>
#include <linux/units.h>
#include <asm/platform.h>
#include <asm/timex.h>

/*
 * Default functions that are used if no platform specific function is defined.
 * (Please, refer to arch/xtensa/include/asm/platform.h for more information)
 */

void __weak __init platform_init(bp_tag_t *first)
{
}

void __weak __init platform_setup(char **cmd)
{
}

void __weak platform_idle(void)
{
	__asm__ __volatile__ ("waiti 0" ::: "memory");
}

#ifdef CONFIG_XTENSA_CALIBRATE_CCOUNT
void __weak platform_calibrate_ccount(void)
{
	pr_err("ERROR: Cannot calibrate cpu frequency! Assuming 10 MHz.\n");
	ccount_freq = 10 * HZ_PER_MHZ;
}
#endif

Annotation

Implementation Notes