Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 80523
b: refs/heads/master
c: 266b9f8
h: refs/heads/master
i:
  80521: 496542c
  80519: 294c132
v: v3
  • Loading branch information
Thomas Gleixner authored and Ingo Molnar committed Jan 30, 2008
1 parent 7ca6ca3 commit 07faac0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 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: 950f9d95bed1a366434d3597ea75f5b9d772d74f
refs/heads/master: 266b9f8727976769e2ed2dad77ac9295f37e321e
17 changes: 4 additions & 13 deletions trunk/arch/x86/mm/ioremap.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,23 +125,14 @@ 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..
*/
if (phys_addr <= virt_to_phys(high_memory - 1)) {
char *t_addr, *t_end;
struct page *page;

t_addr = __va(phys_addr);
t_end = t_addr + (size - 1);

for (page = virt_to_page(t_addr);
page <= virt_to_page(t_end); page++)
if (!PageReserved(page))
return NULL;
for (offset = phys_addr >> PAGE_SHIFT; offset < max_pfn_mapped &&
(offset << PAGE_SHIFT) < last_addr; offset++) {
if (page_is_ram(offset))
return NULL;
}
#endif

pgprot = MAKE_GLOBAL(__PAGE_KERNEL | flags);

Expand Down

0 comments on commit 07faac0

Please sign in to comment.