Remove unclear comment about address truncation in busdma. Add (hopefully much clearer) comment at declaration of PHYS_TO_VM_PAGE().
Noted by: avg
This commit is contained in:
parent
3f8e071052
commit
a50730587b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=289825
@ -1089,10 +1089,6 @@ _bus_dmamap_load_phys(bus_dma_tag_t dmat,
|
||||
sl++;
|
||||
sl->vaddr = 0;
|
||||
sl->datacount = sgsize;
|
||||
/*
|
||||
* PHYS_TO_VM_PAGE() will truncate
|
||||
* unaligned addresses.
|
||||
*/
|
||||
sl->pages = PHYS_TO_VM_PAGE(curaddr);
|
||||
sl->dataoffs = curaddr & PAGE_MASK;
|
||||
} else
|
||||
@ -1214,10 +1210,6 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dmat,
|
||||
sl++;
|
||||
sl->vaddr = kvaddr;
|
||||
sl->datacount = sgsize;
|
||||
/*
|
||||
* PHYS_TO_VM_PAGE() will truncate
|
||||
* unaligned addresses.
|
||||
*/
|
||||
sl->pages = PHYS_TO_VM_PAGE(curaddr);
|
||||
sl->dataoffs = curaddr & PAGE_MASK;
|
||||
} else
|
||||
@ -1687,7 +1679,6 @@ add_bounce_page(bus_dma_tag_t dmat, bus_dmamap_t map, vm_offset_t vaddr,
|
||||
bpage->busaddr |= addr & PAGE_MASK;
|
||||
}
|
||||
bpage->datavaddr = vaddr;
|
||||
/* PHYS_TO_VM_PAGE() will truncate unaligned addresses. */
|
||||
bpage->datapage = PHYS_TO_VM_PAGE(addr);
|
||||
bpage->dataoffs = addr & PAGE_MASK;
|
||||
bpage->datacount = size;
|
||||
|
@ -993,10 +993,6 @@ _bus_dmamap_load_phys(bus_dma_tag_t dmat, bus_dmamap_t map, vm_paddr_t buf,
|
||||
sl++;
|
||||
sl->vaddr = 0;
|
||||
sl->datacount = sgsize;
|
||||
/*
|
||||
* PHYS_TO_VM_PAGE() will truncate
|
||||
* unaligned addresses.
|
||||
*/
|
||||
sl->pages = PHYS_TO_VM_PAGE(curaddr);
|
||||
sl->dataoffs = curaddr & PAGE_MASK;
|
||||
} else
|
||||
@ -1108,10 +1104,6 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf,
|
||||
sl++;
|
||||
sl->vaddr = kvaddr;
|
||||
sl->datacount = sgsize;
|
||||
/*
|
||||
* PHYS_TO_VM_PAGE() will truncate
|
||||
* unaligned addresses.
|
||||
*/
|
||||
sl->pages = PHYS_TO_VM_PAGE(curaddr);
|
||||
sl->dataoffs = curaddr & PAGE_MASK;
|
||||
} else
|
||||
@ -1541,7 +1533,6 @@ add_bounce_page(bus_dma_tag_t dmat, bus_dmamap_t map, vm_offset_t vaddr,
|
||||
bpage->busaddr |= addr & PAGE_MASK;
|
||||
}
|
||||
bpage->datavaddr = vaddr;
|
||||
/* PHYS_TO_VM_PAGE() will truncate unaligned addresses. */
|
||||
bpage->datapage = PHYS_TO_VM_PAGE(addr);
|
||||
bpage->dataoffs = addr & PAGE_MASK;
|
||||
bpage->datacount = size;
|
||||
|
@ -1009,7 +1009,6 @@ add_bounce_page(bus_dma_tag_t dmat, bus_dmamap_t map, vm_offset_t vaddr,
|
||||
bpage->busaddr |= addr & PAGE_MASK;
|
||||
}
|
||||
bpage->datavaddr = vaddr;
|
||||
/* PHYS_TO_VM_PAGE() will truncate unaligned addresses. */
|
||||
bpage->datapage = PHYS_TO_VM_PAGE(addr);
|
||||
bpage->dataoffs = addr & PAGE_MASK;
|
||||
bpage->datacount = size;
|
||||
|
@ -375,6 +375,11 @@ extern long first_page; /* first physical page number */
|
||||
|
||||
#define VM_PAGE_TO_PHYS(entry) ((entry)->phys_addr)
|
||||
|
||||
/*
|
||||
* PHYS_TO_VM_PAGE() Returns the vm_page_t object that represents a memory
|
||||
* page to which the given physical address belongs. The correct vm_page_t
|
||||
* object is returned for addresses that are not page-aligned.
|
||||
*/
|
||||
vm_page_t PHYS_TO_VM_PAGE(vm_paddr_t pa);
|
||||
|
||||
/*
|
||||
|
@ -1006,7 +1006,6 @@ add_bounce_page(bus_dma_tag_t dmat, bus_dmamap_t map, vm_offset_t vaddr,
|
||||
bpage->busaddr |= addr & PAGE_MASK;
|
||||
}
|
||||
bpage->datavaddr = vaddr;
|
||||
/* PHYS_TO_VM_PAGE() will truncate unaligned addresses. */
|
||||
bpage->datapage = PHYS_TO_VM_PAGE(addr);
|
||||
bpage->dataoffs = addr & PAGE_MASK;
|
||||
bpage->datacount = size;
|
||||
|
Loading…
Reference in New Issue
Block a user