linux/arch/x86/mm/pat/cpa-test.c

// SPDX-License-Identifier: GPL-2.0
/*
 * self test for change_page_attr.
 *
 * Clears the a test pte bit on random pages in the direct mapping,
 * then reverts and compares page tables forwards and afterwards.
 */
#include <linux/memblock.h>
#include <linux/kthread.h>
#include <linux/random.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/mm.h>
#include <linux/vmalloc.h>

#include <asm/cacheflush.h>
#include <asm/kdebug.h>

/*
 * Only print the results of the first pass:
 */
static __read_mostly int print =;

enum {};

#define PAGE_CPA_TEST

static int pte_testbit(pte_t pte)
{}

struct split_state {};

static int print_split(struct split_state *s)
{}

static unsigned long addr[NTEST];
static unsigned int len[NTEST];

static struct page *pages[NPAGES];
static unsigned long addrs[NPAGES];

/* Change the global bit on random pages in the direct mapping */
static int pageattr_test(void)
{}

static int do_pageattr_test(void *__unused)
{}

static int start_pageattr_test(void)
{}
device_initcall(start_pageattr_test);