Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp860703rwb; Thu, 18 Aug 2022 13:41:35 -0700 (PDT) X-Google-Smtp-Source: AA6agR417h4ouxISe5hvYo2eBWNqiAqFYrQtLdL7tliFABMly8HTH4tIbZiazc4Z+TqDCfHJm704 X-Received: by 2002:a05:6a00:15cb:b0:52e:6100:e7a7 with SMTP id o11-20020a056a0015cb00b0052e6100e7a7mr4459621pfu.23.1660855295716; Thu, 18 Aug 2022 13:41:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660855295; cv=none; d=google.com; s=arc-20160816; b=YHRX4a0vGcHwixieVO12V4ZbYsLzk7ILcACTRoNalQNN0DA52hcj7ZbgitKTf6g6pF hKRC9vOkmZtuWw5APbE7mm3/BcZdFPhV7flv4rwXxnmOTaBxztYqagU1G1igo4e9202x 8mrhC7Bjkw49WkB6XNScljEzwhwwEHtLrk2d2H4AYJzb6B0L2u02BIsdZ6NRNIxNJVUj tzq/64KFea/x8QtrYKuzsLQj2Y38NaLgfCP2VnOxUOB2c9yvW7ryf5exfu/WCYyQE7dB 2M1GtvB+5vl1BUjzc34EvBDGsGP2CSDhFsFeWpb+Vqc1s34LTgyZLnhYfAsiuEr2Z/vI WWVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=WoNpxThHsB/AIg/LI6tXaaPBhVhciQC5vd6xYrqwv5Q=; b=Anrnc86sV40vckfq5D5J0bphLejPyU1CPdeXaINACH3+42lRY2ukXRKBO0l3dZddxb 1pDJFSa03PMcyywQvXJhvk7eAygO4vuDijxT1KLjgGIEd0ATKNizajjH5kT64398tSy3 226+B8i3OWmTSPuhB2F3fBUcyeqUULKC6Zo0q/OJA1mMBk9wV8apHZM+8daT1UA1/Z9w 05n9hKAZemBrecZ2EYij3ResFxe17QIZijDC2eOYWMh1WwJPES/njN0Zhn/PrrclQDVO OKSz726FMMuSvwpSQfYIHhODl+4XXGbSVMQRidbb/Tcm6mP7MRKeVu4YprLip5ADAzry +PLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=xASG6ipw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j70-20020a638049000000b0041cc49ce728si848217pgd.433.2022.08.18.13.41.24; Thu, 18 Aug 2022 13:41:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=xASG6ipw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242294AbiHRTvc (ORCPT + 99 others); Thu, 18 Aug 2022 15:51:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234438AbiHRTvb (ORCPT ); Thu, 18 Aug 2022 15:51:31 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [185.16.172.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C18CD8B980; Thu, 18 Aug 2022 12:51:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=WoNpxThHsB/AIg/LI6tXaaPBhVhciQC5vd6xYrqwv5Q=; b=xASG6ipwpLLNcj5P+2kBITSNI0 EPfy7+9c0YpmfEOCxpwwhyu/FleN0yW2i3Eed0JD4n0NiEJHpJZoMfJ19M9DrSD7da4YCoxWkU5rM Uy9jE/WaoHnIlqC9oLHSd1GMAJ6Rd0rjRGPwJwnn06CEg7omvHjA7BzGZxcizEGbIpy0=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1oOlY1-00Dpra-DR; Thu, 18 Aug 2022 21:51:21 +0200 Date: Thu, 18 Aug 2022 21:51:21 +0200 From: Andrew Lunn To: Pali =?iso-8859-1?Q?Roh=E1r?= Cc: Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Bjorn Helgaas , Rob Herring , Sebastian Hesselbarth , Gregory Clement , Thomas Petazzoni , linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 2/4] PCI: mvebu: Implement support for interrupts on emulated bridge Message-ID: References: <20220817230036.817-1-pali@kernel.org> <20220817230036.817-3-pali@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220817230036.817-3-pali@kernel.org> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -static irqreturn_t mvebu_pcie_irq_handler(int irq, void *arg) > +static irqreturn_t mvebu_pcie_error_irq_handler(int irq, void *arg) > +{ > + struct mvebu_pcie_port *port = arg; > + struct device *dev = &port->pcie->pdev->dev; > + u32 cause, unmask, status; > + > + cause = mvebu_readl(port, PCIE_INT_CAUSE_OFF); > + unmask = mvebu_readl(port, PCIE_INT_UNMASK_OFF); > + status = cause & unmask; > + > + /* "error" interrupt handler does not process INTX interrupts */ > + status &= ~(PCIE_INT_INTX(0) | PCIE_INT_INTX(1) | > + PCIE_INT_INTX(2) | PCIE_INT_INTX(3)); Just for my understanding... There are two interrupts, but the status information what those interrupts actually mean are all packed into one register? I assume reading the clause register does not clear set bits? Otherwise there would be a race condition. Are these actually level interrupts, and in order to clear them you need to poke some other register? > + /* > + * Old DT bindings do not contain "error" interrupt > + * so do not fail probing driver when interrupt does not exist. > + */ > + port->error_irq = of_irq_get_byname(child, "error"); > + if (port->error_irq == -EPROBE_DEFER) { > + ret = port->error_irq; > + goto err; > + } > + if (port->error_irq <= 0) { > + dev_warn(dev, "%s: interrupts on Root Port are unsupported, " Maybe that should be "Error interrupts on Root..." ? Andrew