lkml.org 
[lkml]   [2009]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/2] Intel-IOMMU, intr-remap: source-id checking
From
Date
On Wed, 2009-05-06 at 23:16 -0700, Han, Weidong wrote:
> @@ -634,6 +694,44 @@ static int ir_parse_ioapic_scope(struct acpi_dmar_header *header,
> " 0x%Lx\n", scope->enumeration_id,
> drhd->address);
>
> + bus = pci_find_bus(drhd->segment, scope->bus);
> + path = (struct acpi_dmar_pci_path *)(scope + 1);
> + count = (scope->length -
> + sizeof(struct acpi_dmar_device_scope))
> + / sizeof(struct acpi_dmar_pci_path);
> +
> + while (count) {
> + if (pdev)
> + pci_dev_put(pdev);
> +
> + if (!bus)
> + break;
> +
> + pdev = pci_get_slot(bus,
> + PCI_DEVFN(path->dev, path->fn));
> + if (!pdev)
> + break;

ir_parse_ioapic_scope() happens very early in the boot. So, I don't
think we can do the pci related discovery here.

thanks,
suresh

> +
> + path++;
> + count--;
> + bus = pdev->subordinate;
> + }
> +
> + if (pdev) { /* PCI discoverable IOAPIC*/
> + ir_ioapic[ir_ioapic_num].bus =
> + pdev->bus->number;
> + ir_ioapic[ir_ioapic_num].devfn = pdev->devfn;
> + } else { /* Not PCI discoverable IOAPIC */
> + if (!bus)
> + ir_ioapic[ir_ioapic_num].bus =
> + scope->bus;
> + else
> + ir_ioapic[ir_ioapic_num].bus =
> + bus->number;
> + ir_ioapic[ir_ioapic_num].devfn =
> + PCI_DEVFN(path->dev, path->fn);
> + }
> +
> ir_ioapic[ir_ioapic_num].iommu = iommu;
> ir_ioapic[ir_ioapic_num].id = scope->enumeration_id;
> ir_ioapic_num++;




\
 
 \ /
  Last update: 2009-05-07 20:23    [W:0.052 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site