Received: by 2002:a05:6a10:83d0:0:0:0:0 with SMTP id o16csp42828pxh; Thu, 7 Apr 2022 13:25:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzFwxnmrfx42bcHXxwULGTkIPlovDz3LFIBhyt97J2b+p8yPuzqPWBY9lym4uBc+9tbpQPy X-Received: by 2002:a05:6a00:22d2:b0:4fa:9d26:bc5d with SMTP id f18-20020a056a0022d200b004fa9d26bc5dmr16072294pfj.79.1649363140698; Thu, 07 Apr 2022 13:25:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649363140; cv=none; d=google.com; s=arc-20160816; b=Swm7EqDGfv+20FBT17Z5TS1Ul07gKlHG/TVVkGsIoGA/brqXOKt47H9OYH7E6o4Eii 2eY514jLT/kUENV7MU1ve5AUAzq9cOWgQ2q6YuLV2G35acYEUWyiaqJvN0p3tOmDTT4s Nx4B+itJIgu+PktZAGma+9kJS9gENK/30TOyl078nKwJ7VMrsH4ghh0Adxrpf9Nl53a2 XOekHKzaj/3rOpxWim/u00Vi5CXTbZ/z3bTWgAzXt1vJ8WOjXoiNghJHtqqXOZRjezdg WeYjiovakCQgRgf6yB9cEGArFGG/SqtykiOKIdIlwWRUNuvr5JdqikJvz5r8LByCktKo jv/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=i5967/a5oK0EGt/wrkemwwnhICguU6R5xviUzoKD7O8=; b=Vy9D6fb1cQstpzgUWyKFi+uYOaGFdxKXO9zW3uQIJ+rU8tgRmdxXq90QZhIaLOKb+7 iPtmtooO8x/agyqaObjFNqOEzX8Dsvg39GGWUcRYTK/iOkhO0eLgx5iBI/8qWsKinGzV /Hv8dk5qVDgQhPlzuMHWlE9aZZALh7n9GAcg+7w3EhYOdGNqlFqOtqfMv6DetUffGNMp 94kUO2ASHpx3ecBm+mklOo75BD+i5s2ICCBl5shQSaBUPvjN4Bygk04hXLHzA26xhXwa 0ABOTZd+AesHKAIVHbnctEElcZjEQKfXeqYa7MYxCbdHmkJu8Vun1Gb+0oPBpS7l6xGf y+HQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=pOhYtIBm; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id i11-20020a17090ad34b00b001c648d1fb6esi2418361pjx.132.2022.04.07.13.25.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Apr 2022 13:25:40 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=pOhYtIBm; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 19843354D36; Thu, 7 Apr 2022 12:41:09 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346478AbiDGRdV (ORCPT + 99 others); Thu, 7 Apr 2022 13:33:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346870AbiDGRdB (ORCPT ); Thu, 7 Apr 2022 13:33:01 -0400 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49CE518B24; Thu, 7 Apr 2022 10:30:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=i5967/a5oK0EGt/wrkemwwnhICguU6R5xviUzoKD7O8=; b=pOhYtIBmMilhtrc+5FBGc4SuH8 YuC62mIwfZJzk3lKGHpaGHkD407+t2JCSVto8KRmiOVP+nZz4lGVAEL50VrfqVyNts7Y4EHQVhuXu fIONIhWZ41KxsGfZXDZ7xOrgna5/0lDeoPJIrBN+LEsIhd6nYvlU7q51Zv26NlWvW2j8=; Received: from p200300daa70ef200411eb61494300c34.dip0.t-ipconnect.de ([2003:da:a70e:f200:411e:b614:9430:c34] helo=nf.local) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1ncVxI-0007Or-HM; Thu, 07 Apr 2022 19:30:00 +0200 Message-ID: Date: Thu, 7 Apr 2022 19:29:59 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH v2 05/14] dt-bindings: arm: mediatek: document the pcie mirror node on MT7622 Content-Language: en-US To: Rob Herring Cc: Krzysztof Kozlowski , netdev@vger.kernel.org, Krzysztof Kozlowski , Matthias Brugger , "David S. Miller" , Jakub Kicinski , Paolo Abeni , Lorenzo Bianconi , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org References: <20220405195755.10817-1-nbd@nbd.name> <20220405195755.10817-6-nbd@nbd.name> <4bafe244-6a3d-d0ec-59d3-3f3f00e71caf@linaro.org> <318163cb-c771-c7eb-73ba-35c66f7d0e68@nbd.name> From: Felix Fietkau In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=unavailable 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 On 07.04.22 19:16, Rob Herring wrote: > On Wed, Apr 06, 2022 at 01:01:06PM +0200, Felix Fietkau wrote: >> >> On 06.04.22 10:20, Krzysztof Kozlowski wrote: >> > On 05/04/2022 21:57, Felix Fietkau wrote: >> > > From: Lorenzo Bianconi >> > > >> > > This patch adds the pcie mirror document bindings for MT7622 SoC. >> > > The feature is used for intercepting PCIe MMIO access for the WED core >> > > Add related info in mediatek-net bindings. >> > > >> > > Signed-off-by: Lorenzo Bianconi >> > > Signed-off-by: Felix Fietkau >> > > --- >> > > .../mediatek/mediatek,mt7622-pcie-mirror.yaml | 42 +++++++++++++++++++ >> > >> > Eh, I wanted to ask to not put it inside arm/, but judging by your usage >> > - you did not create drivers for both of these (WED and PCIe mirror). >> > >> > You only need them to expose address spaces via syscon. >> > >> > This actually looks hacky. Either WED and PCIe mirror are part of >> > network driver, then add the address spaces via "reg". If they are not, >> > but instead they are separate blocks, why you don't have drivers for them? >> The code that uses the WED block is built into the Ethernet driver, but not >> all SoCs that use this ethernet core have it. Also, there are two WED >> blocks, and I'm not sure if future SoCs might have a different number of >> them at some point. >> The WED code also needs to access registers of the ethernet MAC. >> One reason for having a separate device is this: >> As long as WED is not in use, ethernet supports coherent DMA for increased >> performance. When the first wireless device attaches to WED, IO coherency >> gets disabled and the ethernet DMA rings are cleaned up and allocated again, >> this time with the struct device of WED (which doesn't have the dma-coherent >> property). > > I'm pretty sure there are assumptions in the driver core that coherency > is not changing on the fly. In any case, if it is, using 'dma-coherent' > is not appropriate. You obviously have another method to determine > whether you are coherent or not. It's not really on the fly. Before changing coherency, all DMA memory is freed, and the subsequent reallocation uses the struct device of the WED core, which does not have the dma-coherent property. - Felix