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,URIBL_BLOCKED,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 BF7EAC43444 for ; Fri, 18 Jan 2019 16:00:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 91B3620896 for ; Fri, 18 Jan 2019 16:00:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=linaro.org header.i=@linaro.org header.b="bNzCtnnL" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727895AbfARQAy (ORCPT ); Fri, 18 Jan 2019 11:00:54 -0500 Received: from mail-lf1-f68.google.com ([209.85.167.68]:42357 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727946AbfARQAs (ORCPT ); Fri, 18 Jan 2019 11:00:48 -0500 Received: by mail-lf1-f68.google.com with SMTP id l10so10839159lfh.9 for ; Fri, 18 Jan 2019 08:00:47 -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=JtMNvTA/Xfcz7swSit3+8xCKZZXJV4FJwJy01ZUmLQc=; b=bNzCtnnLp3LijYFrx+06tX3tnbh2MEXLxcP3JRILsf7Xf12EtR/P+C7aDW2viMjmup A/nhP89qOyj9UTLOkhUX2hxVl36yE400f/NAUS1+Sz/M4JlzbbptwUlbn8rgXTkv/wFd ho6FhPZq/PKDZmav/4Gc3U54SHTqtVSr8Ob0k= 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=JtMNvTA/Xfcz7swSit3+8xCKZZXJV4FJwJy01ZUmLQc=; b=UquyBEXDoQ+0gfqLohibxe6S6+ONbGmnBUHGJ1f0gStl+Zsm4wxVmUdxflkfES/rrb CkCBVupcJs7wDl+t5lxc1GVfZkh0Cbocg62R7MgMXwhOBtfv+8gYtp/cFG9hbGKeLC7r JP2lV/siF69Ma/gtP/OMzNvx3aX5a+FIIOzDYF+g0Qb6729/NldPxV9j9XbptxPM0ora rJ5JXXz+YBLdvP3peY12ksdUi6arw/1ebbsBABkMFgHkfbhXEAA/Qb2ysqpIY9G3iPj6 x1JrkJyXiDDxY7LX/rhto4O6wqWBtshMbwbjIPc6ZLPKP2Sgt+8ZbtKNeufS+HRMr1pV 2lTA== X-Gm-Message-State: AJcUukfMgd0HITII8UU78LViCRVmrr3GSopuLqYEH3qLa1JFPgYjSiOG hJd6z5UfBDr3/+fBhiW5lbtLCw== X-Google-Smtp-Source: ALg8bN7BJfX7OqCT+MWCNOrRonxL+bUlphpHJIcArTKkyw6h9s/mVFyM8wDAGtyuwv13CSVp/FbekQ== X-Received: by 2002:a19:5e5d:: with SMTP id z29mr12842894lfi.105.1547827246531; Fri, 18 Jan 2019 08:00:46 -0800 (PST) Received: from centauri.lan (h-229-118.A785.priv.bahnhof.se. [5.150.229.118]) by smtp.gmail.com with ESMTPSA id u15-v6sm885385lja.63.2019.01.18.08.00.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 18 Jan 2019 08:00:45 -0800 (PST) Date: Fri, 18 Jan 2019 17:00:43 +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: <20190118160043.GA23201@centauri.lan> References: <1547540677157229@kroah.com> <20190116234308.GA23572@centauri.lan> <7c303b33-6679-5040-e5a2-b14575b1d0d2@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7c303b33-6679-5040-e5a2-b14575b1d0d2@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 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); 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.) 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? Kind regards, Niklas > static struct irq_chip dw_msi_irq_chip = { > .name = "PCI-MSI", > + .irq_ack = dwc_irq_ack, > .irq_enable = pci_msi_unmask_irq, > .irq_disable = pci_msi_mask_irq, > .irq_mask = pci_msi_mask_irq, > @@ -72,8 +83,6 @@ irqreturn_t dw_handle_msi_irq(struct pcie_port *pp) > pos)) != 32) { > irq = irq_find_mapping(pp->irq_domain, i * 32 + pos); > generic_handle_irq(irq); > - dw_pcie_wr_own_conf(pp, PCIE_MSI_INTR0_STATUS + i * 12, > - 4, 1 << pos); > pos++; > } > } > > All I can say is that it compiles. > > Thanks, > > M. > -- > Jazz is not dead. It just smells funny...