diff mbox series

[1/2] hw/imc: move imc_init() towards end main_cpu_entry()

Message ID 20200929115713.1082952-1-maddy@linux.ibm.com
State Accepted
Headers show
Series [1/2] hw/imc: move imc_init() towards end main_cpu_entry() | expand

Commit Message

Madhavan Srinivasan Sept. 29, 2020, 11:57 a.m. UTC
imc_init() checks for the 24x7 microcode state at boot to
check whether the microcode is in proper state (running or paused).
But in a larger system, loading of 24x7 microcode by OCC gets delayed.
Because of this, imc_init() removes imc devices from the device tree.

Moving imc_init() function towards end of the main_cpu_entry()
works around this.

Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
---
 core/init.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Vasant Hegde Oct. 22, 2020, 11:31 a.m. UTC | #1
On 9/29/20 5:27 PM, Madhavan Srinivasan wrote:
> imc_init() checks for the 24x7 microcode state at boot to
> check whether the microcode is in proper state (running or paused).
> But in a larger system, loading of 24x7 microcode by OCC gets delayed.

Does this mean we are hitting on witherspoon/zz class system -OR- only in large 
system?

> Because of this, imc_init() removes imc devices from the device tree.
> 
> Moving imc_init() function towards end of the main_cpu_entry()
> works around this.

I see that you have marked this patch for stable. Can you tell me in which 
branch you want this fix and why?

-Vasant


> 
> Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
> ---
>   core/init.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/core/init.c b/core/init.c
> index 1289805f..da003e21 100644
> --- a/core/init.c
> +++ b/core/init.c
> @@ -1322,9 +1322,6 @@ void __noreturn __nomcount main_cpu_entry(const void *fdt)
>   	/* NX init */
>   	nx_init();
> 
> -	/* Init In-Memory Collection related stuff (load the IMC dtb into memory) */
> -	imc_init();
> -
>   	/* Probe PHB3 on P8 */
>   	probe_phb3();
> 
> @@ -1366,6 +1363,9 @@ void __noreturn __nomcount main_cpu_entry(const void *fdt)
>   	/* Add the list of interrupts going to OPAL */
>   	add_opal_interrupts();
> 
> +	/* Init In-Memory Collection related stuff (load the IMC dtb into memory) */
> +	imc_init();
> +
>   	/* Disable protected execution facility in BML */
>   	cpu_disable_pef();
>
Vasant Hegde May 13, 2021, 1:48 p.m. UTC | #2
On 9/29/20 5:27 PM, Madhavan Srinivasan wrote:
> imc_init() checks for the 24x7 microcode state at boot to
> check whether the microcode is in proper state (running or paused).
> But in a larger system, loading of 24x7 microcode by OCC gets delayed.
> Because of this, imc_init() removes imc devices from the device tree.
> 
> Moving imc_init() function towards end of the main_cpu_entry()
> works around this.
> 
> Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>

Thanks! Merged this series to master as of  d505f403.

-Vasant
diff mbox series

Patch

diff --git a/core/init.c b/core/init.c
index 1289805f..da003e21 100644
--- a/core/init.c
+++ b/core/init.c
@@ -1322,9 +1322,6 @@  void __noreturn __nomcount main_cpu_entry(const void *fdt)
 	/* NX init */
 	nx_init();
 
-	/* Init In-Memory Collection related stuff (load the IMC dtb into memory) */
-	imc_init();
-
 	/* Probe PHB3 on P8 */
 	probe_phb3();
 
@@ -1366,6 +1363,9 @@  void __noreturn __nomcount main_cpu_entry(const void *fdt)
 	/* Add the list of interrupts going to OPAL */
 	add_opal_interrupts();
 
+	/* Init In-Memory Collection related stuff (load the IMC dtb into memory) */
+	imc_init();
+
 	/* Disable protected execution facility in BML */
 	cpu_disable_pef();