Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 129971
b: refs/heads/master
c: ef5fa0a
h: refs/heads/master
i:
  129969: 202362c
  129967: 5013944
v: v3
  • Loading branch information
Eric Anholt authored and Ingo Molnar committed Jan 26, 2009
1 parent 661a865 commit 5ad0f84
Show file tree
Hide file tree
Showing 2 changed files with 11 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: e1b4d1143651fb3838be1117785b6e0386fa151f
refs/heads/master: ef5fa0ab24b87646c7bc98645acbb4b51fc2acd4
10 changes: 10 additions & 0 deletions trunk/arch/x86/mm/iomap_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/

#include <asm/iomap.h>
#include <asm/pat.h>
#include <linux/module.h>

/* Map 'pfn' using fixed map 'type' and protections 'prot'
Expand All @@ -29,6 +30,15 @@ iomap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot)

pagefault_disable();

/*
* For non-PAT systems, promote PAGE_KERNEL_WC to PAGE_KERNEL_UC_MINUS.
* PAGE_KERNEL_WC maps to PWT, which translates to uncached if the
* MTRR is UC or WC. UC_MINUS gets the real intention, of the
* user, which is "WC if the MTRR is WC, UC if you can't do that."
*/
if (!pat_enabled && pgprot_val(prot) == pgprot_val(PAGE_KERNEL_WC))
prot = PAGE_KERNEL_UC_MINUS;

idx = type + KM_TYPE_NR*smp_processor_id();
vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
set_pte(kmap_pte-idx, pfn_pte(pfn, prot));
Expand Down

0 comments on commit 5ad0f84

Please sign in to comment.