lkml.org 
[lkml]   [2015]   [May]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectA question about state machine function state_next()
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


\
 
 \ /
  Last update: 2015-06-01 05:41    [W:1.094 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site