mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-05-09 16:53:48 +00:00
x86: ioremap(), extend check to all RAM pages
Suggested by Jan Beulich. Signed-off-by: Ingo Molnar <mingo@elte.hu> Acked-by: Jan Beulich <jbeulich@novell.com>
This commit is contained in:
parent
b089c12b25
commit
bdd3cee2e4
1 changed files with 3 additions and 2 deletions
|
@ -146,8 +146,9 @@ static void __iomem *__ioremap(resource_size_t phys_addr, unsigned long size,
|
||||||
/*
|
/*
|
||||||
* Don't allow anybody to remap normal RAM that we're using..
|
* Don't allow anybody to remap normal RAM that we're using..
|
||||||
*/
|
*/
|
||||||
for (pfn = phys_addr >> PAGE_SHIFT; pfn < max_pfn_mapped &&
|
for (pfn = phys_addr >> PAGE_SHIFT;
|
||||||
(pfn << PAGE_SHIFT) < last_addr; pfn++) {
|
(pfn << PAGE_SHIFT) < last_addr; pfn++) {
|
||||||
|
|
||||||
if (page_is_ram(pfn) && pfn_valid(pfn) &&
|
if (page_is_ram(pfn) && pfn_valid(pfn) &&
|
||||||
!PageReserved(pfn_to_page(pfn)))
|
!PageReserved(pfn_to_page(pfn)))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Add table
Reference in a new issue