diff options
| author | Doug Gilbert <dgilbert@us.ibm.com> | 2017-03-10 17:06:58 -0600 |
|---|---|---|
| committer | Joshua Hunsberger <jahunsbe@us.ibm.com> | 2017-10-23 17:24:52 -0500 |
| commit | 6dfd244848fb4caf27172166d400085ac30136da (patch) | |
| tree | 2e0c9d6110f723d0ba0034c6fa2153fe27c2f9d6 | |
| parent | 97283ea19f1a3890067759b0c8317cc7e5f5a3d9 (diff) | |
| download | talos-hcode-6dfd244848fb4caf27172166d400085ac30136da.tar.gz talos-hcode-6dfd244848fb4caf27172166d400085ac30136da.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>
| -rw-r--r-- | import/chips/p9/procedures/ppe/pk/kernel/pk_api.h | 9 | ||||
| -rw-r--r-- | import/chips/p9/procedures/ppe/pk/ppe42/ppe42_core.c | 18 |
2 files changed, 18 insertions, 9 deletions
diff --git a/import/chips/p9/procedures/ppe/pk/kernel/pk_api.h b/import/chips/p9/procedures/ppe/pk/kernel/pk_api.h index 48405df7..a841cb8b 100644 --- a/import/chips/p9/procedures/ppe/pk/kernel/pk_api.h +++ b/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/import/chips/p9/procedures/ppe/pk/ppe42/ppe42_core.c b/import/chips/p9/procedures/ppe/pk/ppe42/ppe42_core.c index fb37c652..e7355257 100644 --- a/import/chips/p9/procedures/ppe/pk/ppe42/ppe42_core.c +++ b/import/chips/p9/procedures/ppe/pk/ppe42/ppe42_core.c @@ -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); - } } |

