Skip to contentSkip to conversation

hack: avoid "Registered protocol family 2" hang

uml-devel Werner Almesberger 2 participants 3 messages Mar 5, 2004 – Mar 8, 2004 User-mode Linux (UML)

lore
Share & tools
lore
#0 lore raw

I've attached a little hack that should make the hang after
NET: Registered protocol family 2
disappear. This isn't the real solution (haven't yet figured out how this is truly supposed to work on non-SMP), but it gives me a happier UML :-)

- Werner

Signature · 3 lines
  _________________________________________________________________________
 / Werner Almesberger, Buenos Aires, Argentina     [email protected] /
/_http://www.almesberger.net/____________________________________________/
arch/um/kernel/time_kern.c +1 -0
@@ -172,6 +172,7 @@
 	update_process_times(user_context(UPT_SP(regs)));
 	local_irq_enable();
 #endif
+	update_process_times(user_context(UPT_SP(regs)));
 	if(current_thread->cpu == 0)
 		timer_irq(regs);
 }
#1 lore raw
Quoted 7 lines · Werner Almesberger

I've attached a little hack that should make the hang after
NET: Registered protocol family 2
disappear. This isn't the real solution (haven't yet figured
out how this is truly supposed to work on non-SMP), but it gives me a happier UML :-)

- Werner

The actual bug has been fixed. The problem was the host cpu Hz was being truncated to a signed int so uml wouldn't run on a host faster than 2.1Ghz.

Patch attached

Jonathan

../linux-2.6.3/arch/um/kernel/time.c 2004-03-04 08:54:33.000000000 +0000 renamed from um/kernel/time.c 2004-03-05 13:54:12.262248632 +0000 +2 -1
@@ -88,7 +88,8 @@
 static unsigned long long get_host_hz(void)
 {
        char mhzline[16], *end;
-       int ret, mult, mhz, rest, len;
+       int ret, mult, rest, len;
+       unsigned long long mhz;
 
        ret = cpu_feature("cpu MHz", mhzline, 
                          sizeof(mhzline) / sizeof(mhzline[0]));
#2 lore raw
Quoted 1 line · Jonathan Boler

Patch attached

Thanks a lot ! I've been following the list through the archive, but that seems to be very out of sync now :-(

- Werner

Signature · 14 lines
  _________________________________________________________________________
 / Werner Almesberger, Buenos Aires, Argentina     [email protected] /
/_http://www.almesberger.net/____________________________________________/


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel