On Fri, May 18, 2001 at 09:46:17PM +0400, Ivan Kokshaysky wrote:
> -void
> -cia_pci_tbi(struct pci_controller *hose, dma_addr_t start, dma_addr_t end)
> -{
> -     wmb();
> -     *(vip)CIA_IOC_PCI_TBIA = 3;     /* Flush all locked and unlocked.  */
> -     mb();
> -     *(vip)CIA_IOC_PCI_TBIA;
> -}

I'd rather keep this around.  It should be possible to use on CIA2.

> +/* Even if the tbia works, we cannot use it. It effectively locks the
> + * chip (as well as direct write to the tag registers) if there is a
> + * SG DMA operation in progress. This is true at least for PYXIS rev. 1.

Uggg.  How did you discover this?

> +/*   __save_and_cli(flags);  Don't need this -- we're called from
> +                             pci_unmap_xx() or iommu_arena_alloc()
> +                             with IPL_MAX after spin_lock_irqsave() */

Just delete it, don't comment it out.  You might mention in the
function header comment that we're called with interrupts disabled.

>       *(vip)CIA_IOC_CIA_CTRL = ctrl;
>       mb();
> -     *(vip)CIA_IOC_CIA_CTRL;
> -     mb();

I'm pretty sure you don't want to do this.  You're risking a
subsequent i/o being posted through the PCI bridge before this
takes effect.  An "mb" is only effective inside the CPU.



r~
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to