lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 06 Oct 2015 13:58:43 -0700
From:	David Daney <ddaney.cavm@...il.com>
To:	"Sean O. Stalley" <sean.stalley@...el.com>
CC:	linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org,
	Bjorn Helgaas <bhelgaas@...gle.com>,
	"Michael S. Tsirkin" <mst@...hat.com>,
	Rafał Miłecki <zajec5@...il.com>,
	linux-api@...r.kernel.org, yinghai@...nel.org,
	rajatxjain@...il.com, gong.chen@...ux.intel.com,
	David Daney <david.daney@...ium.com>
Subject: Re: [PATCH v4 3/5] PCI: Handle IORESOURCE_PCI_FIXED when sizing and
 assigning resources.

On 10/05/2015 03:23 PM, Sean O. Stalley wrote:
> On Fri, Oct 02, 2015 at 03:37:54PM -0700, David Daney wrote:
>
> ...
>
>> +/*
>> + * Try to assign any resources marked as IORESOURCE_PCI_FIXED, as they
>> + * are skipped by pbus_assign_resources_sorted().
>> + */
>> +static void pdev_assign_fixed_resources(struct pci_dev *dev)
>> +{
>> +	int i;
>> +
>> +	for (i = 0; i <  PCI_NUM_RESOURCES; i++) {
>> +		struct pci_bus *b;
>> +		struct resource *r = &dev->resource[i];
>> +
>> +		if (r->parent || !(r->flags & IORESOURCE_PCI_FIXED) ||
>> +		    !(r->flags & (IORESOURCE_IO | IORESOURCE_MEM)))
>> +			continue;
>> +
>> +		b = dev->bus;
>> +		while (b && !r->parent) {
>> +			assign_fixed_resource_on_bus(b, r);
>> +			b = b->parent;
>> +		}
>> +		if (!r->parent) {
>> +			/*
>> +			 * If that didn't work, try to fallback to the
>> +			 * ultimate parent.
>> +			 */
>> +			if (r->flags &  IORESOURCE_IO)
>> +				request_resource(&ioport_resource, r);
>> +			else
>> +				request_resource(&iomem_resource, r);
>> +		}
>
> I don't think this check is necessary.
> assign_fixed_resource_on_bus() should find these resources when it reaches the top bus.
> (since since the root bus contains these resources).

You are correct.  It does work fine without that last fallback bit.  I 
will remove that, and re-send the patches.

Thanks,
David Daney



>
>> +	}
>> +}
>
> -Sean
>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists