Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 80511
b: refs/heads/master
c: 74ff285
h: refs/heads/master
i:
  80509: d0462c7
  80507: 2c8fe5e
  80503: 2813fc9
  80495: 3ff01cc
  80479: b621ed8
  80447: ab401c1
  80383: e13e23c
v: v3
  • Loading branch information
Thomas Gleixner authored and Ingo Molnar committed Jan 30, 2008
1 parent 1c8e474 commit aa8bd81
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 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: f87519e8f4f1de9b39a40e56479a7ad2443169dd
refs/heads/master: 74ff2857f099951020a47420872f5c1460f32c27
4 changes: 2 additions & 2 deletions trunk/arch/x86/mm/ioremap_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ void __iomem *__ioremap(unsigned long phys_addr, unsigned long size,
/*
* Ok, go for it..
*/
area = get_vm_area(size, VM_IOREMAP | (flags << 20));
area = get_vm_area(size, VM_IOREMAP);
if (!area)
return NULL;
area->phys_addr = phys_addr;
Expand Down Expand Up @@ -189,7 +189,7 @@ void iounmap(volatile void __iomem *addr)
}

/* Reset the direct mapping. Can block */
if ((p->flags >> 20) && p->phys_addr < virt_to_phys(high_memory) - 1) {
if (p->phys_addr < virt_to_phys(high_memory) - 1) {
change_page_attr(virt_to_page(__va(p->phys_addr)),
get_vm_area_size(p) >> PAGE_SHIFT,
PAGE_KERNEL);
Expand Down
14 changes: 6 additions & 8 deletions trunk/arch/x86/mm/ioremap_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ EXPORT_SYMBOL(__phys_addr);
* conflicts.
*/
static int ioremap_change_attr(unsigned long phys_addr, unsigned long size,
unsigned long flags)
pgprot_t prot)
{
int err = 0;
if (phys_addr + size - 1 < (end_pfn_map << PAGE_SHIFT)) {
Expand All @@ -50,8 +50,8 @@ static int ioremap_change_attr(unsigned long phys_addr, unsigned long size,
* the phys addr can be a in hole between nodes and
* not have an memmap entry.
*/
err = change_page_attr_addr(vaddr,npages,
MAKE_GLOBAL(__PAGE_KERNEL|flags));
err = change_page_attr_addr(vaddr, npages, prot);

if (!err)
global_flush_tlb();
}
Expand Down Expand Up @@ -97,7 +97,7 @@ void __iomem *__ioremap(unsigned long phys_addr, unsigned long size,
/*
* Ok, go for it..
*/
area = get_vm_area(size, VM_IOREMAP | (flags << 20));
area = get_vm_area(size, VM_IOREMAP);
if (!area)
return NULL;
area->phys_addr = phys_addr;
Expand All @@ -107,8 +107,7 @@ void __iomem *__ioremap(unsigned long phys_addr, unsigned long size,
remove_vm_area((void *)(PAGE_MASK & (unsigned long) addr));
return NULL;
}
if (flags && ioremap_change_attr(phys_addr, size, flags) < 0) {
area->flags &= 0xffffff;
if (ioremap_change_attr(phys_addr, size, pgprot) < 0) {
vunmap(addr);
return NULL;
}
Expand Down Expand Up @@ -180,8 +179,7 @@ void iounmap(volatile void __iomem *addr)
}

/* Reset the direct mapping. Can block */
if (p->flags >> 20)
ioremap_change_attr(p->phys_addr, p->size, 0);
ioremap_change_attr(p->phys_addr, p->size, PAGE_KERNEL);

/* Finally remove it */
o = remove_vm_area((void *)addr);
Expand Down

0 comments on commit aa8bd81

Please sign in to comment.