arch/powerpc/mm/ptdump/book3s64.c

Source file repositories/reference/linux-study-clean/arch/powerpc/mm/ptdump/book3s64.c

File Facts

System
Linux kernel
Corpus path
arch/powerpc/mm/ptdump/book3s64.c
Extension
.c
Size
2432 bytes
Lines
128
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

// SPDX-License-Identifier: GPL-2.0
/*
 * From split of dump_linuxpagetables.c
 * Copyright 2016, Rashmica Gupta, IBM Corp.
 *
 */
#include <linux/kernel.h>
#include <linux/pgtable.h>

#include "ptdump.h"

static const struct flag_info flag_array[] = {
	{
		.mask	= _PAGE_PRIVILEGED,
		.val	= 0,
		.set	= "user",
		.clear	= "    ",
	}, {
		.mask	= _PAGE_READ,
		.val	= _PAGE_READ,
		.set	= "r",
		.clear	= " ",
	}, {
		.mask	= _PAGE_WRITE,
		.val	= _PAGE_WRITE,
		.set	= "w",
		.clear	= " ",
	}, {
		.mask	= _PAGE_EXEC,
		.val	= _PAGE_EXEC,
		.set	= " X ",
		.clear	= "   ",
	}, {
		.mask	= _PAGE_PTE,
		.val	= _PAGE_PTE,
		.set	= "pte",
		.clear	= "   ",
	}, {
		.mask	= _PAGE_PRESENT,
		.val	= _PAGE_PRESENT,
		.set	= "valid",
		.clear	= "     ",
	}, {
		.mask	= _PAGE_PRESENT | _PAGE_INVALID,
		.val	= 0,
		.set	= "       ",
		.clear	= "present",
	}, {
		.mask	= H_PAGE_HASHPTE,
		.val	= H_PAGE_HASHPTE,
		.set	= "hpte",
		.clear	= "    ",
	}, {
		.mask	= _PAGE_DIRTY,
		.val	= _PAGE_DIRTY,
		.set	= "dirty",
		.clear	= "     ",
	}, {
		.mask	= _PAGE_ACCESSED,
		.val	= _PAGE_ACCESSED,
		.set	= "accessed",
		.clear	= "        ",
	}, {
		.mask	= _PAGE_NON_IDEMPOTENT,
		.val	= _PAGE_NON_IDEMPOTENT,
		.set	= "non-idempotent",
		.clear	= "              ",
	}, {
		.mask	= _PAGE_TOLERANT,
		.val	= _PAGE_TOLERANT,
		.set	= "tolerant",
		.clear	= "        ",
	}, {
		.mask	= H_PAGE_BUSY,
		.val	= H_PAGE_BUSY,
		.set	= "busy",
	}, {
#ifdef CONFIG_PPC_64K_PAGES
		.mask	= H_PAGE_COMBO,
		.val	= H_PAGE_COMBO,
		.set	= "combo",
	}, {
		.mask	= H_PAGE_4K_PFN,
		.val	= H_PAGE_4K_PFN,
		.set	= "4K_pfn",
	}, {
#else /* CONFIG_PPC_64K_PAGES */
		.mask	= H_PAGE_F_GIX,
		.val	= H_PAGE_F_GIX,
		.set	= "f_gix",

Annotation

Implementation Notes