Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1593052rwd; Thu, 15 Jun 2023 12:41:35 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4Xg4lcv/tHMrtsMqirCzbICtnKL6blMxAnz12u6bClqH23nayc9583N+wHkKskCoFmEpun X-Received: by 2002:a05:6402:292:b0:514:930c:7951 with SMTP id l18-20020a056402029200b00514930c7951mr13970091edv.7.1686858094996; Thu, 15 Jun 2023 12:41:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686858094; cv=none; d=google.com; s=arc-20160816; b=X3PxxJ/Xly2ZQH3a5P8dlj+/OamM8FET+DLYGM063SA+H8kJxkSWLo9eB3xFQrdCVC KCPhDes9J30iw2R5DZ0FomtJWhxTankBjHGa/nm9r6kIVJhy7STU4g/JrQyVTwMIRJ8w Ro2IDv/UL/Iy1PNOlRQWNsbs68zqS/a58vfIpxZG6MogJcDaJECujA5QJcQAqsGH7sEG qA6KP8L8MjIxbxOUM/eCNyML9WACqNXatZBXnuPU8m9LL6T5jBIUjh+l+cB4ii/Cc6H5 uRUc1PHOPaOHttP5SGZNnFawu6VhmdRODzNziqpyPrKRzVp0uCxXFmfru9gA6lHmiLfJ ppfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Qqop7RiCH8eXf+XF4CmSu5z58mpzfJQOFDXfK4nlUT8=; b=rCtBIE+p450/IiHM8CbtOQLs9qa6LXGqO5MUopR7U3D2pskMX6pM6wUMBx+GvBzBSo IJJuoI5eHCp8gk+opzYuGdR9pNwcvMs5M8lnAY2E71EeFz7WR4vsYMB/KYui1dffKKPm QSQMd02+qwraIXEz2HJYPPe4feRMfV8YmUM02+lDCnYmB9pgux3P0bH+ncRNQSm4Hg7x WngzAJD39fdTTnxD7YlQoIUdTot54QycfFVIWa8hxHU2f2MUzosXo4XY48p5yeYcXJKb CJsCvR1C1dhtoqPhf9ZETuBWWr97lQuM1J1xpCT54oN6E9dlcy27XuWgLXeHf5f7+a0D lQpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SAQXO2dJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t17-20020aa7d711000000b0051891746c3bsi2446304edq.685.2023.06.15.12.41.10; Thu, 15 Jun 2023 12:41:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SAQXO2dJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229662AbjFOTcB (ORCPT + 99 others); Thu, 15 Jun 2023 15:32:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229509AbjFOTcA (ORCPT ); Thu, 15 Jun 2023 15:32:00 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32B7D26B6; Thu, 15 Jun 2023 12:31:59 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C3F0261C81; Thu, 15 Jun 2023 19:31:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 75D75C433C0; Thu, 15 Jun 2023 19:31:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686857518; bh=kictF58Z8Tqb0WvcwXz864a+VzNXEgr7VntV2dSR0Ds=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=SAQXO2dJSrFg0f7YL7VcbzpYm4NMOqoMCluGrUsiuBb/sYLbvRvCKQNy3+y6UC1V5 MAzUteY4hiAJgKHUKzjNyF6cvlI8IUk+zNcocFrBGx6kVflU2ByUfCsfs4UEWF80R3 HvozHMkAJI1Fc9OpDUeuJeP4gP8BOkVIxcuYEQFQuqFw8rKmIZgDFXSDjFKPdPOlqP POS32emQCSwXLahcm4DCUXdxz03D3zYA9qOrcvn++MR7C4G6M7lXgQF5mCXlrYuRGP xe9TsgRC0uixNb8646kL1YcV+jsx1bqtgrt0WvK9T8I0ooL+FYt8XD2Z0ts7pVCNbm ss7WSwUV6+zow== Date: Thu, 15 Jun 2023 20:31:51 +0100 From: Conor Dooley To: Saravana Kannan Cc: Anup Patel , Palmer Dabbelt , Paul Walmsley , Thomas Gleixner , Marc Zyngier , Rob Herring , Krzysztof Kozlowski , Robin Murphy , Joerg Roedel , Will Deacon , Frank Rowand , Atish Patra , Andrew Jones , Anup Patel , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, iommu@lists.linux.dev Subject: Re: [PATCH v4 08/10] irqchip: Add RISC-V advanced PLIC driver Message-ID: <20230615-thyself-doornail-f0545ada9176@spud> References: <20230613153415.350528-1-apatel@ventanamicro.com> <20230613153415.350528-9-apatel@ventanamicro.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="SvxDNUXYoM4it6RY" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --SvxDNUXYoM4it6RY Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hey Saravana, On Thu, Jun 15, 2023 at 12:17:08PM -0700, Saravana Kannan wrote: > On Tue, Jun 13, 2023 at 8:35=E2=80=AFAM Anup Patel wrote: btw, please try to delete the 100s of lines of unrelated context when replying > > +static int __init aplic_dt_init(struct device_node *node, > > + struct device_node *parent) > > +{ > > + /* > > + * The APLIC platform driver needs to be probed early > > + * so for device tree: > > + * > > + * 1) Set the FWNODE_FLAG_BEST_EFFORT flag in fwnode which > > + * provides a hint to the device driver core to probe the > > + * platform driver early. > > + * 2) Clear the OF_POPULATED flag in device_node because > > + * of_irq_init() sets it which prevents creation of > > + * platform device. > > + */ > > + node->fwnode.flags |=3D FWNODE_FLAG_BEST_EFFORT; >=20 > NACK. You are blindly plastering flags without trying to understand > the real issue and fixing this correctly. >=20 > > + of_node_clear_flag(node, OF_POPULATED); > > + return 0; > > +} > > +IRQCHIP_DECLARE(riscv_aplic, "riscv,aplic", aplic_dt_init); >=20 > This macro pretty much skips the entire driver core framework to probe > and calls init and you are supposed to initialize the device when the > init function is called. >=20 > If you want your device/driver to follow the proper platform driver > path (which is recommended), then you need to use the > IRQCHIP_PLATFORM_DRIVER_BEGIN() and related macros. Grep for plenty of ex= amples. >=20 > I offered to help you debug this issue and I asked for a dts file that > corresponds to a board you are testing this on and seeing an issue. There isn't a dts file for this because there's no publicly available hardware that actually has an APLIC. Maybe Ventana have pre-production silicon that has it, but otherwise it's a QEMU job. Cheers, Conor. > But you haven't answered my question [1] and are pointing to some > random commit and blaming it. That commit has no impact on any > existing devices/drivers. >=20 > Hi Marc, >=20 > Please consider this patch Nacked as long as FWNODE_FLAG_BEST_EFFORT > is used or until Anup actually works with us to debug the real issue. >=20 > -Saravana > [1] - https://lore.kernel.org/lkml/CAAhSdy2p6K70fc2yZLPdVGqEq61Y8F7WVT2J8= st5mQrzBi4WHg@mail.gmail.com/ --SvxDNUXYoM4it6RY Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZItnJwAKCRB4tDGHoIJi 0oNdAP9y41MDXvHACoZ/dwEG8Hy5OZRNoJvZmNm6Lx2BVfvqWgD+L4A6erWOa4eW QmND+OPAsLKLIP9O9/cMGnzZJ/jvLQs= =UPBa -----END PGP SIGNATURE----- --SvxDNUXYoM4it6RY--