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 1C6F1C04A94 for ; Wed, 9 Aug 2023 05:47:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229817AbjHIFrO (ORCPT ); Wed, 9 Aug 2023 01:47:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229585AbjHIFrO (ORCPT ); Wed, 9 Aug 2023 01:47:14 -0400 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B7F21BF1 for ; Tue, 8 Aug 2023 22:47:13 -0700 (PDT) Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-1bba04b9df3so56059835ad.0 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=Go3sXrygITETP6cGrdikpGzQXt7Yy08naaMAmIR/RWcev6x1lLwyLKtL7yEO4SFVl9 bqKDhFVdGloIxCLnenTI0g/JlNYDI64MtGLdUQN4WhnpD5vPZcCSambEYhcGgLJIZFD+ mN+6IZReYiIFPsODgoxmWd/WdQJGC8K39TELXX413KiUvzwXCkXOs8iET78139OOSisl gycJpGlOz1g5r/GHRnIa6nlJnP7jKw/C+OSkHKhA00DpdCnF3pG2RdfIUdVawGjXyWyX wMSrruJdsFAEG13Ayqn4INISHn7balYtGykSHU6Yjg3bXYg/kAtJygzu72DjfTA7UrNd EycA== X-Gm-Message-State: AOJu0Yx3Dxj9O06HMDMB7Wwtx8RUbk6lx+TobefypFFSxruV0/fEGg5k lksUKtFyZd611jhabK3RCDfiaQ== 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-doc@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