Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp953729pxk; Fri, 25 Sep 2020 02:14:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/6VzU89DrwVXok/DQcePYfdAqtnbtfYin7Km5GeXIb6OaTkP/E8u044JLHCKel0z/9/tP X-Received: by 2002:a17:906:af6a:: with SMTP id os10mr1755518ejb.34.1601025256887; Fri, 25 Sep 2020 02:14:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601025256; cv=none; d=google.com; s=arc-20160816; b=ZnS2IoGc8pVGYz/vggVd4R+BcjCHwsJYxF0qr8iooL8LAPA3nGhV1piXAAh4Vf0bXX d98Wk2eSJfEwswf+tMGX7dBLTH5PNH6J34+FK0SaWr9KppE07g1BnnnEsCu01fSCiVlo OQW/yPS5sesXFkxvSU2y7EpBUYKMoENdUAMPCSs+yKWOQld5chWp/Svg510surc7U9y8 U/lr8SRTovOwDkGviNUwSotEPMC4cUGnpqLWe4LuvpmEd55/vUUJKqWiBUtb3uA0gDlN vzda8vYzhUg7ow6kJJiH1k7QPzk89ZuNLf84xfAbZwtlmJA7fZy5unqT0vu50QecvuGO 1ryQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=0+PSqWgrbTIrlLTsAGAfwWVJU81ELaG0dQR3Va6lMpU=; b=XWrolAOZWRZB30XcIt8B09JUqSVj5QWkZnToGz30em+Hsr6wosqLn4N++8JkV6w4qs QN7qoSE/N7Joaw+rVs/98OYVS/NQbgl/J3D92fl/yWWnxv+mIV6k+kegbjBLisqFg5HE wHHHn1J6NkIz3gfhJbWKaHzsFOyzj17QHksbqLu0xvb3jnw7zDuo9wWm6MMaGMDIHU2P HOqBErzcokWO/LDsyTTDbvNjaPO5wXQP4JsimGq5UFhj+scWAHFjt3pOk/sh9O5TgHo7 CnnybAGU+BZY9Obw/4JxAcrwhqhCbcSZrlSIzR87ModWTJidyf/BZDYgaggu+cYDNH62 k57w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d21si1360404edn.173.2020.09.25.02.13.53; Fri, 25 Sep 2020 02:14:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727876AbgIYJMA (ORCPT + 99 others); Fri, 25 Sep 2020 05:12:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:49404 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727535AbgIYJL7 (ORCPT ); Fri, 25 Sep 2020 05:11:59 -0400 Received: from gaia (unknown [31.124.44.166]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4C315206B5; Fri, 25 Sep 2020 09:11:58 +0000 (UTC) Date: Fri, 25 Sep 2020 10:11:55 +0100 From: Catalin Marinas To: Phil Chang Cc: linux-arm-kernel@lists.infradead.org, YJ Chiang , Alix Wu , linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: Re: Re: [PATCH] [PATCH] ARM64: Setup DMA32 zone size by bootargs Message-ID: <20200925091154.GA4846@gaia> References: <20200916133324.6280-1-phil.chang@mediatek.com> <20200924141514.23930-1-phil.chang@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200924141514.23930-1-phil.chang@mediatek.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 24, 2020 at 10:15:14PM +0800, Phil Chang wrote: > Actually, In a embedded system with 3GB memory, the memory bus width is not the same among the 3GB. > (The first 2GB is 48-bit wide, and the latter 1GB is 16-bit wide.) So I guess that's the data bus width. Devices can still access the whole memory, though at different throughputs. Does this narrow data bus apply only to devices or the CPUs are affected as well? > For memory throughput reason of hardware IPs, we need allocate memory from the first 2GB for > the hardware IPs. And that is why we setup the first 2GB as DMA_ZONE, and use GFP_DMA to allocate > memory from the range. If it's only a throughput problem, it looks to me more like a NUMA configuration. I think you can add the first 2GB and the last GB in separate nodes and define a "numa-node-id" property per device in DT. -- Catalin