|
@@ -722,6 +722,11 @@ struct dev_pm_ops pcibios_pm_ops = {
|
|
|
|
|
|
static int zpci_alloc_domain(struct zpci_dev *zdev)
|
|
|
{
|
|
|
+ if (zpci_unique_uid) {
|
|
|
+ zdev->domain = (u16) zdev->uid;
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+
|
|
|
spin_lock(&zpci_domain_lock);
|
|
|
zdev->domain = find_first_zero_bit(zpci_domain, ZPCI_NR_DEVICES);
|
|
|
if (zdev->domain == ZPCI_NR_DEVICES) {
|
|
@@ -735,6 +740,9 @@ static int zpci_alloc_domain(struct zpci_dev *zdev)
|
|
|
|
|
|
static void zpci_free_domain(struct zpci_dev *zdev)
|
|
|
{
|
|
|
+ if (zpci_unique_uid)
|
|
|
+ return;
|
|
|
+
|
|
|
spin_lock(&zpci_domain_lock);
|
|
|
clear_bit(zdev->domain, zpci_domain);
|
|
|
spin_unlock(&zpci_domain_lock);
|