Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2960905imu; Mon, 19 Nov 2018 08:39:45 -0800 (PST) X-Google-Smtp-Source: AJdET5c4wYuoPbnBhWoaJlOcb3MsCFAeYea3kqiOo1YeM0dKxUY7YnXQNo/AW1qyJXeHmZ659C/M X-Received: by 2002:a63:c42:: with SMTP id 2mr20792320pgm.372.1542645585445; Mon, 19 Nov 2018 08:39:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542645585; cv=none; d=google.com; s=arc-20160816; b=OUDF8Z3qOvMEf83EaW9/bTpH+egcSZm08XE46uvRzjOqISYgNMrPoiEvF4bWPpXuak 0k6jZh4YzpHbEbUMrUIdjUGlbHuoxgpsfH51ophaPpsG3uxKoUhFilyftAs7HHli7pwO zTVfu2rzc/BkhrppzNzZaDgrQHwGn7bbUxhTaNItdjU5bfdzPw3s7I40Tn92o2GKY6dT QEmdhnBazR6N7AnUs46/I+Xev6ljLzklINqQPV+OCCVq2poVN3iBRGVP0DnMiPzFU8YW ipQc/2r4r1I0zIbmO29hzN8WoXy5QdF3T5cFTXBNCILodI4OqPyHJmg/RZ6B9kmU/X/U +Y2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=HAmU8yzXscjRxCXVT0u9FWpopAOXQIR/7cnPyyyMjVk=; b=U4Fu2++aThyfTkmGxvay9tg/y2UrM3aAEKqSAy2KUtGdbOJLqgY7tCkfVEtlYB0gZM OEFP5WvrZxzT/DxHWo9tW/LoB2z2gwmARB/39lGrkfNvMQ8OQF/HtEP7Qbsi6M57HX4W GMC0GfeCpkEfTcgHjZmRmIv5lQyupC6z3+tDZCRcWBlTNgjajABYzsk8U5j83frQoq0z PsMi2AiEhFTD9UoZC/ZRqZ1bmRw6GQeKwkvyefCC9SGtvlxcHq9a2RzUqL56wUmrGDJ6 w0xYBCpEaCK58hUEKuQ/6CdrV6CD6cXsxEimhDWJ8npkLDCryZbknU3KmSpO5tYR9d7Y gTYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0VprYbQW; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y2si13611532pli.266.2018.11.19.08.39.29; Mon, 19 Nov 2018 08:39:45 -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=@kernel.org header.s=default header.b=0VprYbQW; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732591AbeKTDDD (ORCPT + 99 others); Mon, 19 Nov 2018 22:03:03 -0500 Received: from mail.kernel.org ([198.145.29.99]:35500 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731637AbeKTDDB (ORCPT ); Mon, 19 Nov 2018 22:03:01 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (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 1FD1A208E3; Mon, 19 Nov 2018 16:38:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542645532; bh=BIg1UwMRC4U61U70Z16GZPjJsjFcyRWNHJNYcSF+Ua4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0VprYbQWBViNvkQgtXUFU0dA9ZSazOFkw6VxHOUYmR1mYvLBx0y36lNCGk1zuwS44 iXTkGozddTqrL+iVHzpjcklsrUFykDEZ1cCsz4vlVMVp4CafyOYLqncAuFamEHHrAf sw6Hb/tlNW/qGmvXtZiLYmUkgMs+n2VtMZfJdgfA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sergii Romantsov , Chris Wilson , Lionel Landwerlin , Michal Wajdeczko , Joonas Lahtinen Subject: [PATCH 4.19 199/205] drm/i915: Mark pin flags as u64 Date: Mon, 19 Nov 2018 17:28:26 +0100 Message-Id: <20181119162642.566427879@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181119162616.586062722@linuxfoundation.org> References: <20181119162616.586062722@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Chris Wilson commit 0014868b9c3c1dda1de6711cf58c3486fb422d07 upstream. Since the flags are being used to operate on a u64 variable, they too need to be marked as such so that the inverses are full width (and not zero extended on 32b kernels and bdw+). Reported-by: Sergii Romantsov Signed-off-by: Chris Wilson Cc: stable@vger.kernel.org Reviewed-by: Lionel Landwerlin Reviewed-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20181102161232.17742-2-chris@chris-wilson.co.uk (cherry picked from commit 83b466b1dc5f0b4d33f0a901e8b00197a8f3582d) Signed-off-by: Joonas Lahtinen Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/i915/i915_gem_gtt.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) --- a/drivers/gpu/drm/i915/i915_gem_gtt.h +++ b/drivers/gpu/drm/i915/i915_gem_gtt.h @@ -664,20 +664,20 @@ int i915_gem_gtt_insert(struct i915_addr u64 start, u64 end, unsigned int flags); /* Flags used by pin/bind&friends. */ -#define PIN_NONBLOCK BIT(0) -#define PIN_MAPPABLE BIT(1) -#define PIN_ZONE_4G BIT(2) -#define PIN_NONFAULT BIT(3) -#define PIN_NOEVICT BIT(4) +#define PIN_NONBLOCK BIT_ULL(0) +#define PIN_MAPPABLE BIT_ULL(1) +#define PIN_ZONE_4G BIT_ULL(2) +#define PIN_NONFAULT BIT_ULL(3) +#define PIN_NOEVICT BIT_ULL(4) -#define PIN_MBZ BIT(5) /* I915_VMA_PIN_OVERFLOW */ -#define PIN_GLOBAL BIT(6) /* I915_VMA_GLOBAL_BIND */ -#define PIN_USER BIT(7) /* I915_VMA_LOCAL_BIND */ -#define PIN_UPDATE BIT(8) +#define PIN_MBZ BIT_ULL(5) /* I915_VMA_PIN_OVERFLOW */ +#define PIN_GLOBAL BIT_ULL(6) /* I915_VMA_GLOBAL_BIND */ +#define PIN_USER BIT_ULL(7) /* I915_VMA_LOCAL_BIND */ +#define PIN_UPDATE BIT_ULL(8) -#define PIN_HIGH BIT(9) -#define PIN_OFFSET_BIAS BIT(10) -#define PIN_OFFSET_FIXED BIT(11) +#define PIN_HIGH BIT_ULL(9) +#define PIN_OFFSET_BIAS BIT_ULL(10) +#define PIN_OFFSET_FIXED BIT_ULL(11) #define PIN_OFFSET_MASK (-I915_GTT_PAGE_SIZE) #endif