lkml.org 
[lkml]   [2015]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] n_tty: use kmalloc() instead of vmalloc() to avoid crash on armada-xp
On Wed, Mar 11, 2015 at 09:38:53PM +0300, Stas Sergeev wrote:
> 11.03.2015 21:11, Thomas Petazzoni пишет:
> > Dear Stas Sergeev,
> >
> > On Wed, 11 Mar 2015 20:56:50 +0300, Stas Sergeev wrote:
> >
> >> It doesn't look like it works as intended.
> >> Got the crash below.
> >> Please note the mappings beyond 0xe0000000, so I wonder if
> >> the option worked as expected?
> > Are you sure you're not confusing virtual addresses and physical
> > addresses?
> OK, so I changed Russel's printk to the following way:
>
> +printk("vmalloc: mapping page %p (0x%08lx000) at 0x%08lx 0x%08zx\n",
> + page, page_to_pfn(page), addr, __pa(addr));
>
> (added __pa(addr)) and now I hope I am seeing the physical
> addresses at the last column:

No, you don't want to do that...

> [ 19.023836] vmalloc: mapping page ef7f1fa0 (0x000bfc7d000) at
| `- physical address
`-struct page address
> 0xf04a3000 0x304a3000
`- virtual address

__pa() doesn't work on addresses in the vmalloc region.

--
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.


\
 
 \ /
  Last update: 2015-03-11 20:01    [W:1.551 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site