From patchwork Mon Jul 15 12:19:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 1960636 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=mailbox.org header.i=@mailbox.org header.a=rsa-sha256 header.s=mail20150812 header.b=xuYuvoDK; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.a=rsa-sha256 header.s=mail20150812 header.b=crqNVKYh; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2604:1380:45d1:ec00::1; helo=ny.mirrors.kernel.org; envelope-from=linux-tegra+bounces-3019-incoming=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [IPv6:2604:1380:45d1:ec00::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WN1WP6zbvz1xqc for ; Mon, 15 Jul 2024 22:20:49 +1000 (AEST) Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 1C8341C213DD for ; Mon, 15 Jul 2024 12:20:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 19DD918A95A; Mon, 15 Jul 2024 12:20:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="xuYuvoDK"; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="crqNVKYh" X-Original-To: linux-tegra@vger.kernel.org Received: from mout-p-102.mailbox.org (mout-p-102.mailbox.org [80.241.56.152]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 72E56175A6; Mon, 15 Jul 2024 12:20:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.241.56.152 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721046044; cv=none; b=oN0/RLr7EgqNXZRtOeiXgW7j+Sd1u0zq2lWrkGx1IRWL7oTDgJbB3yT0bN9H9Xb+32cpw+X422+ZNoVOORrtSiLfsdsZk3sKtCmrI6/8NH21uZsMhZG0L0SVOE5qchEz/Rmcf13vxB4pY3CnktEK+T1sbgKDeHcFFEpBqBvv2ts= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721046044; c=relaxed/simple; bh=fZCTvImvlbUbtY8RaEfq01G/C8Xbe35DoKLCdRoa/zc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=bSwOMPQS4JaXRNFc0yl2ZBLmPMMwfv0DaTjmP3yZQViwSyWHxTkAlAHVAIfkpcU+dHgn6ou1ZzNAeyYsyGgu7hsDbqC7z/mTde8tnYP2hpMuEG97gig5+NvOWnXzUrddnp6+/Qj77cLFtma0/U1vOwLEfgq11ywSETd9RXW+NdI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mailbox.org; spf=pass smtp.mailfrom=mailbox.org; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b=xuYuvoDK; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b=crqNVKYh; arc=none smtp.client-ip=80.241.56.152 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mailbox.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mailbox.org Received: from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4WN1W92KYVz9sc6; Mon, 15 Jul 2024 14:20:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1721046037; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FL4eb5mH+GbNCEmlKqjoVaar4JHSCtGhxjB+oJ3+EWI=; b=xuYuvoDKJH8jzqzbd4GToZ2j2cy9F/nczr/r/CmtEJICfvv+472zI76TBvIV3nDnaV7FbK PDp2PSDsRTGKMSKl58jrQILvNDBEqftf7PpJumTw7yh8cZP89Tv/O3X3wJm7JG0ExX06/P cfhX13vIYHHUgyQ4bIGQBANgCPXgKH7gTUFzA9XfvmT+SAZDQLgXyDaB7mwjW43xX/XwBx 0AQ1Yw1OHkBph/sfW5uGJWCVwVAFLt+8LPPDPyZ3Unf/4kApgl4qM3ZhddAyQp4fKXC26f ep0qKtQXSAGaLGlaHQPyCsFZKVpzPdxiZMsalBtqBP/SVrFav434v0OnfnxRlg== From: Marek Vasut DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1721046035; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FL4eb5mH+GbNCEmlKqjoVaar4JHSCtGhxjB+oJ3+EWI=; b=crqNVKYhpKd5MqWX2oQH1x3MTn3aEx9LyR8W41JEv+/LwVRCtHVwcJkQAX3rVQxvJuzJMq a4TLzXNVi9N5bZ5UpWbgEony/GBzT0tv9i2CcyGe8w5E5UrT1/TpPSfbF58oosnFgBoB8I Uh76nqO+bYX8fiXBTh/JRjFjcNgrxcQYUCS+Y8XPxX9AXKWpQ04I76nw6Ywry/4dIvNQ4l rmprqQPielbpXIQU2kbTDyqv+aCxv2NJa+TREz78YYlR+unULH56YP3t4WIRnp61Mkck72 Dzy1+wA8wquYtbIlmQRliTvfs2ThxFdP7RAlhS7TG/G5a1XtyfqzB+n52n8/lQ== To: linux-pci@vger.kernel.org Cc: Marek Vasut , =?utf-8?q?Krzysztof_Wilcz?= =?utf-8?q?y=C5=84ski?= , Anna-Maria Behnsen , Anup Patel , Bjorn Helgaas , Jisheng Zhang , Jon Hunter , Koichiro Den , Lorenzo Pieralisi , Marc Zyngier , Nipun Gupta , Rob Herring , Shivamurthy Shastri , Thierry Reding , Thomas Gleixner , Yoshihiro Shimoda , linux-renesas-soc@vger.kernel.org, linux-tegra@vger.kernel.org Subject: [PATCH v3 1/3] genirq/msi: Silence set affinity failed warning Date: Mon, 15 Jul 2024 14:19:26 +0200 Message-ID: <20240715122012.35222-1-marek.vasut+renesas@mailbox.org> Precedence: bulk X-Mailing-List: linux-tegra@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MBO-RS-ID: 5304ea1013472d8aac6 X-MBO-RS-META: i65y8kgmushz3ue6hhx41xtiggio3qan Various PCIe controllers that mux MSIs onto single IRQ line produce these "IRQ%d: set affinity failed" warnings when entering suspend. This has been discussed before [1] [2] and an example test case is included at the end of this commit message. Controller drivers which create MSI IRQ domain with MSI_FLAG_USE_DEF_CHIP_OPS flag set and which do not override the .irq_set_affinity irqchip callback get assigned default .irq_set_affinity = msi_domain_set_affinity() callback. That is not desired on controllers where it is not possible to set affinity of each MSI IRQ line to a specific CPU core due to hardware limitation. Introduce dedicated flag MSI_FLAG_NO_AFFINITY, which keeps .irq_set_affinity unset in case the controller driver did not assign the callback. This way, the migrate_one_irq() code in cpuhotplug.c can exit right away, without printing the aforementioned warning. The .irq_set_affinity implementations which only return -EINVAL can be removed from multiple controller drivers. ``` $ grep 25 /proc/interrupts 25: 0 0 0 0 0 0 0 0 PCIe MSI 0 Edge PCIe PME $ echo core > /sys/power/pm_test ; echo mem > /sys/power/state ... Disabling non-boot CPUs ... IRQ25: set affinity failed(-22). <---------- This is being silenced here psci: CPU7 killed (polled 4 ms) ... ``` [1] https://lore.kernel.org/all/d4a6eea3c5e33a3a4056885419df95a7@kernel.org/ [2] https://lore.kernel.org/all/5f4947b18bf381615a37aa81c2242477@kernel.org/ Signed-off-by: Marek Vasut --- Cc: "Krzysztof Wilczyński" Cc: Anna-Maria Behnsen Cc: Anup Patel Cc: Bjorn Helgaas Cc: Jisheng Zhang Cc: Jon Hunter Cc: Jonathan Hunter Cc: Koichiro Den Cc: Lorenzo Pieralisi Cc: Marc Zyngier Cc: Nipun Gupta Cc: Rob Herring Cc: Shivamurthy Shastri Cc: Thierry Reding Cc: Thomas Gleixner Cc: Yoshihiro Shimoda Cc: linux-pci@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org Cc: linux-tegra@vger.kernel.org --- V2: - Introduce MSI_FLAG_NO_AFFINITY to inhibit assignment of msi_domain_set_affinity() V3: - Replace MSI_FLAG_USE_DEF_CHIP_OPS_NOAFF with MSI_FLAG_NO_AFFINITY and make MSI_FLAG_NO_AFFINITY into separate flag - Update commit message - Rebase on current linux-next - Use genirq/msi: subject prefix which is likely better fit now - Split off R-Car part of the patch --- include/linux/msi.h | 2 ++ kernel/irq/msi.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/linux/msi.h b/include/linux/msi.h index 9449797638255..b10093c4d00ea 100644 --- a/include/linux/msi.h +++ b/include/linux/msi.h @@ -554,6 +554,8 @@ enum { MSI_FLAG_MSIX_CONTIGUOUS = (1 << 19), /* PCI/MSI-X vectors can be dynamically allocated/freed post MSI-X enable */ MSI_FLAG_PCI_MSIX_ALLOC_DYN = (1 << 20), + /* PCI MSIs cannot be steered separately to CPU cores */ + MSI_FLAG_NO_AFFINITY = (1 << 21), }; /** diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c index 5fa0547ece0c4..ca6e2ae6d6fc0 100644 --- a/kernel/irq/msi.c +++ b/kernel/irq/msi.c @@ -832,7 +832,7 @@ static void msi_domain_update_chip_ops(struct msi_domain_info *info) struct irq_chip *chip = info->chip; BUG_ON(!chip || !chip->irq_mask || !chip->irq_unmask); - if (!chip->irq_set_affinity) + if (!chip->irq_set_affinity && !(info->flags & MSI_FLAG_NO_AFFINITY)) chip->irq_set_affinity = msi_domain_set_affinity; } From patchwork Mon Jul 15 12:19:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 1960637 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=mailbox.org header.i=@mailbox.org header.a=rsa-sha256 header.s=mail20150812 header.b=SWROWmWt; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.a=rsa-sha256 header.s=mail20150812 header.b=fTH6aGyt; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2604:1380:45e3:2400::1; helo=sv.mirrors.kernel.org; envelope-from=linux-tegra+bounces-3020-incoming=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [IPv6:2604:1380:45e3:2400::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WN1WR0lPcz20CW for ; Mon, 15 Jul 2024 22:20:51 +1000 (AEST) Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id D9BE1281853 for ; Mon, 15 Jul 2024 12:20:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C8C7118C169; Mon, 15 Jul 2024 12:20:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="SWROWmWt"; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="fTH6aGyt" X-Original-To: linux-tegra@vger.kernel.org Received: from mout-p-102.mailbox.org (mout-p-102.mailbox.org [80.241.56.152]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1715A172799; Mon, 15 Jul 2024 12:20:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.241.56.152 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721046045; cv=none; b=QQVsgmWbinHAGeNI/2/KEPPda3YFBR01pmG2A+/WN6TOK9RCl1xi71J9SwQwE7rI6CbG+FWI6ziEPFdpDU4ZSpo1xh/hpueHv2Izxz98zTJBHs9YNXY3UOz64pUtUkKsqHLHsG2em/RfOGq3kQIgN1RdUFUfIikIjztADQ/QVVQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721046045; c=relaxed/simple; bh=wxyN2Soi5hPghwCDRcn/LU1vNmUmU0GEVLoxtPi3hBk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ZghMKfbJpisr+hlLnLoPCVuCxphhn2eSZMc6Z0erWxdpAEY0ic4JjWfHHbPD5lh/SaomlZZnCARYeowPOsStrv3kau7jHC5tK+IEerEIj3yeO4VxQUmGCl9pVMAIIdIA0o5UnrMtJWWPm9oh83tkNyvjouVRHA8hilmV4Me6P3Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mailbox.org; spf=pass smtp.mailfrom=mailbox.org; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b=SWROWmWt; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b=fTH6aGyt; arc=none smtp.client-ip=80.241.56.152 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mailbox.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mailbox.org Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4WN1WD6P46z9scJ; Mon, 15 Jul 2024 14:20:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1721046040; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GFZL+rC4L3YqzPlzyA7IEyfbTHEYRvoPw1Tzo0CDzio=; b=SWROWmWtcWfen2WQc3wdSYbLaKHYQvMrWjAE/bvewGk8FcAyR2/674CqboUpMFyeiByovT YgNf2zHZElue5xYhvpWv0p9ONKRmjtiGKV8ElEX81D6V2oT0J4stQYulgEc0jJdxeN5j7I 2Ov2ozIPywNhvde46Fmdzd9gG2onHerD4mtJB4u8eGKASyxZ5wbxTT83b7mR9YGeIROUnL L8fvpEs/zF9Z9SjSpyDXySNRd53Od0zZMiHDO93YMVK0Nz+/JKeNu8874U89mo9RYRrGO/ NKKXhILAOeYI4rNo33BZHj4aHE+o1aaefgjuyFDKdL1sekk67t61whcO7SSLDA== From: Marek Vasut DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1721046038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GFZL+rC4L3YqzPlzyA7IEyfbTHEYRvoPw1Tzo0CDzio=; b=fTH6aGyt7T2zA7X4KU/fSw5tzEZNtXci//ndevnzDtlIKw3zhh/+gF7bTL7YyarFeAAvcu kEbXvS88+b8M0F1hix7ccRf8L3NUBxQJv157sKUZ8F9MM3Tzi4WV9U5scz4oouTy8z++50 2aJb94tu6MsONPQgtDXZYhs0FHP+U1JDZoc3S5diMgZ7d7Winc/nzkUg29cgMceaZAogPO hN+8WytCjX2e1C+YhnlQJrGc4UhtwJfNVtM1158snoThM8OX2Q92t5rlbgTI8RC3/VU0rf bu2nMMx4pthJQ2WT/kl6mrlhpQayqrSjXq/nooeyi7XCWvEuntpUVoK0Bnpouw== To: linux-pci@vger.kernel.org Cc: Marek Vasut , =?utf-8?q?Krzysztof_Wilcz?= =?utf-8?q?y=C5=84ski?= , Anna-Maria Behnsen , Anup Patel , Bjorn Helgaas , Jisheng Zhang , Jon Hunter , Koichiro Den , Lorenzo Pieralisi , Marc Zyngier , Nipun Gupta , Rob Herring , Shivamurthy Shastri , Thierry Reding , Thomas Gleixner , Yoshihiro Shimoda , linux-renesas-soc@vger.kernel.org, linux-tegra@vger.kernel.org Subject: [PATCH v3 2/3] PCI/rcar-host: Silence set affinity failed warning Date: Mon, 15 Jul 2024 14:19:27 +0200 Message-ID: <20240715122012.35222-2-marek.vasut+renesas@mailbox.org> In-Reply-To: <20240715122012.35222-1-marek.vasut+renesas@mailbox.org> References: <20240715122012.35222-1-marek.vasut+renesas@mailbox.org> Precedence: bulk X-Mailing-List: linux-tegra@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MBO-RS-ID: c913639756c68c1f3ce X-MBO-RS-META: ki1suaerkm63p74dg7r3j9d34yshwn73 X-Rspamd-Queue-Id: 4WN1WD6P46z9scJ Use newly introduced MSI_FLAG_NO_AFFINITY, which keeps .irq_set_affinity unset and allows migrate_one_irq() code in cpuhotplug.c to exit right away, without printing "IRQ...: set affinity failed(-22)" warning. Remove .irq_set_affinity implementation which only return -EINVAL from this controller driver. Signed-off-by: Marek Vasut --- Cc: "Krzysztof Wilczyński" Cc: Anna-Maria Behnsen Cc: Anup Patel Cc: Bjorn Helgaas Cc: Jisheng Zhang Cc: Jon Hunter Cc: Jonathan Hunter Cc: Koichiro Den Cc: Lorenzo Pieralisi Cc: Marc Zyngier Cc: Nipun Gupta Cc: Rob Herring Cc: Shivamurthy Shastri Cc: Thierry Reding Cc: Thomas Gleixner Cc: Yoshihiro Shimoda Cc: linux-pci@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org Cc: linux-tegra@vger.kernel.org --- V3: - New patch --- drivers/pci/controller/pcie-rcar-host.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/pci/controller/pcie-rcar-host.c b/drivers/pci/controller/pcie-rcar-host.c index c01efc6ea64f6..3dd653f3d7841 100644 --- a/drivers/pci/controller/pcie-rcar-host.c +++ b/drivers/pci/controller/pcie-rcar-host.c @@ -658,11 +658,6 @@ static void rcar_msi_irq_unmask(struct irq_data *d) spin_unlock_irqrestore(&msi->mask_lock, flags); } -static int rcar_msi_set_affinity(struct irq_data *d, const struct cpumask *mask, bool force) -{ - return -EINVAL; -} - static void rcar_compose_msi_msg(struct irq_data *data, struct msi_msg *msg) { struct rcar_msi *msi = irq_data_get_irq_chip_data(data); @@ -678,7 +673,6 @@ static struct irq_chip rcar_msi_bottom_chip = { .irq_ack = rcar_msi_irq_ack, .irq_mask = rcar_msi_irq_mask, .irq_unmask = rcar_msi_irq_unmask, - .irq_set_affinity = rcar_msi_set_affinity, .irq_compose_msi_msg = rcar_compose_msi_msg, }; @@ -725,8 +719,8 @@ static const struct irq_domain_ops rcar_msi_domain_ops = { }; static struct msi_domain_info rcar_msi_info = { - .flags = (MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS | - MSI_FLAG_MULTI_PCI_MSI), + .flags = MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS | + MSI_FLAG_NO_AFFINITY | MSI_FLAG_MULTI_PCI_MSI, .chip = &rcar_msi_top_chip, }; From patchwork Mon Jul 15 12:19:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 1960640 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=mailbox.org header.i=@mailbox.org header.a=rsa-sha256 header.s=mail20150812 header.b=FD1sZ2KJ; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.a=rsa-sha256 header.s=mail20150812 header.b=GvJLStJ0; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2604:1380:4601:e00::3; helo=am.mirrors.kernel.org; envelope-from=linux-tegra+bounces-3021-incoming=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [IPv6:2604:1380:4601:e00::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WN1WT6rlDz20CW for ; Mon, 15 Jul 2024 22:20:53 +1000 (AEST) Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 6F5261F2205A for ; Mon, 15 Jul 2024 12:20:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3F4E918C32C; Mon, 15 Jul 2024 12:20:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="FD1sZ2KJ"; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="GvJLStJ0" X-Original-To: linux-tegra@vger.kernel.org Received: from mout-p-102.mailbox.org (mout-p-102.mailbox.org [80.241.56.152]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E01D518C170; Mon, 15 Jul 2024 12:20:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.241.56.152 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721046048; cv=none; b=MTYkrsnK3hAFJBpskzfX1Ron/BzgKaFHh1TkQP3u4KFBhwzY8Ozb8KdHPb7HV3DE3tQ4chOd31mu0KCba6+adbQjB5+7Bbq6QHMJ/8c2ErOjiWnETJtdKNsK4QBcTp27Wpp1/5D1n63jCf9+oNi6hedxASteAQCOMUr2eUrJdb8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721046048; c=relaxed/simple; bh=DmUnzz7NWMRUBhVdsvhXisqW/f88mWV4Qx2UxuBzzb4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ZFGpalTzFYitd2y7E4MPKLtQsojM4AtZ4ehW4P/9rsqP9B2Ha24AMQUjHkamupidrN0XRi712Uv2bQmsHUb0rxk1p+vYSo8wkEDlbrrTTQpYuySNVYaA6MnzZfs4KcgduikfrkpnsrLFArLIDeZhnlNifwfuh2BtNeZerF0Beow= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mailbox.org; spf=pass smtp.mailfrom=mailbox.org; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b=FD1sZ2KJ; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b=GvJLStJ0; arc=none smtp.client-ip=80.241.56.152 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mailbox.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mailbox.org Received: from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4WN1WJ13D5z9slg; Mon, 15 Jul 2024 14:20:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1721046044; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=unnL5I7d5jwqGcATBu9+KiMley5zwh8pHHnERosyJX0=; b=FD1sZ2KJWKvbikfo0CFFnUXMcjvpeXxPrWTeKtyVK80YnDTfmpiX4sN3ogrdVtxJVJnEo4 R6N80Z5IpFPUc1Gtonl7HJWkCAXASjL/ns9FgLZAxjDRlPYMstOqIHY+yOwGZNKJYf1PGi elaQO0Y69K3dwrDEpBTyKaiz6EhHGLXbHX4xB9xoYaCYQ61oo4AIiz/F/FfjLPraX/UIjY GwsqPJJbePf2jPvLm0/EbJhkpTOeeUDg45TLvKVstZuPOCjLs4y/p72kf2Uq9W47fCWfKL acpb4N2uHjMwTDbekWSUBwXc3S2VrYughEHUYxfZ9tu+iy7PfLbi3Y1GeJESjg== From: Marek Vasut DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1721046042; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=unnL5I7d5jwqGcATBu9+KiMley5zwh8pHHnERosyJX0=; b=GvJLStJ0kCwyDcLcB85cZ1u+Pr7On6yeqKVP8shWvkvwE/UAj5lvU6HXH4qYliKYqxXxGE tumjk4uOks5kd62kAJ9FkzE9VBbdsRSRxQ0w8NwmH7evO1T6PpGrctd3I1jePNBmXCurq9 81AWvVOLMvKMNx6or/dj3Ly/1A+M1oHLfG/JCnkGMULguufluWO/XWMnhn1LibmDB7twTL REGLKdBPh2B3EiImNB+uh4m6xfIKvlN8ysXGIPfbNkTLfX+Mo+L30uxcDYzNkFZn/A+C36 da/ahDXcUj1LOFEsNKty8B2KhPRH/20dNBje/hXXr35iWxOiDHrxjCBr0cqxbw== To: linux-pci@vger.kernel.org Cc: Marek Vasut , =?utf-8?q?Krzysztof_Wilcz?= =?utf-8?q?y=C5=84ski?= , Anna-Maria Behnsen , Anup Patel , Bjorn Helgaas , Jisheng Zhang , Jon Hunter , Koichiro Den , Lorenzo Pieralisi , Marc Zyngier , Nipun Gupta , Rob Herring , Shivamurthy Shastri , Thierry Reding , Thomas Gleixner , Yoshihiro Shimoda , linux-renesas-soc@vger.kernel.org, linux-tegra@vger.kernel.org Subject: [PATCH v3 3/3] PCI: tegra: Silence set affinity failed warning Date: Mon, 15 Jul 2024 14:19:28 +0200 Message-ID: <20240715122012.35222-3-marek.vasut+renesas@mailbox.org> In-Reply-To: <20240715122012.35222-1-marek.vasut+renesas@mailbox.org> References: <20240715122012.35222-1-marek.vasut+renesas@mailbox.org> Precedence: bulk X-Mailing-List: linux-tegra@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MBO-RS-ID: c9fbb42232487850b10 X-MBO-RS-META: wk8zixksezs68dzd8b88ci6y5fu1jciy Use newly introduced MSI_FLAG_NO_AFFINITY, which keeps .irq_set_affinity unset and allows migrate_one_irq() code in cpuhotplug.c to exit right away, without printing "IRQ...: set affinity failed(-22)" warning. Remove .irq_set_affinity implementation which only return -EINVAL from this controller driver. Signed-off-by: Marek Vasut --- Cc: "Krzysztof Wilczyński" Cc: Anna-Maria Behnsen Cc: Anup Patel Cc: Bjorn Helgaas Cc: Jisheng Zhang Cc: Jon Hunter Cc: Jonathan Hunter Cc: Koichiro Den Cc: Lorenzo Pieralisi Cc: Marc Zyngier Cc: Nipun Gupta Cc: Rob Herring Cc: Shivamurthy Shastri Cc: Thierry Reding Cc: Thomas Gleixner Cc: Yoshihiro Shimoda Cc: linux-pci@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org Cc: linux-tegra@vger.kernel.org --- V3: - New patch --- drivers/pci/controller/pci-tegra.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/pci/controller/pci-tegra.c b/drivers/pci/controller/pci-tegra.c index 038d974a318ea..d7517c3976e7f 100644 --- a/drivers/pci/controller/pci-tegra.c +++ b/drivers/pci/controller/pci-tegra.c @@ -1629,11 +1629,6 @@ static void tegra_msi_irq_unmask(struct irq_data *d) spin_unlock_irqrestore(&msi->mask_lock, flags); } -static int tegra_msi_set_affinity(struct irq_data *d, const struct cpumask *mask, bool force) -{ - return -EINVAL; -} - static void tegra_compose_msi_msg(struct irq_data *data, struct msi_msg *msg) { struct tegra_msi *msi = irq_data_get_irq_chip_data(data); @@ -1648,7 +1643,6 @@ static struct irq_chip tegra_msi_bottom_chip = { .irq_ack = tegra_msi_irq_ack, .irq_mask = tegra_msi_irq_mask, .irq_unmask = tegra_msi_irq_unmask, - .irq_set_affinity = tegra_msi_set_affinity, .irq_compose_msi_msg = tegra_compose_msi_msg, }; @@ -1697,8 +1691,8 @@ static const struct irq_domain_ops tegra_msi_domain_ops = { }; static struct msi_domain_info tegra_msi_info = { - .flags = (MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS | - MSI_FLAG_PCI_MSIX), + .flags = MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS | + MSI_FLAG_NO_AFFINITY | MSI_FLAG_PCI_MSIX, .chip = &tegra_msi_top_chip, };