IDE & byte-swapping in 2.4.21
linas at austin.ibm.com
linas at austin.ibm.com
Thu May 22 08:11:50 EST 2003
FYI.
I tried to get ide modules to work, but gave up. Howwever, following
simple patch helps a little bit:
Index: setup-pci.c
===================================================================
RCS file: /cvs/linuxppc64/linuxppc64_2_4/drivers/ide/setup-pci.c,v
retrieving revision 1.1
diff -u -r1.1 setup-pci.c
--- setup-pci.c 8 Jan 2003 18:08:22 -0000 1.1
+++ setup-pci.c 15 May 2003 16:49:12 -0000
@@ -172,16 +172,21 @@
* is already in DMA mode we check and enforce IDE simplex rules.
*/
-static unsigned long __init ide_get_or_set_dma_base (ide_hwif_t *hwif)
+/* This must not be marked __init, since it is called during module load */
+static unsigned long ide_get_or_set_dma_base (ide_hwif_t *hwif)
{
unsigned long dma_base = 0;
On Wed, May 21, 2003 at 03:55:44PM -0500, linas at austin.ibm.com wrote:
>
> I haven't tried it yet, but I'm guessing that implementing
> the __ide_mm_insw to be non-swapping on the ppc64 will cure my
> ills.
FYI,
The following cures all my ppc64 ills.
--linas
Index: ide.h
===================================================================
RCS file: /cvs/linuxppc64/linuxppc64_2_4/include/asm-ppc64/ide.h,v
retrieving revision 1.6
diff -u -r1.6 ide.h
--- ide.h 8 Jan 2003 18:57:40 -0000 1.6
+++ ide.h 21 May 2003 21:58:15 -0000
@@ -48,7 +48,11 @@
{
}
-#include <asm-generic/ide_iops.h>
+#define __ide_mm_insw(p, a, c) _insw_ns((volatile u16 *)(p), (a), (c))
+#define __ide_mm_insl(p, a, c) _insl_ns((volatile u32 *)(p), (a), (c))
+#define __ide_mm_outsw(p, a, c) _outsw_ns((volatile u16 *)(p), (a), (c))
+#define __ide_mm_outsl(p, a, c) _outsl_ns((volatile u32 *)(p), (a), (c))
+
#endif /* __KERNEL__ */
Index: io.h
===================================================================
RCS file: /cvs/linuxppc64/linuxppc64_2_4/include/asm-ppc64/io.h,v
retrieving revision 1.23.2.1
diff -u -r1.23.2.1 io.h
--- io.h 2 Oct 2002 18:44:34 -0000 1.23.2.1
+++ io.h 16 May 2003 18:53:50 -0000
@@ -90,7 +90,7 @@
#define inw_p(port) inw(port)
#define outw_p(val, port) (udelay(1), outw((val), (port)))
#define inl_p(port) inl(port)
-#define outl_p(val, port) (udelay(1), outl((val, (port)))
+#define outl_p(val, port) (udelay(1), outl((val), (port)))
Index: misc.S
===================================================================
RCS file: /cvs/linuxppc64/linuxppc64_2_4/arch/ppc64/kernel/misc.S,v
retrieving revision 1.47
diff -u -r1.47 misc.S
--- misc.S 28 Apr 2003 20:27:54 -0000 1.47
+++ misc.S 21 May 2003 21:59:47 -0000
@@ -354,7 +354,7 @@
bdnz 00b
blr
-_GLOBAL(ide_insw)
+/* _GLOBAL(ide_insw) now in drivers/ide/ide-iops.c */
_GLOBAL(_insw_ns)
cmpwi 0,r5,0
mtctr r5
@@ -366,7 +366,7 @@
bdnz 00b
blr
-_GLOBAL(ide_outsw)
+/* _GLOBAL(ide_outsw) now in drivers/ide/ide-iops.c */
_GLOBAL(_outsw_ns)
cmpwi 0,r5,0
mtctr r5
** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/
More information about the Linuxppc64-dev
mailing list