summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/core/core/parent.c
diff options
context:
space:
mode:
authorIlia Mirkin <imirkin@alum.mit.edu>2014-02-09 15:51:24 -0500
committerBen Skeggs <bskeggs@redhat.com>2014-03-26 13:59:31 +1000
commit73970c47beb42f3e1ab0b86c537b1c79539f05f4 (patch)
treedb0e30783fe20810e97265d75ff3452db18195f0 /drivers/gpu/drm/nouveau/core/core/parent.c
parent0ac4e3a58d58e33b2353b3e187c88b9485f26591 (diff)
drm/nouveau: replace ffsll with __ffs64
The ffsll function is a lot slower than the __ffs64 built-in which compiles to a single instruction on 64-bit. It's also nice to avoid custom versions of standard functions. Note that __ffs == ffs - 1. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/core/core/parent.c')
-rw-r--r--drivers/gpu/drm/nouveau/core/core/parent.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/core/core/parent.c b/drivers/gpu/drm/nouveau/core/core/parent.c
index 313380ce632d..dee5d1235e9b 100644
--- a/drivers/gpu/drm/nouveau/core/core/parent.c
+++ b/drivers/gpu/drm/nouveau/core/core/parent.c
@@ -49,7 +49,7 @@ nouveau_parent_sclass(struct nouveau_object *parent, u16 handle,
mask = nv_parent(parent)->engine;
while (mask) {
- int i = ffsll(mask) - 1;
+ int i = __ffs64(mask);
if (nv_iclass(parent, NV_CLIENT_CLASS))
engine = nv_engine(nv_client(parent)->device);