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=-8.1 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, 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 8A2F9C433E0 for ; Tue, 19 May 2020 17:06:47 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4E5EC20709 for ; Tue, 19 May 2020 17:06:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=xen.org header.i=@xen.org header.b="3vC/AbDT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4E5EC20709 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=xen.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jb5hC-0002DJ-0h; Tue, 19 May 2020 17:06:26 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jb5hA-0002DE-IB for xen-devel@lists.xenproject.org; Tue, 19 May 2020 17:06:24 +0000 X-Inumbo-ID: 110f5548-99f3-11ea-b07b-bc764e2007e4 Received: from mail.xenproject.org (unknown [104.130.215.37]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 110f5548-99f3-11ea-b07b-bc764e2007e4; Tue, 19 May 2020 17:06:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=89uvTAHM8r7Gcoc2v6jeqC5cUXOEfk1Yfte8B/+lU7I=; b=3vC/AbDTTQzmfh//YYGH+C7nI3 mR+KSnKUqHskuhKWNsIKVvujSU+XONKTXjxDHUA8GyJCWbe0YSeodIadN5tmpEAIfPdtWGW6+x62l /I97rmGH9g7s82BuL+ga245BZTD1mtiS4ooPZcMdlKD+iws8B+LMOt/Nufa4F4OvG+DU=; Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jb5h6-0006OU-6M; Tue, 19 May 2020 17:06:20 +0000 Received: from 54-240-197-225.amazon.com ([54.240.197.225] helo=a483e7b01a66.ant.amazon.com) by xenbits.xenproject.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1jb5h5-0002vS-V1; Tue, 19 May 2020 17:06:20 +0000 Subject: Re: [PATCH for-4.14 3/3] xen/arm: plat: Allocate as much as possible memory below 1GB for dom0 for RPI To: Volodymyr Babchuk , "xen-devel@lists.xenproject.org" References: <20200518113008.15422-1-julien@xen.org> <20200518113008.15422-4-julien@xen.org> From: Julien Grall Message-ID: <3570aa57-d5b0-7db2-536f-5cef3c8b2e01@xen.org> Date: Tue, 19 May 2020 18:06:17 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: "jeff.kubascik@dornerworks.com" , "jgrall@amazon.com" , "sstabellini@kernel.org" , "roman@zededa.com" , "minyard@acm.org" Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" On 18/05/2020 21:36, Volodymyr Babchuk wrote: > Hi Julien, Hi, > On Mon, 2020-05-18 at 12:30 +0100, Julien Grall wrote: >> From: Julien Grall >> >> The raspberry PI 4 has devices that can only DMA into the first GB of >> the RAM. Therefore we want allocate as much as possible memory below 1GB >> for dom0. >> >> Use the recently introduced dma_bitsize field to specify the DMA width >> supported. >> >> Signed-off-by: Julien Grall >> Reported-by: Corey Minyard >> --- >> xen/arch/arm/platforms/brcm-raspberry-pi.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/xen/arch/arm/platforms/brcm-raspberry-pi.c b/xen/arch/arm/platforms/brcm-raspberry-pi.c >> index b697fa2c6c0e..ad5483437b31 100644 >> --- a/xen/arch/arm/platforms/brcm-raspberry-pi.c >> +++ b/xen/arch/arm/platforms/brcm-raspberry-pi.c >> @@ -43,6 +43,7 @@ static const struct dt_device_match rpi4_blacklist_dev[] __initconst = >> PLATFORM_START(rpi4, "Raspberry Pi 4") >> .compatible = rpi4_dt_compat, >> .blacklist_dev = rpi4_blacklist_dev, >> + .dma_bitsize = 10, > > I'm confused. Should it be 30? Argh, yes. I computed the number of bits for 1024 and forgot to add 20 :(. I will fix it in the next revision. Cheers, -- Julien Grall