Skip to content

Commit db9947c

Browse files
committed
MIPS: mm: Remove unused *cache_page_indexed flush functions
The *cache_page_indexed flush functions are no (longer) used. Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
1 parent de34007 commit db9947c

File tree

1 file changed

+0
-100
lines changed

1 file changed

+0
-100
lines changed

arch/mips/mm/c-r4k.c

Lines changed: 0 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -187,24 +187,6 @@ static void r4k_blast_dcache_user_page_setup(void)
187187

188188
#endif
189189

190-
static void (* r4k_blast_dcache_page_indexed)(unsigned long addr);
191-
192-
static void r4k_blast_dcache_page_indexed_setup(void)
193-
{
194-
unsigned long dc_lsize = cpu_dcache_line_size();
195-
196-
if (dc_lsize == 0)
197-
r4k_blast_dcache_page_indexed = (void *)cache_noop;
198-
else if (dc_lsize == 16)
199-
r4k_blast_dcache_page_indexed = blast_dcache16_page_indexed;
200-
else if (dc_lsize == 32)
201-
r4k_blast_dcache_page_indexed = blast_dcache32_page_indexed;
202-
else if (dc_lsize == 64)
203-
r4k_blast_dcache_page_indexed = blast_dcache64_page_indexed;
204-
else if (dc_lsize == 128)
205-
r4k_blast_dcache_page_indexed = blast_dcache128_page_indexed;
206-
}
207-
208190
void (* r4k_blast_dcache)(void);
209191
EXPORT_SYMBOL(r4k_blast_dcache);
210192

@@ -266,39 +248,6 @@ static inline void tx49_blast_icache32(void)
266248
addr | ws, 32);
267249
}
268250

269-
static inline void blast_icache32_r4600_v1_page_indexed(unsigned long page)
270-
{
271-
unsigned long flags;
272-
273-
local_irq_save(flags);
274-
blast_icache32_page_indexed(page);
275-
local_irq_restore(flags);
276-
}
277-
278-
static inline void tx49_blast_icache32_page_indexed(unsigned long page)
279-
{
280-
unsigned long indexmask = current_cpu_data.icache.waysize - 1;
281-
unsigned long start = INDEX_BASE + (page & indexmask);
282-
unsigned long end = start + PAGE_SIZE;
283-
unsigned long ws_inc = 1UL << current_cpu_data.icache.waybit;
284-
unsigned long ws_end = current_cpu_data.icache.ways <<
285-
current_cpu_data.icache.waybit;
286-
unsigned long ws, addr;
287-
288-
CACHE32_UNROLL32_ALIGN2;
289-
/* I'm in even chunk. blast odd chunks */
290-
for (ws = 0; ws < ws_end; ws += ws_inc)
291-
for (addr = start + 0x400; addr < end; addr += 0x400 * 2)
292-
cache_unroll(32, kernel_cache, Index_Invalidate_I,
293-
addr | ws, 32);
294-
CACHE32_UNROLL32_ALIGN;
295-
/* I'm in odd chunk. blast even chunks */
296-
for (ws = 0; ws < ws_end; ws += ws_inc)
297-
for (addr = start; addr < end; addr += 0x400 * 2)
298-
cache_unroll(32, kernel_cache, Index_Invalidate_I,
299-
addr | ws, 32);
300-
}
301-
302251
static void (* r4k_blast_icache_page)(unsigned long addr);
303252

304253
static void r4k_blast_icache_page_setup(void)
@@ -341,34 +290,6 @@ static void r4k_blast_icache_user_page_setup(void)
341290

342291
#endif
343292

344-
static void (* r4k_blast_icache_page_indexed)(unsigned long addr);
345-
346-
static void r4k_blast_icache_page_indexed_setup(void)
347-
{
348-
unsigned long ic_lsize = cpu_icache_line_size();
349-
350-
if (ic_lsize == 0)
351-
r4k_blast_icache_page_indexed = (void *)cache_noop;
352-
else if (ic_lsize == 16)
353-
r4k_blast_icache_page_indexed = blast_icache16_page_indexed;
354-
else if (ic_lsize == 32) {
355-
if (IS_ENABLED(CONFIG_WAR_R4600_V1_INDEX_ICACHEOP) &&
356-
cpu_is_r4600_v1_x())
357-
r4k_blast_icache_page_indexed =
358-
blast_icache32_r4600_v1_page_indexed;
359-
else if (IS_ENABLED(CONFIG_WAR_TX49XX_ICACHE_INDEX_INV))
360-
r4k_blast_icache_page_indexed =
361-
tx49_blast_icache32_page_indexed;
362-
else if (current_cpu_type() == CPU_LOONGSON2EF)
363-
r4k_blast_icache_page_indexed =
364-
loongson2_blast_icache32_page_indexed;
365-
else
366-
r4k_blast_icache_page_indexed =
367-
blast_icache32_page_indexed;
368-
} else if (ic_lsize == 64)
369-
r4k_blast_icache_page_indexed = blast_icache64_page_indexed;
370-
}
371-
372293
void (* r4k_blast_icache)(void);
373294
EXPORT_SYMBOL(r4k_blast_icache);
374295

@@ -414,24 +335,6 @@ static void r4k_blast_scache_page_setup(void)
414335
r4k_blast_scache_page = blast_scache128_page;
415336
}
416337

417-
static void (* r4k_blast_scache_page_indexed)(unsigned long addr);
418-
419-
static void r4k_blast_scache_page_indexed_setup(void)
420-
{
421-
unsigned long sc_lsize = cpu_scache_line_size();
422-
423-
if (scache_size == 0)
424-
r4k_blast_scache_page_indexed = (void *)cache_noop;
425-
else if (sc_lsize == 16)
426-
r4k_blast_scache_page_indexed = blast_scache16_page_indexed;
427-
else if (sc_lsize == 32)
428-
r4k_blast_scache_page_indexed = blast_scache32_page_indexed;
429-
else if (sc_lsize == 64)
430-
r4k_blast_scache_page_indexed = blast_scache64_page_indexed;
431-
else if (sc_lsize == 128)
432-
r4k_blast_scache_page_indexed = blast_scache128_page_indexed;
433-
}
434-
435338
static void (* r4k_blast_scache)(void);
436339

437340
static void r4k_blast_scache_setup(void)
@@ -1807,13 +1710,10 @@ void r4k_cache_init(void)
18071710
setup_scache();
18081711

18091712
r4k_blast_dcache_page_setup();
1810-
r4k_blast_dcache_page_indexed_setup();
18111713
r4k_blast_dcache_setup();
18121714
r4k_blast_icache_page_setup();
1813-
r4k_blast_icache_page_indexed_setup();
18141715
r4k_blast_icache_setup();
18151716
r4k_blast_scache_page_setup();
1816-
r4k_blast_scache_page_indexed_setup();
18171717
r4k_blast_scache_setup();
18181718
r4k_blast_scache_node_setup();
18191719
#ifdef CONFIG_EVA

0 commit comments

Comments
 (0)