Thread (30 messages) 30 messages, 2 authors, 2021-06-15

Re: [PATCH v9 01/14] swiotlb: Refactor swiotlb init functions

flat view

From: Claire Chang <hidden>
Date: 2021-06-15 04:06:36
Also in: dri-devel, intel-gfx, linux-devicetree, linux-iommu, linux-pci, lkml, xen-devel

On Mon, Jun 14, 2021 at 2:16 PM Christoph Hellwig [off-list ref] wrote:
On Fri, Jun 11, 2021 at 11:26:46PM +0800, Claire Chang wrote:
quoted
+     spin_lock_init(&mem->lock);
+     for (i = 0; i < mem->nslabs; i++) {
+             mem->slots[i].list = IO_TLB_SEGSIZE - io_tlb_offset(i);
+             mem->slots[i].orig_addr = INVALID_PHYS_ADDR;
+             mem->slots[i].alloc_size = 0;
+     }
+
+     if (memory_decrypted)
+             set_memory_decrypted((unsigned long)vaddr, bytes >> PAGE_SHIFT);
+     memset(vaddr, 0, bytes);
We don't really need to do this call before the memset.  Which means we
can just move it to the callers that care instead of having a bool
argument.

Otherwise looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>
Thanks for the review. Will wait more days for other reviews and send
v10 to address the comments in this and other patches.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help