arch/csky/mm/syscache.c

Source file repositories/reference/linux-study-clean/arch/csky/mm/syscache.c

File Facts

System
Linux kernel
Corpus path
arch/csky/mm/syscache.c
Extension
.c
Size
623 bytes
Lines
33
Domain
Architecture Layer
Bucket
arch/csky
Inferred role
Architecture Layer: syscall or user/kernel boundary
Status
core 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

SYSCALL_DEFINE3(cacheflush,
		void __user *, addr,
		unsigned long, bytes,
		int, cache)
{
	switch (cache) {
	case BCACHE:
	case DCACHE:
		dcache_wb_range((unsigned long)addr,
				(unsigned long)addr + bytes);
		if (cache != BCACHE)
			break;
		fallthrough;
	case ICACHE:
		flush_icache_mm_range(current->mm,
				(unsigned long)addr,
				(unsigned long)addr + bytes);
		break;
	default:
		return -EINVAL;
	}

	return 0;
}

Annotation

Implementation Notes