aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2014-03-09 18:40:26 -0400
committerAnton Blanchard <anton@samba.org>2014-04-22 20:05:22 -0400
commit26f920605680b69e484a114b3dcb47ce11df9827 (patch)
treee7d54ff5b7b3e3dc6ca72f8c0eac123800b24ba1
parentc71b7eff426fa7d8fd33e0964a7f79a3b41faff9 (diff)
powerpc: Use ppc_function_entry instead of open coding it
Replace FUNCTION_TEXT with ppc_function_entry which can handle both ABIv1 and ABIv2. Signed-off-by: Anton Blanchard <anton@samba.org>
-rw-r--r--arch/powerpc/mm/hash_utils_64.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c
index d766d6ee33fe..49fc935ee807 100644
--- a/arch/powerpc/mm/hash_utils_64.c
+++ b/arch/powerpc/mm/hash_utils_64.c
@@ -603,8 +603,6 @@ int remove_section_mapping(unsigned long start, unsigned long end)
603} 603}
604#endif /* CONFIG_MEMORY_HOTPLUG */ 604#endif /* CONFIG_MEMORY_HOTPLUG */
605 605
606#define FUNCTION_TEXT(A) ((*(unsigned long *)(A)))
607
608static void __init htab_finish_init(void) 606static void __init htab_finish_init(void)
609{ 607{
610 extern unsigned int *htab_call_hpte_insert1; 608 extern unsigned int *htab_call_hpte_insert1;
@@ -619,31 +617,31 @@ static void __init htab_finish_init(void)
619 extern unsigned int *ht64_call_hpte_updatepp; 617 extern unsigned int *ht64_call_hpte_updatepp;
620 618
621 patch_branch(ht64_call_hpte_insert1, 619 patch_branch(ht64_call_hpte_insert1,
622 FUNCTION_TEXT(ppc_md.hpte_insert), 620 ppc_function_entry(ppc_md.hpte_insert),
623 BRANCH_SET_LINK); 621 BRANCH_SET_LINK);
624 patch_branch(ht64_call_hpte_insert2, 622 patch_branch(ht64_call_hpte_insert2,
625 FUNCTION_TEXT(ppc_md.hpte_insert), 623 ppc_function_entry(ppc_md.hpte_insert),
626 BRANCH_SET_LINK); 624 BRANCH_SET_LINK);
627 patch_branch(ht64_call_hpte_remove, 625 patch_branch(ht64_call_hpte_remove,
628 FUNCTION_TEXT(ppc_md.hpte_remove), 626 ppc_function_entry(ppc_md.hpte_remove),
629 BRANCH_SET_LINK); 627 BRANCH_SET_LINK);
630 patch_branch(ht64_call_hpte_updatepp, 628 patch_branch(ht64_call_hpte_updatepp,
631 FUNCTION_TEXT(ppc_md.hpte_updatepp), 629 ppc_function_entry(ppc_md.hpte_updatepp),
632 BRANCH_SET_LINK); 630 BRANCH_SET_LINK);
633 631
634#endif /* CONFIG_PPC_HAS_HASH_64K */ 632#endif /* CONFIG_PPC_HAS_HASH_64K */
635 633
636 patch_branch(htab_call_hpte_insert1, 634 patch_branch(htab_call_hpte_insert1,
637 FUNCTION_TEXT(ppc_md.hpte_insert), 635 ppc_function_entry(ppc_md.hpte_insert),
638 BRANCH_SET_LINK); 636 BRANCH_SET_LINK);
639 patch_branch(htab_call_hpte_insert2, 637 patch_branch(htab_call_hpte_insert2,
640 FUNCTION_TEXT(ppc_md.hpte_insert), 638 ppc_function_entry(ppc_md.hpte_insert),
641 BRANCH_SET_LINK); 639 BRANCH_SET_LINK);
642 patch_branch(htab_call_hpte_remove, 640 patch_branch(htab_call_hpte_remove,
643 FUNCTION_TEXT(ppc_md.hpte_remove), 641 ppc_function_entry(ppc_md.hpte_remove),
644 BRANCH_SET_LINK); 642 BRANCH_SET_LINK);
645 patch_branch(htab_call_hpte_updatepp, 643 patch_branch(htab_call_hpte_updatepp,
646 FUNCTION_TEXT(ppc_md.hpte_updatepp), 644 ppc_function_entry(ppc_md.hpte_updatepp),
647 BRANCH_SET_LINK); 645 BRANCH_SET_LINK);
648} 646}
649 647