How to protect a page so that it cannot be write in mips arch?

45 views Asked by At

I want use pte_wrportect func to protect an address which ioremap return.

char * addr;
addr = ioremap(0x207f700000,PAGE_SIZE);

how to do next ?

1

There are 1 answers

4
Mark Segal On

Use the function

int set_memory_ro(unsigned long addr, int numpages)

use

#include <linux/set_memory.h>