* iounmap causes Oops and Aiees
@ 2001-01-08 18:29 Timur Tabi
0 siblings, 0 replies; 2+ messages in thread
From: Timur Tabi @ 2001-01-08 18:29 UTC (permalink / raw)
To: Linux MM mailing list
(sorry if this is a repost - but I haven't been seeing my posts to this or the
linux-kernel mailing lists)
I'm using 2.2.18pre15 on an i386, and the following code causes my system to be
very unstable:
unsigned long phys = virt_to_phys(high_memory) - (2 * PAGE_SIZE);
mem_map_t *mm = mem_map + MAP_NR(phys);
unsigned long flags = mm->flags;
mm->flags |= PG_reserved;
p = ioremap_nocache(phys, PAGE_SIZE);
mm->flags = flags;
ASSERT(p);
if (p) iounmap(p);
The code is located in the init_module section of my driver. It executes
without any problems. However, after the driver is loaded (it doesn't do
anything but run this code), the system rapidly becomes unstable. Symptoms are
random and include:
1. Inability to log in (login prompt doesn't respond after I type in a userid)
2. Attempting to shut down always causes an oops
3. Various kernel panics, including the "Aieee" kind.
I must be forgetting to do something critical, probably because what I'm trying
to do is not well documented but apparently supported by the kernel. I make
that assumption because of this code fragment in function __ioremap of
arch/i386/mm/ioremap.c:
if (phys_addr < virt_to_phys(high_memory))
{
char *temp_addr, *temp_end;
int i;
temp_addr = __va(phys_addr);
temp_end = temp_addr + (size - 1);
for(i = MAP_NR(temp_addr); i < MAP_NR(temp_end); i++) {
if(!PageReserved(mem_map + i))
return NULL;
}
}
As long as every page is marked as reserved, ioremap_nocache() will map the
page. My question is: why does iounmap fail when ioremap succeeds?
--
Timur Tabi - ttabi@interactivesi.com
Interactive Silicon - http://www.interactivesi.com
When replying to a mailing-list message, please direct the reply to the mailing list only. Don't send another copy to me.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
^ permalink raw reply [flat|nested] 2+ messages in thread* iounmap causes Oops and Aiees
@ 2001-01-08 18:13 Timur Tabi
0 siblings, 0 replies; 2+ messages in thread
From: Timur Tabi @ 2001-01-08 18:13 UTC (permalink / raw)
To: Linux MM mailing list
I'm using 2.2.18pre15 on an i386, and the following code causes my system to be
very unstable:
unsigned long phys = virt_to_phys(high_memory) - (2 * PAGE_SIZE);
mem_map_t *mm = mem_map + MAP_NR(phys);
unsigned long flags = mm->flags;
mm->flags |= PG_reserved;
p = ioremap_nocache(phys, PAGE_SIZE);
mm->flags = flags;
ASSERT(p);
if (p) iounmap(p);
The code is located in the init_module section of my driver. It executes
without any problems. However, after the driver is loaded (it doesn't do
anything but run this code), the system rapidly becomes unstable. Symptoms are
random and include:
1. Inability to log in (login prompt doesn't respond after I type in a userid)
2. Attempting to shut down always causes an oops
3. Various kernel panics, including the "Aieee" kind.
I must be forgetting to do something critical, probably because what I'm trying
to do is not well documented but apparently supported by the kernel. I make
that assumption because of this code fragment in function __ioremap of
arch/i386/mm/ioremap.c:
if (phys_addr < virt_to_phys(high_memory))
{
char *temp_addr, *temp_end;
int i;
temp_addr = __va(phys_addr);
temp_end = temp_addr + (size - 1);
for(i = MAP_NR(temp_addr); i < MAP_NR(temp_end); i++) {
if(!PageReserved(mem_map + i))
return NULL;
}
}
As long as every page is marked as reserved, ioremap_nocache() will map the
page. My question is: why does iounmap fail when ioremap succeeds?
--
Timur Tabi - ttabi@interactivesi.com
Interactive Silicon - http://www.interactivesi.com
When replying to a mailing-list message, please direct the reply to the mailing list only. Don't send another copy to me.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-01-08 18:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-01-08 18:29 iounmap causes Oops and Aiees Timur Tabi
-- strict thread matches above, loose matches on Subject: below --
2001-01-08 18:13 Timur Tabi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox