Re: [PATCH] iommu: parse pci device scope even only intr remap is defined

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 21, 2011 at 1:56 AM, Ingo Molnar <mingo@xxxxxxx> wrote:
>

>>
>> +#ifndef CONFIG_DMAR
>> +/* When intr remapping is used but dmar remapping is not defined */
>> +int __init intel_iommu_init(void)
>> +{
>> +     if (dmar_table_init())
>> +             return  -ENODEV;
>> +
>> +     return dmar_dev_scope_init();
>> +}
>> +#endif
>
> So INTR_REMAP functionality really depends on dmar_table_init()?

it will need DMAR table and need to parse ioapic and pci device scope in them

and dev scope is needed to done later because it will put pci dev
pointer into drhd dev list.

>
> This looks very messy.
>
> CONFIG_DMAR has no clear meaning. The DMAR table parsing
> functionality is intermixed with the DMAR feature itself. The kernel
> code is littered with a couple of dozen CONFIG_DMAR #ifdefs with no
> clear structure to the initialization and to the separation of
> functionality.

CONFIG_DMAR is actually DMA_REMAP instead DMAR table.

or Do you prefer to clean them up further with following depency?

CONFIG_DMAR_TBL for DMAR table
CONFIG_DMA_REMAP for DMA remapping
CONFIG_INTR_REMAP for Interrupt remapping
and XXX_REMAP will select DMAR_TBL

Thanks

Yinghai
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux