Re: custom ide driver causes "Badness in smp_call_function"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 25, 2005 at 05:17:48PM -0400, Bryan Althouse wrote:

> If I change the line "hwif->irq = 0" in my driver to "hwif->irq = 5", my SMP
> kernel no longer experiences SMP badness.  Instead, I get many lines like
> "hda: lost interrupt", and the drive is not usable.  If I compile the kernel
> without SMP, the drive works properly as before.  I tried irq = 5 because I
> noticed that /proc/interrupts indicated that ide0 was being probed at 5.
> With the SMP kernel, /proc/interrupts shows a count of 0 for ide0.  My
> non-SMP kernel shows a count that increments when the drive is being used
> (as expected).

Try this patch below and let me know.  I would also like to ask those
people who used to suffer from aliases with IDE PIO to try this patch.

  Ralf

Index: include/asm-mips/mach-generic/ide.h
===================================================================
RCS file: /home/cvs/linux/include/asm-mips/mach-generic/ide.h,v
retrieving revision 1.9
diff -u -r1.9 ide.h
--- include/asm-mips/mach-generic/ide.h	19 Apr 2005 12:26:59 -0000	1.9
+++ include/asm-mips/mach-generic/ide.h	26 Aug 2005 14:04:38 -0000
@@ -19,6 +19,7 @@
 #include <linux/pci.h>
 #include <linux/stddef.h>
 #include <asm/processor.h>
+#include <asm/cacheflush.h>
 
 #ifndef MAX_HWIFS
 # ifdef CONFIG_BLK_DEV_IDEPCI
@@ -105,12 +106,14 @@
 
 /* MIPS port and memory-mapped I/O string operations.  */
 
-static inline void __ide_flush_dcache_range(unsigned long addr, unsigned long size)
+static inline void __ide_flush_dcache_range(unsigned long addr,
+	unsigned long size)
 {
-	if (cpu_has_dc_aliases) {
-		unsigned long end = addr + size;
-		for (; addr < end; addr += PAGE_SIZE)
-			flush_dcache_page(virt_to_page(addr));
+	unsigned long end = addr + size;
+
+	while (addr < end) {
+		SetPageDcacheDirty(virt_to_page(addr));
+		addr += PAGE_SIZE;
 	}
 }
 


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux