All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powerpc/include/asm: Remove unused 64bit cacheflush function
@ 2017-07-20  6:25 Matt Brown
  2018-03-19 22:22 ` Michael Ellerman
  2018-03-20 10:15 ` Michael Ellerman
  0 siblings, 2 replies; 4+ messages in thread
From: Matt Brown @ 2017-07-20  6:25 UTC (permalink / raw)
  To: linuxppc-dev

The flush_dcache_phys_range function is no longer used in the kernel.
This patch removes and cleans up the function.

Signed-off-by: Matt Brown <matthew.brown.dev@gmail.com>
---
 arch/powerpc/include/asm/cacheflush.h |  1 -
 arch/powerpc/kernel/misc_64.S         | 38 -----------------------------------
 2 files changed, 39 deletions(-)

diff --git a/arch/powerpc/include/asm/cacheflush.h b/arch/powerpc/include/asm/cacheflush.h
index b77f036..11843e3 100644
--- a/arch/powerpc/include/asm/cacheflush.h
+++ b/arch/powerpc/include/asm/cacheflush.h
@@ -99,7 +99,6 @@ static inline void invalidate_dcache_range(unsigned long start,
 #ifdef CONFIG_PPC64
 extern void flush_dcache_range(unsigned long start, unsigned long stop);
 extern void flush_inval_dcache_range(unsigned long start, unsigned long stop);
-extern void flush_dcache_phys_range(unsigned long start, unsigned long stop);
 #endif
 
 #define copy_to_user_page(vma, page, vaddr, dst, src, len) \
diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S
index c119044..0ed5c55 100644
--- a/arch/powerpc/kernel/misc_64.S
+++ b/arch/powerpc/kernel/misc_64.S
@@ -144,44 +144,6 @@ _GLOBAL_TOC(flush_dcache_range)
 	blr
 EXPORT_SYMBOL(flush_dcache_range)
 
-/*
- * Like above, but works on non-mapped physical addresses.
- * Use only for non-LPAR setups ! It also assumes real mode
- * is cacheable. Used for flushing out the DART before using
- * it as uncacheable memory 
- *
- * flush_dcache_phys_range(unsigned long start, unsigned long stop)
- *
- *    flush all bytes from start to stop-1 inclusive
- */
-_GLOBAL(flush_dcache_phys_range)
- 	ld	r10,PPC64_CACHES@toc(r2)
-	lwz	r7,DCACHEL1BLOCKSIZE(r10)	/* Get dcache block size */
-	addi	r5,r7,-1
-	andc	r6,r3,r5		/* round low to line bdy */
-	subf	r8,r6,r4		/* compute length */
-	add	r8,r8,r5		/* ensure we get enough */
-	lwz	r9,DCACHEL1LOGBLOCKSIZE(r10)	/* Get log-2 of dcache block size */
-	srw.	r8,r8,r9		/* compute line count */
-	beqlr				/* nothing to do? */
-	mfmsr	r5			/* Disable MMU Data Relocation */
-	ori	r0,r5,MSR_DR
-	xori	r0,r0,MSR_DR
-	sync
-	mtmsr	r0
-	sync
-	isync
-	mtctr	r8
-0:	dcbst	0,r6
-	add	r6,r6,r7
-	bdnz	0b
-	sync
-	isync
-	mtmsr	r5			/* Re-enable MMU Data Relocation */
-	sync
-	isync
-	blr
-
 _GLOBAL(flush_inval_dcache_range)
  	ld	r10,PPC64_CACHES@toc(r2)
 	lwz	r7,DCACHEL1BLOCKSIZE(r10)	/* Get dcache block size */
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: powerpc/include/asm: Remove unused 64bit cacheflush function
  2017-07-20  6:25 [PATCH] powerpc/include/asm: Remove unused 64bit cacheflush function Matt Brown
@ 2018-03-19 22:22 ` Michael Ellerman
  2018-03-20 10:15 ` Michael Ellerman
  1 sibling, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2018-03-19 22:22 UTC (permalink / raw)
  To: Matt Brown, linuxppc-dev

On Thu, 2017-07-20 at 06:25:14 UTC, Matt Brown wrote:
> The flush_dcache_phys_range function is no longer used in the kernel.
> This patch removes and cleans up the function.
> 
> Signed-off-by: Matt Brown <matthew.brown.dev@gmail.com>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/1d82fc5c54ef7956f5c01bbcf26b52

cheers

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: powerpc/include/asm: Remove unused 64bit cacheflush function
  2017-07-20  6:25 [PATCH] powerpc/include/asm: Remove unused 64bit cacheflush function Matt Brown
  2018-03-19 22:22 ` Michael Ellerman
@ 2018-03-20 10:15 ` Michael Ellerman
  1 sibling, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2018-03-20 10:15 UTC (permalink / raw)
  To: Matt Brown, linuxppc-dev

On Thu, 2017-07-20 at 06:25:14 UTC, Matt Brown wrote:
> The flush_dcache_phys_range function is no longer used in the kernel.
> This patch removes and cleans up the function.
> 
> Signed-off-by: Matt Brown <matthew.brown.dev@gmail.com>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/31513207ce72fef5978e8b284e53f2

cheers

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] powerpc/include/asm: Remove unused 64bit cacheflush function
       [not found] <20170720062716.8D819136040@b03ledav002.gho.boulder.ibm.com>
@ 2017-08-09  2:04 ` Andrew Donnellan
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew Donnellan @ 2017-08-09  2:04 UTC (permalink / raw)
  To: Matt Brown, linuxppc-dev

On 20/07/17 16:25, Matt Brown wrote:
> The flush_dcache_phys_range function is no longer used in the kernel.
> This patch removes and cleans up the function.
> 
> Signed-off-by: Matt Brown <matthew.brown.dev@gmail.com>

That does indeed look unused.

Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>

-- 
Andrew Donnellan              OzLabs, ADL Canberra
andrew.donnellan@au1.ibm.com  IBM Australia Limited

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-03-20 10:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-20  6:25 [PATCH] powerpc/include/asm: Remove unused 64bit cacheflush function Matt Brown
2018-03-19 22:22 ` Michael Ellerman
2018-03-20 10:15 ` Michael Ellerman
     [not found] <20170720062716.8D819136040@b03ledav002.gho.boulder.ibm.com>
2017-08-09  2:04 ` [PATCH] " Andrew Donnellan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.