Re: CONFIG_VGACON_SOFT_SCROLLBACK crashes 2.6.17

From: Antonio Vargas
Date: Thu Jun 22 2006 - 02:30:49 EST


On 6/22/06, Antonino A. Daplas <adaplas@xxxxxxxxx> wrote:
Al Boldi wrote:
> Antonino A. Daplas wrote:
>> Al Boldi wrote:
>>> Enabling CONFIG_VGACON_SOFT_SCROLLBACK causes random fatal system
>>> freezes.
>>>
>>> Especially, ping 10.1 -A easily causes a complete system hang during
>>> scroll.
>>>
>>> Is there an easy way to fix this, other than disabling the option?
>> I can't duplicate your problem. Did it ever work before?
>
> This option did not exist before 2.6.17.

I meant if you tried any of the -rc kernels.

Anyway, can you try the patch below. It's a debugging patch and
it will slow down the console.

If the system hang disappears, remove the line

while (i--);

in include/linux/vt_buffer.h. This line is introduced by
the patch below.

Let me know at what point it worked, or whether it worked at all.

>
>> Can you send me you kernel config?
>
> Attached below.
>
> BTW, is there any chance to patch your savagefb to support VIA/S3 UniChrome?
>

If someone posts a patch to lkml or fbdev-devel, why not? But a separate
driver is probably better as the 2 are very different.

Tony

diff --git a/include/linux/vt_buffer.h b/include/linux/vt_buffer.h
index 057db7d..e9b6064 100644
--- a/include/linux/vt_buffer.h
+++ b/include/linux/vt_buffer.h
@@ -20,11 +20,21 @@ #endif

#ifndef VT_BUF_HAVE_RW
#define scr_writew(val, addr) (*(addr) = (val))
-#define scr_readw(addr) (*(addr))
-#define scr_memcpyw(d, s, c) memcpy(d, s, c)
-#define scr_memmovew(d, s, c) memmove(d, s, c)
-#define VT_BUF_HAVE_MEMCPYW
-#define VT_BUF_HAVE_MEMMOVEW
+//#define scr_readw(addr) (*(addr))
+
+static inline u16 scr_readw(volatile const u16 *addr)
+{
+ int i = 10000;
+ u16 val = *addr;
+
+ while (i--);
+ return val;
+}
+
+//#define scr_memcpyw(d, s, c) memcpy(d, s, c)
+//#define scr_memmovew(d, s, c) memmove(d, s, c)
+#undef VT_BUF_HAVE_MEMCPYW
+#undef VT_BUF_HAVE_MEMMOVEW
#endif

#ifndef VT_BUF_HAVE_MEMSETW

Antonino, is this while(i--) a cpu busy-wait loop??? This would have
different timings on different cpu kinds... maybe a short usleep()?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/