summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/io.h
diff options
context:
space:
mode:
authorHaren Myneni <haren@us.ibm.com>2012-07-11 07:18:44 +0200
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-07-11 10:22:32 +0200
commite1612de9e4cdf375c3cf1c72434ab8abdcb3927e (patch)
treed2bf73a13ea6e92c9c79d4300294584ef82767c2 /arch/powerpc/include/asm/io.h
parentof: Improve prom_update_property() function (diff)
downloadlinux-e1612de9e4cdf375c3cf1c72434ab8abdcb3927e.tar.xz
linux-e1612de9e4cdf375c3cf1c72434ab8abdcb3927e.zip
powerpc: Disable /dev/port interface on systems without an ISA bridge
Some power systems do not have legacy ISA devices. So, /dev/port is not a valid interface on these systems. User level tools such as kbdrate is trying to access the device using this interface which is causing the system crash. This patch will fix this issue by not creating this interface on these powerpc systems. Signed-off-by: Haren Myneni <haren@us.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include/asm/io.h')
-rw-r--r--arch/powerpc/include/asm/io.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/io.h b/arch/powerpc/include/asm/io.h
index a3855b81eada..f94ef4213e9d 100644
--- a/arch/powerpc/include/asm/io.h
+++ b/arch/powerpc/include/asm/io.h
@@ -20,6 +20,14 @@ extern int check_legacy_ioport(unsigned long base_port);
#define _PNPWRP 0xa79
#define PNPBIOS_BASE 0xf000
+#if defined(CONFIG_PPC64) && defined(CONFIG_PCI)
+extern struct pci_dev *isa_bridge_pcidev;
+/*
+ * has legacy ISA devices ?
+ */
+#define arch_has_dev_port() (isa_bridge_pcidev != NULL)
+#endif
+
#include <linux/device.h>
#include <linux/io.h>