diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2012-09-20 18:08:28 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-09-26 22:51:06 -0400 |
commit | 8e166991c0c3631b8af5a26990df77fa2a1d09e6 (patch) | |
tree | e630b3c73da4d29eecea8f46fc62a1f306c1cbd8 /arch/powerpc | |
parent | 466921c5a4669f4315528a25f9afd66601ce2c04 (diff) |
powerpc: Remove tlb batching hack for nighthawk
In hpte_init_native() we call tlb_batching_enabled() to decide if we
should setup ppc_md.flush_hash_range.
tlb_batching_enabled() checks the _unflattened_ device tree, to see
if we are running on a nighthawk.
Since commit a223535 ("dont allow pSeries_probe to succeed without
initialising MMU", Dec 2006), hpte_init_native() has been called from
pSeries_probe() - at which point we have not yet unflattened the
device tree.
This means tlb_batching_enabled() will always return true, so the hack
has effectively been disabled since Dec 2006. Ergo, I think we can
drop it.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Acked-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/mm/hash_native_64.c | 26 |
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 */ | ||
574 | static 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 | ||
589 | static inline int tlb_batching_enabled(void) | ||
590 | { | ||
591 | return 1; | ||
592 | } | ||
593 | #endif | ||
594 | |||
595 | void __init hpte_init_native(void) | 572 | void __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 | } |