]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: hv: Use bytes 4 and 5 from instance ID as the PCI domain numbers
authorHaiyang Zhang <haiyangz@microsoft.com>
Thu, 15 Aug 2019 17:01:45 +0000 (17:01 +0000)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Tue, 10 Sep 2019 11:14:08 +0000 (12:14 +0100)
commit4e0f0591c11c4669ceb0168a19a061b2fb607052
treef592fefa590014df683cf9e2cac03a3da2c2986c
parent8663a6d8e23dd3920fa5c1c088386df81bf47ac1
PCI: hv: Use bytes 4 and 5 from instance ID as the PCI domain numbers

As recommended by Azure host team, the bytes 4, 5 have more uniqueness
(info entropy) than bytes 8, 9 so use them as the PCI domain numbers.

On older hosts, bytes 4, 5 can also be used -- no backward compatibility
issues are introduced and the chance of collision is greatly reduced.

In the rare cases of collision, the driver code detects and finds
another number that is not in use.

Suggested-by: Michael Kelley <mikelley@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Sasha Levin <sashal@kernel.org>
drivers/pci/controller/pci-hyperv.c