[PARISC] Make local cache flushes take a void *

Make flush_data_cache_local, flush_instruction_cache_local and
flush_tlb_all_local take a void * so they don't have to be cast
when using on_each_cpu(). This becomes a problem when on_each_cpu
is a macro (as it is in current -mm).

Also move the prototype of flush_tlb_all_local into tlbflush.h and
remove its declaration from .c files.

Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>

authored by

Matthew Wilcox and committed by
Kyle McMartin
1b2425e3 8039de10

+13 -14
+4 -4
arch/parisc/kernel/cache.c
··· 54 void 55 flush_data_cache(void) 56 { 57 - on_each_cpu((void (*)(void *))flush_data_cache_local, NULL, 1, 1); 58 } 59 void 60 flush_instruction_cache(void) 61 { 62 - on_each_cpu((void (*)(void *))flush_instruction_cache_local, NULL, 1, 1); 63 } 64 #endif 65 66 void 67 flush_cache_all_local(void) 68 { 69 - flush_instruction_cache_local(); 70 - flush_data_cache_local(); 71 } 72 EXPORT_SYMBOL(flush_cache_all_local); 73
··· 54 void 55 flush_data_cache(void) 56 { 57 + on_each_cpu(flush_data_cache_local, NULL, 1, 1); 58 } 59 void 60 flush_instruction_cache(void) 61 { 62 + on_each_cpu(flush_instruction_cache_local, NULL, 1, 1); 63 } 64 #endif 65 66 void 67 flush_cache_all_local(void) 68 { 69 + flush_instruction_cache_local(NULL); 70 + flush_data_cache_local(NULL); 71 } 72 EXPORT_SYMBOL(flush_cache_all_local); 73
+3 -5
arch/parisc/kernel/smp.c
··· 39 #include <asm/atomic.h> 40 #include <asm/current.h> 41 #include <asm/delay.h> 42 - #include <asm/pgalloc.h> /* for flush_tlb_all() proto/macro */ 43 44 #include <asm/io.h> 45 #include <asm/irq.h> /* for CPU_IRQ_REGION and friends */ ··· 406 * as we want to ensure all TLB's flushed before proceeding. 407 */ 408 409 - extern void flush_tlb_all_local(void); 410 - 411 void 412 smp_flush_tlb_all(void) 413 { 414 - on_each_cpu((void (*)(void *))flush_tlb_all_local, NULL, 1, 1); 415 } 416 417 ··· 485 #endif 486 487 flush_cache_all_local(); /* start with known state */ 488 - flush_tlb_all_local(); 489 490 local_irq_enable(); /* Interrupts have been off until now */ 491
··· 39 #include <asm/atomic.h> 40 #include <asm/current.h> 41 #include <asm/delay.h> 42 + #include <asm/tlbflush.h> 43 44 #include <asm/io.h> 45 #include <asm/irq.h> /* for CPU_IRQ_REGION and friends */ ··· 406 * as we want to ensure all TLB's flushed before proceeding. 407 */ 408 409 void 410 smp_flush_tlb_all(void) 411 { 412 + on_each_cpu(flush_tlb_all_local, NULL, 1, 1); 413 } 414 415 ··· 487 #endif 488 489 flush_cache_all_local(); /* start with known state */ 490 + flush_tlb_all_local(NULL); 491 492 local_irq_enable(); /* Interrupts have been off until now */ 493
+1 -1
arch/parisc/mm/init.c
··· 998 void flush_tlb_all(void) 999 { 1000 spin_lock(&sid_lock); 1001 - flush_tlb_all_local(); 1002 recycle_sids(); 1003 spin_unlock(&sid_lock); 1004 }
··· 998 void flush_tlb_all(void) 999 { 1000 spin_lock(&sid_lock); 1001 + flush_tlb_all_local(NULL); 1002 recycle_sids(); 1003 spin_unlock(&sid_lock); 1004 }
+4 -4
include/asm-parisc/cache.h
··· 29 30 #define SMP_CACHE_BYTES L1_CACHE_BYTES 31 32 - extern void flush_data_cache_local(void); /* flushes local data-cache only */ 33 - extern void flush_instruction_cache_local(void); /* flushes local code-cache only */ 34 #ifdef CONFIG_SMP 35 extern void flush_data_cache(void); /* flushes data-cache only (all processors) */ 36 extern void flush_instruction_cache(void); /* flushes i-cache only (all processors) */ 37 #else 38 - #define flush_data_cache flush_data_cache_local 39 - #define flush_instruction_cache flush_instruction_cache_local 40 #endif 41 42 extern void parisc_cache_init(void); /* initializes cache-flushing */
··· 29 30 #define SMP_CACHE_BYTES L1_CACHE_BYTES 31 32 + extern void flush_data_cache_local(void *); /* flushes local data-cache only */ 33 + extern void flush_instruction_cache_local(void *); /* flushes local code-cache only */ 34 #ifdef CONFIG_SMP 35 extern void flush_data_cache(void); /* flushes data-cache only (all processors) */ 36 extern void flush_instruction_cache(void); /* flushes i-cache only (all processors) */ 37 #else 38 + #define flush_data_cache() flush_data_cache_local(NULL) 39 + #define flush_instruction_cache() flush_instruction_cache_local(NULL) 40 #endif 41 42 extern void parisc_cache_init(void); /* initializes cache-flushing */
+1
include/asm-parisc/tlbflush.h
··· 22 #define purge_tlb_end(x) spin_unlock(&pa_tlb_lock) 23 24 extern void flush_tlb_all(void); 25 26 /* 27 * flush_tlb_mm()
··· 22 #define purge_tlb_end(x) spin_unlock(&pa_tlb_lock) 23 24 extern void flush_tlb_all(void); 25 + extern void flush_tlb_all_local(void *); 26 27 /* 28 * flush_tlb_mm()