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=-7.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham 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 1A9FCC49ED7 for ; Fri, 13 Sep 2019 09:25:50 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id BEC71214AE for ; Fri, 13 Sep 2019 09:25:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BEC71214AE Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 570476B0005; Fri, 13 Sep 2019 05:25:49 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5485E6B0006; Fri, 13 Sep 2019 05:25:49 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 40E136B0007; Fri, 13 Sep 2019 05:25:49 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0098.hostedemail.com [216.40.44.98]) by kanga.kvack.org (Postfix) with ESMTP id 0E50F6B0005 for ; Fri, 13 Sep 2019 05:25:49 -0400 (EDT) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with SMTP id B457B8243770 for ; Fri, 13 Sep 2019 09:25:48 +0000 (UTC) X-FDA: 75929365176.03.hook81_6cda416a1b53d X-HE-Tag: hook81_6cda416a1b53d X-Filterd-Recvd-Size: 15397 Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by imf39.hostedemail.com (Postfix) with ESMTP for ; Fri, 13 Sep 2019 09:25:47 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 0C277AE8B; Fri, 13 Sep 2019 09:25:46 +0000 (UTC) Subject: Re: [PATCH v5 0/4] Raspberry Pi 4 DMA addressing support To: Stefan Wahren , catalin.marinas@arm.com, marc.zyngier@arm.com, Matthias Brugger , robh+dt@kernel.org, linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, hch@lst.de, Nicolas Saenz Julienne Cc: robin.murphy@arm.com, f.fainelli@gmail.com, will@kernel.org, linux-rpi-kernel@lists.infradead.org, phill@raspberrypi.org, m.szyprowski@samsung.com, linux-kernel@vger.kernel.org References: <20190909095807.18709-1-nsaenzjulienne@suse.de> <5a8af6e9-6b90-ce26-ebd7-9ee626c9fa0e@gmx.net> <3f9af46e-2e1a-771f-57f2-86a53caaf94a@suse.com> <09f82f88-a13a-b441-b723-7bb061a2f1e3@gmail.com> <2c3e1ef3-0dba-9f79-52e2-314b6b500e14@gmx.net> <4a6f965b-c988-5839-169f-9f24a0e7a567@suse.com> <48a6b72d-d554-b563-5ed6-9a79db5fb4ab@gmx.net> From: Matthias Brugger Openpgp: preference=signencrypt Autocrypt: addr=mbrugger@suse.com; prefer-encrypt=mutual; keydata= mQINBFP1zgUBEAC21D6hk7//0kOmsUrE3eZ55kjc9DmFPKIz6l4NggqwQjBNRHIMh04BbCMY fL3eT7ZsYV5nur7zctmJ+vbszoOASXUpfq8M+S5hU2w7sBaVk5rpH9yW8CUWz2+ZpQXPJcFa OhLZuSKB1F5JcvLbETRjNzNU7B3TdS2+zkgQQdEyt7Ij2HXGLJ2w+yG2GuR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mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <48a6b72d-d554-b563-5ed6-9a79db5fb4ab@gmx.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable 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 13/09/2019 10:50, Stefan Wahren wrote: > Am 13.09.19 um 10:09 schrieb Matthias Brugger: >> >> On 12/09/2019 21:32, Stefan Wahren wrote: >>> Am 12.09.19 um 19:18 schrieb Matthias Brugger: >>>> On 10/09/2019 11:27, Matthias Brugger wrote: >>>>> On 09/09/2019 21:33, Stefan Wahren wrote: >>>>>> 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 bringi= ng up >>>>>>> the new Raspberry Pi 4 in arm64 and it's intended to serve as a f= ollow >>>>>>> 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 periphera= ls can >>>>>>> only address the first GB: their DMA address range is >>>>>>> 0xc0000000-0xfc000000 which is aliased to the first GB of physica= l >>>>>>> memory 0x00000000-0x3c000000. Note that only some peripherals hav= e 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 s= econd >>>>>>> interconnect. >>>>>>> >>>>>>> Part of this is solved on arm32 by setting up the machine specifi= c >>>>>>> '.dma_zone_size =3D SZ_1G', which takes care of reserving the coh= erent >>>>>>> memory area at the right spot. That said no buffer bouncing (need= ed 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 firs= t 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 limi= tations >>>>>>> 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 physi= cal >>>>>>> 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 for= cing >>>>>>> the situation where all three memory zones are nonempty by sett= ing a 3G >>>>>>> ZONE_DMA32 ceiling on a 4G setup. Both with and without NUMA su= pport. >>>>>>> >>>>>> i like to test this series on Raspberry Pi 4 and i have some quest= ions >>>>>> to get arm64 running: >>>>>> >>>>>> Do you use U-Boot? Which tree? >>>>> If you want to use U-Boot, try v2019.10-rc4, it should have everyth= ing you need >>>>> to boot your kernel. >>>>> >>>> Ok, here is a thing. In the linux kernel we now use bcm2711 as SoC n= ame, but the >>>> RPi4 devicetree provided by the FW uses mostly bcm2838. >>> Do you mean the DTB provided at runtime? >>> >>> You mean the merged U-Boot changes, doesn't work with my Raspberry Pi >>> series? >>> >>>> U-Boot in its default >>>> config uses the devicetree provided by the FW, mostly because this w= ay you don't >>>> have to do anything to find out how many RAM you really have. Second= ly because >>>> this will allow us, in the near future, to have one U-boot binary fo= r both RPi3 >>>> and RPi4 (and as a side effect one binary for RPi1 and RPi2). >>>> >>>> Anyway, I found at least, that the following compatibles need to be = added: >>>> >>>> "brcm,bcm2838-cprman" >>>> "brcm,bcm2838-gpio" >>>> >>>> Without at least the cprman driver update, you won't see anything. >>>> >>>> "brcm,bcm2838-rng200" is also a candidate. >>>> >>>> I also suppose we will need to add "brcm,bcm2838" to >>>> arch/arm/mach-bcm/bcm2711.c, but I haven't verified this. >>> How about changing this in the downstream kernel? Which is much easie= r. >> I'm not sure I understand what you want to say. My goal is to use the = upstream >> kernel with the device tree blob provided by the FW. >=20 > The device tree blob you are talking is defined in this repository: >=20 > https://github.com/raspberrypi/linux >=20 > So the word FW is misleading to me. >=20 No, it's part of https://github.com/raspberrypi/firmware.git file boot/bcm2711-rpi-4-b.dtb >> If you talk about the >> downstream kernel, I suppose you mean we should change this in the FW = DT blob >> and in the downstream kernel. That would work for me. >> >> Did I understand you correctly? >=20 > Yes >=20 > So i suggest to add the upstream compatibles into the repo mentioned ab= ove. >=20 > Sorry, but in case you decided as a U-Boot developer to be compatible > with a unreviewed DT, we also need to make U-Boot compatible with > upstream and downstream DT blobs. >=20 Well RPi3 is working with the DT blob provided by the FW, as I mentioned = earlier if we can use this DTB we can work towards one binary that can boot both = RPi3 and RPi4. On the other hand we can rely on the FW to detect the amount of= memory our RPi4 has. That said, I agree that we should make sure that U-Boot can boot with bot= h DTBs, the upstream one and the downstream. Now the question is how to get to th= is. I'm a bit puzzled that by talking about "unreviewed DT" you insinuate that bc= m2711 compatible is already reviewed and can't be changed. From what I can see = none of these compatibles got merged for now, so we are still at time to change t= hem. Apart from the point Florian made, to stay consistent with the RPi SoC na= ming, it will save us work, both in the kernel and in U-Boot, as we would need = to add both compatibles to the code-base. Regards, Matthias >> >>>> Regards, >>>> Matthias >>>> >>>>> Regards, >>>>> Matthias >>>>> >>>>>> 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 >>>>> >>>> _______________________________________________ >>>> linux-arm-kernel mailing list >>>> linux-arm-kernel@lists.infradead.org >>>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel >>> >=20