Rev 5271 | Rev 6131 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5271 | Rev 6084 | ||
---|---|---|---|
Line 59... | Line 59... | ||
59 | mb(); |
59 | mb(); |
60 | for (i = 0; i < num_pages; i++) |
60 | for (i = 0; i < num_pages; i++) |
61 | drm_clflush_page(*pages++); |
61 | drm_clflush_page(*pages++); |
62 | mb(); |
62 | mb(); |
63 | } |
63 | } |
64 | - | ||
65 | static void |
- | |
66 | drm_clflush_ipi_handler(void *null) |
- | |
67 | { |
- | |
68 | wbinvd(); |
- | |
69 | } |
- | |
70 | #endif |
64 | #endif |
Line 71... | Line 65... | ||
71 | 65 | ||
72 | void |
66 | void |
73 | drm_clflush_pages(struct page *pages[], unsigned long num_pages) |
67 | drm_clflush_pages(struct page *pages[], unsigned long num_pages) |
Line 123... | Line 117... | ||
123 | } |
117 | } |
124 | EXPORT_SYMBOL(drm_clflush_sg); |
118 | EXPORT_SYMBOL(drm_clflush_sg); |
Line 125... | Line 119... | ||
125 | 119 | ||
126 | #if 0 |
120 | #if 0 |
127 | void |
121 | void |
128 | drm_clflush_virt_range(char *addr, unsigned long length) |
122 | drm_clflush_virt_range(void *addr, unsigned long length) |
129 | { |
123 | { |
130 | #if defined(CONFIG_X86) |
124 | #if defined(CONFIG_X86) |
- | 125 | if (cpu_has_clflush) { |
|
131 | if (cpu_has_clflush) { |
126 | const int size = boot_cpu_data.x86_clflush_size; |
- | 127 | void *end = addr + length; |
|
132 | char *end = addr + length; |
128 | addr = (void *)(((unsigned long)addr) & -size); |
133 | mb(); |
129 | mb(); |
134 | for (; addr < end; addr += boot_cpu_data.x86_clflush_size) |
130 | for (; addr < end; addr += size) |
135 | clflush(addr); |
- | |
136 | clflush(end - 1); |
131 | clflushopt(addr); |
137 | mb(); |
132 | mb(); |
138 | return; |
133 | return; |
Line 139... | Line 134... | ||
139 | } |
134 | } |
140 | 135 | ||
141 | if (on_each_cpu(drm_clflush_ipi_handler, NULL, 1) != 0) |
136 | if (wbinvd_on_all_cpus()) |
142 | printk(KERN_ERR "Timed out waiting for cache flush.\n"); |
137 | printk(KERN_ERR "Timed out waiting for cache flush.\n"); |
143 | #else |
138 | #else |
144 | printk(KERN_ERR "Architecture has no drm_cache.c support\n"); |
139 | printk(KERN_ERR "Architecture has no drm_cache.c support\n"); |