aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/agp/i460-agp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/agp/i460-agp.c')
-rw-r--r--drivers/char/agp/i460-agp.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/char/agp/i460-agp.c b/drivers/char/agp/i460-agp.c
index 70117df4d067..e72a83e2bad5 100644
--- a/drivers/char/agp/i460-agp.c
+++ b/drivers/char/agp/i460-agp.c
@@ -13,6 +13,7 @@
13#include <linux/string.h> 13#include <linux/string.h>
14#include <linux/slab.h> 14#include <linux/slab.h>
15#include <linux/agp_backend.h> 15#include <linux/agp_backend.h>
16#include <linux/log2.h>
16 17
17#include "agp.h" 18#include "agp.h"
18 19
@@ -59,8 +60,6 @@
59 */ 60 */
60#define WR_FLUSH_GATT(index) RD_GATT(index) 61#define WR_FLUSH_GATT(index) RD_GATT(index)
61 62
62#define log2(x) ffz(~(x))
63
64static struct { 63static struct {
65 void *gatt; /* ioremap'd GATT area */ 64 void *gatt; /* ioremap'd GATT area */
66 65
@@ -148,7 +147,7 @@ static int i460_fetch_size (void)
148 * values[i].size. 147 * values[i].size.
149 */ 148 */
150 values[i].num_entries = (values[i].size << 8) >> (I460_IO_PAGE_SHIFT - 12); 149 values[i].num_entries = (values[i].size << 8) >> (I460_IO_PAGE_SHIFT - 12);
151 values[i].page_order = log2((sizeof(u32)*values[i].num_entries) >> PAGE_SHIFT); 150 values[i].page_order = ilog2((sizeof(u32)*values[i].num_entries) >> PAGE_SHIFT);
152 } 151 }
153 152
154 for (i = 0; i < agp_bridge->driver->num_aperture_sizes; i++) { 153 for (i = 0; i < agp_bridge->driver->num_aperture_sizes; i++) {