The replies for people in the know (Rik, wli) give a clue but not an
answer. Use mere mortals want a proper patch in order to build and
use this kernel.
I will summarise my understanding so far; The original code says:
unsigned long
nv_get_phys_address(unsigned long address)
{
pgd_t *pg_dir;
pmd_t *pg_mid_dir;
pte_t *pte__, pte;
.....
#if defined (pte_offset_atomic)
pte__ = pte_offset_atomic(pg_mid_dir, address);
pte = *pte__;
pte_kunmap(pte__);
#else
pte__ = NULL;
pte = *pte_offset(pg_mid_dir, address);
#endif
if (!pte_present(pte))
goto failed;
return ((pte_val(pte) & KERN_PAGE_MASK) | NV_MASK_OFFSET(address));
.....
}
The last line above is the problem. So far I could see two possible
changes that will compile, but I do not know which will function
correctly. The first replacement option:
pte = *pte_offset(pg_mid_dir, address);
The second replacement option is more involved:
pte__ = pte_offset_map(pg_mid_dir, address);
pte = *pte__;
if (!pte_present(pte))
goto failed;
pte_unmap(pte__);
Reading the patch itself I see places where the first approach is used,
while elsewhere the second is used. I do not know what pte_val(pte)
requires though. Can we do the pte_unmap(pte__) earlier or is the
mapping
necessary for pte_present(pte)? Will this work:
pte__ = pte_offset_map(pg_mid_dir, address);
pte = *pte__;
pte_unmap(pte__);
In summary, you can see that for someone who is not intimately involved
the answers so far do not provide a working patch.
Thanks everybody.
-- Eyal Lebedinsky (eyal@eyal.emu.id.au) <http://samba.org/eyal/> - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/