aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/mm/hash_native_64.c26
1 files changed, 1 insertions, 25 deletions
diff --git a/arch/powerpc/mm/hash_native_64.c b/arch/powerpc/mm/hash_native_64.c
index a4a1c728f269..ffc1e00f7a22 100644
--- a/arch/powerpc/mm/hash_native_64.c
+++ b/arch/powerpc/mm/hash_native_64.c
@@ -569,29 +569,6 @@ static void native_flush_hash_range(unsigned long number, int local)
569 local_irq_restore(flags); 569 local_irq_restore(flags);
570} 570}
571 571
572#ifdef CONFIG_PPC_PSERIES
573/* Disable TLB batching on nighthawk */
574static inline int tlb_batching_enabled(void)
575{
576 struct device_node *root = of_find_node_by_path("/");
577 int enabled = 1;
578
579 if (root) {
580 const char *model = of_get_property(root, "model", NULL);
581 if (model && !strcmp(model, "IBM,9076-N81"))
582 enabled = 0;
583 of_node_put(root);
584 }
585
586 return enabled;
587}
588#else
589static inline int tlb_batching_enabled(void)
590{
591 return 1;
592}
593#endif
594
595void __init hpte_init_native(void) 572void __init hpte_init_native(void)
596{ 573{
597 ppc_md.hpte_invalidate = native_hpte_invalidate; 574 ppc_md.hpte_invalidate = native_hpte_invalidate;
@@ -600,6 +577,5 @@ void __init hpte_init_native(void)
600 ppc_md.hpte_insert = native_hpte_insert; 577 ppc_md.hpte_insert = native_hpte_insert;
601 ppc_md.hpte_remove = native_hpte_remove; 578 ppc_md.hpte_remove = native_hpte_remove;
602 ppc_md.hpte_clear_all = native_hpte_clear; 579 ppc_md.hpte_clear_all = native_hpte_clear;
603 if (tlb_batching_enabled()) 580 ppc_md.flush_hash_range = native_flush_hash_range;
604 ppc_md.flush_hash_range = native_flush_hash_range;
605} 581}