Skip to content

Commit 3151320

Browse files
m-browmpe
authored andcommitted
powerpc: Remove unused flush_dcache_phys_range()
The flush_dcache_phys_range() function is no longer used in the kernel. The last usage was removed in c40785a ("powerpc/dart: Use a cachable DART"). This patch removes the function and declaration. Signed-off-by: Matt Brown <[email protected]> [mpe: Munge change log, include commit that removed last user] Signed-off-by: Michael Ellerman <[email protected]>
1 parent aa9532d commit 3151320

File tree

2 files changed

+0
-39
lines changed

2 files changed

+0
-39
lines changed

arch/powerpc/include/asm/cacheflush.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ static inline void invalidate_dcache_range(unsigned long start,
9999
#ifdef CONFIG_PPC64
100100
extern void flush_dcache_range(unsigned long start, unsigned long stop);
101101
extern void flush_inval_dcache_range(unsigned long start, unsigned long stop);
102-
extern void flush_dcache_phys_range(unsigned long start, unsigned long stop);
103102
#endif
104103

105104
#define copy_to_user_page(vma, page, vaddr, dst, src, len) \

arch/powerpc/kernel/misc_64.S

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -144,44 +144,6 @@ _GLOBAL_TOC(flush_dcache_range)
144144
blr
145145
EXPORT_SYMBOL(flush_dcache_range)
146146

147-
/*
148-
* Like above, but works on non-mapped physical addresses.
149-
* Use only for non-LPAR setups ! It also assumes real mode
150-
* is cacheable. Used for flushing out the DART before using
151-
* it as uncacheable memory
152-
*
153-
* flush_dcache_phys_range(unsigned long start, unsigned long stop)
154-
*
155-
* flush all bytes from start to stop-1 inclusive
156-
*/
157-
_GLOBAL(flush_dcache_phys_range)
158-
ld r10,PPC64_CACHES@toc(r2)
159-
lwz r7,DCACHEL1BLOCKSIZE(r10) /* Get dcache block size */
160-
addi r5,r7,-1
161-
andc r6,r3,r5 /* round low to line bdy */
162-
subf r8,r6,r4 /* compute length */
163-
add r8,r8,r5 /* ensure we get enough */
164-
lwz r9,DCACHEL1LOGBLOCKSIZE(r10) /* Get log-2 of dcache block size */
165-
srw. r8,r8,r9 /* compute line count */
166-
beqlr /* nothing to do? */
167-
mfmsr r5 /* Disable MMU Data Relocation */
168-
ori r0,r5,MSR_DR
169-
xori r0,r0,MSR_DR
170-
sync
171-
mtmsr r0
172-
sync
173-
isync
174-
mtctr r8
175-
0: dcbst 0,r6
176-
add r6,r6,r7
177-
bdnz 0b
178-
sync
179-
isync
180-
mtmsr r5 /* Re-enable MMU Data Relocation */
181-
sync
182-
isync
183-
blr
184-
185147
_GLOBAL(flush_inval_dcache_range)
186148
ld r10,PPC64_CACHES@toc(r2)
187149
lwz r7,DCACHEL1BLOCKSIZE(r10) /* Get dcache block size */

0 commit comments

Comments
 (0)