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 698D7C7618B for ; Tue, 14 Mar 2023 14:14:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230228AbjCNOOi (ORCPT ); Tue, 14 Mar 2023 10:14:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229525AbjCNOOe (ORCPT ); Tue, 14 Mar 2023 10:14:34 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81ECA2D73; Tue, 14 Mar 2023 07:14:31 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E93C9617A5; Tue, 14 Mar 2023 14:14:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 42195C433D2; Tue, 14 Mar 2023 14:14:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1678803270; bh=qhXwhy6Cl+s9k6JRE6nqU7xp7VBDDJnS951Dvre7bkg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=LY7gjSiuMUB5pPGHUjwLNoTDLnJO+/gmKbfcmqDFZktVM1oJ9unB1E8ayT2zcQyXS sWKlUqkLFdIq2shgcuntAcjnnGwtd34ns6fr0Y8j2RsQZUw3e2jNeR6Se39qlfr2NE F9uGpnbiPsDwmnhlv3xu2EQukcSHeAmH0imBHjUxgEZmpq+G7buXq1QAsIYvT/rHZm ZzQ2ig3GxB2CNjWHt/9PR6kvEQoERyVkcK5sAIm9UhUNNqvpAhmxll6r1/0dBVES9U oxyDZp/yvpkMJiQacmf0ss4/5vvW3zDMoqnUSTirLxKXK79QLT4wOeVWYRnGmV4GX7 XSqJLv4C3XyAA== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1pc5Q3-00HaSl-PZ; Tue, 14 Mar 2023 14:14:27 +0000 Date: Tue, 14 Mar 2023 14:14:27 +0000 Message-ID: <86h6unxvwc.wl-maz@kernel.org> From: Marc Zyngier To: Lucas Tanure Cc: Robin Murphy , Peter Geis , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Heiko Stuebner , Thomas Gleixner , Lorenzo Pieralisi , Krzysztof Wilczynski , Bjorn Helgaas , Qu Wenruo , Piotr Oniszczuk , Kever Yang , linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, kernel@collabora.com Subject: Re: [PATCH 1/7] irqchip/gic-v3: Add a DMA Non-Coherent flag In-Reply-To: <93e4d83d-9559-c987-d93b-c49572413275@collabora.com> References: <20230310080518.78054-1-lucas.tanure@collabora.com> <20230310080518.78054-2-lucas.tanure@collabora.com> <3db23e11-5fac-f36e-c89e-93c4e8ac2d98@arm.com> <93e4d83d-9559-c987-d93b-c49572413275@collabora.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.2 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: lucas.tanure@collabora.com, robin.murphy@arm.com, pgwipeout@gmail.com, vkoul@kernel.org, kishon@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, heiko@sntech.de, tglx@linutronix.de, lpieralisi@kernel.org, kw@linux.com, bhelgaas@google.com, wqu@suse.com, piotr.oniszczuk@gmail.com, kever.yang@rock-chips.com, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, kernel@collabora.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 14 Mar 2023 13:25:28 +0000, Lucas Tanure wrote: > > On 10-03-2023 12:04, Robin Murphy wrote: > > On 2023-03-10 11:41, Peter Geis wrote: > >> On Fri, Mar 10, 2023 at 3:05 AM Lucas Tanure > >> wrote: > >>> > >>> The GIC600 integration in RK356x, used in rk3588, doesn't support > >>> any of the shareability or cacheability attributes, and requires > >>> both values to be set to 0b00 for all the ITS and Redistributor > >>> tables. > >>> > >>> This is loosely based on prior work from XiaoDong Huang and > >>> Peter Geis fixing this issue specifically for Rockchip 356x. > >> > >> Good Morning, > >> > >> Since the gic is using dma, would it be reasonable to have all memory > >> allocations be requested with the GFP_DMA flag? Otherwise this doesn't > >> fully solve the problem for rk356x, where only the lower 4GB range is > >> DMA capable, but this tends to get allocated in the upper 4GB on 8GB > >> boards. > > > > Not really, because there's no fixed definition of what GFP_DMA > > actually means, and it may mean nothing (same for GFP_DMA32, which > > may or may not be meaningful depending on kernel config and platform > > topology). Drivers should really use the DMA API allocation > > functions if they care about what they get, which comes back round > > to the notion from years ago of converting the ITS driver to a > > regular platform driver, so it can benefit from regular DT concepts > > like "dma-ranges" automatically. > > > > Thanks, > > Robin. > > > I am looking how to do that conversion to platform driver. > But about the communication between irq-gic-v3-its and irq-gic-v3. > Should irq-gic-v3-its be a MFD child of irq-gic-v3? MFD? I'd rather suggest an VME bus driver. ;-) Seriously, this is an interrupt controller. Nothing else. It should probe the parent irqdomain, and stack onto that. No parent? Probe deferral. > Or use the component bind/unbind framework? I don't understand what you mean here. M. -- Without deviation from the norm, progress is not possible.