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.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS 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 BE986C432C0 for ; Tue, 3 Dec 2019 05:08:52 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 80D5A206DF for ; Tue, 3 Dec 2019 05:08:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="oBqcKe8G" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 80D5A206DF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 13ABA6B02A7; Tue, 3 Dec 2019 00:08:52 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 0EC826B02A8; Tue, 3 Dec 2019 00:08:52 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F1C306B02A9; Tue, 3 Dec 2019 00:08:51 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0060.hostedemail.com [216.40.44.60]) by kanga.kvack.org (Postfix) with ESMTP id D6A5A6B02A7 for ; Tue, 3 Dec 2019 00:08:51 -0500 (EST) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with SMTP id 82930181AEF00 for ; Tue, 3 Dec 2019 05:08:51 +0000 (UTC) X-FDA: 76222650462.03.sink08_6a659afed7b31 X-HE-Tag: sink08_6a659afed7b31 X-Filterd-Recvd-Size: 6720 Received: from mail-ot1-f67.google.com (mail-ot1-f67.google.com [209.85.210.67]) by imf27.hostedemail.com (Postfix) with ESMTP for ; Tue, 3 Dec 2019 05:08:51 +0000 (UTC) Received: by mail-ot1-f67.google.com with SMTP id 59so1777853otp.12 for ; Mon, 02 Dec 2019 21:08:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WZKMAVxtDLCraxcIiN00SsJEJBiXhWtyCoaPrnrSK7s=; b=oBqcKe8GwpzMfWCzOpz6k8A9kpdP/IpogOa4QMVMi1V41uaJwMzkXho7ydtuEMajNz szdX7Xtr7bE/4qsM0T2BFq8e80vtNeL84dLeM/iqGREr49p8N2c53zCmQa+n950nVR6Z 6iGPayd+018+WDpv5SCby8xhrf+/42Npi3JOslIr4vH65sAgSziSEZGuefAlnAJocoBn id++ytyCPP/m9lOSO70QGToIxsNbT+MBZz33hSF1z/NGLHQr2n4eusakZHYVnS/cRl7g tqkF2YKPkJGN/mt88IQpUZ6SPZUwQmO8hGjGrYvQrv6Yq9v3/NTajW6FAB8XUZFC01vr bafw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WZKMAVxtDLCraxcIiN00SsJEJBiXhWtyCoaPrnrSK7s=; b=VaA+u2nOOFWVzrdJIXXgVZutGiNbrCz6QXBnHQxLaBRwWs92J0mIaq0uoE8EK/p71G K8jZMVpnsav9ult2vGHzoWJ8gdfKwxNSBYRi6PsPIlkR304/BfrSte4yen2UprHgSKCb 6j/E5lRSG702na96DYdTnpWNy1c28PaN+3ZWHcy/AolyHNdA7JXbZiqBMDcurW4jKuAA wWDdp6g4YMAc3g0JGkVRt2D65BSr+ewhUfUe14s3M1kp3Zcg3UUj8dSz14vkC5dTHy1c Ms7xiygpYZgWnUce8zOHggYKUeKj+xYCRg5q4TKQhIKtbz9GmDRz0o94J7OgLbyiluC4 M97A== X-Gm-Message-State: APjAAAU0jGh9uin7m0VtdEmU20nH02Q4to9biRC+Atz/2J6cHimg9+9G 5P3Vfp/e+Dk2osK3GQgo2FCfQa/QHeLYQXXpZzjjcg== X-Google-Smtp-Source: APXvYqzEJd0JnrQikt41atghBrKjPPeBmz9MNjbEqllktVwshO8ISesIC+M+S9vKnsCFZYOczBBF7MBhb09xnC6+tFw= X-Received: by 2002:a9d:66ca:: with SMTP id t10mr1941618otm.352.1575349730156; Mon, 02 Dec 2019 21:08:50 -0800 (PST) MIME-Version: 1.0 References: <20190911182546.17094-1-nsaenzjulienne@suse.de> <20190911182546.17094-4-nsaenzjulienne@suse.de> In-Reply-To: <20190911182546.17094-4-nsaenzjulienne@suse.de> From: John Stultz Date: Mon, 2 Dec 2019 21:08:38 -0800 Message-ID: Subject: Re: [PATCH v6 3/4] arm64: use both ZONE_DMA and ZONE_DMA32 To: Nicolas Saenz Julienne Cc: Catalin Marinas , Christoph Hellwig , wahrenst@gmx.net, Marc Zyngier , Rob Herring , linux-arm-kernel , Florian Fainelli , Robin Murphy , lkml , linux-mm , mbrugger@suse.com, linux-rpi-kernel@lists.infradead.org, phill@raspberrypi.org, Will Deacon , Marek Szyprowski , Bjorn Andersson , Amit Pundir , Nicolas Dechense Content-Type: text/plain; charset="UTF-8" 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 Wed, Sep 11, 2019 at 11:26 AM Nicolas Saenz Julienne wrote: > So far all arm64 devices have supported 32 bit DMA masks for their > peripherals. This is not true anymore for the Raspberry Pi 4 as most of > it's peripherals can only address the first GB of memory on a total of > up to 4 GB. > > This goes against ZONE_DMA32's intent, as it's expected for ZONE_DMA32 > to be addressable with a 32 bit mask. So it was decided to re-introduce > ZONE_DMA in arm64. > > ZONE_DMA will contain the lower 1G of memory, which is currently the > memory area addressable by any peripheral on an arm64 device. > ZONE_DMA32 will contain the rest of the 32 bit addressable memory. > > Signed-off-by: Nicolas Saenz Julienne > Reviewed-by: Catalin Marinas Hey Nicolas, Testing the db845c with linus/master, I found a regression causing system hangs in early boot: [ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x517f803c] [ 0.000000] Linux version 5.4.0-mainline-10675-g957a03b9e38f (docker@a4ec90a1e72c) (gcc version 7.4.0 (Ubuntu/Linaro 7.4.0-1ubuntu1~18.04.1)) #1209 SMP PREEMPT Tue Dec 3 00:23:15 UTC 2019 [ 0.000000] Machine model: Thundercomm Dragonboard 845c [ 0.000000] earlycon: qcom_geni0 at MMIO 0x0000000000a84000 (options '115200n8') [ 0.000000] printk: bootconsole [qcom_geni0] enabled [ 0.000000] efi: Getting EFI parameters from FDT: [ 0.000000] efi: UEFI not found. [ 0.000000] cma: Reserved 16 MiB at 0x00000000ff000000 [ 0.000000] psci: probing for conduit method from DT. [ 0.000000] psci: PSCIv1.1 detected in firmware. [ 0.000000] psci: Using standard PSCI v0.2 function IDs [ 0.000000] psci: MIGRATE_INFO_TYPE not supported. [ 0.000000] psci: SMC Calling Convention v1.0 [ 0.000000] psci: OSI mode supported. [ 0.000000] percpu: Embedded 31 pages/cpu s87512 r8192 d31272 u126976 [ 0.000000] Detected VIPT I-cache on CPU0 [ 0.000000] CPU features: detected: GIC system register CPU interface [ 0.000000] CPU features: kernel page table isolation forced ON by KASLR [ 0.000000] CPU features: detected: Kernel page table isolation (KPTI) [ 0.000000] ARM_SMCCC_ARCH_WORKAROUND_1 missing from firmware [ 0.000000] CPU features: detected: Hardware dirty bit management [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: -188245 [ 0.000000] Kernel command line: earlycon firmware_class.path=/vendor/firmware/ androidboot.hardware=db845c init=/init androidboot.boot_devices=soc/1d84000.ufshc printk.devkmsg=on buildvariant=userdebug root=/dev/sda2 androidboot.bootdevice=1d84000.ufshc androidboot.serialno=c4e1189c androidboot.baseband=sda msm_drm.dsi_display0=dsi_lt9611_1080_video_display: androidboot.slot_suffix=_a skip_initramfs rootwait ro init=/init I bisected the issue down to this patch (1a8e1cef7603 upstream - the previous patch a573cdd7973d works though I need to apply the arm64_dma_phys_limit bit from this one as the previous patch doesn't build on its own). In the above log: [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: -188245 looks the most suspect, and going back to the working a573cdd7973d + build fix I see: [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 957419 Do you have any suggestions for what might be going wrong? thanks -john