Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754658AbcCWLEz (ORCPT ); Wed, 23 Mar 2016 07:04:55 -0400 Received: from mail-db3on0087.outbound.protection.outlook.com ([157.55.234.87]:60976 "EHLO emea01-db3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751925AbcCWLEr convert rfc822-to-8bit (ORCPT ); Wed, 23 Mar 2016 07:04:47 -0400 From: Minghuan Lian To: Alexander Stein , "linux-kernel@vger.kernel.org" CC: "linux-arm-kernel@lists.infradead.org" , Marc Zyngier , Thomas Gleixner , Jason Cooper , Roy Zang , Mingkai Hu , Stuart Yoder , Yang-Leo Li Subject: RE: [PATCH 2/2 v5] irqchip/Layerscape: Add SCFG MSI controller support Thread-Topic: [PATCH 2/2 v5] irqchip/Layerscape: Add SCFG MSI controller support Thread-Index: AQHReCJYxdpiemRZC0yR/i00fweC8p9m2ZKAgAAYz7A= Date: Wed, 23 Mar 2016 10:50:02 +0000 Message-ID: References: <1457321782-3245-1-git-send-email-Minghuan.Lian@nxp.com> <1457321782-3245-2-git-send-email-Minghuan.Lian@nxp.com> <7239962.9Fyo0vfqsc@ws-stein> In-Reply-To: <7239962.9Fyo0vfqsc@ws-stein> Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: systec-electronic.com; dkim=none (message not signed) header.d=none;systec-electronic.com; dmarc=none action=none header.from=nxp.com; x-originating-ip: [192.158.241.86] x-ms-office365-filtering-correlation-id: 08370eb9-dcfb-4c66-8faf-08d35308e337 x-microsoft-exchange-diagnostics: 1;VI1PR04MB1023;5:XB8znAwAQmUqS/n2Nou/V/AsT2DsaRtGthS334Q/Lbs3zVJkJhg/3U45+rVCO1WvGhnHSrzDeVDNYbxJKaJazHa+X3wt6Mkra33jn2nCfunLa2L3sPjxZ0nhDgy4kJNXUfzSJjBbrInvB/OWOg1yRQ==;24:ix2xmiGG5TfY7+pulPwIbT4Ah7ogyoflMQl2wyTQkNKjfigeSfuOqM7eEVGAtfxNRXl2G9q+2ABBwh/lRX+fIevkOUaWrdZpNTNvuMAhJsg= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:VI1PR04MB1023; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001);SRVR:VI1PR04MB1023;BCL:0;PCL:0;RULEID:;SRVR:VI1PR04MB1023; x-forefront-prvs: 08902E536D x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(377454003)(24454002)(13464003)(164054003)(5004730100002)(92566002)(33656002)(5003600100002)(81166005)(106116001)(2501003)(76576001)(5002640100001)(74316001)(5008740100001)(3660700001)(122556002)(10400500002)(3280700002)(5001770100001)(2906002)(102836003)(6116002)(1220700001)(3846002)(586003)(19580405001)(19580395003)(4326007)(2950100001)(2900100001)(86362001)(189998001)(76176999)(1096002)(50986999)(54356999)(66066001)(87936001)(77096005)(217873001);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR04MB1023;H:VI1PR04MB1615.eurprd04.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Mar 2016 10:50:02.5191 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB1023 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2189 Lines: 69 Hi Alexander, Thanks for your test. Number 134742016 is calculated by the following code /** * pci_msi_domain_calc_hwirq - Generate a unique ID for an MSI source * @dev: Pointer to the PCI device * @desc: Pointer to the msi descriptor * * The ID number is only used within the irqdomain. */ irq_hw_number_t pci_msi_domain_calc_hwirq(struct pci_dev *dev, struct msi_desc *desc) { return (irq_hw_number_t)desc->msi_attrib.entry_nr | PCI_DEVID(dev->bus->number, dev->devfn) << 11 | (pci_domain_nr(dev->bus) & 0xFFFFFFFF) << 27; } And this value is assigned to the hwirq in the function: static void pci_msi_domain_set_desc(msi_alloc_info_t *arg, struct msi_desc *desc) { arg->desc = desc; arg->hwirq = pci_msi_domain_calc_hwirq(msi_desc_to_pci_dev(desc), desc); } Thanks, Minghuan > -----Original Message----- > From: Alexander Stein [mailto:alexander.stein@systec-electronic.com] > Sent: Wednesday, March 23, 2016 5:18 PM > To: linux-kernel@vger.kernel.org > Cc: Minghuan Lian ; > linux-arm-kernel@lists.infradead.org; Marc Zyngier ; > Thomas Gleixner ; Jason Cooper > ; Roy Zang ; Mingkai Hu > ; Stuart Yoder ; Yang-Leo Li > > Subject: Re: [PATCH 2/2 v5] irqchip/Layerscape: Add SCFG MSI controller > support > > On Monday 07 March 2016 11:36:22, Minghuan Lian wrote: > > Some kind of NXP Layerscape SoC provides a MSI > > implementation which uses two SCFG registers MSIIR and > > MSIR to support 32 MSI interrupts for each PCIe controller. > > The patch is to support it. > > > > Signed-off-by: Minghuan Lian > > Tested-by: Alexander Stein > > Using an intel e1000e card which uses 3 MSIs. But the IRQ numbers are a bit > strange though: > > grep eth3 /proc/interrupts > > > > 63: 49 0 MSI 134742016 Edge > eth3-rx-0 > > 64: 3 0 MSI 134742017 Edge > eth3-tx-0 > > 65: 4 0 MSI 134742018 Edge eth3 > > Best regards, > Alexander