9 #include <linux/types.h>
10 #include <linux/pci.h>
11 #include <linux/export.h>
12 #include <asm/sn/addrs.h>
52 pdi_linux_pcidev->devfn)) - 1;
72 ate_count =
IOPG(req_size
92 ate = ate_flags | (xio_addr -
offset);
109 ate_write(pcibus_info, ate_index, ate_count, ate);
128 pcibr_dmatrans_direct64(
struct pcidev_info * info,
u64 paddr,
129 u64 dma_attributes,
int dma_flags)
131 struct pcibus_info *pcibus_info = (
struct pcibus_info *)
142 pci_addr |= dma_attributes;
166 pcibr_dmatrans_direct32(
struct pcidev_info * info,
167 u64 paddr,
size_t req_size,
u64 flags,
int dma_flags)
170 struct pcibus_info *pcibus_info = (
struct pcibus_info *)pcidev_info->
182 if (dma_flags & SN_DMA_MSI)
192 offset = xio_addr - xio_base;
193 endoff = req_size +
offset;
194 if ((req_size > (1ULL << 31)) ||
195 (xio_addr < xio_base) ||
196 (endoff > (1ULL << 31))) {
211 struct pcibus_info *pcibus_info =
266 is_tio = (nasid & 1);
277 if (itte_index >= 0) {
278 itte = flush_nasid_list->
iio_itte[itte_index];
293 p = &flush_nasid_list->
widget_p[wid_num][0];
302 && addr <= common->sfdl_bar_list[j].end)
305 if (j < PCI_ROM_RESOURCE && common->sfdl_bar_list[j].
start != 0)
310 if (i == DEV_PER_WIDGET)
373 dma_handle = pcibr_dmatrans_direct64(pcidev_info, phys_addr,
377 dma_handle = pcibr_dmatrans_direct32(pcidev_info, phys_addr,
385 dma_handle = pcibr_dmamap_ate32(pcidev_info, phys_addr,
396 size_t size,
int dma_flags)
401 if (hwdev->
dev.coherent_dma_mask == ~0
UL) {
402 dma_handle = pcibr_dmatrans_direct64(pcidev_info, phys_addr,
405 dma_handle = (
dma_addr_t) pcibr_dmamap_ate32(pcidev_info,