Skip to contentSkip to conversation

ppc64: PCI ignores empty phb regions

PATCH New Benjamin Herrenschmidt 1 participant 1 message Oct 26, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ppc64: PCI ignores empty phb regions

Hi !

The ppc64 PCI code, when parsing the OF tree, may end up getting empty regions in addition to the "normal" ones for the PHB (some pSeries OF device-tree contains weird "ranges" properties). These are harmless but do trigger some annoying warnings during boot, so let's ignore them.

arch/ppc64/kernel/pci.c +2 -0
Index: linux-work/arch/ppc64/kernel/pci.c
===================================================================
@@ -654,6 +654,8 @@
 			cpu_phys_addr = cpu_phys_addr << 32 | ranges[4];
 
 		size = (unsigned long)ranges[na+3] << 32 | ranges[na+4];
+		if (size == 0)
+			continue;
 		switch ((ranges[0] >> 24) & 0x3) {
 		case 1:		/* I/O space */
 			hose->io_base_phys = cpu_phys_addr;