All of lore.kernel.org
 help / color / mirror / Atom feed
From: yangyingliang@huawei.com (Yang Yingliang)
To: linux-arm-kernel@lists.infradead.org
Subject: Does the driver need check the GICD_ACTIVE or GICD_PENDING state before SPI affinity changing
Date: Wed, 11 Jul 2018 17:15:07 +0800	[thread overview]
Message-ID: <5B45CA9B.8020602@huawei.com> (raw)

Hi Marc,

The following case :

            cpu0           cpu1                          cpu2
           read iar
                           set affinity to cpu2
            dsb(sy)                                       read iar

cpu0 is interrupted by a edge-SPI. After cpu0 getting INTID,
cpu1 set SPI's affinity to another cpu(like cpu2), if the effects
of reading ICC_IAR1_EL1 on the state of a returned INTID are
not seeing by GIC, the SPI's state is still pending and the state
will be migrated to cpu2, so cpu2 can also read the INTID from
ICC_IAR1_EL1. It makes the SPI be handled twice.

Does the driver need check the GICD_ACTIVE or GICD_PENDING
state before SPI affinity changing or should hardware guarantee
this case can't happen ?

Does GIC SPEC have describe the affinity chaning flow ?


Thanks,
Yang

             reply	other threads:[~2018-07-11  9:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-11  9:15 Yang Yingliang [this message]
2018-07-11 12:20 ` Does the driver need check the GICD_ACTIVE or GICD_PENDING state before SPI affinity changing Marc Zyngier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5B45CA9B.8020602@huawei.com \
    --to=yangyingliang@huawei.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.