// SPDX-License-Identifier: GPL-2.0 /* * Virtual DMA allocation * * (C) 1999 Thomas Bogendoerfer (tsbogend@alpha.franken.de) * * 11/26/2000 -- disabled the existing code because it didn't work for * me in 2.4. Replaced with a significantly more primitive version * similar to the sun3 code. the old functionality was probably more * desirable, but.... -- Sam Creasey (sammy@oh.verio.com) *
*/
/* create a virtual mapping for a page assigned within the IOMMU
so that the cpu can reach it easily */ inlineint dvma_map_cpu(unsignedlong kaddr, unsignedlong vaddr, int len)
{
pgd_t *pgd;
p4d_t *p4d;
pud_t *pud; unsignedlong end; int ret = 0;
int dvma_map_iommu(unsignedlong kaddr, unsignedlong baddr, int len)
{ unsignedlong end, index;
index = baddr >> DVMA_PAGE_SHIFT;
end = ((baddr+len) >> DVMA_PAGE_SHIFT);
if(len & ~DVMA_PAGE_MASK)
end++;
for(; index < end ; index++) { // if(dvma_entry_use(index)) // BUG(); // pr_info("mapping pa %lx to ba %lx\n", __pa(kaddr), // index << DVMA_PAGE_SHIFT);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.