lkml.org 
[lkml]   [2014]   [Oct]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectDoes slow_virt_to_phys() work with vmalloc() in the case of 32bit-PAE and 2MB page?
Date
Hi all,
I suspect slow_virt_to_phys() may not work with vmalloc() in
the 32-bit PAE case(when the pa > 4GB), probably due to 2MB page(?)

Is there any known issue with slow_virt_to_phys() + vmalloc() +
32-bit PAE + 2MB page?

From what I read the code of slow_virt_to_phys(), the variable 'psize' is
assigned with a value but not used at all -- is this a bug?


phys_addr_t slow_virt_to_phys(void *__virt_addr)
{
unsigned long virt_addr = (unsigned long)__virt_addr;
phys_addr_t phys_addr;
unsigned long offset;
enum pg_level level;
unsigned long psize;
unsigned long pmask;
pte_t *pte;

pte = lookup_address(virt_addr, &level);
BUG_ON(!pte);
psize = page_level_size(level);
pmask = page_level_mask(level);
offset = virt_addr & ~pmask;
phys_addr = pte_pfn(*pte) << PAGE_SHIFT;
return (phys_addr | offset);
}

Thanks,
-- Dexuan



\
 
 \ /
  Last update: 2014-10-28 08:41    [W:0.053 / U:0.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site