drm/nouveau/abi16: fix handles past the 32nd one
authorIlia Mirkin <imirkin@alum.mit.edu>
Sun, 9 Feb 2014 20:51:25 +0000 (15:51 -0500)
committerBen Skeggs <bskeggs@redhat.com>
Wed, 26 Mar 2014 03:59:32 +0000 (13:59 +1000)
abi16->handles is a u64, so make sure to use 1ULL << val when modifying.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_abi16.c

index b70111711be3b30100e4c25385abfacc9b0a9cff..66abf4d6e5756a539e10ea33b92268243f8cd5bb 100644 (file)
@@ -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 |