From: Baoquan He <bhe@redhat.com>
To: Joerg Roedel <joro@8bytes.org>
Cc: linux-kernel@vger.kernel.org
Subject: A question about state machine function state_next()
Date: Mon, 1 Jun 2015 11:09:40 +0800 [thread overview]
Message-ID: <20150601030940.GK6353@dhcp-128-28.nay.redhat.com> (raw)
Hi Joerg,
I am reading amd iommu code because I have some knowledge about intel
iommu since review Zhenhua's fixing kdump error patches. Now there's
a question I didn't find answer.
In amd iommu state_next() is the state machine running function. However
I only found 4 function to call iommu_go_to_state() to change the state,
they are:
amd_iommu_detect()
amd_iommu_prepare()
amd_iommu_enable()
amd_iommu_init()
And they are called according to above sequence. It means only below 4
cases are checked and the code blocks are executed. Then where to call
amd_iommu_enable_interrupts() and amd_iommu_init_dma(). Could you help
to tell what I missed?
static int __init state_next(void)
{
int ret = 0;
switch (init_state) {
case IOMMU_START_STATE: //checked and execute
case IOMMU_IVRS_DETECTED: //checked and execute
case IOMMU_ACPI_FINISHED: //checked and execute
case IOMMU_ENABLED: //checked and execute
...
}
Thanks
Baoquan
next reply other threads:[~2015-06-01 3:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-01 3:09 Baoquan He [this message]
2015-06-01 6:42 ` A question about state machine function state_next() 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
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=20150601030940.GK6353@dhcp-128-28.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 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.