Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp54296pxx; Wed, 28 Oct 2020 17:58:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxSg7F0DlRVTycnhGF4byV01C2ko+PHT+NAhH53jp4kWk9Xso2t+B6gg2aLNnOGYxZYLSEM X-Received: by 2002:a17:907:644:: with SMTP id wq4mr1738240ejb.234.1603933120949; Wed, 28 Oct 2020 17:58:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603933120; cv=none; d=google.com; s=arc-20160816; b=WlsfSyk1G32sz4KyYW8ls3LpfJsyTdSSL9BpKK96R/uqNtfTlsEPvFHc+JPuR9iG8C D55QzLGqKPGKuUilmISRX6a6Vvo1S/q5PR48AQhh/EugmrRTIgnjnn2rmB22nRHKBOOv RoYRC045JoI7H6sBj2Xg4zNDfvpfoXD3LJ8EnjaQqyy4MMF7fo5zn4IByFPvUbru+Nwp RPOdlEGydz7NJ2FrmTAxXHkIcDJMoDdjeatgIE4GaEElklbD62y6k2VlhywMaM55hUfI +1X/rwgnybaax+D8Dj0kiThgsQmthtDiNwrpHyq/p5RhGXDFmLxovNrkHUsTCgDTuaRL O1Yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=E1a5zGuVgGA1RKBsmSdKLsGZ/CiOYFcM9mZnhxIsanI=; b=bcHDkdsAAsxhv7WFctDYbCAV2z9nHLI+Epv/+T/iIueAmSptiShvkvA+JWMfvxuqZX ZsDU2fpZ/eOnxOCgJihqiMhDUT4a8CzO4UqnVss/1Wvi3h9V2a45rE0LOii7+0zo2cR3 E7GWodr/ttn1TJrjHPk3BlfXHX4AJC4rbtSJfEOOqMRKaDLEweGg1X/kvesHGfgtJlHO tJXYNaBkBcIxwtSooMKaqiqBmXGNW+VZij1ZXHXj0TU1aMw1x/sWGxHfxWJHEJHAuQXN xpFdsywYPH0+1aIeLrdP2XKrL8dAN1LH3W/D5chQQk5UkL5BshZdWk78aotnadMSBh3d KRJg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i9si684083eje.410.2020.10.28.17.58.18; Wed, 28 Oct 2020 17:58:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729158AbgJ1V62 (ORCPT + 99 others); Wed, 28 Oct 2020 17:58:28 -0400 Received: from mx.socionext.com ([202.248.49.38]:49799 "EHLO mx.socionext.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728544AbgJ1V6T (ORCPT ); Wed, 28 Oct 2020 17:58:19 -0400 Received: from unknown (HELO kinkan-ex.css.socionext.com) ([172.31.9.52]) by mx.socionext.com with ESMTP; 28 Oct 2020 10:31:59 +0900 Received: from mail.mfilter.local (m-filter-1 [10.213.24.61]) by kinkan-ex.css.socionext.com (Postfix) with ESMTP id 491AE180C13; Wed, 28 Oct 2020 10:31:56 +0900 (JST) Received: from 172.31.9.51 (172.31.9.51) by m-FILTER with ESMTP; Wed, 28 Oct 2020 10:31:56 +0900 Received: from plum.e01.socionext.com (unknown [10.213.132.32]) by kinkan.css.socionext.com (Postfix) with ESMTP id A7A4E1A0509; Wed, 28 Oct 2020 10:31:55 +0900 (JST) From: Kunihiko Hayashi To: Bjorn Helgaas , Rob Herring , Lorenzo Pieralisi , Jingoo Han , Gustavo Pimentel , Marc Zyngier Cc: linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Masami Hiramatsu , Jassi Brar , Kunihiko Hayashi Subject: [PATCH v8 2/3] PCI: dwc: Add msi_host_isr() callback Date: Wed, 28 Oct 2020 10:31:42 +0900 Message-Id: <1603848703-21099-3-git-send-email-hayashi.kunihiko@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1603848703-21099-1-git-send-email-hayashi.kunihiko@socionext.com> References: <1603848703-21099-1-git-send-email-hayashi.kunihiko@socionext.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This adds msi_host_isr() callback function support to describe SoC-dependent service triggered by MSI. For example, when AER interrupt is triggered by MSI, the callback function reads SoC-dependent registers and detects that the interrupt is from AER, and invoke AER interrupts related to MSI. Cc: Marc Zyngier Cc: Jingoo Han Cc: Gustavo Pimentel Signed-off-by: Kunihiko Hayashi Acked-by: Gustavo Pimentel Reviewed-by: Rob Herring --- drivers/pci/controller/dwc/pcie-designware-host.c | 3 +++ drivers/pci/controller/dwc/pcie-designware.h | 1 + 2 files changed, 4 insertions(+) diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c index 674f32d..45eea6f 100644 --- a/drivers/pci/controller/dwc/pcie-designware-host.c +++ b/drivers/pci/controller/dwc/pcie-designware-host.c @@ -61,6 +61,9 @@ irqreturn_t dw_handle_msi_irq(struct pcie_port *pp) irqreturn_t ret = IRQ_NONE; struct dw_pcie *pci = to_dw_pcie_from_pp(pp); + if (pp->ops->msi_host_isr) + pp->ops->msi_host_isr(pp); + num_ctrls = pp->num_vectors / MAX_MSI_IRQS_PER_CTRL; for (i = 0; i < num_ctrls; i++) { diff --git a/drivers/pci/controller/dwc/pcie-designware.h b/drivers/pci/controller/dwc/pcie-designware.h index 9d2f511..2ce3133 100644 --- a/drivers/pci/controller/dwc/pcie-designware.h +++ b/drivers/pci/controller/dwc/pcie-designware.h @@ -176,6 +176,7 @@ struct dw_pcie_host_ops { int (*host_init)(struct pcie_port *pp); void (*set_num_vectors)(struct pcie_port *pp); int (*msi_host_init)(struct pcie_port *pp); + void (*msi_host_isr)(struct pcie_port *pp); }; struct pcie_port { -- 2.7.4