Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp5269137rwb; Wed, 9 Aug 2023 01:03:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFs50U23ApgwMy3gyV5Q7KZkor4Wb7Mm79SbG9BQojhid+b0kzC4J7WMwWWEuWbXWRjnhkc X-Received: by 2002:a19:6754:0:b0:4f6:47a2:7bb4 with SMTP id e20-20020a196754000000b004f647a27bb4mr1273863lfj.60.1691568217419; Wed, 09 Aug 2023 01:03:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691568217; cv=none; d=google.com; s=arc-20160816; b=hohXhEE7ThShZ0R87e7biRLTCcGVqpDJ0cGitsfOG7lokL44TKCC5JgJUepwMub3Tf f5DQxjcqABaZu8YAOzCUZqF5adAMlNt/xTnsvlUm1Ue4RtNjmYADLQvjSO/ulfpSX40/ eL6P6PdDZQH0BvrKu+tR5SVyhoQzd5u1f2++whNIsspobQFlIvZlow6k7CMiN/tYZra6 f1dhvXxedh4jhzICYPgnJmk+YFguKeU7EBnj0PeSR/swHlLWyQiZSLqQDsGoQAoHL5KL RmMyPWGTIYREcEkkb6JieejDOmO/9t+f8RRnpsBVsuY04vDmiu0wUKIH/ZaEln/iGkNb 7UuQ== 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=YCeIptmtpKy5q98QjD4SUtd19PTpMTjSWPCM/pRkRaI=; fh=GA3SEjR1uzaQgUVVV9ja5Va5f51+G8u163QbMpuif6Q=; b=xU3VwRInQLZnPPr5Zh19ET75x3PxnBFZhZ6yHb2UzC4wFBqoejase6LP0fV4n7G5wr PgGDefyMgYS5rZPQP02kKej0EC252IXL9+N5jO4BuReP+qmdjcMgE6XkWqFrG8xW8cP8 XYRWWUBymrej5G69lUoEILwnWcNrQEGN41OgzNgDFbMSOaZcevDe79aSnHK7xYxxMaVN sGApKOB1gAKrIdRvlS62PRwmeikFPOT4enlgqSvEyFvw1Wd+xOsMSrwxMJ3aJjBXzb9j EEXx6alZSFWG4I5/iDZ28XEnvvgY7cclapzWM9BVBpMZt+abvnY/EeIAOTyAYxa0AV1D KXzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=haeX18sU; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s22-20020a170906355600b00992b54ad681si8728067eja.773.2023.08.09.01.03.12; Wed, 09 Aug 2023 01:03:37 -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=@ventanamicro.com header.s=google header.b=haeX18sU; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229719AbjHIFrP (ORCPT + 99 others); Wed, 9 Aug 2023 01:47:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229468AbjHIFrN (ORCPT ); Wed, 9 Aug 2023 01:47:13 -0400 Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A4EC1BF0 for ; Tue, 8 Aug 2023 22:47:13 -0700 (PDT) Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-1bba04b9df3so56059795ad.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=PeP+RERTwuUOfFE7rt+FQ5USZCuHdbzMP4wrm77jG7d29o0YebHHx2BdQJxthWgSjX FY/orVW+bqf/nc7plaTm8x2NDVUjI22ONNe7ja4Qk0QFxuFvEBIEepWqqJTcjc3C0XDQ 2B9aO5crZ2XrcIK/oK7pJHv5Dvyrt9PxKCPzA3e4s5YrNICgrtlp3UwAUDfb1BDlGG9D iGbBwfTYU8Hyi70n7+wHBPAaghxyX17qyOqjjNQSmx6xtD31B83tOsrwRP/jSMJGuY1q gdhs701SWoC+JElDBoPgJC1tpj0rIM9JFQxbIAugxiG4MTfJ2G0i91CaA/zUeRHnJWcS SFmQ== X-Gm-Message-State: AOJu0YyKGv64zIJg2oWnWby91ns3fYqaBPu9BKB6wnObhBQrg7WvCLXY vdeW6OSOfjzI+UiI3/AVuswESA== 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> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 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