static int change_page_attr_set(unsigned long addr, int numpages,
pgprot_t prot)
{
- pgprot_t current_prot;
+ pgprot_t current_prot, new_prot;
int level;
pte_t *pte;
int i, ret;
else
pgprot_val(current_prot) = 0;
- pgprot_val(prot) = pgprot_val(current_prot) | pgprot_val(prot);
+ pgprot_val(new_prot) =
+ pgprot_val(current_prot) | pgprot_val(prot);
- ret = change_page_attr_addr(addr, prot);
+ ret = change_page_attr_addr(addr, new_prot);
if (ret)
return ret;
addr += PAGE_SIZE;
static int change_page_attr_clear(unsigned long addr, int numpages,
pgprot_t prot)
{
- pgprot_t current_prot;
+ pgprot_t current_prot, new_prot;
int level;
pte_t *pte;
int i, ret;
else
pgprot_val(current_prot) = 0;
- pgprot_val(prot) =
+ pgprot_val(new_prot) =
pgprot_val(current_prot) & ~pgprot_val(prot);
- ret = change_page_attr_addr(addr, prot);
+ ret = change_page_attr_addr(addr, new_prot);
if (ret)
return ret;
addr += PAGE_SIZE;