From patchwork Mon Feb 19 14:47:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13562799 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4DCCDC48BF8 for ; Mon, 19 Feb 2024 14:47:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Message-Id:MIME-Version:Subject: Date:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=BgSmegKMrDl6xBe6DYVAG4dcotUwb01KegzYIjSJeLw=; b=NTV0cpB8nqfXQi Jfrt/kp8SWB6HwTAzs9bbTUMGGqSJ4z3j8hF12uphC1XsYz8GBGA9sj1M5HPwzUGOL1M8t3BzPD22 wF7qSEt6DXgredWNqfYxdkEr0aIIfwAf+UA47gQDiCz4ctPfQARgdzxXuemywIp/xxnmIFFzTOYN4 qH8yK+OlAEBo1o72SaKg0TeJNYN7g2iHJhAWaRTNhKlr/14UC99JwXahOYew5XUbbgPtWrGPCBVpw OKcQip/DXT+LtCDTFbeyL7qmuXwDBTZHlWuuiWf0x+kxOqMAJV/14K+a/o67LHJ1NWH298a4bRaW+ lYR2V7V60ibUt4pFGzPg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rc4vm-0000000Auay-3tMS; Mon, 19 Feb 2024 14:47:42 +0000 Received: from mail-lf1-x12a.google.com ([2a00:1450:4864:20::12a]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rc4vj-0000000AuaI-43Zs for linux-arm-kernel@lists.infradead.org; Mon, 19 Feb 2024 14:47:41 +0000 Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-512a9ae6c02so2023257e87.2 for ; Mon, 19 Feb 2024 06:47:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708354058; x=1708958858; darn=lists.infradead.org; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:from:to:cc:subject:date:message-id:reply-to; bh=5NUo4d1gxTmiY7z7v99UlcjZS6ZKrBDK3bbgjglglyk=; b=CI1lwIiInPD0G6fjI1sTTv8VOOrZwuRbksP/Xnadt5N+brGtjetTwj799zhgp0aESL 460DwwUjtLZAP/gz50HrIVvSMO3/BYhakIkVS1qmFtU1l0QctFIe8J0eQXLOoZJi0CF1 Vv3CGztAqZe+JDDSir+cxntHGQ/970wpmJgriRdwNKcCNLMBGbjikzejkAZLRKGXNt5f Ba9ppKVQ2VLzvKN83R5LCs5xcOTiNCl02u0OonjA3OrTKIy8FPu1LsY1wHPaIFo6rBVi H71f0gI4C+1LzPMm8Vjd5g6v46iclljzLY2b1SFJ1/NXLjcHKq2AI+HBWMM869UNAzs6 1XjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708354058; x=1708958858; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=5NUo4d1gxTmiY7z7v99UlcjZS6ZKrBDK3bbgjglglyk=; b=rWPXjUdlZxSD37gtRLtP67oJQ4MLm5Pm0uBUbDunAcwDLnEOWbcJ2+ZLOWdWvH/ap+ F2IlwnUkOKvW+t7OflGyLdvwJDDurzKW1ayB6h/d7TARqqVbrBtDczdV1kcdrQyE0RS0 iwG1XrNx7H+4EDnbaGeEcpRYgBI4fbQaXZygaNyGVuwVVRDjAKSHZtB/EXdAG39aB3ga OEpWTWC61y6mF+/pj1EdzJ5tPcuCMMvyEoBt98aHYjB6plBTGM3bwpT3Quysi5j9yhpd rqgFZKdW/ohYYWLUiZzjNl4kcHjjZe11ZdxDgl6a5mECU9JA1yKOPAE1VlP8ij/ZPSVb AqIg== X-Forwarded-Encrypted: i=1; AJvYcCWRL+3Fuj6ruS9N6fNrqgr44WRP4Da63rg0rfR2oHXyqfsQkKrZ7e4Uz9YU47z9nPnv+w4AY5OHgwDUW8olsrVSvPNlyIoJNlxdhkpbYResIXmxt+E= X-Gm-Message-State: AOJu0YyJoog23fyXJFI0Iz/l3MDodM8MoxFtqBNCi0BT9ntAkb/TgSi0 5bMxfjLbhjo2HxPB8VJWpMLBRrN6ZPqBJbq6Cod2Ei7SlNQiCqH2OhFqB/dolTQO5lfQztGM70W C X-Google-Smtp-Source: AGHT+IGsyulPjnmfahOMJZ1D3dlJkcZNdWHiMlP++b2WnCvL2tuMyrc7eh5KbLdlQJgmjRTt56KbhQ== X-Received: by 2002:a05:6512:6d4:b0:511:e296:e563 with SMTP id u20-20020a05651206d400b00511e296e563mr9724280lff.2.1708354057815; Mon, 19 Feb 2024 06:47:37 -0800 (PST) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id v29-20020a056512049d00b005128d5d670csm924254lfq.193.2024.02.19.06.47.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 06:47:37 -0800 (PST) From: Dmitry Baryshkov Date: Mon, 19 Feb 2024 16:47:37 +0200 Subject: [PATCH] irqchip/gic-v3: handle DOMAIN_BUS_ANY in gic_irq_domain_select MIME-Version: 1.0 Message-Id: <20240219-gic-fix-child-domain-v1-1-09f8fd2d9a8f@linaro.org> X-B4-Tracking: v=1; b=H4sIAAhq02UC/x2MQQqAIBAAvxJ7bkHFwPpKdDBdbaEsFCKQ/p50H JiZCoUyU4Gpq5Dp5sJnaiD7DtxmUyRk3xiUUFooOWJkh4EfdBvvHv15WE5orDRarDSGMEBLr0z N+bfz8r4fqFrqTWYAAAA= To: Marc Zyngier , Thomas Gleixner , Anup Patel Cc: Konrad Dybcio , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Dmitry Baryshkov X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1663; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=EHbRQ7dLHAog9MqSFM/E+Sdhe/5P8jIuOjtEE4j2X68=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBl02oJZo2K7nEm2susxBahpdq/LMzQO89GN/01X IghlhaAWmWJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZdNqCQAKCRCLPIo+Aiko 1dr2B/4iG4WVuvwqRcRvLAR7OJUV4wyiF8CtzhWVKinJ6V3wT+pna+GA8Cn3+mK3WJwaVmFedql oJKMb9ykN0akdVxAA7eZh7UWNNdx1Lwn4EnrXWEzhGDq49r+tuJANZoSXrSaPB/rl8Nw8bg2DMm dvNnIRyQr5i7MhLceVChQ30DQuVfilQBIHMeXBiRnIjFw9HxuQx7yOApeFBHMV14HsXNvgZeGLw ym0wzk/ft10ot8T0Avdnr6wxJs/adnIjDfWI5nBhoaXEuIrsLMcD2tifsXK0LsmR15cqP3zmbmI 31h4E5so8h3/+aNhdKZUPfqtMcL75NNBnSpKNvFeH/Wa++Yo X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240219_064740_051613_F582E4AB X-CRM114-Status: GOOD ( 12.18 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Before the commit de1ff306dcf4 ("genirq/irqdomain: Remove the param count restriction from select()") the irq_find_matching_fwspec() was handling the DOMAIN_BUS_ANY on its own. After this commit it is a job of the select() callback. However the callback of GICv3 (even though it got modified to handle zero param_count) wasn't prepared to return true for DOMAIN_BUS_ANY bus_token. This breaks probing of any of the child IRQ domains, since platform_irqchip_probe() uses irq_find_matching_host(par_np, DOMAIN_BUS_ANY) to check for the presence of the parent IRQ domain. Fixes: 151378251004 ("irqchip/gic-v3: Make gic_irq_domain_select() robust for zero parameter count") Fixes: de1ff306dcf4 ("genirq/irqdomain: Remove the param count restriction from select()") Signed-off-by: Dmitry Baryshkov --- drivers/irqchip/irq-gic-v3.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- base-commit: 35a4fdde2466b9d90af297f249436a270ef9d30e change-id: 20240219-gic-fix-child-domain-8a1840be9ff5 Best regards, diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c index 6fb276504bcc..e9e9643c653f 100644 --- a/drivers/irqchip/irq-gic-v3.c +++ b/drivers/irqchip/irq-gic-v3.c @@ -1696,7 +1696,8 @@ static int gic_irq_domain_select(struct irq_domain *d, /* Handle pure domain searches */ if (!fwspec->param_count) - return d->bus_token == bus_token; + return d->bus_token == bus_token || + bus_token == DOMAIN_BUS_ANY; /* If this is not DT, then we have a single domain */ if (!is_of_node(fwspec->fwnode))