summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/pci_64.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2007-09-26 16:02:05 +0200
committerPaul Mackerras <paulus@samba.org>2007-10-03 03:48:44 +0200
commit3eb523b939d59fd90518188750c26df5d357478f (patch)
tree8cf71ddfd32f184b5686f118d1e4ea22a5ba3565 /arch/powerpc/kernel/pci_64.c
parent[POWERPC] Add CHECK_FULL_REGS in several places in ptrace code (diff)
downloadlinux-3eb523b939d59fd90518188750c26df5d357478f.tar.xz
linux-3eb523b939d59fd90518188750c26df5d357478f.zip
[POWERPC] Fix pci domain detection
The /proc/bus/pci/* files list PCI domain numbers only for devices that claim to be on a multi-domain system. The check for this is broken on powerpc, because the buid value is truncated to 32 bits. There is at least one machine (IBM QS21) that only uses the high-order bits of the buid, so the return value of pci_proc_domain() ends up being always zero, which makes /proc/bus/pci useless. Change the logic to always return '1' for a nonzero buid value. Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/pci_64.c')
-rw-r--r--arch/powerpc/kernel/pci_64.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index 291ffbc360c9..9f63bdcb0bdf 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -588,7 +588,7 @@ int pci_proc_domain(struct pci_bus *bus)
return 0;
else {
struct pci_controller *hose = pci_bus_to_host(bus);
- return hose->buid;
+ return hose->buid != 0;
}
}