diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2013-03-21 06:28:10 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2013-04-11 07:04:11 -0400 |
commit | 0bfbf6a256348b1543e638c7d7b2f3004b289fdb (patch) | |
tree | 2726d73cb4e301a6f4410b298eac90eedada0009 /arch/mips/mm | |
parent | 86a1708a9d5423f93e8f23d05d219ac6c6297b37 (diff) |
MIPS: Make declarations and definitions of tlbmiss_handler_setup_pgd match.
tlbmiss_handler_setup_pgd is run-time generated code and it was convenient
to pretend the symbol was an array in the generator but a function for
the users. LTO gcc won't tolerate this kind of lie anymore so solve the
problem through a cast and function pointer instead.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/mm')
-rw-r--r-- | arch/mips/mm/tlbex.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c index 820e6612d744..b71affde3e7b 100644 --- a/arch/mips/mm/tlbex.c +++ b/arch/mips/mm/tlbex.c | |||
@@ -1458,17 +1458,17 @@ u32 handle_tlbl[FASTPATH_SIZE] __cacheline_aligned; | |||
1458 | u32 handle_tlbs[FASTPATH_SIZE] __cacheline_aligned; | 1458 | u32 handle_tlbs[FASTPATH_SIZE] __cacheline_aligned; |
1459 | u32 handle_tlbm[FASTPATH_SIZE] __cacheline_aligned; | 1459 | u32 handle_tlbm[FASTPATH_SIZE] __cacheline_aligned; |
1460 | #ifdef CONFIG_MIPS_PGD_C0_CONTEXT | 1460 | #ifdef CONFIG_MIPS_PGD_C0_CONTEXT |
1461 | u32 tlbmiss_handler_setup_pgd[16] __cacheline_aligned; | 1461 | u32 tlbmiss_handler_setup_pgd_array[16] __cacheline_aligned; |
1462 | 1462 | ||
1463 | static void __cpuinit build_r4000_setup_pgd(void) | 1463 | static void __cpuinit build_r4000_setup_pgd(void) |
1464 | { | 1464 | { |
1465 | const int a0 = 4; | 1465 | const int a0 = 4; |
1466 | const int a1 = 5; | 1466 | const int a1 = 5; |
1467 | u32 *p = tlbmiss_handler_setup_pgd; | 1467 | u32 *p = tlbmiss_handler_setup_pgd_array; |
1468 | struct uasm_label *l = labels; | 1468 | struct uasm_label *l = labels; |
1469 | struct uasm_reloc *r = relocs; | 1469 | struct uasm_reloc *r = relocs; |
1470 | 1470 | ||
1471 | memset(tlbmiss_handler_setup_pgd, 0, sizeof(tlbmiss_handler_setup_pgd)); | 1471 | memset(tlbmiss_handler_setup_pgd_array, 0, sizeof(tlbmiss_handler_setup_pgd_array)); |
1472 | memset(labels, 0, sizeof(labels)); | 1472 | memset(labels, 0, sizeof(labels)); |
1473 | memset(relocs, 0, sizeof(relocs)); | 1473 | memset(relocs, 0, sizeof(relocs)); |
1474 | 1474 | ||
@@ -1496,15 +1496,15 @@ static void __cpuinit build_r4000_setup_pgd(void) | |||
1496 | uasm_i_jr(&p, 31); | 1496 | uasm_i_jr(&p, 31); |
1497 | UASM_i_MTC0(&p, a0, 31, pgd_reg); | 1497 | UASM_i_MTC0(&p, a0, 31, pgd_reg); |
1498 | } | 1498 | } |
1499 | if (p - tlbmiss_handler_setup_pgd > ARRAY_SIZE(tlbmiss_handler_setup_pgd)) | 1499 | if (p - tlbmiss_handler_setup_pgd_array > ARRAY_SIZE(tlbmiss_handler_setup_pgd_array)) |
1500 | panic("tlbmiss_handler_setup_pgd space exceeded"); | 1500 | panic("tlbmiss_handler_setup_pgd_array space exceeded"); |
1501 | uasm_resolve_relocs(relocs, labels); | 1501 | uasm_resolve_relocs(relocs, labels); |
1502 | pr_debug("Wrote tlbmiss_handler_setup_pgd (%u instructions).\n", | 1502 | pr_debug("Wrote tlbmiss_handler_setup_pgd_array (%u instructions).\n", |
1503 | (unsigned int)(p - tlbmiss_handler_setup_pgd)); | 1503 | (unsigned int)(p - tlbmiss_handler_setup_pgd_array)); |
1504 | 1504 | ||
1505 | dump_handler("tlbmiss_handler", | 1505 | dump_handler("tlbmiss_handler", |
1506 | tlbmiss_handler_setup_pgd, | 1506 | tlbmiss_handler_setup_pgd_array, |
1507 | ARRAY_SIZE(tlbmiss_handler_setup_pgd)); | 1507 | ARRAY_SIZE(tlbmiss_handler_setup_pgd_array)); |
1508 | } | 1508 | } |
1509 | #endif | 1509 | #endif |
1510 | 1510 | ||
@@ -2207,7 +2207,7 @@ void __cpuinit flush_tlb_handlers(void) | |||
2207 | local_flush_icache_range((unsigned long)handle_tlbm, | 2207 | local_flush_icache_range((unsigned long)handle_tlbm, |
2208 | (unsigned long)handle_tlbm + sizeof(handle_tlbm)); | 2208 | (unsigned long)handle_tlbm + sizeof(handle_tlbm)); |
2209 | #ifdef CONFIG_MIPS_PGD_C0_CONTEXT | 2209 | #ifdef CONFIG_MIPS_PGD_C0_CONTEXT |
2210 | local_flush_icache_range((unsigned long)tlbmiss_handler_setup_pgd, | 2210 | local_flush_icache_range((unsigned long)tlbmiss_handler_setup_pgd_array, |
2211 | (unsigned long)tlbmiss_handler_setup_pgd + sizeof(handle_tlbm)); | 2211 | (unsigned long)tlbmiss_handler_setup_pgd_array + sizeof(handle_tlbm)); |
2212 | #endif | 2212 | #endif |
2213 | } | 2213 | } |