From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 93A32C433E0 for ; Thu, 6 Aug 2020 19:59:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9669D221E2 for ; Thu, 6 Aug 2020 19:59:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596743972; bh=rZzNB7Mchw1xUwGcA2KB6ufKo5ZZoG/yMfMIbq6pK/Y=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=HpR7UlhPKjZNzhAuOdDnnFFXBVmHUnooYosHI0O84460jt2DkjX+jUXs/Gl4jMNSk aaW+KHpkJcH9rk+8+G9XkyS+seNFd+sfM3eeaXfEAWoGaEcAD5YfW7JLICpCndRd7u xR1aSaCzUhoJWCNSN09Qm7/j522fuMSDD549pBiI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726217AbgHFT7b (ORCPT ); Thu, 6 Aug 2020 15:59:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:59624 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725875AbgHFT7a (ORCPT ); Thu, 6 Aug 2020 15:59:30 -0400 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DFBAE2173E; Thu, 6 Aug 2020 19:59:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596743970; bh=rZzNB7Mchw1xUwGcA2KB6ufKo5ZZoG/yMfMIbq6pK/Y=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=2oq7B8IMmc0UB+V4Gs9PVKpLknPtYkzLPt6nce5QAFIKMqUSYttUwXraHgU41ekQg idJrEf9h1GGJy7Kb1jWhp9GWclJ9y5E0WckC6dyocfEOOSli3dSDSVcshgAAIiOcbz 1H86dIn1t92Nnw6/n5miq3I0V0KITvHSGAIBX5LM= Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1k3m2y-000Mn1-AH; Thu, 06 Aug 2020 20:59:28 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 06 Aug 2020 20:59:28 +0100 From: Marc Zyngier To: Saravana Kannan Cc: John Stultz , Thomas Gleixner , Jason Cooper , Matthias Brugger , Andy Gross , Bjorn Andersson , Android Kernel Team , lkml , linux-arm-kernel , "moderated list:ARM/Mediatek SoC support" , linux-arm-msm , Hanks Chen , CC Hwang , Loda Chou , steev@kali.org, Nial Peters Subject: Re: [PATCH v3 2/4] irqchip/qcom-pdc: Switch to using IRQCHIP_PLATFORM_DRIVER helper macros In-Reply-To: References: <20200718000637.3632841-1-saravanak@google.com> <20200718000637.3632841-3-saravanak@google.com> <5e6124390b9e3e7f4d6f6decbdb669ca@kernel.org> User-Agent: Roundcube Webmail/1.4.5 Message-ID: <4d79a3e9c8c24f8adb6f7ade97d5a9c6@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: saravanak@google.com, john.stultz@linaro.org, tglx@linutronix.de, jason@lakedaemon.net, matthias.bgg@gmail.com, agross@kernel.org, bjorn.andersson@linaro.org, kernel-team@android.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-arm-msm@vger.kernel.org, hanks.chen@mediatek.com, cc.hwang@mediatek.com, loda.chou@mediatek.com, steev@kali.org, uceenpe@ucl.ac.uk X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-08-06 19:05, Saravana Kannan wrote: > On Thu, Aug 6, 2020 at 5:12 AM Marc Zyngier wrote: >> >> On 2020-08-06 02:24, John Stultz wrote: [...] >> >> + if (par_np == np) >> >> + par_np = NULL; >> >> + >> >> + /* >> >> + * If there's a parent interrupt controller and none of the parent >> >> irq >> >> + * domains have been registered, that means the parent interrupt >> >> + * controller has not been initialized yet. it's not time for this >> >> + * interrupt controller to initialize. So, defer probe of this >> >> + * interrupt controller. The actual initialization callback of this >> >> + * interrupt controller can check for specific domains as necessary. >> >> + */ >> >> + if (par_np && !irq_find_matching_host(np, DOMAIN_BUS_ANY)) >> >> + return -EPROBE_DEFER; >> > >> > Yep. We're getting caught on the irq_find_matching_host() check. I'm a >> > little lost as when I look at the qcom,pdc node in the dtsi its not >> > under a parent controller (instead the soc node). >> > Not sure if that's an issue in the dtsi or if par_np check needs to >> > ignore the soc node and pass null? >> >> I think you have nailed it. This checks for a domain attached to >> the driver we are about to probe, and this domain cannot possibly >> exist. Instead, it is the *parent* this should check for, as we >> depend on it for successful probing. > > Duh! Looks like I made a copy-paste/typo error. The comment clearly > says I'm trying to check the parent and then I end up checking the > node getting registered. I'm sure this will fix it. > > Actually Nial sent an email a few hours after your and he had found > the same issue. He even tested the fix with an irqchip driver and it > fixed the probe issue. OK, thanks for confirming. It would have been good if these patches had seen a bit more testing. > > I'm assuming you'll put up the patch yourself. Please let me know if > you need me to send one. I have queued this [1] in -next. It'd be good if someone (John?) could give a Tested-by. Thanks, M. [1] https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/commit/?h=irq/irqchip-next -- Jazz is not dead. It just smells funny...