Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp956069pxk; Fri, 25 Sep 2020 02:19:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxAiXcQpRq3jFCq2nQC7O+YvRNNEt3tJnFa/SMM5e694A8UPeMfSnYr4g92gjyNUlXuUhum X-Received: by 2002:a50:d64f:: with SMTP id c15mr269441edj.248.1601025549843; Fri, 25 Sep 2020 02:19:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1601025549; cv=pass; d=google.com; s=arc-20160816; b=Jcu+ag7kYoKd5YvFAay9EXiPh/w1MonQ6XfjtqpJr5YhNKNYlgl4eJSNSSqDl61qoJ ECytPNlDMZNbE6BzCAH5sKRISeFReMAxB4mgshthXDvGhFQ8NgEn5xJs0bSrkwhyUAIt 5HMv/fmlP+TTT+fzm+lQLVQ1qYkfIPTSOs3klEHMRiwBn2sXzBX9WrgZsnVMbvqoa/lE Sv+dn3lFGKStJE/ZRT6vUQe3mPLYtgK3Oo8AXxSricfqvfVPwASRKOVn9MvYNAH60//F btoL3SfWQYn5qRqld+NvISi+5EMB/07DymwfDzujBK4bs7f7QJmYzhwRbjpSup6c2a5u UnQA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=0MJjtIL2AEpcEzM17DEANEGzkN/9eam0aF96BBJJE3w=; b=oquAYL5hyDfjlVsF7VzDA0YTBQHVQxtUivzjs5xI+7NTm3oXBzctdGlIBvqQR5AJwK LkzXUdZPdo0r176cC+Pmss3gwIMZfcwk1Ys6KTL+lQnNqiRO9BkaYs3lx3zb0oz4jZdZ McewPdW12+Ewu/NgSP1c7a9r43vTPKSrJI3epk2p4FICh/jCQqPhqu5ecOgAW+m2xmn8 g3F5b4ar1CPpYIbmfxat4PBzdlX3qm3HcDD2CDp8Eq9e4SnsOSBo7DON8Bv9Pqglpjgf HP8OVQbW5W8p/dSJ37YP8OMFWXD9NUtNOzL2YD5fGJeP3GZGgjy53fEk3dlcXzlnXABu Y8vg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Synaptics.onmicrosoft.com header.s=selector2-Synaptics-onmicrosoft-com header.b=oCBt2t7Y; arc=pass (i=1 spf=pass spfdomain=synaptics.com dkim=pass dkdomain=synaptics.com dmarc=pass fromdomain=synaptics.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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=synaptics.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h24si1395664eja.559.2020.09.25.02.18.46; Fri, 25 Sep 2020 02:19:09 -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; dkim=pass header.i=@Synaptics.onmicrosoft.com header.s=selector2-Synaptics-onmicrosoft-com header.b=oCBt2t7Y; arc=pass (i=1 spf=pass spfdomain=synaptics.com dkim=pass dkdomain=synaptics.com dmarc=pass fromdomain=synaptics.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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=synaptics.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727795AbgIYJRs (ORCPT + 99 others); Fri, 25 Sep 2020 05:17:48 -0400 Received: from mail-bn8nam11on2077.outbound.protection.outlook.com ([40.107.236.77]:59137 "EHLO NAM11-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727044AbgIYJRr (ORCPT ); Fri, 25 Sep 2020 05:17:47 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ct8WpGb/kr9byxd2bCY9GxlRIUM19XEJRXS6npJbpQ50f2IHkUAYYsAE3D3UnVYlg+lyPED2RO/ZQ5dWR4uEnkknJV/x8QVQvqju70vFCA/JK9xlASyFCF8Tm7ruE3CYKK4OUikcnwiNS0op5Mxl+bpe5FWF1NtmvQCvaVpku9buRCzCwR0HaxqLy8UMXAYwRAbuVelJfqHnjosD/u3+y+ZbLn2rt1+lHPzxlOThXRzDfBTEv2+0SQEgX5GIeA/3S+6ZQ3MCT8Vq+//2VbTSFjLI5KGIQrJ8oqkQK9eS0QDd7d4EFv+FJXO16Pc4/NY7Y9XUdD+S8VW+YGCcXYb6rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0MJjtIL2AEpcEzM17DEANEGzkN/9eam0aF96BBJJE3w=; b=Cmvpw7gIAWBt/s6FEXRKcuMeWhASW6+mmL92V4Pd6+av+5pdn+Tb7PR9qCdG9mHrwBMRs2Z8LgNPYyLHtf3F9z1YzSIDQJxRFe+Z7BAUNQdmv4GRO2IsGq1UV4CjQHRY+ruTP6E/Xrpu/JFkgGmG7N7h4aNlG22hTITcpDY7GZ4oyQ/AhP3+drsADyU/ydDz8EQZaoB4hI4GFNMvxm1Ayn2gYgAAS4h/eJGy2Tp/FkA3KodFsoxx9BLEskgoGn5xfJVoOCs7VtNRENp66CpOTbCFISSpd18vsB3k6nUPziMg8YO3jAckri1+UFvuG02BhPgklKVvrjm4WpMExAA1eA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=synaptics.com; dmarc=pass action=none header.from=synaptics.com; dkim=pass header.d=synaptics.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Synaptics.onmicrosoft.com; s=selector2-Synaptics-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0MJjtIL2AEpcEzM17DEANEGzkN/9eam0aF96BBJJE3w=; b=oCBt2t7Y9g5q5wQ0DE6JLJR38NMhJZEzuCxsv4FhwpiHMM4sSPwNier0flicChNqrFJXaTcbP8sqhEg70S6mag6Mi2MUOkMDPIsELLWz2Nxhd2fqqqikBPe855k42ojh8aXF+ktzCzkKNttb19hgS2FA4MP6CHSOhWcDbPClkVg= Authentication-Results: nvidia.com; dkim=none (message not signed) header.d=none;nvidia.com; dmarc=none action=none header.from=synaptics.com; Received: from DM6PR03MB4555.namprd03.prod.outlook.com (2603:10b6:5:102::17) by DM5PR03MB3259.namprd03.prod.outlook.com (2603:10b6:4:3c::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.26; Fri, 25 Sep 2020 09:17:43 +0000 Received: from DM6PR03MB4555.namprd03.prod.outlook.com ([fe80::e494:740f:155:4a38]) by DM6PR03MB4555.namprd03.prod.outlook.com ([fe80::e494:740f:155:4a38%7]) with mapi id 15.20.3391.028; Fri, 25 Sep 2020 09:17:43 +0000 Date: Fri, 25 Sep 2020 17:17:12 +0800 From: Jisheng Zhang To: Jon Hunter Cc: Kishon Vijay Abraham I , Lorenzo Pieralisi , Rob Herring , Bjorn Helgaas , Jingoo Han , Kukjin Kim , Krzysztof Kozlowski , Richard Zhu , Lucas Stach , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , "Yue Wang" , Kevin Hilman , "Neil Armstrong" , Jerome Brunet , Martin Blumenstingl , Jesper Nilsson , Gustavo Pimentel , Xiaowei Song , Binghui Wang , Andy Gross , Bjorn Andersson , Stanimir Varbanov , Pratyush Anand , Thierry Reding , Kunihiko Hayashi , Masahiro Yamada , , , , , , , , , , Vidya Sagar Subject: Re: [PATCH v2 0/5] PCI: dwc: improve msi handling Message-ID: <20200925171712.254a018d@xhacker.debian> In-Reply-To: References: <20200924190421.549cb8fc@xhacker.debian> X-Mailer: Claws Mail 3.17.6 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-ClientProxiedBy: TYCPR01CA0031.jpnprd01.prod.outlook.com (2603:1096:405:1::19) To DM6PR03MB4555.namprd03.prod.outlook.com (2603:10b6:5:102::17) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from xhacker.debian (124.74.246.114) by TYCPR01CA0031.jpnprd01.prod.outlook.com (2603:1096:405:1::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3412.20 via Frontend Transport; Fri, 25 Sep 2020 09:17:32 +0000 X-Mailer: Claws Mail 3.17.6 (GTK+ 2.24.32; x86_64-pc-linux-gnu) X-Originating-IP: [124.74.246.114] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d93dd60c-b84d-4de7-047d-08d86133db61 X-MS-TrafficTypeDiagnostic: DM5PR03MB3259: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zfkwaHOTLAKAYnUoWYo/Fk8yhxtcjvMzFJz17VVvh4fbPZJQXXFy+Oz2YjQvMcipNy0EIXplsTMKwdC2HWBkmyLzSjn7dMj++PAa56RnoN5TNaNMXNd+6omSQ7v0C48mRxBdrlHoPls1B5JVHJ0PaEPpwyg4WcZ06RL3KmZ9GmuWmaUehNe9Yovu4fkR1iXhCtWJnsrbbalup9DCqB0wp1MdEXtg27xTM0oJ6RyqUJaeufu3S2wLeZlNPrYeIg1CD+SNqX69/AjU1IDwRH3B7YI9yRUcgkRqHpaBXri7jqdob3dxN9bF2q05VrLpFPfn X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR03MB4555.namprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(136003)(366004)(396003)(376002)(39860400002)(346002)(8936002)(2906002)(83380400001)(66556008)(956004)(66476007)(66946007)(6916009)(7406005)(5660300002)(86362001)(54906003)(9686003)(8676002)(26005)(7696005)(52116002)(316002)(4326008)(186003)(6506007)(55016002)(6666004)(1076003)(7416002)(53546011)(16526019)(478600001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 5vJ8B2kYtheC9shaepwaK5RLUXRuAfL3qjOISqdwkdsaT7vC1ISZkopHoq5r57fR6ZRXAY8J1OccaVeFmaCU/y6yetW0qVqUi3eR3Dr8BdjeslVwe2CHgSoNtX3EywSHVuZ/juODg7k0uysbvfem7U9rF1DdaJaniV3gp2UVUaT1dWgYif6CIk3IwSHJ7NIRVRfxoJXiHkCdacD9gJoQ+6qQ82qdTTj0+b6Lx6iAH1BptGnr8BMdcVOwPexHmswOSlh33bdggIH3paJ9GWGCy/j0hQOWA/Wxo2XBRMsjnZegTGAlWJ3n0HAmP+DL6cet3gBMJ8yWxPjGw8PRu1ws9q/Wu+Q4g9LH3l2Ej64laHP7OF9hA2Lr4GLBhrEy/xGe9TI+FDFfzU1ZFLZOmFiMU8YXeMENaDYm8soJwfo9nsyCZrwYM3qCokI15jXL+bUWhHO/yrZx6V3/mGYRn3r7DRPGRmcrBT4YtGh72pUprHGm9rV+6/Cyb2cCYzduf4svAYzJ6M11oULICYsFKZQPtPoCALLj7gaGUHG5CSfka+7iz4x05K9V4SVs08HfTu5DfPYlgrCk/e5m9+EESEU5yGhjtjKCYMYNol5GW/JxsioCpwenoawUmX7fMABlNOrvExNn8wAhi7qMUE+lehLkog== X-OriginatorOrg: synaptics.com X-MS-Exchange-CrossTenant-Network-Message-Id: d93dd60c-b84d-4de7-047d-08d86133db61 X-MS-Exchange-CrossTenant-AuthSource: DM6PR03MB4555.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Sep 2020 09:17:43.3925 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335d1fbc-2124-4173-9863-17e7051a2a0e X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: obAQt4C5pM6hC+a7zBUzKZIIeqhNcifGDoGMu+xJfE7V3rrlkZmiLl7PNiakvjpsXJ3ymBQ2jQRdZLQ2v2Vumg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR03MB3259 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jon, On Fri, 25 Sep 2020 09:53:45 +0100 Jon Hunter wrote: > > On 24/09/2020 12:05, Jisheng Zhang wrote: > > Improve the msi code: > > 1. Add proper error handling. > > 2. Move dw_pcie_msi_init() from each users to designware host to solve > > msi page leakage in resume path. > > Apologies if this is slightly off topic, but I have been meaning to ask > about MSIs and PCI. On Tegra194 which uses the DWC PCI driver, whenever we > hotplug CPUs we see the following warnings ... > > [ 79.068351] WARNING KERN IRQ70: set affinity failed(-22). > [ 79.068362] WARNING KERN IRQ71: set affinity failed(-22). > > These interrupts are the MSIs ... > > 70: 0 0 0 0 0 0 0 0 PCI-MSI 134217728 Edge PCIe PME, aerdrv > 71: 0 0 0 0 0 0 0 0 PCI-MSI 134742016 Edge ahci[0001:01:00.0] > > This caused because ... > > static int dw_pci_msi_set_affinity(struct irq_data *d, > const struct cpumask *mask, bool force) > { > return -EINVAL; > } > > Now the above is not unique to the DWC PCI host driver, it appears that > most PCIe drivers also do the same. However, I am curious if there is > any way to avoid the above warnings given that setting the affinity does > not appear to be supported in anyway AFAICT. > Could you please try below patch? diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c index bf25d783b5c5..7e5dc54d060e 100644 --- a/drivers/pci/controller/dwc/pcie-designware-host.c +++ b/drivers/pci/controller/dwc/pcie-designware-host.c @@ -197,7 +197,6 @@ static struct irq_chip dw_pci_msi_bottom_irq_chip = { .name = "DWPCI-MSI", .irq_ack = dw_pci_bottom_ack, .irq_compose_msi_msg = dw_pci_setup_msi_msg, - .irq_set_affinity = dw_pci_msi_set_affinity, .irq_mask = dw_pci_bottom_mask, .irq_unmask = dw_pci_bottom_unmask, };