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.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,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 07701C4741F for ; Thu, 1 Oct 2020 20:02:21 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7FE57207DE for ; Thu, 1 Oct 2020 20:02:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="fv2G+gwn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7FE57207DE 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 B775A6B005C; Thu, 1 Oct 2020 16:02:19 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AFFCE6B0062; Thu, 1 Oct 2020 16:02:19 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9A1276B0068; Thu, 1 Oct 2020 16:02:19 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0140.hostedemail.com [216.40.44.140]) by kanga.kvack.org (Postfix) with ESMTP id 695226B005C for ; Thu, 1 Oct 2020 16:02:19 -0400 (EDT) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id F27EC2C89 for ; Thu, 1 Oct 2020 20:02:18 +0000 (UTC) X-FDA: 77324428356.05.ear56_2d133c42719e Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin05.hostedemail.com (Postfix) with ESMTP id D2CAD1801B60E for ; Thu, 1 Oct 2020 20:02:18 +0000 (UTC) X-HE-Tag: ear56_2d133c42719e X-Filterd-Recvd-Size: 4528 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf38.hostedemail.com (Postfix) with ESMTP for ; Thu, 1 Oct 2020 20:02:18 +0000 (UTC) Received: from mail-ot1-f47.google.com (mail-ot1-f47.google.com [209.85.210.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2CCDD207DE for ; Thu, 1 Oct 2020 20:02:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601582537; bh=X4GALR0/qFK5SmDexVvDnxfl0R4yatvYbaVfr1S5mhE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=fv2G+gwnjbVlRGYvDBilOq2DE7yzKzzO8czOj6nHOIlOG/mHWnM7eMS0UnhsKFGj6 5AGtaofc2zEU0GXPaYgpbm0rXI6BhjbEqKIFlupL502zynstjccnTSOGevRhvnrbja rxmA+KojicON0YDUGZ3jAjfkhYmrmY3culfbV5qQ= Received: by mail-ot1-f47.google.com with SMTP id m12so6797550otr.0 for ; Thu, 01 Oct 2020 13:02:17 -0700 (PDT) X-Gm-Message-State: AOAM5313CZs0FH1VEyvSGa5cEzRhW2KuQbst4558LeyCUUkvfnzZAQ96 HLNJ4OJ+AfKUuQJgk2BmYzX6tRQcacnuIJkQQQ== X-Google-Smtp-Source: ABdhPJxiEDxZ0FgXOi5cEGTxp8JWRcCOqobBw1qQ2DkZLAGugxsEI/6ZnBC1AlXUEf9at/4YzkBjFq5m7bNvdiq3ow4= X-Received: by 2002:a05:6830:1008:: with SMTP id a8mr5715034otp.107.1601582536474; Thu, 01 Oct 2020 13:02:16 -0700 (PDT) MIME-Version: 1.0 References: <20201001161740.29064-1-nsaenzjulienne@suse.de> <20201001161740.29064-2-nsaenzjulienne@suse.de> <20201001171500.GN21544@gaia> <20201001172320.GQ21544@gaia> In-Reply-To: From: Rob Herring Date: Thu, 1 Oct 2020 15:02:05 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/4] of/fdt: Update zone_dma_bits when running in bcm2711 To: Nicolas Saenz Julienne Cc: Catalin Marinas , devicetree@vger.kernel.org, Will Deacon , Frank Rowand , "linux-kernel@vger.kernel.org" , linux-mm , Linux IOMMU , "moderated list:BROADCOM BCM2835 ARM ARCHITECTURE" , Robin Murphy , Christoph Hellwig , linux-arm-kernel 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 Thu, Oct 1, 2020 at 12:31 PM Nicolas Saenz Julienne wrote: > > On Thu, 2020-10-01 at 18:23 +0100, Catalin Marinas wrote: > > On Thu, Oct 01, 2020 at 06:15:01PM +0100, Catalin Marinas wrote: > > > Hi Nicolas, > > > > > > Thanks for putting this together. > > > > > > On Thu, Oct 01, 2020 at 06:17:37PM +0200, Nicolas Saenz Julienne wrote: > > > > diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c > > > > index 4602e467ca8b..cd0d115ef329 100644 > > > > --- a/drivers/of/fdt.c > > > > +++ b/drivers/of/fdt.c > > > > @@ -25,6 +25,7 @@ > > > > #include > > > > #include > > > > #include > > > > +#include /* for zone_dma_bits */ > > > > > > > > #include /* for COMMAND_LINE_SIZE */ > > > > #include > > > > @@ -1198,6 +1199,14 @@ void __init early_init_dt_scan_nodes(void) > > > > of_scan_flat_dt(early_init_dt_scan_memory, NULL); > > > > } > > > > > > > > +void __init early_init_dt_update_zone_dma_bits(void) > > > > +{ > > > > + unsigned long dt_root = of_get_flat_dt_root(); > > > > + > > > > + if (of_flat_dt_is_compatible(dt_root, "brcm,bcm2711")) > > > > + zone_dma_bits = 30; > > > > +} > > > > > > I think we could keep this entirely in the arm64 setup_machine_fdt() and > > > not pollute the core code with RPi4-specific code. > > > > Actually, even better, could we not move the check to > > arm64_memblock_init() when we initialise zone_dma_bits? > > I did it this way as I vaguely remembered Rob saying he wanted to centralise > all early boot fdt code in one place. But I'll be happy to move it there. Right, unless zone_dma_bits is only an arm64 thing, then this doesn't really have anything arch specific. Reviewed-by: Rob Herring Rob