Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp290812ybv; Thu, 6 Feb 2020 23:08:26 -0800 (PST) X-Google-Smtp-Source: APXvYqwyXUN7ooCsO7I1OknaNW2inBcRrExvr7m9wSltZvFjH5qzLht3/1qHjpOILY2ZBcijdb1H X-Received: by 2002:a9d:6e14:: with SMTP id e20mr1656385otr.283.1581059305893; Thu, 06 Feb 2020 23:08:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581059305; cv=none; d=google.com; s=arc-20160816; b=YE48ZK4JiFWRH4d1G2iulRHqSWC1GSclCh8GXk70uxmdqxnxdmQ2TAJfJn/T8uA8sw g4C9iGRXSangpSTjyx1bonTvj5ASxVyo1MDxYY0usAJry2mThbGeifWC1H1Culeex+sz VaD9LeHmhUljn2r6u9eailB0mQb4BOLp6hdhrpk3RT0rqQwHEJHlrmIc7jVJ4GPo/iZM gb/CNgN6vBzAZPHSrH+l2xJwvVfP3RM3BkSrV92PzwFUKbpOWjBlrweZgsVNFT4T/AQa 5AfNQ36pwYJIUq1mOrd9sNpXFOp42HNMADMEQvvEH/02HQwk0oRQqIiL1w/yhOejZqOO WqZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=AI/Ed1jGZu0syy2ZPa3aiPuxKymaXFosIYunW/DJlgg=; b=NWoRcyIyhoZEy0kirFSwyKsUTrBoSMPFQzB2ip1C7hCmTQrQf3vQs1cq7n8PeiKAW7 0Fou1K6KQ2lCNidljLXUgMxW5jEPKDSvuLOLR/EaJX+u6q4b9jSwRPZLK02GlunY8z/4 JKQj3U7HCGCn9SDz6z5e/z2ZMZLNyFPV3ypRuO4jRBb5eHBzv5j3Pp9tLDNcJkdf1gaF 6oh1uhkdahlo2I0CSJSLdP/TW6kmou+JMEv9jsMsvMKwX7cHqpxBWInZy/hgWXrfyWCb MnksOmjpobd0oo5LIY2SO+h3Y02sS/lzPNwu7Z5t2gQZu7Lotxw2dKQVCf6huipso1pi m+yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=f5N4N057; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a143si3505866oii.179.2020.02.06.23.08.13; Thu, 06 Feb 2020 23:08:25 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=f5N4N057; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726860AbgBGHFv (ORCPT + 99 others); Fri, 7 Feb 2020 02:05:51 -0500 Received: from mail-ot1-f65.google.com ([209.85.210.65]:44019 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726130AbgBGHFv (ORCPT ); Fri, 7 Feb 2020 02:05:51 -0500 Received: by mail-ot1-f65.google.com with SMTP id p8so1182933oth.10 for ; Thu, 06 Feb 2020 23:05:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=AI/Ed1jGZu0syy2ZPa3aiPuxKymaXFosIYunW/DJlgg=; b=f5N4N057lze/UYExempS2s0dCoH9sLy74s6Isw5TBb7/s01mBzzDWFwD/EmbDtPZ8c ne3ozJuuy965JFt7rupc1pObbHtWJfpedMtj0AuzKB4Vd4kYIHURJ0MThF43IwOp8mFr ql0X+5PjZRWGOp2oKoDeu1U+mHPSwc37CgW60CFAJ2TK0v5zfHWa9eYsZiQ6OmChT+eW xwp2tE69NrwsSIufnkxubt+SbjO9+3X8xuVkoQV89xnEUP2WtRV9NcZJKL7wXjoXa5E0 LDYH5YMWp1KLWEH1qbAkF4f6I7H6jNh3nRfs9WvGEJ3wDUP3HYEjy63BjD67LTq/RBox IB4g== 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=AI/Ed1jGZu0syy2ZPa3aiPuxKymaXFosIYunW/DJlgg=; b=X0oxtujJoZAkVCLGBiSFAKDY29/JCm9JQ88xhtno05BuwrR4oZSOJX8I3XSaghWmYK nhnbqb42iJZz5j7MdfFqgLHjvncDLxsaI4vQ6MBlXll8bWZTPKCttTmmHz20Te9OfuT9 dU6P2AL3w/U0cQPgtYim0ypvgEBgcn/cFJRfwiEMXrV8RTdbqwKzDMLzBnagf0pLSTmF L6U749u1FqVavYYeuniDZEnMaEwvpadGu4EgGZjjNLxUR/4k39a8R2OvEFk+n8Wp/gVY scg6eU1lhrzQDV10IckJd92hlyrE6qUGrYtn7JrK7WXGWnr9Fn6omH/RrNzm0dbVbnQ3 bM0A== X-Gm-Message-State: APjAAAW91bwtb1w31I+Uk4E7E/FO3iXqG52j75TnryAofZuD/Fono4LP sY9FphjPcD8/JG6YRiEvYNhpzXZQZUuSU0TyoBHQKFdT X-Received: by 2002:aca:ebcb:: with SMTP id j194mr1179392oih.154.1581059150234; Thu, 06 Feb 2020 23:05:50 -0800 (PST) MIME-Version: 1.0 References: <20200206111646.11755-1-oshpigelman@habana.ai> In-Reply-To: <20200206111646.11755-1-oshpigelman@habana.ai> From: Oded Gabbay Date: Fri, 7 Feb 2020 09:05:24 +0200 Message-ID: Subject: Re: [PATCH] habanalabs: fix DDR bar address setting To: Omer Shpigelman Cc: "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 6, 2020 at 1:16 PM Omer Shpigelman wrote: > > DRAM_PHYS_BASE is already taken into account in MMU_PAGE_TABLES_ADDR. > > Signed-off-by: Omer Shpigelman > --- > drivers/misc/habanalabs/goya/goya.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/misc/habanalabs/goya/goya.c b/drivers/misc/habanalabs/goya/goya.c > index 74785ccd2cb1..f634e9c5cad9 100644 > --- a/drivers/misc/habanalabs/goya/goya.c > +++ b/drivers/misc/habanalabs/goya/goya.c > @@ -2575,8 +2575,7 @@ static int goya_hw_init(struct hl_device *hdev) > * After CPU initialization is finished, change DDR bar mapping inside > * iATU to point to the start address of the MMU page tables > */ > - if (goya_set_ddr_bar_base(hdev, DRAM_PHYS_BASE + > - (MMU_PAGE_TABLES_ADDR & > + if (goya_set_ddr_bar_base(hdev, (MMU_PAGE_TABLES_ADDR & > ~(prop->dram_pci_bar_size - 0x1ull))) == U64_MAX) { > dev_err(hdev->dev, > "failed to map DDR bar to MMU page tables\n"); > -- > 2.17.1 > This patch is: Reviewed-by: Oded Gabbay