diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2022-05-20 12:33:24 +0200 |
---|---|---|
committer | Wolfram Sang <wsa@kernel.org> | 2022-05-21 08:36:53 +0200 |
commit | a0fb48c9bd7e99c1cad6a5d592c0686fbe0d1803 (patch) | |
tree | c410c92e597dd6e46b4717a567b1b3af2514f8a8 /tools/perf/scripts/python/stackcollapse.py | |
parent | 3c9fedf9903108430d36c20ed640069eef032f68 (diff) |
i2c: rcar: avoid race condition with SMIs
A customer experienced a race condition with 'repeated starts' when a
System Management Interrupt took over for 30us and more. The problem was
that during the SMI a new MAT interrupt came in because we set up the
'repeated start' condition. But the old one was not acknowledged yet.
So, when it was acknowledged after the SMI, the new MAT interrupt was
lost, confusing the state machine of the driver.
The fix consists of two parts. First, we do not clear the status
register for 'repeated starts' when preparing the next message anymore.
The interrupt handlers for sending and receiving data is now solely
responsible for that and it makes the code easier to follow, in fact.
Secondly, clearing the status register is now split up to handle MAT
interrupts independently. This avoids the race condition because the old
MAT interrupt will be now cleared before we initiate the "repeated
start" condition.
Reported-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions