Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'dma-mapping-5.1-1' of git://git.infradead.org/users/hch/dma-mapping

Pull dma-mapping fixes from Christoph Hellwig:
"Fix a sparc64 sun4v_pci regression introduced in this merged window,
and a dma-debug stracktrace regression from the big refactor last
merge window"

* tag 'dma-mapping-5.1-1' of git://git.infradead.org/users/hch/dma-mapping:
dma-debug: only skip one stackframe entry
sparc64/pci_sun4v: fix ATU checks for large DMA masks

+12 -10
+11 -9
arch/sparc/kernel/pci_sun4v.c
··· 73 73 p->npages = 0; 74 74 } 75 75 76 + static inline bool iommu_use_atu(struct iommu *iommu, u64 mask) 77 + { 78 + return iommu->atu && mask > DMA_BIT_MASK(32); 79 + } 80 + 76 81 /* Interrupts must be disabled. */ 77 82 static long iommu_batch_flush(struct iommu_batch *p, u64 mask) 78 83 { ··· 97 92 prot &= (HV_PCI_MAP_ATTR_READ | HV_PCI_MAP_ATTR_WRITE); 98 93 99 94 while (npages != 0) { 100 - if (mask <= DMA_BIT_MASK(32) || !pbm->iommu->atu) { 95 + if (!iommu_use_atu(pbm->iommu, mask)) { 101 96 num = pci_sun4v_iommu_map(devhandle, 102 97 HV_PCI_TSBID(0, entry), 103 98 npages, ··· 184 179 unsigned long flags, order, first_page, npages, n; 185 180 unsigned long prot = 0; 186 181 struct iommu *iommu; 187 - struct atu *atu; 188 182 struct iommu_map_table *tbl; 189 183 struct page *page; 190 184 void *ret; ··· 209 205 memset((char *)first_page, 0, PAGE_SIZE << order); 210 206 211 207 iommu = dev->archdata.iommu; 212 - atu = iommu->atu; 213 - 214 208 mask = dev->coherent_dma_mask; 215 - if (mask <= DMA_BIT_MASK(32) || !atu) 209 + if (!iommu_use_atu(iommu, mask)) 216 210 tbl = &iommu->tbl; 217 211 else 218 - tbl = &atu->tbl; 212 + tbl = &iommu->atu->tbl; 219 213 220 214 entry = iommu_tbl_range_alloc(dev, tbl, npages, NULL, 221 215 (unsigned long)(-1), 0); ··· 335 333 atu = iommu->atu; 336 334 devhandle = pbm->devhandle; 337 335 338 - if (dvma <= DMA_BIT_MASK(32)) { 336 + if (!iommu_use_atu(iommu, dvma)) { 339 337 tbl = &iommu->tbl; 340 338 iotsb_num = 0; /* we don't care for legacy iommu */ 341 339 } else { ··· 376 374 npages >>= IO_PAGE_SHIFT; 377 375 378 376 mask = *dev->dma_mask; 379 - if (mask <= DMA_BIT_MASK(32)) 377 + if (!iommu_use_atu(iommu, mask)) 380 378 tbl = &iommu->tbl; 381 379 else 382 380 tbl = &atu->tbl; ··· 512 510 IO_PAGE_SIZE) >> IO_PAGE_SHIFT; 513 511 514 512 mask = *dev->dma_mask; 515 - if (mask <= DMA_BIT_MASK(32)) 513 + if (!iommu_use_atu(iommu, mask)) 516 514 tbl = &iommu->tbl; 517 515 else 518 516 tbl = &atu->tbl;
+1 -1
kernel/dma/debug.c
··· 706 706 #ifdef CONFIG_STACKTRACE 707 707 entry->stacktrace.max_entries = DMA_DEBUG_STACKTRACE_ENTRIES; 708 708 entry->stacktrace.entries = entry->st_entries; 709 - entry->stacktrace.skip = 2; 709 + entry->stacktrace.skip = 1; 710 710 save_stack_trace(&entry->stacktrace); 711 711 #endif 712 712