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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3F1D9EB64DD for ; Wed, 9 Aug 2023 05:45:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4LiNJpFo4z9Ul5+LlLbIvry1KVX6iBkIB4ews978bQM=; b=KLnH85ae/cP8jD UFcDmPmcfTkK0Ck5Rsc4F1E0SjCeNnREjDmVnDX0SJN9/gBCTs6wuzWzRbmXR5sYHvHBwRaDrNYWm 91k1Qj3KTVyJLvbIMoOtoFU6gzUKACJkVhC5uVLLbTsgHuWLmeu+1jjsA2/A5Ltc+FBXar86xmnsE WftgfUDeGQWMIVzgTwmQhntA6QZBKPyatJM7sVaO3RGzdL+d+wpOCAMLKdW40Pqy+Cl8xZ8N3A3mb h0MhWjDn2V6ay7HJ3kB+4BysCtLjf99Zh+Bcy3+8NOhBhD8vMo2mYAt9h9O3f8DWPiRBLTsqj+DK8 rhHYINWwWjG4R+n7Ng9w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qTc05-0045ft-0N; Wed, 09 Aug 2023 05:44:53 +0000 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qTc01-0045eV-2j for linux-arm-kernel@lists.infradead.org; Wed, 09 Aug 2023 05:44:51 +0000 Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-1bc8045e09dso10814295ad.0 for ; Tue, 08 Aug 2023 22:44:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1691559886; x=1692164686; 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=vxcldl12I3EwBgJQlvH4uhDdlUAS8X8H2ABb+awGB+s=; b=bWGuxL1DOLIxUyEVzJG60PbAM1TTn29jgsmsdGFv9qt+PlkLpRdGCCJZGPoiRMfOYr w9qFJTH5PT+r7p4FA5jao0vuTT90gasDkW6Bo1XxbbOWe/fhyXTmQUTE2pfQLsatgY0r lX7gmoWKIwHD6LZwG2TlGOKagQrqaidNlUvAOGhXyV8pCSVZ/Lk0UmyWUdXrIu+T9Eh3 /Soqy/xjVjR1GiUStLrKv7rmXMRysXV7RIbStm8m+wr2i3F1i+UdIwa9g55kgvjwJrxx DBO33rOID4saTHn/d3MhTY0k3X/iUrCb06S3/3JTmz6goyAyYFhB0CeGlH+nFXPQYBNd TuBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691559886; x=1692164686; 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=vxcldl12I3EwBgJQlvH4uhDdlUAS8X8H2ABb+awGB+s=; b=EpT4zWmMNssqpElTqh4wLTOE0l5nnpIwayGszdd8bVVn2IYxXsEQY0thojhZnvE+yV JltMKjlsu39A93kgfZAW99dURuxLzrkB8KN/2t7JwzFUwYoVf1GANDtTUbxHaP07mYod /En6wyc5Fu+EF/WxH3serwG6NGMunlmPxZELR7yoc0lFIo2UvDhRH/+hNvh4quDQVz4S wZdxHmiZw++PU9FSVXctS0tgc/61h5+o535QBcdTOXUithxAe9mTIg7x9oKho3AhpAgq laxsuNembtphcIks5/BTNyUwIz34dLIl8RrUrCxxPJ/bl6KEhwXbaE17ZUdU73ezLMmx FT8w== X-Gm-Message-State: AOJu0Yx/cMJFunxERj2o4cElCn1Er+x1FTprr6SxTep6jAw161gGsM7u IkbGq71kr8s1JoocjxmJ6ofK9Q== X-Google-Smtp-Source: AGHT+IFQByYfqVXmufCi4ZexsDkSCJeetmAUHqrPdPKuKE7/AuT3eoLpHY4Ewpuc1qDtZMZN3aNTyA== X-Received: by 2002:a17:902:e88b:b0:1bb:dc48:644a with SMTP id w11-20020a170902e88b00b001bbdc48644amr1829426plg.49.1691559886467; Tue, 08 Aug 2023 22:44:46 -0700 (PDT) Received: from sunil-laptop ([106.51.83.242]) by smtp.gmail.com with ESMTPSA id jw15-20020a170903278f00b001b8a54f99d1sm10040833plb.275.2023.08.08.22.44.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Aug 2023 22:44:46 -0700 (PDT) Date: Wed, 9 Aug 2023 11:14:36 +0530 From: Sunil V L To: Marc Zyngier Cc: Andy Shevchenko , 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, Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , Catalin Marinas , Will Deacon , "Rafael J . Wysocki" , Len Brown , Daniel Scally , Heikki Krogerus , Sakari Ailus , Greg Kroah-Hartman , Daniel Lezcano , Thomas Gleixner , Anup Patel , Bjorn Helgaas , Robert Moore , Haibo Xu , Andrew Jones , Conor Dooley , Atish Kumar Patra , Anup Patel Subject: Re: [RFC PATCH v1 11/21] swnode: Add support to create early during boot Message-ID: References: <20230803175916.3174453-1-sunilvl@ventanamicro.com> <20230803175916.3174453-12-sunilvl@ventanamicro.com> <865y5phdwd.wl-maz@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <865y5phdwd.wl-maz@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230808_224449_882003_44C01E1E X-CRM114-Status: GOOD ( 41.33 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Aug 08, 2023 at 02:17:22PM +0100, Marc Zyngier wrote: > On Fri, 04 Aug 2023 09:11:05 +0100, > Sunil V L wrote: > > > > Hi Andy, > > > > On Fri, Aug 04, 2023 at 09:09:16AM +0300, Andy Shevchenko wrote: > > > On Thu, Aug 03, 2023 at 11:29:06PM +0530, Sunil V L wrote: > > > > From: Anup Patel > > > > > > > > swnode framework can be used to create fwnode for interrupt > > > > controllers. > > > > > > Why? What is this for? > > > Can you elaborate? This commit message is poorly written... > > > > > > And why firmware node is not enough for ACPI case? > > > I assume the fwnode in DT case is already provided by OF. > > > > > Thanks a lot for the review!. > > > > You are right, OF provides the fwnode for irqchip drivers. However, for > > ACPI case, it is typically created using irq_domain_alloc_named_fwnode > > or irq_domain_alloc_fwnode since these are not ACPI devices in the > > namespace but from MADT. The fwnode created using > > irq_domain_alloc_fwnode() is a simple one which doesn't support properties > > similar to the one created by OF framework or software node framework. > > Hence, lot of data from the MADT structures need to be cached as > > separate structures in the drivers and also would need several ifdefs to > > check for ACPI and some amount of code duplication is also required due > > to the way DT driver gets the information vs ACPI. > > > > The beauty of software node framework is, it supports adding properties > > and also is a supported fwnode type in __irq_domain_create(). > > There is no beauty here. Only some extra bloat that we do not need. > > DT and ACPI exposes very different attributes. One describe the HW, > the other one describe an OS abstraction. Pretending that you can > summon both into the same infrastructure is a fallacy. You'll just end > up with the cross product of both infrastructure, and pollute the rest > of the kernel with pointless cruft. > Hi Marc, Thank you very much for the feedback!. Sure, let me revert this approach and do as you recommended in next version. > > So, if we > > can create the fwnode for these irqchip using software node, we can > > attach the same properties and the actual irqchip driver which uses the > > fwnode doesn't need to have any ACPI vs DT checks. Same driver will work > > seamlessly on both DT and ACPI platforms. But the challenge is, > > currently swnode expects to be created with sysfs which won't be > > available during early boot when irqchip drivers need to be probed. So, > > adding support to create without dependency on sysfs help us to reuse > > the same framework for irqchip use case also. > > That's another fallacy. > > Most irqchips *DO NOT* need to be probed early. Only the root > irqchip. Given that this series is about *secondary* interrupt > controllers, they absolutely don't need to be probed early. > Since we created swnode for root irqchip also in this approach, we had to support early creation. With your feedback, this is no longer required. > To be clear: I do not intend to merge anything that: > > - invents yet another way to "abstract" firmware interfaces > > - adds more "early probe" hacks for non-primary interrupt controllers > > I have already said that in response to Anup's AIA series, and this > equally applies to this series. > In Anup's AIA v7 series, he has made non-primary controller drivers as platform drivers which are not probed early. Thanks, Sunil _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel