projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1ba9a29
)
x86/mm/mtrr: Slightly simplify print_mtrr_state()
author
Jan Beulich
<
[email protected]
>
Fri, 6 Jul 2012 14:20:35 +0000
(15:20 +0100)
committer
Ingo Molnar
<
[email protected]
>
Tue, 10 Jul 2012 08:38:15 +0000
(10:38 +0200)
high_width can be easily calculated in a single expression when
making use of __ffs64().
Signed-off-by: Jan Beulich <
[email protected]
>
Cc: Linus Torvalds <
[email protected]
>
Cc: Andrew Morton <
[email protected]
>
Cc: Peter Zijlstra <
[email protected]
>
Cc: Yinghai Lu <
[email protected]
>
Link:
http://lkml.kernel.org/r/
[email protected]
Signed-off-by: Ingo Molnar <
[email protected]
>
arch/x86/kernel/cpu/mtrr/generic.c
patch
|
blob
|
history
diff --git
a/arch/x86/kernel/cpu/mtrr/generic.c
b/arch/x86/kernel/cpu/mtrr/generic.c
index 75772ae6c65f81cbc2268120b1fdcf3bad80028f..e9fe907cd2495c9ad6a687f9b45a49c39a5ebd26 100644
(file)
--- a/
arch/x86/kernel/cpu/mtrr/generic.c
+++ b/
arch/x86/kernel/cpu/mtrr/generic.c
@@
-361,11
+361,7
@@
static void __init print_mtrr_state(void)
}
pr_debug("MTRR variable ranges %sabled:\n",
mtrr_state.enabled & 2 ? "en" : "dis");
- if (size_or_mask & 0xffffffffUL)
- high_width = ffs(size_or_mask & 0xffffffffUL) - 1;
- else
- high_width = ffs(size_or_mask>>32) + 32 - 1;
- high_width = (high_width - (32 - PAGE_SHIFT) + 3) / 4;
+ high_width = (__ffs64(size_or_mask) - (32 - PAGE_SHIFT) + 3) / 4;
for (i = 0; i < num_var_ranges; ++i) {
if (mtrr_state.var_ranges[i].mask_lo & (1 << 11))