arch/sparc/kernel/jump_label.c

Source file repositories/reference/linux-study-clean/arch/sparc/kernel/jump_label.c

File Facts

System
Linux kernel
Corpus path
arch/sparc/kernel/jump_label.c
Extension
.c
Size
1062 bytes
Lines
48
Domain
Architecture Layer
Bucket
arch/sparc
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 (use_v9_branch) {
			/* WDISP19 - target is . + immed << 2 */
			/* ba,pt %xcc, . + off */
			val = 0x10680000 | (((u32) off >> 2) & 0x7ffff);
		} else {
			/* WDISP22 - target is . + immed << 2 */
			BUG_ON(off > 0x7fffff);
			BUG_ON(off < -0x800000);
			/* ba . + off */
			val = 0x10800000 | (((u32) off >> 2) & 0x3fffff);
		}
	} else {
		val = 0x01000000;
	}

	mutex_lock(&text_mutex);
	*insn = val;
	flushi(insn);
	mutex_unlock(&text_mutex);
}

Annotation

Implementation Notes