Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp4608484rwb; Tue, 8 Aug 2023 10:54:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEvNwHcppedLiQDW2e2t1H3p4DqGnTbYBQr5xPEDqTBFuQSSJlpnKVG+e7knDfP4QvDmjIA X-Received: by 2002:a05:6a00:1a54:b0:682:713e:e520 with SMTP id h20-20020a056a001a5400b00682713ee520mr266276pfv.8.1691517275243; Tue, 08 Aug 2023 10:54:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691517275; cv=none; d=google.com; s=arc-20160816; b=dyqvZ1/3xkcQhoHnsHehvqMtF3eru/lJHEN0FG4Eqz7tiwh+gmlt4crV0xG61mEMlv /Kh4G6OjRZeodmZ/yieZoEREp2DfVo2JmpsENDt684N6BwyHBEdEkveyC1bxvv0YDRTN MWe8P47vMM52ISZPv1hoYzASyakr62NlshWZnhij+jJo/Ls8bIOAzu1Wt5SauXLfTvoU Ltmd6zlp98RS1ZqM/VCvcpdPEg5maE3mi+IP1s5Y6dti2AXmkolFZLwF/H7rOuy0TuW1 IPuZikfC44NF9/vPWDPdzqhehYh/Tw+Lbq6cWAAURe96lPbMJUgFb2EtafsOSuhqGLPM i3kA== 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=lP+IDJQGcjx/ofLN9AmuZw+Of1eY0CJEtuGyrRH6hq4=; fh=grL+DmJQktZyhi6FyfoPbkDSCDZlVYwzoGCSg5eMgqc=; b=WalYaAgTtVxJgH2eZO9/5zT4ZPoa7+k39kNuSnrFF2qVYBpVRUj64HV1GK6gRIupBx YYzlpMFk1TMaG9YzGIMDBengbvE5ZTpKpnSKy4tDAk6OHj8iQSS+UJ4z8sGEYW3jBcVq BevBMQl/8Z2gsGZ3LeEDdpeVV51xg5oBEaejt6vOBPInW8153p9Z52moiZiZW23LSg8N E9T41ohJk2FYoYvQFpAU8V1skWb6gH8X9H9MiHVudl4u/DVJd7Hz1HbLNmtunDbLdF/U WtwiPiopM/0xJc09y+6jNAJYFB412xsuiB/aeok1W+5FrnPQVI4hszK7UMzS1xQT1MFN oH7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cwr+yMbU; 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 w188-20020a6362c5000000b0056499ea771fsi7446846pgb.672.2023.08.08.10.54.19; Tue, 08 Aug 2023 10:54:35 -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=cwr+yMbU; 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 S232776AbjHHQaI (ORCPT + 99 others); Tue, 8 Aug 2023 12:30:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232772AbjHHQ2z (ORCPT ); Tue, 8 Aug 2023 12:28:55 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3762812538; Tue, 8 Aug 2023 08:51:10 -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)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9D43F62461; Tue, 8 Aug 2023 08:41:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8003EC433C8; Tue, 8 Aug 2023 08:41:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691484113; bh=RmuHI6SnVuFMKUQ2d0Pd88TnzEPcPc2NGqkjG7ikYO4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=cwr+yMbUV+NM94lVf0ySZk4FQ2nozF+U9wyhfVylYCpXbt1OL0ssrTMJwXSxsdsHi 18rTqTqxxueHW+nMM+ermi6IQknqO8+usQdaIiyi1h1tiB82F262sqvPDUGDacSDkO a+eTTnFx91yf6zmVoeagFEWEQ3lln0JhVGRC83P65FbUnGAKxwHLFQyg6fLOXTTdZn A1EoGEKnrrv1NvaNJ3siqRI5n1/LCn3oUKEUABC06gGoEHMihEoitC1g2km+U7SlBq HDlEJ7VYY0XrzBN2J0H3HcQA4IRPSXjHrlCgv6J3k9J5QInU+H7jleqW4Lu80DSrip ExqC2/GRUi8eA== Date: Tue, 8 Aug 2023 09:41:45 +0100 From: Conor Dooley To: Sunil V L Cc: linux-doc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org, Heikki Krogerus , "Rafael J . Wysocki" , Catalin Marinas , Atish Kumar Patra , Conor Dooley , Will Deacon , Haibo Xu , Jonathan Corbet , Marc Zyngier , Daniel Lezcano , Robert Moore , Andrew Jones , Albert Ou , Paul Walmsley , Bjorn Helgaas , Thomas Gleixner , Andy Shevchenko , Greg Kroah-Hartman , Daniel Scally , Palmer Dabbelt , Sakari Ailus , Anup Patel , Len Brown Subject: Re: [RFC PATCH v1 20/21] RISC-V: ACPI: Create PLIC platform device Message-ID: <20230808-chalice-easing-1369c7386082@spud> References: <20230803175916.3174453-1-sunilvl@ventanamicro.com> <20230803175916.3174453-21-sunilvl@ventanamicro.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="yKOyY2Nm+bU0Ajrr" Content-Disposition: inline In-Reply-To: <20230803175916.3174453-21-sunilvl@ventanamicro.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS 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 --yKOyY2Nm+bU0Ajrr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 03, 2023 at 11:29:15PM +0530, Sunil V L wrote: > Since PLIC needs to be a platform device For the unwashed, why does the PLCI need to be a platform device? (And while you're at that, please try to make use of the extra ~20 characters per line that you can use here.) > probe the > MADT and create platform devices for each PLIC in the > system. Use software node framework for the fwnode > which allows to create properties and hence the > actual irqchip driver doesn't need to do anything > different for ACPI vs DT. >=20 > Signed-off-by: Sunil V L > Co-developed-by: Haibo Xu > Signed-off-by: Haibo Xu > +static struct fwnode_handle *acpi_plic_create_fwnode(struct acpi_madt_pl= ic *plic) > +{ > + struct fwnode_handle *fwnode, *parent_fwnode; > + struct riscv_irqchip_list *plic_element; > + struct software_node_ref_args *refs; > + struct property_entry props[8] =3D {}; > + int nr_contexts; > + > + props[0] =3D PROPERTY_ENTRY_U32("riscv,gsi-base", plic->gsi_base); > + props[1] =3D PROPERTY_ENTRY_U32("riscv,ndev", plic->num_irqs); > + props[2] =3D PROPERTY_ENTRY_U32("riscv,max_prio", plic->max_prio); My OCD wants to know why this gets an _ but the others have a -. > + props[3] =3D PROPERTY_ENTRY_U8("riscv,plic-id", plic->id); > + props[4] =3D PROPERTY_ENTRY_U64("riscv,plic-base", plic->base_addr); > + props[5] =3D PROPERTY_ENTRY_U32("riscv,plic-size", plic->size); --yKOyY2Nm+bU0Ajrr Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZNH/yQAKCRB4tDGHoIJi 0o+oAQCMWQ+6bAgMjck+BSFaQF/FjtKfLfwDUTH+w218stePOwD8DiC9qCq9yuol xjAhVIcaeVplSIBN2+Ti/3cDd5sR5AE= =0Z4N -----END PGP SIGNATURE----- --yKOyY2Nm+bU0Ajrr--