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 X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_NONE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2438CC43460 for ; Fri, 16 Apr 2021 14:10:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0749A610F7 for ; Fri, 16 Apr 2021 14:10:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243662AbhDPOLK (ORCPT ); Fri, 16 Apr 2021 10:11:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:53592 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235553AbhDPOLH (ORCPT ); Fri, 16 Apr 2021 10:11:07 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B3E8E611C2; Fri, 16 Apr 2021 14:10:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618582242; bh=1s9sCrJo44Veolfwl+MwQWl66gowBJVDh4jCcMWmw20=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=bWtljR/0v+ciclhWmYZDIUGhhvFJ3qQ7nO0uU82MghhOsGFdSMyacApx9Rv+nHL6X W5cY5QnPwP6g7dxd13lON+NP7T3wxEgswnDncwfQXbUpDa1noe9/ic1qeaxTeqr1An xJUGxVeiTwbDQol4BcT+uJeJ/K8GtjgPzMatA+QGLBn8/pwaCrhafWYek6SKXGeGJX JrnAkRBsacpGTrsZXVT6wqIi5rnqa1PtXSpagwrGhkYyDEvybabUi7RBZVXZcudA+H 4dZgdBI6yZkxxw1SMBUj5RKBCe9Uqk2xt0sX7dm9fywiRJ0wfW8Bx5Y3FStVzaPeVS VyQ7HbK3kn2jA== Received: by mail-wm1-f46.google.com with SMTP id n10-20020a05600c4f8ab0290130f0d3cba3so2452761wmq.1; Fri, 16 Apr 2021 07:10:42 -0700 (PDT) X-Gm-Message-State: AOAM5311rO2I/o6Ind6RThkqpjvCAbINqe/V2ca2Zxn0e895bpA76IE+ pQhj8cZzVF3wdYjF0bFkNNhn6QVSWsiGrmNBMrQ= X-Google-Smtp-Source: ABdhPJwer78kcpt2KUTk7pLNWv4YpxxYqG4ncdMLFchwkUndSOMZjtA8z9tZUxzlPor4R9hASXWQZTamma1KWyeXMwk= X-Received: by 2002:a7b:c14a:: with SMTP id z10mr8250595wmi.75.1618582241293; Fri, 16 Apr 2021 07:10:41 -0700 (PDT) MIME-Version: 1.0 References: <20210409185105.188284-3-willy@infradead.org> <202104100656.N7EVvkNZ-lkp@intel.com> <20210410024313.GX2531743@casper.infradead.org> <20210410082158.79ad09a6@carbon> In-Reply-To: From: Arnd Bergmann Date: Fri, 16 Apr 2021 16:10:37 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Bogus struct page layout on 32-bit To: Grygorii Strashko Cc: Ilias Apalodimas , Jesper Dangaard Brouer , Christoph Hellwig , Matthew Wilcox , kernel test robot , Linux-MM , kbuild-all@lists.01.org, clang-built-linux@googlegroups.com, open list , linux-fsdevel@vger.kernel.org, Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , linuxppc-dev@lists.ozlabs.org, Linux ARM , "David S. Miller" , Matteo Croce , "netdev@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 16, 2021 at 11:27 AM 'Grygorii Strashko' via Clang Built Linux wrote: > On 10/04/2021 11:52, Ilias Apalodimas wrote: > > +CC Grygorii for the cpsw part as Ivan's email is not valid anymore > The TI platforms am3/4/5 (cpsw) and Keystone 2 (netcp) can do only 32bit DMA even in case of LPAE (dma-ranges are used). > Originally, as I remember, CONFIG_ARCH_DMA_ADDR_T_64BIT has not been selected for the LPAE case > on TI platforms and the fact that it became set is the result of multi-paltform/allXXXconfig/DMA > optimizations and unification. > (just checked - not set in 4.14) > > Probable commit 4965a68780c5 ("arch: define the ARCH_DMA_ADDR_T_64BIT config symbol in lib/Kconfig"). I completely missed this change in the past, and I don't really agree with it either. Most 32-bit Arm platforms are in fact limited to 32-bit DMA, even when they have MMIO or RAM areas above the 4GB boundary that require LPAE. > The TI drivers have been updated, finally to accept ARCH_DMA_ADDR_T_64BIT=y by using > things like (__force u32) for example. > > Honestly, I've done sanity check of CPSW with LPAE=y (ARCH_DMA_ADDR_T_64BIT=y) very long time ago. This is of course a good idea, drivers should work with any combination of 32-bit or 64-bit phys_addr_t and dma_addr_t. Arnd 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 X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_NONE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 66DF9C43462 for ; Fri, 16 Apr 2021 14:10:47 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E0C24611AC for ; Fri, 16 Apr 2021 14:10:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E0C24611AC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 5BE898D0002; Fri, 16 Apr 2021 10:10:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 56EE38D0001; Fri, 16 Apr 2021 10:10:46 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 40F6B8D0002; Fri, 16 Apr 2021 10:10:46 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0227.hostedemail.com [216.40.44.227]) by kanga.kvack.org (Postfix) with ESMTP id 201DD8D0001 for ; Fri, 16 Apr 2021 10:10:46 -0400 (EDT) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id B3ACF18045E74 for ; Fri, 16 Apr 2021 14:10:45 +0000 (UTC) X-FDA: 78038416050.16.6FE6190 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf09.hostedemail.com (Postfix) with ESMTP id 8092F600012C for ; Fri, 16 Apr 2021 14:10:41 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id A7BA0611AC for ; Fri, 16 Apr 2021 14:10:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618582242; bh=1s9sCrJo44Veolfwl+MwQWl66gowBJVDh4jCcMWmw20=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=bWtljR/0v+ciclhWmYZDIUGhhvFJ3qQ7nO0uU82MghhOsGFdSMyacApx9Rv+nHL6X W5cY5QnPwP6g7dxd13lON+NP7T3wxEgswnDncwfQXbUpDa1noe9/ic1qeaxTeqr1An xJUGxVeiTwbDQol4BcT+uJeJ/K8GtjgPzMatA+QGLBn8/pwaCrhafWYek6SKXGeGJX JrnAkRBsacpGTrsZXVT6wqIi5rnqa1PtXSpagwrGhkYyDEvybabUi7RBZVXZcudA+H 4dZgdBI6yZkxxw1SMBUj5RKBCe9Uqk2xt0sX7dm9fywiRJ0wfW8Bx5Y3FStVzaPeVS VyQ7HbK3kn2jA== Received: by mail-wm1-f42.google.com with SMTP id k4-20020a7bc4040000b02901331d89fb83so2187191wmi.5 for ; Fri, 16 Apr 2021 07:10:42 -0700 (PDT) X-Gm-Message-State: AOAM5332RRBcz8B8nSFZo0ayeGCvpb/USWx+MgAnCdf4EFAeGDCz/rEI r4d6sOrutjI6hdO9T2ofPCaL88J7RMQc3Io5goA= X-Google-Smtp-Source: ABdhPJwer78kcpt2KUTk7pLNWv4YpxxYqG4ncdMLFchwkUndSOMZjtA8z9tZUxzlPor4R9hASXWQZTamma1KWyeXMwk= X-Received: by 2002:a7b:c14a:: with SMTP id z10mr8250595wmi.75.1618582241293; Fri, 16 Apr 2021 07:10:41 -0700 (PDT) MIME-Version: 1.0 References: <20210409185105.188284-3-willy@infradead.org> <202104100656.N7EVvkNZ-lkp@intel.com> <20210410024313.GX2531743@casper.infradead.org> <20210410082158.79ad09a6@carbon> In-Reply-To: From: Arnd Bergmann Date: Fri, 16 Apr 2021 16:10:37 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Bogus struct page layout on 32-bit To: Grygorii Strashko Cc: Ilias Apalodimas , Jesper Dangaard Brouer , Christoph Hellwig , Matthew Wilcox , kernel test robot , Linux-MM , kbuild-all@lists.01.org, clang-built-linux@googlegroups.com, open list , linux-fsdevel@vger.kernel.org, Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , linuxppc-dev@lists.ozlabs.org, Linux ARM , "David S. Miller" , Matteo Croce , "netdev@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 8092F600012C X-Stat-Signature: s4m8sbkdmkjmajheeo6c5tn5cndo8jj3 Received-SPF: none (kernel.org>: No applicable sender policy available) receiver=imf09; identity=mailfrom; envelope-from=""; helo=mail.kernel.org; client-ip=198.145.29.99 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1618582241-706825 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, Apr 16, 2021 at 11:27 AM 'Grygorii Strashko' via Clang Built Linux wrote: > On 10/04/2021 11:52, Ilias Apalodimas wrote: > > +CC Grygorii for the cpsw part as Ivan's email is not valid anymore > The TI platforms am3/4/5 (cpsw) and Keystone 2 (netcp) can do only 32bit DMA even in case of LPAE (dma-ranges are used). > Originally, as I remember, CONFIG_ARCH_DMA_ADDR_T_64BIT has not been selected for the LPAE case > on TI platforms and the fact that it became set is the result of multi-paltform/allXXXconfig/DMA > optimizations and unification. > (just checked - not set in 4.14) > > Probable commit 4965a68780c5 ("arch: define the ARCH_DMA_ADDR_T_64BIT config symbol in lib/Kconfig"). I completely missed this change in the past, and I don't really agree with it either. Most 32-bit Arm platforms are in fact limited to 32-bit DMA, even when they have MMIO or RAM areas above the 4GB boundary that require LPAE. > The TI drivers have been updated, finally to accept ARCH_DMA_ADDR_T_64BIT=y by using > things like (__force u32) for example. > > Honestly, I've done sanity check of CPSW with LPAE=y (ARCH_DMA_ADDR_T_64BIT=y) very long time ago. This is of course a good idea, drivers should work with any combination of 32-bit or 64-bit phys_addr_t and dma_addr_t. Arnd 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 X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F3E5BC433ED for ; Fri, 16 Apr 2021 14:11:14 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7DE1461184 for ; Fri, 16 Apr 2021 14:11:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7DE1461184 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4FMJ690CdTz3c5L for ; Sat, 17 Apr 2021 00:11:13 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=bWtljR/0; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=198.145.29.99; helo=mail.kernel.org; envelope-from=arnd@kernel.org; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=bWtljR/0; dkim-atps=neutral Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4FMJ5f1rhBz30Dr for ; Sat, 17 Apr 2021 00:10:46 +1000 (AEST) Received: by mail.kernel.org (Postfix) with ESMTPSA id C3D986121F for ; Fri, 16 Apr 2021 14:10:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618582242; bh=1s9sCrJo44Veolfwl+MwQWl66gowBJVDh4jCcMWmw20=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=bWtljR/0v+ciclhWmYZDIUGhhvFJ3qQ7nO0uU82MghhOsGFdSMyacApx9Rv+nHL6X W5cY5QnPwP6g7dxd13lON+NP7T3wxEgswnDncwfQXbUpDa1noe9/ic1qeaxTeqr1An xJUGxVeiTwbDQol4BcT+uJeJ/K8GtjgPzMatA+QGLBn8/pwaCrhafWYek6SKXGeGJX JrnAkRBsacpGTrsZXVT6wqIi5rnqa1PtXSpagwrGhkYyDEvybabUi7RBZVXZcudA+H 4dZgdBI6yZkxxw1SMBUj5RKBCe9Uqk2xt0sX7dm9fywiRJ0wfW8Bx5Y3FStVzaPeVS VyQ7HbK3kn2jA== Received: by mail-wm1-f48.google.com with SMTP id n4-20020a05600c4f84b029013151278decso3089604wmq.4 for ; Fri, 16 Apr 2021 07:10:42 -0700 (PDT) X-Gm-Message-State: AOAM53090YTVCjBEjz2bmfQ88UhFri3wgCuuQh3JXBMorheZhLXHxzj5 JOMIQEGjqgX86C/FHCIdtoGfAVH74g/ixGHAOHg= X-Google-Smtp-Source: ABdhPJwer78kcpt2KUTk7pLNWv4YpxxYqG4ncdMLFchwkUndSOMZjtA8z9tZUxzlPor4R9hASXWQZTamma1KWyeXMwk= X-Received: by 2002:a7b:c14a:: with SMTP id z10mr8250595wmi.75.1618582241293; Fri, 16 Apr 2021 07:10:41 -0700 (PDT) MIME-Version: 1.0 References: <20210409185105.188284-3-willy@infradead.org> <202104100656.N7EVvkNZ-lkp@intel.com> <20210410024313.GX2531743@casper.infradead.org> <20210410082158.79ad09a6@carbon> In-Reply-To: From: Arnd Bergmann Date: Fri, 16 Apr 2021 16:10:37 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Bogus struct page layout on 32-bit To: Grygorii Strashko Content-Type: text/plain; charset="UTF-8" X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kbuild-all@lists.01.org, kernel test robot , clang-built-linux@googlegroups.com, Ilias Apalodimas , open list , Matthew Wilcox , "David S. Miller" , Linux-MM , "netdev@vger.kernel.org" , Jesper Dangaard Brouer , linux-fsdevel@vger.kernel.org, Paul Mackerras , Matteo Croce , linuxppc-dev@lists.ozlabs.org, Christoph Hellwig , Linux ARM Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Fri, Apr 16, 2021 at 11:27 AM 'Grygorii Strashko' via Clang Built Linux wrote: > On 10/04/2021 11:52, Ilias Apalodimas wrote: > > +CC Grygorii for the cpsw part as Ivan's email is not valid anymore > The TI platforms am3/4/5 (cpsw) and Keystone 2 (netcp) can do only 32bit DMA even in case of LPAE (dma-ranges are used). > Originally, as I remember, CONFIG_ARCH_DMA_ADDR_T_64BIT has not been selected for the LPAE case > on TI platforms and the fact that it became set is the result of multi-paltform/allXXXconfig/DMA > optimizations and unification. > (just checked - not set in 4.14) > > Probable commit 4965a68780c5 ("arch: define the ARCH_DMA_ADDR_T_64BIT config symbol in lib/Kconfig"). I completely missed this change in the past, and I don't really agree with it either. Most 32-bit Arm platforms are in fact limited to 32-bit DMA, even when they have MMIO or RAM areas above the 4GB boundary that require LPAE. > The TI drivers have been updated, finally to accept ARCH_DMA_ADDR_T_64BIT=y by using > things like (__force u32) for example. > > Honestly, I've done sanity check of CPSW with LPAE=y (ARCH_DMA_ADDR_T_64BIT=y) very long time ago. This is of course a good idea, drivers should work with any combination of 32-bit or 64-bit phys_addr_t and dma_addr_t. Arnd 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 X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 154AFC433ED for ; Fri, 16 Apr 2021 14:12:48 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 62C086103D for ; Fri, 16 Apr 2021 14:12:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 62C086103D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=NtwmCV/GRj1QvyBPFBXtCznnpY96uHMijVYGYAk/Ltg=; b=iac9ceqkP1ZEsNWtz9i9yot1+ 1A5vGmi1vGLPdsJ10kP8VC4L4pqtLQW0uzCNYrz0e49P6Q/8QweFu4Cgjip8FweJix527PMRRmqWT IDvfeJWXTVpnKJZTeT9QyJUJwUG2zmBJmva/1jNVFVeNAyYmciWCRhANNZZNgCjxVKae2xix/Pqtq cynPC832q8eNhwAmEY+p1xtqaSpciOkdOClKpTKCsEjaKzNLXKCtn8pNySBhyTfB58ugId5E6WTXS 54WMuBiWp41hRSedPMnyTJiKs3Eat26d66GuQ5C1Gq0Df7kydiuwh2qJAIG7vO6R8XS+QpeOyrwWu pXpR4Ftnw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lXPBJ-002Lp3-0g; Fri, 16 Apr 2021 14:10:49 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lXPBG-002LoO-8i for linux-arm-kernel@desiato.infradead.org; Fri, 16 Apr 2021 14:10:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=xBCP/g8wCu0DO7eDhYVbzqfgptXdXdUtIAsYTHxltHc=; b=qWvkgi3BSqm+HDtZcu+ziV13kr RsP2NzRY5B3M6/UjrJ7MhxIFjHWjrRZnQQGmj0XqPd23sAmEfuzu1H9Kh7/VBN5iTFoFu/0hqex9Q dPJo1VqxO3tdVGksEozmlu1Ax92a/tYCDUKFAmgdJMVLigWI1ScCVnZBp6do9otUDFH+F9++2oNz6 qAfz56Eo3pZJpbhWcBn5eIyoLTaBieK4sdDvHd5jiOCjdExp2EH6iQy1MBrNTQqML+RvWtPCnXjLu BmEou++pM/BBJlkOlmR5yRxb6CUuQO6b76MLgs+cD6oTDLhDSoAzdkUTsm8oss82rfQ886q+SdIuh ls7ZZ8OQ==; Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lXPBD-009Qcb-PX for linux-arm-kernel@lists.infradead.org; Fri, 16 Apr 2021 14:10:45 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id CAF4C6137D for ; Fri, 16 Apr 2021 14:10:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618582242; bh=1s9sCrJo44Veolfwl+MwQWl66gowBJVDh4jCcMWmw20=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=bWtljR/0v+ciclhWmYZDIUGhhvFJ3qQ7nO0uU82MghhOsGFdSMyacApx9Rv+nHL6X W5cY5QnPwP6g7dxd13lON+NP7T3wxEgswnDncwfQXbUpDa1noe9/ic1qeaxTeqr1An xJUGxVeiTwbDQol4BcT+uJeJ/K8GtjgPzMatA+QGLBn8/pwaCrhafWYek6SKXGeGJX JrnAkRBsacpGTrsZXVT6wqIi5rnqa1PtXSpagwrGhkYyDEvybabUi7RBZVXZcudA+H 4dZgdBI6yZkxxw1SMBUj5RKBCe9Uqk2xt0sX7dm9fywiRJ0wfW8Bx5Y3FStVzaPeVS VyQ7HbK3kn2jA== Received: by mail-wm1-f53.google.com with SMTP id q123-20020a1c43810000b029012c7d852459so5486651wma.0 for ; Fri, 16 Apr 2021 07:10:42 -0700 (PDT) X-Gm-Message-State: AOAM531S1BBEVpIiiDUyQjUFk1sNOBtaRYuQA3aMkzPQXroM/ze2RA4c I7fYLdseKcYE5gaobuXEiitUFy3yfQmXxZv7FAk= X-Google-Smtp-Source: ABdhPJwer78kcpt2KUTk7pLNWv4YpxxYqG4ncdMLFchwkUndSOMZjtA8z9tZUxzlPor4R9hASXWQZTamma1KWyeXMwk= X-Received: by 2002:a7b:c14a:: with SMTP id z10mr8250595wmi.75.1618582241293; Fri, 16 Apr 2021 07:10:41 -0700 (PDT) MIME-Version: 1.0 References: <20210409185105.188284-3-willy@infradead.org> <202104100656.N7EVvkNZ-lkp@intel.com> <20210410024313.GX2531743@casper.infradead.org> <20210410082158.79ad09a6@carbon> In-Reply-To: From: Arnd Bergmann Date: Fri, 16 Apr 2021 16:10:37 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Bogus struct page layout on 32-bit To: Grygorii Strashko Cc: Ilias Apalodimas , Jesper Dangaard Brouer , Christoph Hellwig , Matthew Wilcox , kernel test robot , Linux-MM , kbuild-all@lists.01.org, clang-built-linux@googlegroups.com, open list , linux-fsdevel@vger.kernel.org, Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , linuxppc-dev@lists.ozlabs.org, Linux ARM , "David S. Miller" , Matteo Croce , "netdev@vger.kernel.org" X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210416_071043_904560_A0211152 X-CRM114-Status: GOOD ( 14.22 ) 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 Fri, Apr 16, 2021 at 11:27 AM 'Grygorii Strashko' via Clang Built Linux wrote: > On 10/04/2021 11:52, Ilias Apalodimas wrote: > > +CC Grygorii for the cpsw part as Ivan's email is not valid anymore > The TI platforms am3/4/5 (cpsw) and Keystone 2 (netcp) can do only 32bit DMA even in case of LPAE (dma-ranges are used). > Originally, as I remember, CONFIG_ARCH_DMA_ADDR_T_64BIT has not been selected for the LPAE case > on TI platforms and the fact that it became set is the result of multi-paltform/allXXXconfig/DMA > optimizations and unification. > (just checked - not set in 4.14) > > Probable commit 4965a68780c5 ("arch: define the ARCH_DMA_ADDR_T_64BIT config symbol in lib/Kconfig"). I completely missed this change in the past, and I don't really agree with it either. Most 32-bit Arm platforms are in fact limited to 32-bit DMA, even when they have MMIO or RAM areas above the 4GB boundary that require LPAE. > The TI drivers have been updated, finally to accept ARCH_DMA_ADDR_T_64BIT=y by using > things like (__force u32) for example. > > Honestly, I've done sanity check of CPSW with LPAE=y (ARCH_DMA_ADDR_T_64BIT=y) very long time ago. This is of course a good idea, drivers should work with any combination of 32-bit or 64-bit phys_addr_t and dma_addr_t. Arnd _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============0367012014976412891==" MIME-Version: 1.0 From: Arnd Bergmann To: kbuild-all@lists.01.org Subject: Re: Bogus struct page layout on 32-bit Date: Fri, 16 Apr 2021 16:10:37 +0200 Message-ID: In-Reply-To: List-Id: --===============0367012014976412891== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On Fri, Apr 16, 2021 at 11:27 AM 'Grygorii Strashko' via Clang Built Linux wrote: > On 10/04/2021 11:52, Ilias Apalodimas wrote: > > +CC Grygorii for the cpsw part as Ivan's email is not valid anymore > The TI platforms am3/4/5 (cpsw) and Keystone 2 (netcp) can do only 32bit = DMA even in case of LPAE (dma-ranges are used). > Originally, as I remember, CONFIG_ARCH_DMA_ADDR_T_64BIT has not been sele= cted for the LPAE case > on TI platforms and the fact that it became set is the result of multi-pa= ltform/allXXXconfig/DMA > optimizations and unification. > (just checked - not set in 4.14) > > Probable commit 4965a68780c5 ("arch: define the ARCH_DMA_ADDR_T_64BIT con= fig symbol in lib/Kconfig"). I completely missed this change in the past, and I don't really agree with it either. Most 32-bit Arm platforms are in fact limited to 32-bit DMA, even when they= have MMIO or RAM areas above the 4GB boundary that require LPAE. > The TI drivers have been updated, finally to accept ARCH_DMA_ADDR_T_64BIT= =3Dy by using > things like (__force u32) for example. > > Honestly, I've done sanity check of CPSW with LPAE=3Dy (ARCH_DMA_ADDR_T_6= 4BIT=3Dy) very long time ago. This is of course a good idea, drivers should work with any combination of 32-bit or 64-bit phys_addr_t and dma_addr_t. Arnd --===============0367012014976412891==--