summaryrefslogtreecommitdiffstats
path: root/src/occ_405/pgpe/pgpe_interface.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/occ_405/pgpe/pgpe_interface.c')
-rw-r--r--src/occ_405/pgpe/pgpe_interface.c38
1 files changed, 35 insertions, 3 deletions
diff --git a/src/occ_405/pgpe/pgpe_interface.c b/src/occ_405/pgpe/pgpe_interface.c
index 5674641..fad5bd6 100644
--- a/src/occ_405/pgpe/pgpe_interface.c
+++ b/src/occ_405/pgpe/pgpe_interface.c
@@ -45,6 +45,7 @@ extern pstateStatus G_proc_pstate_status;
extern PMCR_OWNER G_proc_pmcr_owner;
extern uint16_t G_proc_fmax_mhz;
+extern uint32_t G_present_cores;
extern bool G_simics_environment;
@@ -649,7 +650,7 @@ int pgpe_clip_update(void)
}
// Schedule PGPE clip update IPC task
- schedule_rc = gpe_request_schedule(&G_clip_update_req);
+ schedule_rc = pgpe_request_schedule(&G_clip_update_req);
}
else
{
@@ -817,8 +818,9 @@ int pgpe_start_suspend(uint8_t action, PMCR_OWNER owner)
{
TRAC_IMP("pgpe_start_suspend: scheduling disable of pstates (owner=0x%02X)", owner);
}
+
// Schedule PGPE start_suspend task
- schedule_rc = gpe_request_schedule(&G_start_suspend_req);
+ schedule_rc = pgpe_request_schedule(&G_start_suspend_req);
}
// couldn't schedule the IPC task?
@@ -932,7 +934,7 @@ int pgpe_pmcr_set(void)
if (!G_simics_environment)
{
// Schedule PGPE PMCR update IPC task
- schedule_rc = gpe_request_schedule(&G_pmcr_set_req);
+ schedule_rc = pgpe_request_schedule(&G_pmcr_set_req);
}
// Confirm Successfull completion of PGPE PMCR update task
@@ -1074,3 +1076,33 @@ int set_nominal_pstate(void)
return l_rc;
}
+
+// Function Specification
+//
+// Name: pgpe_request_schedule
+//
+// Description: Wrapper function that takes care of any overhead associated
+// with scheduling a GpeRequest to the PGPE
+//
+// End Function Specification
+int pgpe_request_schedule(GpeRequest* request)
+{
+ int rc = 0;
+ static uint8_t L_traceCount = 10;
+ // Before sending any IPC task to the PGPE, make sure there are cores
+ // configured
+ if( G_present_cores != 0 )
+ {
+ rc = gpe_request_schedule(request);
+ }
+ else
+ {
+ if( L_traceCount )
+ {
+ // If we skip the IPC task, just send successful return code
+ TRAC_INFO("No Configured Cores. Skipping PGPE-bound IPC tasks");
+ L_traceCount--;
+ }
+ }
+ return rc;
+}
OpenPOWER on IntegriCloud