powerpc/rfi-flush: Call setup_rfi_flush() after LPM migration
authorMichael Ellerman <mpe@ellerman.id.au>
Sat, 2 Jun 2018 11:08:53 +0000 (21:08 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 Jun 2018 14:44:36 +0000 (16:44 +0200)
commit 921bc6cf807ceb2ab8005319cf39f33494d6b100 upstream.

We might have migrated to a machine that uses a different flush type,
or doesn't need flushing at all.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Mauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/platforms/pseries/mobility.c
arch/powerpc/platforms/pseries/pseries.h
arch/powerpc/platforms/pseries/setup.c

index 6a5e746..3784a7a 100644 (file)
@@ -314,6 +314,9 @@ void post_mobility_fixup(void)
                printk(KERN_ERR "Post-mobility device tree update "
                        "failed: %d\n", rc);
 
+       /* Possibly switch to a new RFI flush type */
+       pseries_setup_rfi_flush();
+
        return;
 }
 
index b1be7b7..62ff57c 100644 (file)
@@ -79,4 +79,6 @@ extern struct pci_controller_ops pseries_pci_controller_ops;
 
 unsigned long pseries_memory_block_size(void);
 
+void pseries_setup_rfi_flush(void);
+
 #endif /* _PSERIES_PSERIES_H */
index 626bf1c..483aa7a 100644 (file)
@@ -450,7 +450,7 @@ static void __init find_and_init_phbs(void)
        of_pci_check_probe_only();
 }
 
-static void pseries_setup_rfi_flush(void)
+void pseries_setup_rfi_flush(void)
 {
        struct h_cpu_char_result result;
        enum l1d_flush_type types;