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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EE6D9C0015E for ; Wed, 9 Aug 2023 05:47:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229780AbjHIFrO (ORCPT ); Wed, 9 Aug 2023 01:47:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229599AbjHIFrO (ORCPT ); Wed, 9 Aug 2023 01:47:14 -0400 Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C17A1BF2 for ; Tue, 8 Aug 2023 22:47:13 -0700 (PDT) Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-1bc3d94d40fso55714345ad.3 for ; Tue, 08 Aug 2023 22:47:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1691560033; x=1692164833; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=YCeIptmtpKy5q98QjD4SUtd19PTpMTjSWPCM/pRkRaI=; b=haeX18sUQdxxqI7SQwmn8SHKct03Vake+IzrKwZQdTEOTgqFjhH0yzb6gVvecUp++M LMJV1cVhnL5cBk05TA0BuUeVgPeqBBT5xVYYg8Fmt6oC4KEFpsb20dfFQp1sUhdBnv+U Agka3B9ydKgYsr/ueR6T9DXKuK4mFb7fnEgx45MrDCaANoCelYzVXJwVJd52Zm6ffFeo vlwzfD2WG7skOwNLlyX+ou/s/8GC3sc0bR5XFkYBOl3Ac4CqFz3U8O83n9htUtpGlbxX 5MHrYLjZAe/fPUGNNnFPHYXY6gLf92Ljy74BtQmvCjyQU740MtA8mhZgL163A/u/3c14 57jQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691560033; x=1692164833; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=YCeIptmtpKy5q98QjD4SUtd19PTpMTjSWPCM/pRkRaI=; b=jMBhO4zviTug2Tmoz69B4aqZNXeJPabKxDH3CTpOThvzGNkyBKyDmHN7LaaWENginG iJwP/7vNvumKvDKBabRDxbFTzHZ7aXyEjzC87uRsEl2It2U3SguhQ2s2FSPugYzR7ws9 PYtxIPQ4mKNmB17PFf6zS3RHaFYPsWRDOZxFChqIWcrzj41mLHhmQgiFZec9lIAmMWYr 19yMzbKjwLSCQP6SZdhvZ1+1ieNDzBAEXqXUOA9wHGaoXhwE0CLX2hywAs/3Mzvfx2WL vRbX9dytEgPRp1I4qzamDGlT3sJuiJtmLJ8VDJz8G2JgnjsmA6CewH1fu7ZEmMzfrc1V 9l+w== X-Gm-Message-State: AOJu0YyUfsF5t77zxGFWnvZVcFwC3CKOgww0BSzJqw28JQPEXkgamBwl ecys35o+bz3BaWvLAvhwGS2Ziw== X-Google-Smtp-Source: AGHT+IFrTYPQ+5b8uQBjS2fcGKsPAzUjAy1/yAOVWR8AwSQ1NP6723J3EcH5VFWoXC6GPw4jT3aUkA== X-Received: by 2002:a17:903:230d:b0:1bb:a85c:23cc with SMTP id d13-20020a170903230d00b001bba85c23ccmr2339537plh.15.1691560032814; Tue, 08 Aug 2023 22:47:12 -0700 (PDT) Received: from sunil-laptop ([106.51.83.242]) by smtp.gmail.com with ESMTPSA id r14-20020a170902be0e00b001bb381b8260sm10098918pls.100.2023.08.08.22.47.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Aug 2023 22:47:12 -0700 (PDT) Date: Wed, 9 Aug 2023 11:17:02 +0530 From: Sunil V L To: Conor Dooley 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: References: <20230803175916.3174453-1-sunilvl@ventanamicro.com> <20230803175916.3174453-21-sunilvl@ventanamicro.com> <20230808-chalice-easing-1369c7386082@spud> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230808-chalice-easing-1369c7386082@spud> Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org Hi Conor, On Tue, Aug 08, 2023 at 09:41:45AM +0100, Conor Dooley wrote: > 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.) > Sure, let me add more details and use extra characters. > > 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. > > > > 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_plic *plic) > > +{ > > + struct fwnode_handle *fwnode, *parent_fwnode; > > + struct riscv_irqchip_list *plic_element; > > + struct software_node_ref_args *refs; > > + struct property_entry props[8] = {}; > > + int nr_contexts; > > + > > + props[0] = PROPERTY_ENTRY_U32("riscv,gsi-base", plic->gsi_base); > > + props[1] = PROPERTY_ENTRY_U32("riscv,ndev", plic->num_irqs); > > + props[2] = PROPERTY_ENTRY_U32("riscv,max_prio", plic->max_prio); > > My OCD wants to know why this gets an _ but the others have a -. > It should be -. But with Marc's recommendation, this is no longer required. Thanks! Sunil