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=-10.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 B816DC48BCD for ; Thu, 10 Jun 2021 03:23:43 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 37A84613C8 for ; Thu, 10 Jun 2021 03:23:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 37A84613C8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8E2B96E43B; Thu, 10 Jun 2021 03:23:42 +0000 (UTC) Received: from mail-oi1-x235.google.com (mail-oi1-x235.google.com [IPv6:2607:f8b0:4864:20::235]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8B2146E43B for ; Thu, 10 Jun 2021 03:23:41 +0000 (UTC) Received: by mail-oi1-x235.google.com with SMTP id z3so573999oib.5 for ; Wed, 09 Jun 2021 20:23:41 -0700 (PDT) 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=bnSnjCQmJkvI/c6d8ebbCLxM2gw0SqMaYv5TyjqTZjg=; b=I8vgu/viyavEHf9wfa84D20yJO9dbKfJ/YyNoBmdVdm5TjRMsI4MiMOVRpYLIXZ3wJ OHwJEgYqJrejgYikksDouJiRm0GAIXvGBCZQ14sLGODq3kMjyw8cJ3/jfEQDs2CtHkV9 m9op5G+xzLgSVUWJYIgcrAGIYkR1e4cv9y/7EStrmNzL1m913brCV0QvT8IuGkbtwUME EeGH96U0R88RWFKhjuzukrgrNvOh8wN4rrm8fFBt4ck0g90jCS5ftvcrm3r2b9hZibT2 T8Pf0g9fjPVq0SF7T6hGfGSPj1GX4ICrGPHyqv7EKh7TLMrpz0NwIlFgd4Oh7VVqXJNt bPPQ== 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=bnSnjCQmJkvI/c6d8ebbCLxM2gw0SqMaYv5TyjqTZjg=; b=eB9mN54OLj0vtVrPIOlJS3O8HUE7Wco5y7TIH42s0uQTxSzWrbzNRIpd9hT7x0jKpR w59598gQs0Gm9CaagR9pMbz8Z4Qun32eEANnmdeoc2cN2CrCZXakThh+ttWF/CvvQn/w k3fT+hPkv6K6ybREPFWuxl9PnUoEVYmEwIJ/HqJ7d+TQdv30t2a/pOPt7C/00HWxKuqy eK8OFS9U+BTJGnD8/XXoZo8T7w/6C4HFXxovIR6YWVxywtTIbQOBn2s2oP+YmU3R3JPb 0sOj/m9gy2ERn/xdfVnib4ueU1CV1Z9sy5lS8/qupoISra2xfqgAKLO7TH8HMO09Pz8j 2+2w== X-Gm-Message-State: AOAM5310ywnMME4gxMooNdZKk3TIdn2a/wQNg0DG472nkiRMXWmcno77 7jRr98bg3zZnCtJPmZeckwEwO9Ih413ZUQvXrK0= X-Google-Smtp-Source: ABdhPJzLOceBdN9PSCMCjnirRQEaB9LktoTW7LJQWhNRL4Yqmqi8Pqm9IUIDaXbFFH189HvQ+O9WRG2JyLdH4EuLs20= X-Received: by 2002:a05:6808:999:: with SMTP id a25mr1889689oic.123.1623295420774; Wed, 09 Jun 2021 20:23:40 -0700 (PDT) MIME-Version: 1.0 References: <20210610030344.117897-1-airlied@gmail.com> In-Reply-To: <20210610030344.117897-1-airlied@gmail.com> From: Alex Deucher Date: Wed, 9 Jun 2021 23:23:29 -0400 Message-ID: Subject: Re: [PATCH] drm/amdgpu: use correct rounding macro for 64-bit To: Dave Airlie Content-Type: text/plain; charset="UTF-8" X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Deucher, Alexander" , Christian Koenig , Maling list - DRI developers Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Wed, Jun 9, 2021 at 11:10 PM Dave Airlie wrote: > > From: Dave Airlie > > This fixes 32-bit arm build due to lack of 64-bit divides. > > Fixes: cb1c81467af3 ("drm/ttm: flip the switch for driver allocated resources v2") > Signed-off-by: Dave Airlie Reviewed-by: Alex Deucher > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c > index 9a6df02477ce..436ec246a7da 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c > @@ -407,7 +407,7 @@ static int amdgpu_vram_mgr_new(struct ttm_resource_manager *man, > #endif > pages_per_node = max_t(uint32_t, pages_per_node, > tbo->page_alignment); > - num_nodes = DIV_ROUND_UP(PFN_UP(mem_bytes), pages_per_node); > + num_nodes = DIV_ROUND_UP_ULL(PFN_UP(mem_bytes), pages_per_node); > } > > node = kvmalloc(struct_size(node, mm_nodes, num_nodes), > -- > 2.25.4 >