diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-25 18:35:32 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-25 18:35:32 -0400 |
commit | 0798b1dbfbd9ff2a370c5968c5f0621ef0075fe0 (patch) | |
tree | c7f61ab9683786a070da0933b9981fc74a4d865f /arch/tile/lib/cacheflush.c | |
parent | ad363e0916423b2e6cdfcdc30ae707ec709f0a65 (diff) | |
parent | 6738d3210aabe3016a1b03cd98a7fc479c229197 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile
* git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile: (26 commits)
arch/tile: prefer "tilepro" as the name of the 32-bit architecture
compat: include aio_abi.h for aio_context_t
arch/tile: cleanups for tilegx compat mode
arch/tile: allocate PCI IRQs later in boot
arch/tile: support signal "exception-trace" hook
arch/tile: use better definitions of xchg() and cmpxchg()
include/linux/compat.h: coding-style fixes
tile: add an RTC driver for the Tilera hypervisor
arch/tile: finish enabling support for TILE-Gx 64-bit chip
compat: fixes to allow working with tile arch
arch/tile: update defconfig file to something more useful
tile: do_hardwall_trap: do not play with task->sighand
tile: replace mm->cpu_vm_mask with mm_cpumask()
tile,mn10300: add device parameter to dma_cache_sync()
audit: support the "standard" <asm-generic/unistd.h>
arch/tile: clarify flush_buffer()/finv_buffer() function names
arch/tile: kernel-related cleanups from removing static page size
arch/tile: various header improvements for building drivers
arch/tile: disable GX prefetcher during cache flush
arch/tile: tolerate disabling CONFIG_BLK_DEV_INITRD
...
Diffstat (limited to 'arch/tile/lib/cacheflush.c')
-rw-r--r-- | arch/tile/lib/cacheflush.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/tile/lib/cacheflush.c b/arch/tile/lib/cacheflush.c index 35c1d8ca5f38..8928aace7a64 100644 --- a/arch/tile/lib/cacheflush.c +++ b/arch/tile/lib/cacheflush.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <asm/page.h> | 15 | #include <asm/page.h> |
16 | #include <asm/cacheflush.h> | 16 | #include <asm/cacheflush.h> |
17 | #include <arch/icache.h> | 17 | #include <arch/icache.h> |
18 | #include <arch/spr_def.h> | ||
18 | 19 | ||
19 | 20 | ||
20 | void __flush_icache_range(unsigned long start, unsigned long end) | 21 | void __flush_icache_range(unsigned long start, unsigned long end) |
@@ -39,6 +40,18 @@ void finv_buffer_remote(void *buffer, size_t size, int hfh) | |||
39 | char *p, *base; | 40 | char *p, *base; |
40 | size_t step_size, load_count; | 41 | size_t step_size, load_count; |
41 | const unsigned long STRIPE_WIDTH = 8192; | 42 | const unsigned long STRIPE_WIDTH = 8192; |
43 | #ifdef __tilegx__ | ||
44 | /* | ||
45 | * On TILE-Gx, we must disable the dstream prefetcher before doing | ||
46 | * a cache flush; otherwise, we could end up with data in the cache | ||
47 | * that we don't want there. Note that normally we'd do an mf | ||
48 | * after the SPR write to disabling the prefetcher, but we do one | ||
49 | * below, before any further loads, so there's no need to do it | ||
50 | * here. | ||
51 | */ | ||
52 | uint_reg_t old_dstream_pf = __insn_mfspr(SPR_DSTREAM_PF); | ||
53 | __insn_mtspr(SPR_DSTREAM_PF, 0); | ||
54 | #endif | ||
42 | 55 | ||
43 | /* | 56 | /* |
44 | * Flush and invalidate the buffer out of the local L1/L2 | 57 | * Flush and invalidate the buffer out of the local L1/L2 |
@@ -122,4 +135,9 @@ void finv_buffer_remote(void *buffer, size_t size, int hfh) | |||
122 | 135 | ||
123 | /* Wait for the load+inv's (and thus finvs) to have completed. */ | 136 | /* Wait for the load+inv's (and thus finvs) to have completed. */ |
124 | __insn_mf(); | 137 | __insn_mf(); |
138 | |||
139 | #ifdef __tilegx__ | ||
140 | /* Reenable the prefetcher. */ | ||
141 | __insn_mtspr(SPR_DSTREAM_PF, old_dstream_pf); | ||
142 | #endif | ||
125 | } | 143 | } |