svn commit: r339212 - head/sys/powerpc/powernv
Justin Hibbits
jhibbits at FreeBSD.org
Sat Oct 6 03:20:27 UTC 2018
Author: jhibbits
Date: Sat Oct 6 03:20:26 2018
New Revision: 339212
URL: https://svnweb.freebsd.org/changeset/base/339212
Log:
powerpc64/powernv: Don't mask MSIs in OPAL
Summary:
Discussing with Benjamin Herrenschmidt, MSIs, and edge-triggered
interrupts in general, must not be masked in XICS and XIVE, else
subsequent interrupts may be ignored.
Testing locally on my Talos II (single CPU, 18-core POWER9), NVMe now
works with MSI, improving read throughput by ~70% (900MB/s -> 1.67GB/s,
with 64MB block size) over INTx interrupts, and snd_hda(4) now will
actually play music with MSI. Previously, snd_hda(4) would not receive
interrupts, timing out, and declaring the channels dead.
This has also been tested by Kevin Bowling, and others, with great
success. Kevin reported NVMe unusable on his Talos II prior to this
patch.
Reviewed by: nwhitehorn, kbowling
Approved by: re(rgrimes)
Differential Revision: https://reviews.freebsd.org/D17356
Modified:
head/sys/powerpc/powernv/opal_pci.c
Modified: head/sys/powerpc/powernv/opal_pci.c
==============================================================================
--- head/sys/powerpc/powernv/opal_pci.c Sat Oct 6 02:10:32 2018 (r339211)
+++ head/sys/powerpc/powernv/opal_pci.c Sat Oct 6 03:20:26 2018 (r339212)
@@ -95,8 +95,6 @@ static int opalpci_route_interrupt(device_t bus, devic
*/
static void opalpic_pic_enable(device_t dev, u_int irq, u_int vector);
static void opalpic_pic_eoi(device_t dev, u_int irq);
-static void opalpic_pic_mask(device_t dev, u_int irq);
-static void opalpic_pic_unmask(device_t dev, u_int irq);
/*
* Commands
@@ -143,8 +141,6 @@ static device_method_t opalpci_methods[] = {
/* PIC interface for MSIs */
DEVMETHOD(pic_enable, opalpic_pic_enable),
DEVMETHOD(pic_eoi, opalpic_pic_eoi),
- DEVMETHOD(pic_mask, opalpic_pic_mask),
- DEVMETHOD(pic_unmask, opalpic_pic_unmask),
DEVMETHOD_END
};
@@ -650,7 +646,10 @@ opalpci_map_msi(device_t dev, device_t child, int irq,
static void
opalpic_pic_enable(device_t dev, u_int irq, u_int vector)
{
+ struct opalpci_softc *sc = device_get_softc(dev);
+
PIC_ENABLE(root_pic, irq, vector);
+ opal_call(OPAL_PCI_MSI_EOI, sc->phb_id, irq);
}
static void opalpic_pic_eoi(device_t dev, u_int irq)
@@ -662,21 +661,3 @@ static void opalpic_pic_eoi(device_t dev, u_int irq)
PIC_EOI(root_pic, irq);
}
-
-static void opalpic_pic_mask(device_t dev, u_int irq)
-{
- PIC_MASK(root_pic, irq);
-}
-
-static void opalpic_pic_unmask(device_t dev, u_int irq)
-{
- struct opalpci_softc *sc;
-
- sc = device_get_softc(dev);
-
- PIC_UNMASK(root_pic, irq);
-
- opal_call(OPAL_PCI_MSI_EOI, sc->phb_id, irq);
-}
-
-
More information about the svn-src-head
mailing list