Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 82885
b: refs/heads/master
c: 75ab43b
h: refs/heads/master
i:
  82883: e029755
v: v3
  • Loading branch information
Thomas Gleixner authored and Ingo Molnar committed Feb 4, 2008
1 parent ae829f5 commit a8d6e62
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 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: e66aadbe6cb90813b3bbf07e3bc2a6aedcef7cd1
refs/heads/master: 75ab43bfce51085ffd627c470f48ae49ba6e6da3
17 changes: 2 additions & 15 deletions trunk/arch/x86/mm/ioremap.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,25 +70,12 @@ int page_is_ram(unsigned long pagenr)
* Fix up the linear direct mapping of the kernel to avoid cache attribute
* conflicts.
*/
static int ioremap_change_attr(unsigned long paddr, unsigned long size,
static int ioremap_change_attr(unsigned long vaddr, unsigned long size,
enum ioremap_mode mode)
{
unsigned long vaddr = (unsigned long)__va(paddr);
unsigned long nrpages = size >> PAGE_SHIFT;
unsigned int level;
int err;

/* No change for pages after the last mapping */
if ((paddr + size - 1) >= (max_pfn_mapped << PAGE_SHIFT))
return 0;

/*
* If there is no identity map for this address,
* change_page_attr_addr is unnecessary
*/
if (!lookup_address(vaddr, &level))
return 0;

switch (mode) {
case IOR_MODE_UNCACHED:
default:
Expand Down Expand Up @@ -169,7 +156,7 @@ static void __iomem *__ioremap(unsigned long phys_addr, unsigned long size,
return NULL;
}

if (ioremap_change_attr(phys_addr, size, mode) < 0) {
if (ioremap_change_attr(vaddr, size, mode) < 0) {
vunmap(area->addr);
return NULL;
}
Expand Down

0 comments on commit a8d6e62

Please sign in to comment.