Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 80515
b: refs/heads/master
c: 240d3a7
h: refs/heads/master
i:
  80513: f27193f
  80511: aa8bd81
v: v3
  • Loading branch information
Thomas Gleixner authored and Ingo Molnar committed Jan 30, 2008
1 parent b4cc725 commit 745ad88
Show file tree
Hide file tree
Showing 3 changed files with 314 additions and 23 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: e4c1b977f0036c00ebabb60375cb63d0de9d43fa
refs/heads/master: 240d3a7c47e3fb9c2533f63e9e323a25d91d0643
18 changes: 18 additions & 0 deletions trunk/arch/x86/mm/ioremap_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,18 @@
#include <asm/pgtable.h>
#include <asm/tlbflush.h>

#ifdef CONFIG_X86_64

unsigned long __phys_addr(unsigned long x)
{
if (x >= __START_KERNEL_map)
return x - __START_KERNEL_map + phys_base;
return x - PAGE_OFFSET;
}
EXPORT_SYMBOL(__phys_addr);

#endif

/*
* Fix up the linear direct mapping of the kernel to avoid cache attribute
* conflicts.
Expand Down Expand Up @@ -49,6 +61,7 @@ static int ioremap_change_attr(unsigned long phys_addr, unsigned long size,
* memmap entry.
*/
err = change_page_attr_addr(vaddr, npages, prot);

if (!err)
global_flush_tlb();

Expand Down Expand Up @@ -83,6 +96,7 @@ void __iomem *__ioremap(unsigned long phys_addr, unsigned long size,
if (phys_addr >= ISA_START_ADDRESS && last_addr < ISA_END_ADDRESS)
return (__force void __iomem *)phys_to_virt(phys_addr);

#ifdef CONFIG_X86_32
/*
* Don't allow anybody to remap normal RAM that we're using..
*/
Expand All @@ -98,6 +112,7 @@ void __iomem *__ioremap(unsigned long phys_addr, unsigned long size,
if (!PageReserved(page))
return NULL;
}
#endif

pgprot = MAKE_GLOBAL(__PAGE_KERNEL | flags);

Expand Down Expand Up @@ -211,6 +226,7 @@ void iounmap(volatile void __iomem *addr)
}
EXPORT_SYMBOL(iounmap);

#ifdef CONFIG_X86_32

int __initdata early_ioremap_debug;

Expand Down Expand Up @@ -443,3 +459,5 @@ void __this_fixmap_does_not_exist(void)
{
WARN_ON(1);
}

#endif /* CONFIG_X86_32 */
Loading

0 comments on commit 745ad88

Please sign in to comment.