arch/powerpc/include/asm/nohash/32/pte-8xx.h

Source file repositories/reference/linux-study-clean/arch/powerpc/include/asm/nohash/32/pte-8xx.h

File Facts

System
Linux kernel
Corpus path
arch/powerpc/include/asm/nohash/32/pte-8xx.h
Extension
.h
Size
7681 bytes
Lines
242
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

if (IS_ENABLED(CONFIG_PPC_16K_PAGES)) {
			*entry++ = new;
			*entry++ = new;
			*entry++ = new;
		}
	}

	return old;
}

static inline pte_basic_t pte_update(struct mm_struct *mm, unsigned long addr, pte_t *ptep,
				     unsigned long clr, unsigned long set, int huge)
{
	pte_basic_t old;

	if (huge && ptep_is_8m_pmdp(mm, addr, ptep)) {
		pmd_t *pmdp = (pmd_t *)ptep;

		old = __pte_update(mm, addr, pte_offset_kernel(pmdp, 0), clr, set, huge);
		__pte_update(mm, addr, pte_offset_kernel(pmdp + 1, 0), clr, set, huge);
	} else {
		old = __pte_update(mm, addr, ptep, clr, set, huge);
	}
	return old;
}
#define pte_update pte_update

#ifdef CONFIG_PPC_16K_PAGES
#define ptep_get ptep_get
static inline pte_t ptep_get(pte_t *ptep)
{
	pte_basic_t val = READ_ONCE(ptep->pte);
	pte_t pte = {val, val, val, val};

	return pte;
}
#endif /* CONFIG_PPC_16K_PAGES */

#endif

#endif /* __KERNEL__ */
#endif /*  _ASM_POWERPC_NOHASH_32_PTE_8xx_H */

Annotation

Implementation Notes