| .. | .. |
|---|
| 90 | 90 | { |
|---|
| 91 | 91 | struct _parisc_agp_info *info = &parisc_agp_info; |
|---|
| 92 | 92 | |
|---|
| 93 | + /* force fdc ops to be visible to IOMMU */ |
|---|
| 94 | + asm_io_sync(); |
|---|
| 95 | + |
|---|
| 93 | 96 | writeq(info->gart_base | ilog2(info->gart_size), info->ioc_regs+IOC_PCOM); |
|---|
| 94 | 97 | readq(info->ioc_regs+IOC_PCOM); /* flush */ |
|---|
| 95 | 98 | } |
|---|
| .. | .. |
|---|
| 158 | 161 | info->gatt[j] = |
|---|
| 159 | 162 | parisc_agp_mask_memory(agp_bridge, |
|---|
| 160 | 163 | paddr, type); |
|---|
| 164 | + asm_io_fdc(&info->gatt[j]); |
|---|
| 161 | 165 | } |
|---|
| 162 | 166 | } |
|---|
| 163 | 167 | |
|---|
| .. | .. |
|---|
| 191 | 195 | parisc_agp_mask_memory(struct agp_bridge_data *bridge, dma_addr_t addr, |
|---|
| 192 | 196 | int type) |
|---|
| 193 | 197 | { |
|---|
| 194 | | - return SBA_PDIR_VALID_BIT | addr; |
|---|
| 198 | + unsigned ci; /* coherent index */ |
|---|
| 199 | + dma_addr_t pa; |
|---|
| 200 | + |
|---|
| 201 | + pa = addr & IOVP_MASK; |
|---|
| 202 | + asm("lci 0(%1), %0" : "=r" (ci) : "r" (phys_to_virt(pa))); |
|---|
| 203 | + |
|---|
| 204 | + pa |= (ci >> PAGE_SHIFT) & 0xff;/* move CI (8 bits) into lowest byte */ |
|---|
| 205 | + pa |= SBA_PDIR_VALID_BIT; /* set "valid" bit */ |
|---|
| 206 | + |
|---|
| 207 | + return cpu_to_le64(pa); |
|---|
| 195 | 208 | } |
|---|
| 196 | 209 | |
|---|
| 197 | 210 | static void |
|---|
| .. | .. |
|---|
| 381 | 394 | static int __init |
|---|
| 382 | 395 | parisc_agp_init(void) |
|---|
| 383 | 396 | { |
|---|
| 384 | | - extern struct sba_device *sba_list; |
|---|
| 385 | | - |
|---|
| 386 | 397 | int err = -1; |
|---|
| 387 | 398 | struct parisc_device *sba = NULL, *lba = NULL; |
|---|
| 388 | 399 | struct lba_device *lbadev = NULL; |
|---|