From: Baoquan He <bhe@redhat.com>
To: Joerg Roedel <joro@8bytes.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: A question about state machine function state_next()
Date: Mon, 1 Jun 2015 22:01:51 +0800 [thread overview]
Message-ID: <20150601140151.GA2484@dhcp-17-102.nay.redhat.com> (raw)
In-Reply-To: <20150601120103.GF20384@8bytes.org>
On 06/01/15 at 02:01pm, Joerg Roedel wrote:
> On Mon, Jun 01, 2015 at 07:18:02PM +0800, Baoquan He wrote:
> > Checked the code again, it may be a code bug if this is done in
> > device_dma_ops_init(). Since this is called in
> > amd_iommu_init_dma_ops()<-amd_iommu_init_dma(). And amd_iommu_init_dma()
> > is only called in case IOMMU_INTERRUPTS_EN code block. According to the
> > code flow if I understand correctly, it can't be here at boot stage.
> > state_next() will change the state according to the calling times. And
> > in amd iommu only four times to call iommu_go_to_state, it can't go to
> > IOMMU_PCI_INIT and the after cases.
> >
> > I am not sure if my understanding is correct, or I missed something.
>
> You probably missed the loop in iommu_go_to_state() which will call
> state_next() until it reaches either the requested state or an error
> state.
Ah, right. IOMMU_INITIALIZED can cover all left cases until
IOMMU_ENABLED. Many thanks.
Thanks
Baoquan
prev parent reply other threads:[~2015-06-01 14:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-01 3:09 A question about state machine function state_next() Baoquan He
2015-06-01 6:42 ` Joerg Roedel
2015-06-01 9:09 ` Baoquan He
2015-06-01 9:21 ` Joerg Roedel
2015-06-01 10:19 ` Baoquan He
2015-06-01 10:33 ` Joerg Roedel
2015-06-01 11:11 ` Baoquan He
2015-06-01 11:18 ` Baoquan He
2015-06-01 12:01 ` Joerg Roedel
2015-06-01 14:01 ` Baoquan He [this message]
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=20150601140151.GA2484@dhcp-17-102.nay.redhat.com \
--to=bhe@redhat.com \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).