diff options
author | Doug Gilbert <dgilbert@us.ibm.com> | 2017-03-10 17:06:58 -0600 |
---|---|---|
committer | Sachin Gupta <sgupta2m@in.ibm.com> | 2017-04-18 11:00:48 -0400 |
commit | a09a753ff329d1a715ae00a68f1a5cd75333cb7a (patch) | |
tree | 8935a0443fe88e375f76f57d77dba508e92242dd /src | |
parent | 3642fee680eecafd93144c740524ef77d8056223 (diff) | |
download | talos-sbe-a09a753ff329d1a715ae00a68f1a5cd75333cb7a.tar.gz talos-sbe-a09a753ff329d1a715ae00a68f1a5cd75333cb7a.zip |
PK DEC timer interrupts too close together
Change-Id: If62e99e8977fda7211df4e56b78f0d64d2d13217
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/37820
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com>
Reviewed-by: RAHUL BATRA <rbatra@us.ibm.com>
Reviewed-by: YUE DU <daviddu@us.ibm.com>
Reviewed-by: Gregory S. Still <stillgs@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/37822
Reviewed-by: Hostboot Team <hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/import/chips/p9/procedures/ppe/pk/kernel/pk_api.h | 9 | ||||
-rw-r--r-- | src/import/chips/p9/procedures/ppe/pk/ppe42/ppe42_core.c | 20 |
2 files changed, 19 insertions, 10 deletions
diff --git a/src/import/chips/p9/procedures/ppe/pk/kernel/pk_api.h b/src/import/chips/p9/procedures/ppe/pk/kernel/pk_api.h index fb0ff6a7..4680f612 100644 --- a/src/import/chips/p9/procedures/ppe/pk/kernel/pk_api.h +++ b/src/import/chips/p9/procedures/ppe/pk/kernel/pk_api.h @@ -234,6 +234,10 @@ #define PK_TIMEBASE_MAX ((PkTimebase)-1) +/// The minimum count the DEC counter can have so as to not overrun PK +/// with DEC interrupts. +#define PK_DEC_MIN 32 + /// A special value that specifies that the timebase will not be reset during /// pk_init(). @@ -955,7 +959,10 @@ extern PkDeque _pk_bh_queue; static inline void pk_bh_schedule(PkBottomHalf* bottom_half) { - pk_deque_push_back(&_pk_bh_queue, (PkDeque*)bottom_half); + if(!pk_deque_is_queued((PkDeque*)bottom_half)) + { + pk_deque_push_back(&_pk_bh_queue, (PkDeque*)bottom_half); + } } #define PK_BH_INIT(_handler, _arg) \ diff --git a/src/import/chips/p9/procedures/ppe/pk/ppe42/ppe42_core.c b/src/import/chips/p9/procedures/ppe/pk/ppe42/ppe42_core.c index 7b6604b1..68336731 100644 --- a/src/import/chips/p9/procedures/ppe/pk/ppe42/ppe42_core.c +++ b/src/import/chips/p9/procedures/ppe/pk/ppe42/ppe42_core.c @@ -5,7 +5,7 @@ /* */ /* OpenPOWER sbe Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2016 */ +/* Contributors Listed Below - COPYRIGHT 2015,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -114,17 +114,15 @@ __pk_schedule_hardware_timeout(PkTimebase timeout) PkTimebase diff; uint32_t new_dec; + now = pk_timebase_get(); + //update the 64bit accumulator with the current + ppe42_64bit_timebase = now; + if (timeout != PK_TIMEBASE_MAX) { - - now = pk_timebase_get(); - - //update our 64bit accumulator with the current snapshot - ppe42_64bit_timebase = now; - if (timeout <= now) { - new_dec = 1; + new_dec = PK_DEC_MIN; } else { @@ -137,11 +135,15 @@ __pk_schedule_hardware_timeout(PkTimebase timeout) else { new_dec = diff; + + if(new_dec < PK_DEC_MIN) + { + new_dec = PK_DEC_MIN; + } } } mtspr(SPRN_DEC, new_dec); - } } |