* Woodruff, Richard <r-woodruff2@xxxxxx> [050609 10:59]: > If you don't have CONFIG_DISCONTIGMEM support enabled, this used to just > map to a simple macro. > > 0xc1c8c000-0xc0000000+0x10000000 = 11c8c000 > > There should be another layer of indirection if CONFIG_DISCONTIGMEM > support is turned on which needs to be defined properly. Do you have > that enabled by chance? > > open-source-bounces@xxxxxxxxxxxxxx] On Behalf Of Tim Bird > > > > I'm trying to use virt_to_phys() to find the physical address > > of some kernel RAM. (This is an on ARM OSK board). > > It's not working as I expected: > > > > membase = kmalloc(DEBUG_MEM_LENGTH, GFP_ATOMIC); > > physbase = virt_to_phys(membase); > > printk("membase=0x%p\n", membase); > > printk("physbase=0x%lu\n", physbase); > > > > Gives me: > > membase=0xc1c8c000 > > physbase=0x298369024 > > > > physbase isn't in the range of real physical memory on my > > machine. (I'm only interested in the first page of the > > allocation, so I don't care if subsequent pages are > > not physically contiguous.) It should work, otherwise the memory would not work :) How about trying printk with 0x%lx instead? Tony -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/