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=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED 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 0643BC43610 for ; Wed, 14 Nov 2018 22:26:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C1BE222544 for ; Wed, 14 Nov 2018 22:26:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C1BE222544 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-pci-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388009AbeKOIbF (ORCPT ); Thu, 15 Nov 2018 03:31:05 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:52056 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387985AbeKOIbE (ORCPT ); Thu, 15 Nov 2018 03:31:04 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 24D5E15AB; Wed, 14 Nov 2018 14:07:52 -0800 (PST) Received: from big-swifty.misterjones.org (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C75CF3F5A0; Wed, 14 Nov 2018 14:07:51 -0800 (PST) Date: Wed, 14 Nov 2018 22:07:50 +0000 Message-ID: <86r2fn48jt.wl-marc.zyngier@arm.com> From: Marc Zyngier To: Trent Piepho Cc: "linux-pci@vger.kernel.org" , "lorenzo.pieralisi@arm.com" , "helgaas@google.com" , "jingoohan1@gmail.com" , "faiz_abbas@ti.com" , "vigneshr@ti.com" , "Joao.Pinto@synopsys.com" , "gustavo.pimentel@synopsys.com" Subject: Re: [PATCH 0/3] PCI: designware: Fixing MSI handling flow In-Reply-To: <1542220084.30311.453.camel@impinj.com> References: <20181113225734.8026-1-marc.zyngier@arm.com> <1542220084.30311.453.camel@impinj.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 EasyPG/1.0.0 Emacs/25.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Organization: ARM Ltd MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On Wed, 14 Nov 2018 18:28:05 +0000, Trent Piepho wrote: > > On Tue, 2018-11-13 at 22:57 +0000, Marc Zyngier wrote: > > It recently came to light that the Designware PCIe driver is rather > > broken in the way it handles MSI[1]: > > > > - It masks interrupt by disabling them, meaning that MSIs generated > > during the masked window are simply lost. Oops. > > > > - Acking of the currently pending MSI is done outside of the > > interrupt > > flow, getting moved around randomly and ultimately breaking the > > driver. Not great. > > > > This series attempts to address this by switching to using the MASK > > register for masking interrupts (!), and move the ack into the > > appropriate callback, giving it a fixed place in the MSI handling > > flow. > > > > Note that this is only compile-tested on my arm64 laptop, as I'm > > travelling and do not have the required HW to test it anyway. I'd > > welcome both review and testing by the interested parties (dwc > > maintainer and users affected by existing bugs). > > > > I've started to test this series after porting all the patches needed > to make IMX7d work from 4.16.8 to 4.20.0-rc2. > > Took a little while to figure out that the pcieport driver has a new > config entry to enable, or one gets no interrupts. I'm not sure if > this is entirely correct behavior. > > The new domain stuff does not appear to integrate into the existing irq > framework perfectly. My interrupt has changed from MSI #1 to MSI > #524288. Not the most user friendly number. It is not supposed to be user friendly. It is not even supposed to be interpreted by anyone. And if you print it in hex, you'll find that it *is* actually useful. M. -- Jazz is not dead, it just smell funny.