Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 88895
b: refs/heads/master
c: ef354af
h: refs/heads/master
i:
  88893: 4598140
  88891: f1d3f79
  88887: f07d626
  88879: 51e73c1
  88863: 1b82037
  88831: 1c4cf3a
v: v3
  • Loading branch information
venkatesh.pallipadi@intel.com authored and Ingo Molnar committed Apr 17, 2008
1 parent 9d90f91 commit af39578
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 03d72aa18f15df9987fe5837284e15b9ccf6e3f8
refs/heads/master: ef354af4629e5cc76a3f64fc46d452f2b56d5a59
19 changes: 19 additions & 0 deletions trunk/arch/x86/mm/pageattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -787,6 +787,25 @@ int set_memory_uc(unsigned long addr, int numpages)
}
EXPORT_SYMBOL(set_memory_uc);

int _set_memory_wc(unsigned long addr, int numpages)
{
return change_page_attr_set(addr, numpages,
__pgprot(_PAGE_CACHE_WC));
}

int set_memory_wc(unsigned long addr, int numpages)
{
if (!pat_wc_enabled)
return set_memory_uc(addr, numpages);

if (reserve_memtype(addr, addr + numpages * PAGE_SIZE,
_PAGE_CACHE_WC, NULL))
return -EINVAL;

return _set_memory_wc(addr, numpages);
}
EXPORT_SYMBOL(set_memory_wc);

int _set_memory_wb(unsigned long addr, int numpages)
{
return change_page_attr_clear(addr, numpages,
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/asm-x86/cacheflush.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ int set_pages_ro(struct page *page, int numpages);
int set_pages_rw(struct page *page, int numpages);

int _set_memory_uc(unsigned long addr, int numpages);
int _set_memory_wc(unsigned long addr, int numpages);
int _set_memory_wb(unsigned long addr, int numpages);
int set_memory_uc(unsigned long addr, int numpages);
int set_memory_wc(unsigned long addr, int numpages);
int set_memory_wb(unsigned long addr, int numpages);
int set_memory_x(unsigned long addr, int numpages);
int set_memory_nx(unsigned long addr, int numpages);
Expand Down

0 comments on commit af39578

Please sign in to comment.