Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp6569934rwi; Mon, 24 Oct 2022 03:17:53 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7VeTL/THA56fY7VOZoP6yOEvuvsbz6i+xImM4GcHW8Nd454pYeVKxJ3cL9HCVXfLoZexYg X-Received: by 2002:a63:2b48:0:b0:434:eb45:9c6a with SMTP id r69-20020a632b48000000b00434eb459c6amr26951376pgr.508.1666606673633; Mon, 24 Oct 2022 03:17:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666606673; cv=none; d=google.com; s=arc-20160816; b=QUJ595XaGZvDjLIyetGFnnLYU2j1l46KxRY8sQRVtz9hRINBXniWAFVcKncu883fYu efVNybUt7UKUhpNS3r8Ls19DrlbcsGvIBEJfuIwsA9tvASrXVK5/BQuhhCFkFEje++oA +gN2uk6vSXMBkCW3jqTJ7vWBxtL0Kz5Mb7opvMmagLxkkcxHjxi6fLOQP5AFwsRLcKDi HcTqA3H8KwAi8Hb2G/ifpiMPiFAjLIdn1v/ABcl8gYtbIVDDlnhjZrNmacqkCTbQ2RRV FCszqI1E95YWixWCtglpSfnN2EDilHy6Ln8kr+nSCtwDuT1rL0InlzKxbvzv25n2CGdw TxbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=zXMhWjca4naE0pCAheDzGm0IxJuDch6/SpXa6XWdtWM=; b=eiCHPAPesd5ZfQR39WOpSMz1cyAi4ZuTda0/2W5x+kWlxe6A77PHmNIMmijkegbqRw J53fCaSWlU86lCjbeNkvGvir8IrNvVHll1Y+nQT2cc0Bl6DXKVx2NZ5jmuqxahnDihNX cFD08RDHCH/qNy5xm+hTlg/Gjh0Vit4UpkDqXh6yJxpxJlZi+ebsXxJWVnU9Jn/5gIg4 s9nDnlUr19UrIPb5VwNvjf0zbaV6Q3IsLTkxNRfuqHO/VeQjb/SeSBCLc6B1lNC9bcCn 9pa2q4JR4kHYv0ZQFpAOPNO844sPfCQz35R2NpGZvqelidqKRpHfQ/T3HnxhWF2rubqa JlXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@semihalf.com header.s=google header.b=RiUATNYB; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=semihalf.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w8-20020a634908000000b0045f702aaec0si35081238pga.158.2022.10.24.03.17.41; Mon, 24 Oct 2022 03:17:53 -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=@semihalf.com header.s=google header.b=RiUATNYB; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=semihalf.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230029AbiJXJLa (ORCPT + 99 others); Mon, 24 Oct 2022 05:11:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230426AbiJXJLZ (ORCPT ); Mon, 24 Oct 2022 05:11:25 -0400 Received: from mail-yb1-xb33.google.com (mail-yb1-xb33.google.com [IPv6:2607:f8b0:4864:20::b33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9E8E4DB1F for ; Mon, 24 Oct 2022 02:11:23 -0700 (PDT) Received: by mail-yb1-xb33.google.com with SMTP id 187so1235149ybe.1 for ; Mon, 24 Oct 2022 02:11:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf.com; s=google; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=zXMhWjca4naE0pCAheDzGm0IxJuDch6/SpXa6XWdtWM=; b=RiUATNYBaLUD42t0rnY0VOqBk1UjGFpIlfK4WE4ieztDIti82XuL9pvCuLtWIAbQfR oaTKMxuzwdaotitn18013BoSESOiAmZKXqrIoHBFOV4AtthYZsdAG/HkKolpf7e8kvaZ COkQCtZAJlql2llpgZgf9xUm/IaBr4wsfjEvKm2pT8SuZS+2FCcdEbvDZHHHSw5vrONa pU4j0US4hDyq0TfZhTWlzbaRgawbDGkfV0Ud+IuYknjUgv0QMpbOcPOBP8faLAeOkG0D gEciwNMDr+Ge7SURZn4vhq0wPR4ZoWpB4Qrx/n3/HSgwaHbI2h6e7gMR5qoF6wPb2Jwt nqqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zXMhWjca4naE0pCAheDzGm0IxJuDch6/SpXa6XWdtWM=; b=2PLpDPi5SvlTBxwe5Sv7t1FOgU+RrjrJjzqNY2NWvzaqbC3uw+Lp2rTaGfN4YpEqaO eSEu+JGjXwshpj9nN/3ncfWv0AICdMM4S418xXcyGLzS3xUPoPPYbBAIvgPTUNr0Y5Cl NFpzcYO4zBPBWAvLQxRxTYOU0lSSoc8oURGWCm+QJqY+Q6R6to+ZMXBLmERZ0g1MjqqN 0nretNlWgDvMHDY7e27AKq/zP47cUKiTzYttXGm8Af8pmhonCyt40YXfic3YhJm6VgYf QwVvMlH7+PgTpG0QgaPJUBStGv9GhNgxlNwL3zQGvy+wokM6WmxS2u/drclV0D3h+mHE CjAA== X-Gm-Message-State: ACrzQf1T/hC92bJtkoVL4Jzxe6xPobG79GitluuKQ8J4wG6j7XdAx1b8 sskdKlWOH9jm/FtKm7airU+fZ98rV04KO6wBXjelzA== X-Received: by 2002:a25:9a88:0:b0:6b9:c29a:2f4b with SMTP id s8-20020a259a88000000b006b9c29a2f4bmr28077461ybo.236.1666602683018; Mon, 24 Oct 2022 02:11:23 -0700 (PDT) MIME-Version: 1.0 References: <20221022234024.87475-1-mw@semihalf.com> <20221024085102.15712ce9@thinkpad> In-Reply-To: From: Marcin Wojtas Date: Mon, 24 Oct 2022 11:11:12 +0200 Message-ID: Subject: Re: [PATCH] ARM: dts: armada-38x: Mark devices as dma-coherent To: "Russell King (Oracle)" Cc: =?UTF-8?B?TWFyZWsgQmVow7pu?= , Andrew Lunn , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, gregory.clement@bootlin.com, sebastian.hesselbarth@gmail.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, hch@lst.de, jaz@semihalf.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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_NONE, SPF_HELO_NONE,SPF_PASS 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 pon., 24 pa=C5=BA 2022 o 09:51 Russell King (Oracle) napisa=C5=82(a): > > On Mon, Oct 24, 2022 at 08:51:02AM +0200, Marek Beh=C3=BAn wrote: > > > Sure. In such a case the description of 380 variant (single core) > > > should remain untouched. > > > > > > We need to decide what to do with dual-CPU, i.e. Armada 385/388. How = about: > > > - Don't change current behavior, i.e. perform a necessary kernel > > > configuration in "arm,pl310-cache" driver, > > > arch/arm/mach-mvebu/coherency.c + &coherencyfab:node in DT > > > - Satisfy of_dma_is_coherent() by adding `dma-coherent;` in > > > armada-385.dtsi only (IMO this would describe HW properly) > > > ? > > > > It will describe HW properly, but someone running older kernel compiled > > with no SMP support will see a performance drop. I wonder how many > > people do that. > > If the kernel is built without SMP support, the page table entries will > not have the shared bit set, and the system will _not_ be DMA-coherent. > Having DT mark devices as "dma-coherent" in this case will lead to data > corruption, because the DMA API will believe them to be DMA-coherent > when the page tables are not setup for that to work. > Thanks, for the explanation. Since we're heavily dependent on what happens in the kernel we boot, it will be easier to just drop this patch and keep using the DT as-is. Best regards, Marcin