summaryrefslogtreecommitdiffstats
path: root/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/p9_sgpe_stop_threads.c
diff options
context:
space:
mode:
authorYue Du <daviddu@us.ibm.com>2018-02-23 09:57:34 -0600
committerhostboot <hostboot@us.ibm.com>2018-03-22 14:06:14 -0500
commit5f054b32cffe00f2f0bb472c728128fad1c93779 (patch)
treee40c75674525c7fbed9769ad99c17b1548a0bd87 /import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/p9_sgpe_stop_threads.c
parent875f2ea07dad9bbcf881b8fcbc41a73fc174b4ca (diff)
downloadtalos-hcode-5f054b32cffe00f2f0bb472c728128fad1c93779.tar.gz
talos-hcode-5f054b32cffe00f2f0bb472c728128fad1c93779.zip
STOP: Support Suspend Entry/Exit and Fix Pig Collision
1) also cleanup todos in Stop Hcode 2) make STOP3 complete trans in SSH Key_Cronus_Test=PM_REGRESS Change-Id: I91f89d647f8285f1ac153a8ea389f3c314f18f86 Original-Change-Id: I28a146e15e455f09f8d8ff588e122d5ecf34110a CQ: SW416550 CQ: HW437955 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/54660 Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com> Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Cronus HW CI <cronushw-ci+hostboot@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: RAHUL BATRA <rbatra@us.ibm.com> Reviewed-by: Michael S. Floyd <mfloyd@us.ibm.com> Reviewed-by: Gregory S. Still <stillgs@us.ibm.com>
Diffstat (limited to 'import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/p9_sgpe_stop_threads.c')
-rw-r--r--import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/p9_sgpe_stop_threads.c62
1 files changed, 22 insertions, 40 deletions
diff --git a/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/p9_sgpe_stop_threads.c b/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/p9_sgpe_stop_threads.c
index b13c35cb..fc2f72b9 100644
--- a/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/p9_sgpe_stop_threads.c
+++ b/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/p9_sgpe_stop_threads.c
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HCODE Project */
/* */
-/* COPYRIGHT 2015,2017 */
+/* COPYRIGHT 2015,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -38,7 +38,7 @@ p9_sgpe_stop_exit_thread(void* arg)
// Thread goes to sleep
pk_semaphore_pend(&(G_sgpe_stop_record.sem[1]), PK_WAIT_FOREVER);
- G_sgpe_stop_record.wof.status_stop = STATUS_PROCESSING;
+ G_sgpe_stop_record.wof.status_stop |= STATUS_STOP_PROCESSING;
wrteei(1);
// The actual exit sequence
@@ -46,34 +46,25 @@ p9_sgpe_stop_exit_thread(void* arg)
if (!G_sgpe_stop_record.fit.entry_pending)
{
+ G_sgpe_stop_record.wof.status_stop &= ~STATUS_STOP_PROCESSING;
#if !SKIP_IPC
- if (G_sgpe_stop_record.wof.status_stop == STATUS_SUSPENDING)
+ if (G_sgpe_stop_record.wof.status_stop & STATUS_SUSPEND_PENDING)
{
p9_sgpe_stop_suspend_all_cmes();
}
- else if (G_sgpe_stop_record.wof.status_stop != STATUS_SUSPENDED)
- {
- G_sgpe_stop_record.wof.status_stop = STATUS_IDLE;
-#endif
-
- if (G_sgpe_stop_record.wof.update_pgpe &
- IPC_SGPE_PGPE_UPDATE_CTRL_ONGOING)
- {
- p9_sgpe_ack_pgpe_ctrl_stop_updates();
- }
-
- PK_TRACE_INF("Setup: Exit Done,no Entry Request.Enable Type2/3/5/6 Interrupt");
- g_oimr_override &= ~(BITS64(47, 2) | BITS64(50, 2));
- pk_irq_vec_restore(&ctx);
-#if !SKIP_IPC
+#endif
+ if (G_sgpe_stop_record.wof.update_pgpe & IPC_SGPE_PGPE_UPDATE_CTRL_ONGOING)
+ {
+ p9_sgpe_ack_pgpe_ctrl_stop_updates();
}
-#endif
-
+ PK_TRACE_INF("Setup: Exit Done,no Entry Request.Enable Type2/3/5/6 Interrupt");
+ g_oimr_override &= ~(BITS64(47, 2) | BITS64(50, 2));
+ pk_irq_vec_restore(&ctx);
}
}
}
@@ -90,40 +81,31 @@ p9_sgpe_stop_enter_thread(void* arg)
// Thread goes to sleep
pk_semaphore_pend(&(G_sgpe_stop_record.sem[0]), PK_WAIT_FOREVER);
- G_sgpe_stop_record.wof.status_stop = STATUS_PROCESSING;
+ G_sgpe_stop_record.wof.status_stop |= STATUS_STOP_PROCESSING;
wrteei(1);
// The actual entry sequence
p9_sgpe_stop_entry();
+ G_sgpe_stop_record.fit.entry_pending = 0;
+ G_sgpe_stop_record.wof.status_stop &= ~STATUS_STOP_PROCESSING;
+
#if !SKIP_IPC
- if (G_sgpe_stop_record.wof.status_stop == STATUS_SUSPENDING)
+ if (G_sgpe_stop_record.wof.status_stop & STATUS_SUSPEND_PENDING)
{
p9_sgpe_stop_suspend_all_cmes();
}
- else if (G_sgpe_stop_record.wof.status_stop != STATUS_SUSPENDED)
- {
- G_sgpe_stop_record.wof.status_stop = STATUS_IDLE;
#endif
- if (G_sgpe_stop_record.wof.update_pgpe &
- IPC_SGPE_PGPE_UPDATE_CTRL_ONGOING)
- {
- p9_sgpe_ack_pgpe_ctrl_stop_updates();
- }
-
- G_sgpe_stop_record.fit.entry_pending = 0;
- PK_TRACE_INF("Setup: Entry done. Enable Type2/3/5/6 Interrupt");
- g_oimr_override &= ~(BITS64(47, 2) | BITS64(50, 2));
- pk_irq_vec_restore(&ctx);
-
-#if !SKIP_IPC
-
+ if (G_sgpe_stop_record.wof.update_pgpe & IPC_SGPE_PGPE_UPDATE_CTRL_ONGOING)
+ {
+ p9_sgpe_ack_pgpe_ctrl_stop_updates();
}
-#endif
-
+ PK_TRACE_INF("Setup: Entry done. Enable Type2/3/5/6 Interrupt");
+ g_oimr_override &= ~(BITS64(47, 2) | BITS64(50, 2));
+ pk_irq_vec_restore(&ctx);
}
}
OpenPOWER on IntegriCloud