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


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