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 CFFE9C47423 for ; Thu, 1 Oct 2020 20:02:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 948E3207DE for ; Thu, 1 Oct 2020 20:02:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601582539; bh=X4GALR0/qFK5SmDexVvDnxfl0R4yatvYbaVfr1S5mhE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=dvyGeNenVyf8E7OE7wTH73tvmKQbysd8ChIM9MR7Q5PUnO71D/ia0fnOM36DGSNZG nBJHojgro1JuZLVo8vxgliMxrc8ZYH1opr7Xtqe9qaCk3eZNesc07mEdZ8HKNwNZIq Y3awpDphZAjgjo+yLQYJnLE1tKTUwaeBmvidtKtw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732938AbgJAUCS (ORCPT ); Thu, 1 Oct 2020 16:02:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:42290 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729993AbgJAUCS (ORCPT ); Thu, 1 Oct 2020 16:02:18 -0400 Received: from mail-ot1-f45.google.com (mail-ot1-f45.google.com [209.85.210.45]) (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 4D05321481; 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-f45.google.com with SMTP id u25so6749278otq.6; Thu, 01 Oct 2020 13:02:17 -0700 (PDT) X-Gm-Message-State: AOAM532KQtpRCGmRJrlR1a1+ElEqlL769hAHS5bhTbMtTdjo+X6uucFZ W09QRypX9mA8x4m7Bibyjgw0bPcTxLYg7+kFJQ== 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" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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