Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 85769
b: refs/heads/master
c: f34b439
h: refs/heads/master
i:
  85767: 202e156
v: v3
  • Loading branch information
Thomas Gleixner committed Feb 18, 2008
1 parent e2139dd commit ce6fea7
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 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: af96e4438a4b34a257f5318a296e0b9e182e7ab9
refs/heads/master: f34b439f34c49d7de858234bab5e2dd03cfaf3c1
23 changes: 19 additions & 4 deletions trunk/arch/x86/mm/pageattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -594,19 +594,34 @@ static int __change_page_attr_set_clr(struct cpa_data *cpa, int checkalias);
static int cpa_process_alias(struct cpa_data *cpa)
{
struct cpa_data alias_cpa;
int ret;
int ret = 0;

if (cpa->pfn > max_pfn_mapped)
return 0;

alias_cpa = *cpa;
alias_cpa.vaddr = (unsigned long) __va(cpa->pfn << PAGE_SHIFT);
/*
* No need to redo, when the primary call touched the direct
* mapping already:
*/
if (!within(cpa->vaddr, PAGE_OFFSET,
PAGE_OFFSET + (max_pfn_mapped << PAGE_SHIFT))) {

ret = __change_page_attr_set_clr(&alias_cpa, 0);
alias_cpa = *cpa;
alias_cpa.vaddr = (unsigned long) __va(cpa->pfn << PAGE_SHIFT);

ret = __change_page_attr_set_clr(&alias_cpa, 0);
}

#ifdef CONFIG_X86_64
if (ret)
return ret;
/*
* No need to redo, when the primary call touched the high
* mapping already:
*/
if (within(cpa->vaddr, (unsigned long) _text, (unsigned long) _end))
return 0;

/*
* If the physical address is inside the kernel map, we need
* to touch the high mapped kernel as well:
Expand Down

0 comments on commit ce6fea7

Please sign in to comment.