projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[GitHub/mt8127/android_kernel_alcatel_ttab.git]
/
drivers
/
gpu
/
drm
/
nouveau
/
core
/
include
/
core
/
math.h
1
#ifndef __NOUVEAU_MATH_H__
2
#define __NOUVEAU_MATH_H__
3
4
static
inline
int
5
log2i
(
u64 base
)
6
{
7
u64 temp
=
base
>>
1
;
8
int
log2
;
9
10
for
(
log2
=
0
;
temp
;
log2
++,
temp
>>=
1
) {
11
}
12
13
return
(
base
& (
base
-
1
)) ?
log2
+
1
:
log2
;
14
}
15
16
#endif