Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 80533
b: refs/heads/master
c: 4692a14
h: refs/heads/master
i:
  80531: 122f862
v: v3
  • Loading branch information
Ingo Molnar committed Jan 30, 2008
1 parent 014919e commit c6c1a81
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a72a08a4b61cb8868606a69b744848552e92062b
refs/heads/master: 4692a1450b4d1000a942022b088c8791749dd65e
13 changes: 7 additions & 6 deletions trunk/arch/x86/mm/pageattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ static int change_page_attr_addr(unsigned long address, pgprot_t prot)
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;
Expand All @@ -317,9 +317,10 @@ static int change_page_attr_set(unsigned long addr, int numpages,
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;
Expand Down Expand Up @@ -349,7 +350,7 @@ static int change_page_attr_set(unsigned long addr, int numpages,
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;
Expand All @@ -361,10 +362,10 @@ static int change_page_attr_clear(unsigned long addr, int numpages,
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;
Expand Down

0 comments on commit c6c1a81

Please sign in to comment.