[RFCv1 07/11] irqchip: armada-370-xp: add MSI support to interrupt controller driver
Arnd Bergmann
arnd at arndb.de
Wed Mar 27 08:15:40 EST 2013
On Tuesday 26 March 2013, Thomas Petazzoni wrote:
> + msimask = readl_relaxed(per_cpu_int_base +
> + ARMADA_370_XP_IN_DRBEL_CAUSE_OFFS)
> + & PCI_MSI_DOORBELL_MASK;
> +
> + writel(~PCI_MSI_DOORBELL_MASK, per_cpu_int_base +
> + ARMADA_370_XP_IN_DRBEL_CAUSE_OFFS);
> +
Upon reading this code again, I stumbled over the barriers. You use
a readl_relaxed() without barrier but a writel() with barrier. Is
that intentional? Are you sure that you don't need a full readl()
to guarantee that all inbound DMA that was sent by the device before
the MSI message has arrived by the time the interrupt handler function
is called? It depends on the implementation of the MSI controller whether
that guarantee is already made by the fact that you are handling the
interrupt.
Arnd
More information about the devicetree-discuss
mailing list