arch/s390/kernel/guarded_storage.c

Source file repositories/reference/linux-study-clean/arch/s390/kernel/guarded_storage.c

File Facts

System
Linux kernel
Corpus path
arch/s390/kernel/guarded_storage.c
Extension
.c
Size
2576 bytes
Lines
130
Domain
Architecture Layer
Bucket
arch/s390
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_DEFINE2(s390_guarded_storage, int, command,
		struct gs_cb __user *, gs_cb)
{
	if (!cpu_has_gs())
		return -EOPNOTSUPP;
	switch (command) {
	case GS_ENABLE:
		return gs_enable();
	case GS_DISABLE:
		return gs_disable();
	case GS_SET_BC_CB:
		return gs_set_bc_cb(gs_cb);
	case GS_CLEAR_BC_CB:
		return gs_clear_bc_cb();
	case GS_BROADCAST:
		return gs_broadcast();
	default:
		return -EINVAL;
	}
}

Annotation

Implementation Notes