From caf81329c39b5c48f6cc0d78fa159b5a587e37f9 Mon Sep 17 00:00:00 2001 From: Stephen Rothwell Date: Thu, 21 Sep 2006 18:00:00 +1000 Subject: [POWERPC] Merge iSeries i/o operations with the rest This patch changes the io operations so that they are out of line if CONFIG_PPC_ISERIES is set and includes a firmware feature check in that case. Signed-off-by: Stephen Rothwell Signed-off-by: Paul Mackerras --- arch/powerpc/kernel/io.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'arch/powerpc/kernel/io.c') diff --git a/arch/powerpc/kernel/io.c b/arch/powerpc/kernel/io.c index 80a3209acef..e98180686b3 100644 --- a/arch/powerpc/kernel/io.c +++ b/arch/powerpc/kernel/io.c @@ -22,12 +22,16 @@ #include #include +#include +#include void _insb(volatile u8 __iomem *port, void *buf, long count) { u8 *tbuf = buf; u8 tmp; + BUG_ON(firmware_has_feature(FW_FEATURE_ISERIES)); + if (unlikely(count <= 0)) return; asm volatile("sync"); @@ -44,6 +48,8 @@ void _outsb(volatile u8 __iomem *port, const void *buf, long count) { const u8 *tbuf = buf; + BUG_ON(firmware_has_feature(FW_FEATURE_ISERIES)); + if (unlikely(count <= 0)) return; asm volatile("sync"); @@ -59,6 +65,8 @@ void _insw_ns(volatile u16 __iomem *port, void *buf, long count) u16 *tbuf = buf; u16 tmp; + BUG_ON(firmware_has_feature(FW_FEATURE_ISERIES)); + if (unlikely(count <= 0)) return; asm volatile("sync"); @@ -75,6 +83,8 @@ void _outsw_ns(volatile u16 __iomem *port, const void *buf, long count) { const u16 *tbuf = buf; + BUG_ON(firmware_has_feature(FW_FEATURE_ISERIES)); + if (unlikely(count <= 0)) return; asm volatile("sync"); @@ -90,6 +100,8 @@ void _insl_ns(volatile u32 __iomem *port, void *buf, long count) u32 *tbuf = buf; u32 tmp; + BUG_ON(firmware_has_feature(FW_FEATURE_ISERIES)); + if (unlikely(count <= 0)) return; asm volatile("sync"); @@ -106,6 +118,8 @@ void _outsl_ns(volatile u32 __iomem *port, const void *buf, long count) { const u32 *tbuf = buf; + BUG_ON(firmware_has_feature(FW_FEATURE_ISERIES)); + if (unlikely(count <= 0)) return; asm volatile("sync"); -- cgit v1.2.3