Fix for undefined reference to __divdi3

Paul Gortmaker (p_gortmaker@yahoo.com)
Sat, 06 Nov 1999 05:44:15 -0500


After looking at the generated asm I found that gcc needed a hand
in seeing a shift optimization. Perhaps this is because I have an
old(er) gcc, v2.7.2.1

Paul.

--- mm/swapfile.c~ Sat Nov 6 03:50:10 1999
+++ mm/swapfile.c Sat Nov 6 05:23:59 1999
@@ -622,7 +622,7 @@
if (swap_dentry->d_inode == swap_info[i].swap_file->d_inode)
goto bad_swap;
}
- swapfilesize = swap_dentry->d_inode->i_size / PAGE_SIZE;
+ swapfilesize = swap_dentry->d_inode->i_size >> PAGE_SHIFT;
} else
goto bad_swap;

__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/