By making the offset argument of __mod_page_state an unsigned long instead
of unsigned, we can avoid forcing the compiler to sign extend a usually
constant argument. This saves 1 instruction on x86-64.
-ben
Signed-off-by: Benjamin LaHaise <[email protected]>
diff -purN v2.6.12-rc5/include/linux/page-flags.h test-rc5/include/linux/page-flags.h
--- v2.6.12-rc5/include/linux/page-flags.h 2005-05-30 13:29:33.000000000 -0400
+++ test-rc5/include/linux/page-flags.h 2005-06-01 10:45:53.000000000 -0400
@@ -137,7 +137,7 @@ struct page_state {
extern void get_page_state(struct page_state *ret);
extern void get_full_page_state(struct page_state *ret);
extern unsigned long __read_page_state(unsigned offset);
-extern void __mod_page_state(unsigned offset, unsigned long delta);
+extern void __mod_page_state(unsigned long offset, unsigned long delta);
#define read_page_state(member) \
__read_page_state(offsetof(struct page_state, member))
diff -purN v2.6.12-rc5/mm/page_alloc.c test-rc5/mm/page_alloc.c
--- v2.6.12-rc5/mm/page_alloc.c 2005-05-30 13:29:34.000000000 -0400
+++ test-rc5/mm/page_alloc.c 2005-06-01 10:46:25.000000000 -0400
@@ -1128,7 +1128,7 @@ unsigned long __read_page_state(unsigned
return ret;
}
-void __mod_page_state(unsigned offset, unsigned long delta)
+void __mod_page_state(unsigned long offset, unsigned long delta)
{
unsigned long flags;
void* ptr;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]