]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/char/agp/intel-agp.c
Merge branch 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
[net-next-2.6.git] / drivers / char / agp / intel-agp.c
index c1c07a2ccb11c0c8fb5241daba93f98cc425ac23..919a28558d362fa152ae3e12d94babb1cecbfd60 100644 (file)
@@ -8,6 +8,7 @@
 #include <linux/kernel.h>
 #include <linux/pagemap.h>
 #include <linux/agp_backend.h>
+#include <asm/smp.h>
 #include "agp.h"
 
 int intel_agp_enabled;
@@ -907,12 +908,6 @@ static void intel_i830_setup_flush(void)
                intel_i830_fini_flush();
 }
 
-static void
-do_wbinvd(void *null)
-{
-       wbinvd();
-}
-
 /* The chipset_flush interface needs to get data that has already been
  * flushed out of the CPU all the way out to main memory, because the GPU
  * doesn't snoop those buffers.
@@ -929,12 +924,10 @@ static void intel_i830_chipset_flush(struct agp_bridge_data *bridge)
 
        memset(pg, 0, 1024);
 
-       if (cpu_has_clflush) {
+       if (cpu_has_clflush)
                clflush_cache_range(pg, 1024);
-       } else {
-               if (on_each_cpu(do_wbinvd, NULL, 1) != 0)
-                       printk(KERN_ERR "Timed out waiting for cache flush.\n");
-       }
+       else if (wbinvd_on_all_cpus() != 0)
+               printk(KERN_ERR "Timed out waiting for cache flush.\n");
 }
 
 /* The intel i830 automatically initializes the agp aperture during POST.