From patchwork Sun Feb 9 20:51:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilia Mirkin X-Patchwork-Id: 3614311 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 04716BF418 for ; Sun, 9 Feb 2014 20:51:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3F9D420163 for ; Sun, 9 Feb 2014 20:51:53 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 71116200E5 for ; Sun, 9 Feb 2014 20:51:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B3834FA503; Sun, 9 Feb 2014 12:51:49 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qa0-f44.google.com (mail-qa0-f44.google.com [209.85.216.44]) by gabe.freedesktop.org (Postfix) with ESMTP id CD82BFA4DB; Sun, 9 Feb 2014 12:51:38 -0800 (PST) Received: by mail-qa0-f44.google.com with SMTP id w5so8495472qac.3 for ; Sun, 09 Feb 2014 12:51:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=XSBWLdETiJ2si7cJKVuniOqdtMHrGuJkRhHWI+ob7is=; b=kKKrGsahgOyML59AWDIY6OavEaHnCms80DHmjVP4P/ZuNjwBXVfwNxDhk6oGoVxZpS id4g9roduYXPhJy6jbVFN9l9sHJYHdv5E8iR16TXEEOyznm74bPMsDT87Mc8X28wzy/U XcaHRQXPDlgyCEEwRjZWtJLJI4ZqvG1JSq2fYrzmb6AeUHf7GECvTucrvVZDRv+z4YBl hbIDRgFYSK3Nxv7nKyWsBM8EHpo951BTB/ZfBtwONxczJh+asF+pX1Kkgi/tUJJQCEu5 /orYiy3djRkeOI9pRDBNBNdtppHGUVEFoMJxPRmqaw5EQDJYB81/o5nn/dCDJBi+R5nj TT5A== X-Received: by 10.140.94.214 with SMTP id g80mr39936964qge.19.1391979096987; Sun, 09 Feb 2014 12:51:36 -0800 (PST) Received: from athos.24.29.103.16 (cpe-74-71-29-187.nyc.res.rr.com. [74.71.29.187]) by mx.google.com with ESMTPSA id m14sm10041354qax.9.2014.02.09.12.51.36 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Feb 2014 12:51:36 -0800 (PST) From: Ilia Mirkin To: Ben Skeggs , nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH 2/2] drm/nouveau/abi16: fix handles past the 32nd one Date: Sun, 9 Feb 2014 15:51:25 -0500 Message-Id: <1391979085-8012-2-git-send-email-imirkin@alum.mit.edu> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1391979085-8012-1-git-send-email-imirkin@alum.mit.edu> References: <1391979085-8012-1-git-send-email-imirkin@alum.mit.edu> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP abi16->handles is a u64, so make sure to use 1ULL << val when modifying. Signed-off-by: Ilia Mirkin --- Noticed this when doing the previous patch. I'm not sure whether this affects 64-bit builds or not, didn't care to look at the assembly or check the standard. drivers/gpu/drm/nouveau/nouveau_abi16.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_abi16.c b/drivers/gpu/drm/nouveau/nouveau_abi16.c index b701117..66abf4d 100644 --- a/drivers/gpu/drm/nouveau/nouveau_abi16.c +++ b/drivers/gpu/drm/nouveau/nouveau_abi16.c @@ -139,7 +139,7 @@ nouveau_abi16_chan_fini(struct nouveau_abi16 *abi16, /* destroy channel object, all children will be killed too */ if (chan->chan) { - abi16->handles &= ~(1 << (chan->chan->handle & 0xffff)); + abi16->handles &= ~(1ULL << (chan->chan->handle & 0xffff)); nouveau_channel_del(&chan->chan); } @@ -280,7 +280,7 @@ nouveau_abi16_ioctl_channel_alloc(ABI16_IOCTL_ARGS) INIT_LIST_HEAD(&chan->notifiers); list_add(&chan->head, &abi16->channels); - abi16->handles |= (1 << init->channel); + abi16->handles |= (1ULL << init->channel); /* create channel object and initialise dma and fence management */ ret = nouveau_channel_new(drm, cli, NVDRM_DEVICE, NVDRM_CHAN |