Commit 1b2425e3c79984975a1a3e6fa84512f23d96da9f
Committed by
Kyle McMartin
1 parent
8039de10aa
Exists in
master
and in
7 other branches
[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>
Showing 5 changed files with 13 additions and 14 deletions Side-by-side Diff
arch/parisc/kernel/cache.c
... | ... | @@ -54,20 +54,20 @@ |
54 | 54 | void |
55 | 55 | flush_data_cache(void) |
56 | 56 | { |
57 | - on_each_cpu((void (*)(void *))flush_data_cache_local, NULL, 1, 1); | |
57 | + on_each_cpu(flush_data_cache_local, NULL, 1, 1); | |
58 | 58 | } |
59 | 59 | void |
60 | 60 | flush_instruction_cache(void) |
61 | 61 | { |
62 | - on_each_cpu((void (*)(void *))flush_instruction_cache_local, NULL, 1, 1); | |
62 | + on_each_cpu(flush_instruction_cache_local, NULL, 1, 1); | |
63 | 63 | } |
64 | 64 | #endif |
65 | 65 | |
66 | 66 | void |
67 | 67 | flush_cache_all_local(void) |
68 | 68 | { |
69 | - flush_instruction_cache_local(); | |
70 | - flush_data_cache_local(); | |
69 | + flush_instruction_cache_local(NULL); | |
70 | + flush_data_cache_local(NULL); | |
71 | 71 | } |
72 | 72 | EXPORT_SYMBOL(flush_cache_all_local); |
73 | 73 |
arch/parisc/kernel/smp.c
... | ... | @@ -39,7 +39,7 @@ |
39 | 39 | #include <asm/atomic.h> |
40 | 40 | #include <asm/current.h> |
41 | 41 | #include <asm/delay.h> |
42 | -#include <asm/pgalloc.h> /* for flush_tlb_all() proto/macro */ | |
42 | +#include <asm/tlbflush.h> | |
43 | 43 | |
44 | 44 | #include <asm/io.h> |
45 | 45 | #include <asm/irq.h> /* for CPU_IRQ_REGION and friends */ |
46 | 46 | |
... | ... | @@ -406,12 +406,10 @@ |
406 | 406 | * as we want to ensure all TLB's flushed before proceeding. |
407 | 407 | */ |
408 | 408 | |
409 | -extern void flush_tlb_all_local(void); | |
410 | - | |
411 | 409 | void |
412 | 410 | smp_flush_tlb_all(void) |
413 | 411 | { |
414 | - on_each_cpu((void (*)(void *))flush_tlb_all_local, NULL, 1, 1); | |
412 | + on_each_cpu(flush_tlb_all_local, NULL, 1, 1); | |
415 | 413 | } |
416 | 414 | |
417 | 415 | |
... | ... | @@ -487,7 +485,7 @@ |
487 | 485 | #endif |
488 | 486 | |
489 | 487 | flush_cache_all_local(); /* start with known state */ |
490 | - flush_tlb_all_local(); | |
488 | + flush_tlb_all_local(NULL); | |
491 | 489 | |
492 | 490 | local_irq_enable(); /* Interrupts have been off until now */ |
493 | 491 |
arch/parisc/mm/init.c
include/asm-parisc/cache.h
... | ... | @@ -29,14 +29,14 @@ |
29 | 29 | |
30 | 30 | #define SMP_CACHE_BYTES L1_CACHE_BYTES |
31 | 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 */ | |
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 | 34 | #ifdef CONFIG_SMP |
35 | 35 | extern void flush_data_cache(void); /* flushes data-cache only (all processors) */ |
36 | 36 | extern void flush_instruction_cache(void); /* flushes i-cache only (all processors) */ |
37 | 37 | #else |
38 | -#define flush_data_cache flush_data_cache_local | |
39 | -#define flush_instruction_cache flush_instruction_cache_local | |
38 | +#define flush_data_cache() flush_data_cache_local(NULL) | |
39 | +#define flush_instruction_cache() flush_instruction_cache_local(NULL) | |
40 | 40 | #endif |
41 | 41 | |
42 | 42 | extern void parisc_cache_init(void); /* initializes cache-flushing */ |