diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-02 17:51:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-02 17:51:45 -0400 |
commit | e694420258cb1af5eb5a06e4b1a027e8c917d027 (patch) | |
tree | 09848cd700e10fe98c3c299d0a4ecb2df1928c7d /arch/arm/mm/flush.c | |
parent | 3b6362b833b9f7a9d4222cf1bb35f99c411abb31 (diff) | |
parent | a188ad2bc7dbfa16ccdcaa8d43ade185b969baff (diff) |
Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
[ARM] 3762/1: Fix ptrace cache coherency bug for ARM1136 VIPT nonaliasing Harvard caches
[ARM] 3765/1: S3C24XX: cleanup include/asm-arm/arch-s3c2410/dma.h
[ARM] 3764/1: S3C24XX: change type naming to kernel style
[ARM] 3763/1: add both rtcs to csb337 defconfig
[ARM] Fix ARM __raw_read_trylock() implementation
[ARM] 3750/3: Fix double VFP emulation for EABI kernels
Diffstat (limited to 'arch/arm/mm/flush.c')
-rw-r--r-- | arch/arm/mm/flush.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/arm/mm/flush.c b/arch/arm/mm/flush.c index b103e56806bd..d438ce41cdd5 100644 --- a/arch/arm/mm/flush.c +++ b/arch/arm/mm/flush.c | |||
@@ -87,6 +87,32 @@ void flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr, unsig | |||
87 | if (cache_is_vipt_aliasing()) | 87 | if (cache_is_vipt_aliasing()) |
88 | flush_pfn_alias(pfn, user_addr); | 88 | flush_pfn_alias(pfn, user_addr); |
89 | } | 89 | } |
90 | |||
91 | void flush_ptrace_access(struct vm_area_struct *vma, struct page *page, | ||
92 | unsigned long uaddr, void *kaddr, | ||
93 | unsigned long len, int write) | ||
94 | { | ||
95 | if (cache_is_vivt()) { | ||
96 | if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask)) { | ||
97 | unsigned long addr = (unsigned long)kaddr; | ||
98 | __cpuc_coherent_kern_range(addr, addr + len); | ||
99 | } | ||
100 | return; | ||
101 | } | ||
102 | |||
103 | if (cache_is_vipt_aliasing()) { | ||
104 | flush_pfn_alias(page_to_pfn(page), uaddr); | ||
105 | return; | ||
106 | } | ||
107 | |||
108 | /* VIPT non-aliasing cache */ | ||
109 | if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask) && | ||
110 | vma->vm_flags | VM_EXEC) { | ||
111 | unsigned long addr = (unsigned long)kaddr; | ||
112 | /* only flushing the kernel mapping on non-aliasing VIPT */ | ||
113 | __cpuc_coherent_kern_range(addr, addr + len); | ||
114 | } | ||
115 | } | ||
90 | #else | 116 | #else |
91 | #define flush_pfn_alias(pfn,vaddr) do { } while (0) | 117 | #define flush_pfn_alias(pfn,vaddr) do { } while (0) |
92 | #endif | 118 | #endif |