arch/powerpc/include/asm/book3s/64/hash-pkey.h

Source file repositories/reference/linux-study-clean/arch/powerpc/include/asm/book3s/64/hash-pkey.h

File Facts

System
Linux kernel
Corpus path
arch/powerpc/include/asm/book3s/64/hash-pkey.h
Extension
.h
Size
1545 bytes
Lines
46
Domain
Architecture Layer
Bucket
arch/powerpc
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

mmu_has_feature(MMU_FTR_BOOK3S_KUEP)) {
		if ((pte_pkey == 0) && (flags & HPTE_USE_KERNEL_KEY))
			return HASH_DEFAULT_KERNEL_KEY;
	}

	return pte_pkey;
}

static inline u16 hash__pte_to_pkey_bits(u64 pteflags)
{
	return (((pteflags & H_PTE_PKEY_BIT4) ? 0x10 : 0x0UL) |
		((pteflags & H_PTE_PKEY_BIT3) ? 0x8 : 0x0UL) |
		((pteflags & H_PTE_PKEY_BIT2) ? 0x4 : 0x0UL) |
		((pteflags & H_PTE_PKEY_BIT1) ? 0x2 : 0x0UL) |
		((pteflags & H_PTE_PKEY_BIT0) ? 0x1 : 0x0UL));
}

#endif

Annotation

Implementation Notes