public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* ioremap()/iounmap() problem
@ 2009-01-19 10:23 Tomi Valkeinen
  2009-01-19 11:01 ` Russell King - ARM Linux
  2009-01-19 13:34 ` Woodruff, Richard
  0 siblings, 2 replies; 21+ messages in thread
From: Tomi Valkeinen @ 2009-01-19 10:23 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: linux-omap

Hi,

Running with latest linux-omap kernel on OMAP3 SDP board, I have problem
with iounmap(). It looks like iounmap() does not properly free large
areas. Below is a test which fails for me in 6-7 loops.

OMAP spesific ioremap code doesn't do much, so I think it's somewhere in
generic ARM code. I looked at the ioremap code and for larger areas the
code uses area sections, and I believe the bug is somewhere there. 

Does this work on other processors?

 Tomi



#include <linux/module.h>
#include <linux/io.h>

static int test_init(void)
{
	const unsigned long paddr = 0x70000000;
	const unsigned long size = 2048 * 2048 * 4;
	void *vaddr;
	int i;

	for (i = 0; i < 200; ++i) {
		vaddr = ioremap(paddr, size);

		if (!vaddr) {
			printk("couldn't ioremap\n");
			break;
		}

		printk("ioremapped to %p\n", vaddr);

		iounmap(vaddr);
	}

	return 0;
}

static void test_exit(void) { }

module_init(test_init);
module_exit(test_exit);




^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2009-01-22 15:25 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-19 10:23 ioremap()/iounmap() problem Tomi Valkeinen
2009-01-19 11:01 ` Russell King - ARM Linux
2009-01-19 12:27   ` Tomi Valkeinen
2009-01-19 12:53     ` Russell King - ARM Linux
2009-01-19 13:49       ` Tomi Valkeinen
2009-01-21 19:23         ` Russell King - ARM Linux
2009-01-22 11:55           ` Tomi Valkeinen
2009-01-22 15:25             ` Matt Gerassimoff
2009-01-19 13:34 ` Woodruff, Richard
2009-01-19 13:43   ` Russell King - ARM Linux
2009-01-19 13:48     ` Woodruff, Richard
2009-01-19 13:56       ` Russell King - ARM Linux
2009-01-19 15:06         ` Matt Gerassimoff
2009-01-19 15:22           ` Russell King - ARM Linux
2009-01-19 15:39             ` Matt Gerassimoff
2009-01-19 15:58               ` Russell King - ARM Linux
2009-01-19 16:13                 ` Russell King - ARM Linux
2009-01-19 17:07                   ` Matt Gerassimoff
2009-01-19 17:14                     ` Russell King - ARM Linux
2009-01-19 17:47                       ` Matt Gerassimoff
2009-01-19 17:07                   ` Woodruff, Richard

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