From patchwork Wed Dec 30 15:39:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 355280 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp11426921jai; Wed, 30 Dec 2020 07:39:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJzBiAhRoSmO9fbk19wntirQ1Rt1flJ+3KE++pYuQH1MrtBZj+pQ0omfENs02Twmjpo9X88I X-Received: by 2002:a17:90a:a502:: with SMTP id a2mr9281496pjq.218.1609342778735; Wed, 30 Dec 2020 07:39:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609342778; cv=none; d=google.com; s=arc-20160816; b=qki/7QGOeXiAXKXX8Nbw3yJ/bPtBOULEGu6poHs9eXhBLxvO3A2X7I39d3Z13Lq+ix bW9Jfbj6DpcwyWP+XryPyT7+08WwYEyptvdyBoYPyjkobwSIUI2Htpel8JP0wNCyPl59 7Bb5qXRqsm48zOo0smqcyq080evxGJdJZ2fiLlFqEW5KoUl43JMGXXsz1wwZ3E8Db3Qd bgjxvzsmGvHgKeFGohqdeYNakHYwO4g57KF9SexIn8Jv3yA3va5y2GcogtxuNeE3yYeF cDbzP5LtLL5jxQ77DmdXDAlzPbIb9CHfWKmxpOEtkeRdcoA36VWQ94uUqvhzTspYFA1y XNvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=iOtzQdhw3LvuJEj5cee2XMGvimHDuWmKgjH9kCaynjM=; b=MhRxQ3S4Gv9nzVdIjNfcmS55z/po4SVx5y6c8K2aIj20xrri1HkAG6UH3cZj7un7MH foW+OnwmEp2fW3ObvkheQa6DprNSJzCNlioFUWbaaoDO4ViZTAyGgbBA8OWic7Ip2VFJ 68CQTV/gHX/orZ5O9A87NucJKG+xBPDIgrqjI0yy4S2hGDjJYZDAn8RP3pNTVqanEezM RO83AvTl7YinN82wMPw3j7SX5TZIoNxnUpxcGn+b8+TwmjtKg8isjoDpiQevx7Nsvt3/ 7rXMNt+lHWpDJdouM/TYkZiDa0Qo/u1WoMwcuhr//BfGz2DpzT3fFapMRvtS/BZK+mLs ZBJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@kernel.org header.s=k20201202 header.b="t/LvhBIV"; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id b21si43303292pgi.588.2020.12.30.07.39.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Dec 2020 07:39:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@kernel.org header.s=k20201202 header.b="t/LvhBIV"; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 110A9891A1; Wed, 30 Dec 2020 15:39:35 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1ED20891A1; Wed, 30 Dec 2020 15:39:34 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 6517C22288; Wed, 30 Dec 2020 15:39:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1609342773; bh=R+QtqUjZdUsen8XjrwbBijiAfroUZOBF7AE3pnTq3Mg=; h=From:To:Cc:Subject:Date:From; b=t/LvhBIVwknbkuroGTdJD9EhpS/WiYbw3HrpsiOpHIQps7Ax8kj38V01plDw3z9FD WZEBZzWXdRZIkxaIXYgvpCkeItoHbJQnPQ5gtVJNGY3cvuqdrxYC1WgLmIzTHdNkXC SNThC2LqzfKzKNnh2jmIlMqiKKzTVAuOr82Dwzve11IRoAAspH4dFzMj2IwuvQOfnb BewGRZqFu+oWApmvdqTcaHHKNCMuTgmJMCWTP7WF3E7i1/B13eWiQbowSC+vcnfQ6i JWV1qrDo+ALV5AGsd5ChEL5yLK3uiLQrlNsMDKrFCYP3LkcmJnRbzWV2d/Y1b+4s1j 0v0zU64bBfJrw== From: Arnd Bergmann To: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter Subject: [PATCH] i915: fix shift warning Date: Wed, 30 Dec 2020 16:39:14 +0100 Message-Id: <20201230153928.456260-1-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 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: Arnd Bergmann , intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, =?utf-8?q?Jos=C3=A9_Roberto_de_Souza?= , Chris Wilson , Daniele Ceraolo Spurio , dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Arnd Bergmann Randconfig builds on 32-bit machines show lots of warnings for the i915 driver for incorrect bit masks like: drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c:2584:9: error: shift count >= width of type [-Werror,-Wshift-count-overflow] return hweight64(VDBOX_MASK(&i915->gt)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/asm-generic/bitops/const_hweight.h:29:49: note: expanded from macro 'hweight64' #define hweight64(w) (__builtin_constant_p(w) ? __const_hweight64(w) : __arch_hweight64(w)) Since this is a 64-bit mask, use GENMASK_ULL instead of GENMASK. Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/i915/i915_drv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.29.2 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 0a3ee4f9dc0a..ca32fa0d6a57 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -1624,7 +1624,7 @@ tgl_revids_get(struct drm_i915_private *dev_priv) unsigned int first__ = (first); \ unsigned int count__ = (count); \ ((gt)->info.engine_mask & \ - GENMASK(first__ + count__ - 1, first__)) >> first__; \ + GENMASK_ULL(first__ + count__ - 1, first__)) >> first__; \ }) #define VDBOX_MASK(gt) \ ENGINE_INSTANCES_MASK(gt, VCS0, I915_MAX_VCS)