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=-2.5 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 845C1C4740A for ; Mon, 9 Sep 2019 19:34:46 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 5B5DD21A4A for ; Mon, 9 Sep 2019 19:34:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ipAUazkW"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="hMUpmG5b" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5B5DD21A4A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gmx.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-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=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=jOZjqCmm6DoQJg4scrWBol4g9smsSn7DCtxrtr1t2ww=; b=ipAUazkW4JnJDR o4eqEKOsDnNciVB2Tj+AATgoP5YVOfQOOX4IIggOoiU7qpXQ6FLNBkJKdEn2Gsu4SqsqHnR3w+olQ 1N2p8ayqsSUGkD24ygASZF0QgMTCtzEFbEK7NwasWPjkKHEvG39O0mF6ptmk1LnNcF91xgqG3toCd 5bbeTAIpqhNFVtHeZO3EH6rsHFpOXJIQD61wX662NdURdwUuD8MsqlV87x9Aa1skho4gKCZko4n0D bXuFAzVmNs5rDxz8aJxaYcxlZOAtlU5nt1KSZAjkz6ffoCyBFMfi8NZZMS/PBbW4yItc633w/bbyj HeLnTtlzoqNpdCx6P2ow==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i7PQs-0008Gq-I6; Mon, 09 Sep 2019 19:34:38 +0000 Received: from mout.gmx.net ([212.227.17.20]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i7PQp-0008GQ-Ds; Mon, 09 Sep 2019 19:34:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1568057627; bh=d4t6NvwMQ9YTypUWgwkNC+7VlgA/JtZpt8GrsPSKCHs=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=hMUpmG5bI7Ecc5qn5YxStKIYidbTDxDpIrG5t0X1WwthOKMSGEFnXbVwz2DSNffOa Sv8dyTkSeSeYMwFeuT2tmsZhrWzWS2lNLvaSMgvZ+8LtrhLlXGqZKkb/ZXcVFVfPAl e1W0am+4D0QCIP+kg00x2jQkHxmtfpcqdGHHqP+w= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.1.162] ([37.4.249.90]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MfjJY-1hkOv10G4S-00NDN8; Mon, 09 Sep 2019 21:33:47 +0200 Subject: Re: [PATCH v5 0/4] Raspberry Pi 4 DMA addressing support To: Nicolas Saenz Julienne , catalin.marinas@arm.com, hch@lst.de, marc.zyngier@arm.com, robh+dt@kernel.org, linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, linux-riscv@lists.infradead.org References: <20190909095807.18709-1-nsaenzjulienne@suse.de> From: Stefan Wahren Message-ID: <5a8af6e9-6b90-ce26-ebd7-9ee626c9fa0e@gmx.net> Date: Mon, 9 Sep 2019 21:33:43 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190909095807.18709-1-nsaenzjulienne@suse.de> Content-Language: en-US X-Provags-ID: V03:K1:LS01oHKQzcvClmAtuMiV35GzDWGQjl4TMocrZcQk6DA6HAVrjMq joLIBQ7XFMXVpIeH/MS6IOvr05uJoNzY1DAliZFeoVMG1Smed9yI3/EPqAlOvnZYq+y4ifa 1I+hzKfFlkjxIEeh48LA8fJ8+IW5/n72kNXSELzZybJBa7s3kQ74+muskUQhSuquNeriMTy XJfBatyvN85xpY5hnhDdQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:8DJJrmG3oug=:r20bBXJ9yriqQL0K7dlYtr 3D5nkd2eNwi/fPIc7nA/XReM5DD2ystesZjI9WG/JWxtWZdVDqHxCXgsdG9upl0LqHxhPRWl2 IoruO8dbxq2k9VpIfNo6q4WCvXtkCGKKsw3sH6oNySDjjYT6mZusv7UXmfHa0ovSI12/tyJNF OOZEkPvsa0wmVJ0R9v1XPZRNqH1eASiHW+iVlt/tB8NniA3l5NBhPYbYb9A3RtBjKmbDLZ2fh 8+Kl9rh8JTvTgYcYKvF7i6fvXP9dJGs3ngxG+VI6VNtd1UsjcOj6HWI15CHZAaI0355vx7e+W ilwfYTgk0Ma1/6qI0EfInxLskbi5eBScqF0zN/rnknI20HdCFwethoNTw0+IwAybm5l3UwXAO AM9wUDmOGpXmAZFJhwHv0AW19s5t/ls0/XSr5XFmSl+urCrBLgkPcZ9BpUqXVF61h7a0IJ9c3 vTmEd8/Wqk3gPrHkAulh/i0IDJfnrBYJFMu5cBLFIRU9L712b3+pkTe5wa2p7jKYvOUwH1R8C ALrokkoKreKkpotBT1Wsvgt+zLiHVr5Qu6134HCzGxj/jFln7a38J15ryJlaoEWj6xlXJaY5Y CpuXNF2mIRbRPoTDFkejvgHl/XDalzWfCh7pHDsl/wiBfUZAl6CNPHfjYKlxwQtU0DksbtlgK PP0UCzTwxEz0y/6CC+wlQfzGLv+iciCgw/bh6P54tMKmlxcIORsIiwzp0WsfICSPiSNNRA7b+ gJImh/7edE5WeVs3jHJmk0zNCAljed+Y6pkB60wOgaQmFDoWHoJgUc6T/RRfIrjVpFD4f7ESQ NFIdgmkZ+ewXmvphXZpkC/kQ+b5umYYh8LAAu2IjmAC+NpVd2uqKGicmytJkmOl222yRcvS/i KxTvBPrPPOk8/UOGm74aUUxwB/WppNLQ/4sofAEQ53FOsXJ68c9YKnSwZKpUj3/ALYd22bFGN JM1GFT7CylIv1mlwb0SbD6PVHtccl4U7LVjkAh/OzirSupflS+QcIPLiDDdmWW7hsXYU2+bwk DkkoVrlTPhN4e3autQhPV2XrcsKf4pJePsFukIGhvvClKgUYrNQ2kyEwUV0mt2JiS5Gz0n6WZ pbUk1x1giL3IYcwkMwR3QV1KowVLihGeVN7uJ6LB+yEHapvBIqAHAxh4rEyq6qZ0wluGpNfAM RCCSySDoWoGQs49i1yGfO0WkT+22+w6nWSaDNcr32p+OEUFCd2Yvrc+Mfa6zY2E7Efv3o= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190909_123435_767088_9277FEF5 X-CRM114-Status: GOOD ( 19.61 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: f.fainelli@gmail.com, robin.murphy@arm.com, linux-kernel@vger.kernel.org, mbrugger@suse.com, linux-rpi-kernel@lists.infradead.org, phill@raspberrypi.org, will@kernel.org, m.szyprowski@samsung.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Nicolas, Am 09.09.19 um 11:58 schrieb Nicolas Saenz Julienne: > Hi all, > this series attempts to address some issues we found while bringing up > the new Raspberry Pi 4 in arm64 and it's intended to serve as a follow > up of these discussions: > v4: https://lkml.org/lkml/2019/9/6/352 > v3: https://lkml.org/lkml/2019/9/2/589 > v2: https://lkml.org/lkml/2019/8/20/767 > v1: https://lkml.org/lkml/2019/7/31/922 > RFC: https://lkml.org/lkml/2019/7/17/476 > > The new Raspberry Pi 4 has up to 4GB of memory but most peripherals can > only address the first GB: their DMA address range is > 0xc0000000-0xfc000000 which is aliased to the first GB of physical > memory 0x00000000-0x3c000000. Note that only some peripherals have these > limitations: the PCIe, V3D, GENET, and 40-bit DMA channels have a wider > view of the address space by virtue of being hooked up trough a second > interconnect. > > Part of this is solved on arm32 by setting up the machine specific > '.dma_zone_size = SZ_1G', which takes care of reserving the coherent > memory area at the right spot. That said no buffer bouncing (needed for > dma streaming) is available at the moment, but that's a story for > another series. > > Unfortunately there is no such thing as 'dma_zone_size' in arm64. Only > ZONE_DMA32 is created which is interpreted by dma-direct and the arm64 > arch code as if all peripherals where be able to address the first 4GB > of memory. > > In the light of this, the series implements the following changes: > > - Create both DMA zones in arm64, ZONE_DMA will contain the first 1G > area and ZONE_DMA32 the rest of the 32 bit addressable memory. So far > the RPi4 is the only arm64 device with such DMA addressing limitations > so this hardcoded solution was deemed preferable. > > - Properly set ARCH_ZONE_DMA_BITS. > > - Reserve the CMA area in a place suitable for all peripherals. > > This series has been tested on multiple devices both by checking the > zones setup matches the expectations and by double-checking physical > addresses on pages allocated on the three relevant areas GFP_DMA, > GFP_DMA32, GFP_KERNEL: > > - On an RPi4 with variations on the ram memory size. But also forcing > the situation where all three memory zones are nonempty by setting a 3G > ZONE_DMA32 ceiling on a 4G setup. Both with and without NUMA support. > i like to test this series on Raspberry Pi 4 and i have some questions to get arm64 running: Do you use U-Boot? Which tree? Are there any config.txt tweaks necessary? _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel