From: Niklas Cassel <niklas.cassel@linaro.org>
To: gregkh@linuxfoundation.org
Cc: marc.zyngier@arm.com, gustavo.pimentel@synopsys.com,
lorenzo.pieralisi@arm.com, svarbanov@mm-sol.com,
tpiepho@impinj.com, stable@vger.kernel.org
Subject: Re: FAILED: patch "[PATCH] PCI: dwc: Move interrupt acking into the proper callback" failed to apply to 4.14-stable tree
Date: Thu, 17 Jan 2019 00:43:08 +0100 [thread overview]
Message-ID: <20190116234308.GA23572@centauri.lan> (raw)
In-Reply-To: <1547540677157229@kroah.com>
On Tue, Jan 15, 2019 at 09:24:37AM +0100, gregkh@linuxfoundation.org wrote:
>
> The patch below does not apply to the 4.14-stable tree.
> If someone wants it applied there, or to any other stable or longterm
> tree, then please email the backport, including the original git commit
> id to <stable@vger.kernel.org>.
Hello Marc,
You said that you were going to backport this to 4.14, right?
IIRC, you said something about creating a simple dw_pci_bottom_ack()
(since 4.14 lacks a ack() function).
Kind regards,
Niklas
>
> thanks,
>
> greg k-h
>
> ------------------ original commit in Linus's tree ------------------
>
> From 3f7bb2ec20ce07c02b2002349d256c91a463fcc5 Mon Sep 17 00:00:00 2001
> From: Marc Zyngier <marc.zyngier@arm.com>
> Date: Tue, 13 Nov 2018 22:57:34 +0000
> Subject: [PATCH] PCI: dwc: Move interrupt acking into the proper callback
>
> The write to the status register is really an ACK for the HW,
> and should be treated as such by the driver. Let's move it to the
> irq_ack() callback, which will prevent people from moving it around
> in order to paper over other bugs.
>
> Fixes: 8c934095fa2f ("PCI: dwc: Clear MSI interrupt status after it is handled,
> not before")
> Fixes: 7c5925afbc58 ("PCI: dwc: Move MSI IRQs allocation to IRQ domains
> hierarchical API")
> Link: https://lore.kernel.org/linux-pci/20181113225734.8026-1-marc.zyngier@arm.com/
> Reported-by: Trent Piepho <tpiepho@impinj.com>
> Tested-by: Niklas Cassel <niklas.cassel@linaro.org>
> Tested-by: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
> Tested-by: Stanimir Varbanov <svarbanov@mm-sol.com>
> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
> [lorenzo.pieralisi@arm.com: updated commit log]
> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> Cc: stable@vger.kernel.org
>
> diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c
> index 610a5e018d27..0fa9e8fdce66 100644
> --- a/drivers/pci/controller/dwc/pcie-designware-host.c
> +++ b/drivers/pci/controller/dwc/pcie-designware-host.c
> @@ -99,9 +99,6 @@ irqreturn_t dw_handle_msi_irq(struct pcie_port *pp)
> (i * MAX_MSI_IRQS_PER_CTRL) +
> pos);
> generic_handle_irq(irq);
> - dw_pcie_wr_own_conf(pp, PCIE_MSI_INTR0_STATUS +
> - (i * MSI_REG_CTRL_BLOCK_SIZE),
> - 4, 1 << pos);
> pos++;
> }
> }
> @@ -200,14 +197,18 @@ static void dw_pci_bottom_unmask(struct irq_data *data)
>
> static void dw_pci_bottom_ack(struct irq_data *d)
> {
> - struct msi_desc *msi = irq_data_get_msi_desc(d);
> - struct pcie_port *pp;
> + struct pcie_port *pp = irq_data_get_irq_chip_data(d);
> + unsigned int res, bit, ctrl;
> unsigned long flags;
>
> - pp = msi_desc_to_pci_sysdata(msi);
> + ctrl = d->hwirq / MAX_MSI_IRQS_PER_CTRL;
> + res = ctrl * MSI_REG_CTRL_BLOCK_SIZE;
> + bit = d->hwirq % MAX_MSI_IRQS_PER_CTRL;
>
> raw_spin_lock_irqsave(&pp->lock, flags);
>
> + dw_pcie_wr_own_conf(pp, PCIE_MSI_INTR0_STATUS + res, 4, 1 << bit);
> +
> if (pp->ops->msi_irq_ack)
> pp->ops->msi_irq_ack(d->hwirq, pp);
>
>
next prev parent reply other threads:[~2019-01-16 23:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-15 8:24 FAILED: patch "[PATCH] PCI: dwc: Move interrupt acking into the proper callback" failed to apply to 4.14-stable tree gregkh
2019-01-16 23:43 ` Niklas Cassel [this message]
2019-01-17 9:58 ` Marc Zyngier
2019-01-18 16:00 ` Niklas Cassel
2019-01-18 16:22 ` Marc Zyngier
2019-01-19 11:52 ` Niklas Cassel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190116234308.GA23572@centauri.lan \
--to=niklas.cassel@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=gustavo.pimentel@synopsys.com \
--cc=lorenzo.pieralisi@arm.com \
--cc=marc.zyngier@arm.com \
--cc=stable@vger.kernel.org \
--cc=svarbanov@mm-sol.com \
--cc=tpiepho@impinj.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).