Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3789634pxk; Tue, 29 Sep 2020 06:24:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy3Qpg32CbyxA3IAhMHGRuxuS1+KOL20yEOyhztre0ll5nzZmigQl1bo4bwcxO5Ij7hXXs7 X-Received: by 2002:a17:906:7f15:: with SMTP id d21mr3975728ejr.470.1601385895780; Tue, 29 Sep 2020 06:24:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601385895; cv=none; d=google.com; s=arc-20160816; b=BO72/RRBP1tbBMMAdMPPsdK+YqcLBCqIZEhwTH+IyRnQBS1htp7rBVcVWhNB1JVYR+ ADribnTKdbG9kMJLjfn33vyfnbQoIB5tXPatMwmwGTwN2GW3shHFwT7Lcqoh/DASfLAK tiQXoH5zqzoZpqjn3PCYwNiWX6NAGwW51j5NdyQv9cjNevLdzU25qK2BDRAFMi+5b3du CwFec25B7QNBWzCqZtJaM954hNX68qqQqAo7mECUheEA2mvCB8ZAqTZk6tC/noeHTrMG UH2YbyxN7dQ/hQe9QgbkDgE2aOuVpGUZCTTez3Vph2k0xr3TsqxTrpTKbYdJfRQwL9CZ RftQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:dkim-signature:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=O1AmZKE8e7EeFMJXiJzyuvgvP7i5Nhyk8/759La3vkU=; b=YcuU1kplTywU7/gDZA/4Bp4Jn1vL4xGuqLycTvD+geKEvXo0yFfrnblQAznLaJTnX6 FzNLBgR4bpETrBoPbc4/1Yxny4WhySUcb9eokFSn6pDjONdjnfxNpC/1NtZe3ETnC8Y1 MLgjoe4riskz4/8vcEr2RHwSQ/yndX08BxHQ120FJqAHnHC8L4rtsRcm3YC/stG9XNS7 mgRlCgM0sTWMB5Aud6HAZQPl9JybkPWW7iBkbqoj3pK/XRzkEi80dQaOO981ssbdNoDY dZssuqcSVFrHjTFhAt7jXiF1oTc6G/RGDNtn/u0f+M0pcMHHkpV6ETe63zvmHFDeJViL gVbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b="PEUGx/Ot"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m12si534585ejj.328.2020.09.29.06.24.31; Tue, 29 Sep 2020 06:24:55 -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=@nvidia.com header.s=n1 header.b="PEUGx/Ot"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729863AbgI2NXW (ORCPT + 99 others); Tue, 29 Sep 2020 09:23:22 -0400 Received: from hqnvemgate26.nvidia.com ([216.228.121.65]:13115 "EHLO hqnvemgate26.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727495AbgI2NXW (ORCPT ); Tue, 29 Sep 2020 09:23:22 -0400 Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Tue, 29 Sep 2020 06:23:05 -0700 Received: from [10.26.75.44] (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 29 Sep 2020 13:22:59 +0000 Subject: Re: [PATCH v2 0/5] PCI: dwc: improve msi handling To: Jisheng Zhang 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 References: <20200924190421.549cb8fc@xhacker.debian> <20200929184851.22682ff1@xhacker.debian> From: Jon Hunter Message-ID: <8e06a370-a37a-5f33-b43b-2830adb31b3e@nvidia.com> Date: Tue, 29 Sep 2020 14:22:57 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200929184851.22682ff1@xhacker.debian> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL105.nvidia.com (172.20.187.12) To HQMAIL107.nvidia.com (172.20.187.13) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1601385785; bh=O1AmZKE8e7EeFMJXiJzyuvgvP7i5Nhyk8/759La3vkU=; h=Subject:To:CC:References:From:Message-ID:Date:User-Agent: MIME-Version:In-Reply-To:Content-Type:Content-Language: Content-Transfer-Encoding:X-Originating-IP:X-ClientProxiedBy; b=PEUGx/Oto2o82hJdlAk6/ts4WMeu88gqStSAIbht98Z/IG5S7VWh+vP98HENpPGWz dvi4P4CwF9nHeRHsl9AzVkrvmXIBrwVTKKBrg57TUdTtX6rbg2iu/yl/npKamfzDfN bde3+rbXPUm4osMwTFyxLBEvxx/+GgYRccoic8JmGxsvmJpOdJQ499JIrzTlkZbfGy uatLuKB6XhZi8NLNwtLMbP08tRGBLxw/s1yS6UBfhIRviBPwMOohoewPUOkIiYkNbc kQHmRyOIchEWyKHIRxQV7sPqqZB+NDjrJDEXtUGp+aaP6iFoCKud6BERbUL3KiIhZi LjHupkiehvUcg== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jisheng, On 29/09/2020 11:48, Jisheng Zhang wrote: > 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). >> > > I tried to reproduce this issue on Synaptics SoC, but can't reproduce it. > Per my understanding of the code in kernel/irq/cpuhotplug.c, this warning > happened when we migrate irqs away from the offline cpu, this implicitly > implies that before this point the irq has bind to the offline cpu, but how > could this happen given current dw_pci_msi_set_affinity() implementation > always return -EINVAL By default the smp_affinity should be set so that all CPUs can be interrupted ... $ cat /proc/irq/70/smp_affinity 0xff In my case there are 8 CPUs and so 0xff implies that the interrupt can be triggered on any of the 8 CPUs. Do you see the set_affinity callback being called for the DWC irqchip in migrate_one_irq()? Cheers Jon -- nvpublic