From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0F62EC61CE4 for ; Sat, 19 Jan 2019 11:52:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C2BF52084C for ; Sat, 19 Jan 2019 11:52:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=linaro.org header.i=@linaro.org header.b="CHP0q7Z3" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727881AbfASLwb (ORCPT ); Sat, 19 Jan 2019 06:52:31 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:37310 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727879AbfASLwb (ORCPT ); Sat, 19 Jan 2019 06:52:31 -0500 Received: by mail-lj1-f194.google.com with SMTP id t18-v6so13826246ljd.4 for ; Sat, 19 Jan 2019 03:52:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=YKaY+x+m0NZGL1kMp9oKIc+9F0fH8tc0LyWA5r+A8wc=; b=CHP0q7Z3dcE9gWZm9A9Py4Du9zaXp5fGhy4aGa/t/k4lBt+UNttVVIGTvzaWLN0/lD rmybcqF98e9lB5amWQvGao5/FppUMMxdLzCWlbG5TFFYzX1pFwKOHk9dTPOkMKhQxhcr ThF+V6fCqwTC2IvCz2I1SJwN4V80UIMQLntoc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=YKaY+x+m0NZGL1kMp9oKIc+9F0fH8tc0LyWA5r+A8wc=; b=Lj7pivbjE7kcRt19O5rEIf0z+wKCcfZdqaVpVpmBa2fiv0aIJlF8Vtb5Rh7KT5BCmO WoP2nqUH3W1ubaHBrm2MsN6ut0N6OsdIUZabF++dVCEEAfrxc4yfN3tCl9gIUZejIF7o TIfWofb9ZV5lkUkb4JRWWY2qOrw8idfugaEm8wq738sDOB7dvihMBaQLxnC81wKrXBLq XwTZuefVodgAhnbDZFTrFVVcU10t3Vzq5UkpPR2E+lqiHrDdUE0vZ7FdRqDQnVg/x6D3 ckD4uHMRa7pJTur9lu6UP4Ch9HhRSEHfa+EBiCtmL+MFZD7IkpfiKkGFnZQlPwhwj2r4 BHRQ== X-Gm-Message-State: AJcUukcPUMUG1dd+EOAcScvXPmxRgT61qKPSbfeZXHf2DrzMpyc48uCo sxMFPHh0/R5/83dwMFFKWLMqyw== X-Google-Smtp-Source: ALg8bN5DcWvLwmqPPwzcXu9poR5JB9/ftDzuwBPPeTEMrMA73R4LnK1TG/Dkv0TWECjF6y8ysj2BBw== X-Received: by 2002:a2e:4601:: with SMTP id t1-v6mr15050278lja.111.1547898748552; Sat, 19 Jan 2019 03:52:28 -0800 (PST) Received: from centauri.lan (h-229-118.A785.priv.bahnhof.se. [5.150.229.118]) by smtp.gmail.com with ESMTPSA id m10-v6sm1172115ljj.34.2019.01.19.03.52.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 19 Jan 2019 03:52:27 -0800 (PST) Date: Sat, 19 Jan 2019 12:52:25 +0100 From: Niklas Cassel To: Marc Zyngier Cc: gregkh@linuxfoundation.org, 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 Message-ID: <20190119115225.GA10212@centauri.lan> References: <1547540677157229@kroah.com> <20190116234308.GA23572@centauri.lan> <7c303b33-6679-5040-e5a2-b14575b1d0d2@arm.com> <20190118160043.GA23201@centauri.lan> <58351f7a-e00c-4c7a-ba9f-73482bbda1ec@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <58351f7a-e00c-4c7a-ba9f-73482bbda1ec@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Fri, Jan 18, 2019 at 04:22:15PM +0000, Marc Zyngier wrote: > On 18/01/2019 16:00, Niklas Cassel wrote: > > On Thu, Jan 17, 2019 at 09:58:43AM +0000, Marc Zyngier wrote: > >> On 16/01/2019 23:43, Niklas Cassel wrote: > >>> 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 . > >>> > >>> Hello Marc, > >>> > >>> You said that you were going to backport this to 4.14, right? > >> > >> Me, or anyone else. Preferably someone who, like you, has the HW at hand (I don't). > >> > >>> IIRC, you said something about creating a simple dw_pci_bottom_ack() > >>> (since 4.14 lacks a ack() function). > >> > >> Indeed. Something like this: > >> > >> diff --git a/drivers/pci/dwc/pcie-designware-host.c b/drivers/pci/dwc/pcie-designware-host.c > >> index bc3e2d8d0cce..f4f3eeee10af 100644 > >> --- a/drivers/pci/dwc/pcie-designware-host.c > >> +++ b/drivers/pci/dwc/pcie-designware-host.c > >> @@ -45,8 +45,19 @@ static int dw_pcie_wr_own_conf(struct pcie_port *pp, int where, int size, > >> return dw_pcie_write(pci->dbi_base + where, size, val); > >> } > >> > >> +static void dwc_irq_ack(struct irq_data *d) > >> +{ > >> + struct msi_desc *msi = irq_data_get_msi_desc(d); > >> + struct pcie_port *pp = msi_desc_to_pci_sysdata(msi); > >> + int pos = d->hwirq % 32; > >> + int i = d->hwirq / 32; > >> + > >> + dw_pcie_wr_own_conf(pp, PCIE_MSI_INTR0_STATUS + i * 12, 4, BIT(pos)); > >> +} > >> + > > > > Thanks Marc. > > > > This does not seem to work. > > It appears that the ack function is never called. > > I assume that this is because of: > > > > irq_set_chip_and_handler(irq, &dw_msi_irq_chip, handle_simple_irq); > > Ah, indeed, I forgot about that particular nugget. > > > > > is it safe to simply change this to handle_edge_irq? > > (Which seems to be the case after this after this driver's > > MSI handling was heavily refactored in 4.17.) > > Yes, this should be just a matter of using the right interrupt flow. > Please let me know if that works for you. Hello Marc, I ran a simple stress test during the night with your patch plus: - irq_set_chip_and_handler(irq, &dw_msi_irq_chip, handle_simple_irq); + irq_set_chip_and_handler(irq, &dw_msi_irq_chip, handle_edge_irq); without any issues. (Feel free to add my Tested-by). So this looks good to me :) Thanks! Kind regards, Niklas > > > > > I know that you were against reverting 8c934095fa2f ("PCI: dwc: Clear > > MSI interrupt status after it is handled, not before") on mainline, > > since that wouldn't hinder people from moving around stuff in the > > future, but perhaps reverting this commit on 4.14 is safer than > > changing the irq handler type? > > I still don't think that it is a good idea. Using the correct flow is > just as important in order to properly honors the interrupt masking > which the "simple" flow completely ignores. > > Thanks, > > M. > -- > Jazz is not dead. It just smells funny...