linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Re: iounmap() - can't always unmap memory I've mappedt
       [not found] <20000929222813Z129135-481+1113@vger.kernel.org>
@ 2000-09-29 23:24 ` Alan Cox
  0 siblings, 0 replies; 3+ messages in thread
From: Alan Cox @ 2000-09-29 23:24 UTC (permalink / raw)
  To: Timur Tabi; +Cc: Linux Kernel Mailing list, Linux MM mailing list

> Unfortunately, this mapping is a requirement for our product.  I'd hate to have
> to create my own pte's and do it all manually.

If you are doing it at boot time as Id expect then you may need to - the SMP
code for bootstrapping has to do pte stuff itself for the same reason

--
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] 3+ messages in thread

* Re: iounmap() - can't always unmap memory I've mappedt
  2000-09-29 22:00 ` Alan Cox
@ 2000-09-29 22:12   ` Timur Tabi
  0 siblings, 0 replies; 3+ messages in thread
From: Timur Tabi @ 2000-09-29 22:12 UTC (permalink / raw)
  To: Linux Kernel Mailing list, Linux MM mailing list

** Reply to message from Alan Cox <alan@lxorguk.ukuu.org.uk> on Fri, 29 Sep
2000 23:00:16 +0100 (BST)


> > "num_pages" is usually just equal to 1.  This code appears to work very well.
> > However, when I call the iounmap function on the memory obtained via
> > ioremap_nocache, sometimes I hit a kernel BUG().  The code which causes the bug
> > is in page_alloc.c, line 85 (in function  __free_pages_ok):
> > 
> > 	if (page->buffers)
> > 		BUG();
> 
> This sounds like you are trying to do maps on pages that are in use. No can do

Why not?  I mean, I can access the memory anyway from the driver, since it's
all mapped linearly via phys_to_virt.  All I'm really doing is creating a
temporary alias.

Unfortunately, this mapping is a requirement for our product.  I'd hate to have
to create my own pte's and do it all manually.

What confuses me is what ioremap_nocache() doesn't fail.  Why are these tests
(e.g. page->buffers) not in ioremap_nocache()?


-- 
Timur Tabi - ttabi@interactivesi.com
Interactive Silicon - http://www.interactivesi.com

When replying to a mailing-list message, please don't cc: me, because then I'll just get two copies of the same message.
--
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] 3+ messages in thread

* Re: iounmap() - can't always unmap memory I've mappedt
       [not found] <20000929221109Z129234-481+1111@vger.kernel.org>
@ 2000-09-29 22:00 ` Alan Cox
  2000-09-29 22:12   ` Timur Tabi
  0 siblings, 1 reply; 3+ messages in thread
From: Alan Cox @ 2000-09-29 22:00 UTC (permalink / raw)
  To: Timur Tabi; +Cc: Linux Kernel Mailing list, Linux MM mailing list

> "num_pages" is usually just equal to 1.  This code appears to work very well.
> However, when I call the iounmap function on the memory obtained via
> ioremap_nocache, sometimes I hit a kernel BUG().  The code which causes the bug
> is in page_alloc.c, line 85 (in function  __free_pages_ok):
> 
> 	if (page->buffers)
> 		BUG();

This sounds like you are trying to do maps on pages that are in use. No can do

--
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] 3+ messages in thread

end of thread, other threads:[~2000-09-29 23:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20000929222813Z129135-481+1113@vger.kernel.org>
2000-09-29 23:24 ` iounmap() - can't always unmap memory I've mappedt Alan Cox
     [not found] <20000929221109Z129234-481+1111@vger.kernel.org>
2000-09-29 22:00 ` Alan Cox
2000-09-29 22:12   ` Timur Tabi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox