Re: [uml-devel] actually useful backtrace from a CPU-chewing hang

2008-04-25 Thread Nix
On 25 Apr 2008, [EMAIL PROTECTED] told this: > I suspect this can go wrong anywhere, but it happens to have been a > CBQ-triggered gettimeofday() while sending an arp that did it. (My ADSL > router pretty much bombs the poor damn machine with ARP packets all the > time.) Woo, it's happening a lot

[uml-devel] actually useful backtrace from a CPU-chewing hang

2008-04-25 Thread Nix
I suspect this can go wrong anywhere, but it happens to have been a CBQ-triggered gettimeofday() while sending an arp that did it. (My ADSL router pretty much bombs the poor damn machine with ARP packets all the time.) #0 getnstimeofday (ts=0x8217d10) at include/linux/time.h:182 #1 0x080824b4 in

[uml-devel] [PATCH 2/19] UML - Tidy stub management code

2008-04-25 Thread Jeff Dike
Restructure the stub management code to make it simpler. syscall_stub_done is extracted from do_syscall_stub. The counters are gone since I never looked at them. The common code in run_syscall_stub and syscall_stub_data is extracted into flush_syscalls. Signed-off-by: Jeff Dike <[EMAIL PROTECTE

[uml-devel] [PATCH 14/19] UML - Fix bad NTP interaction with clock

2008-04-25 Thread Jeff Dike
UML's supposed nanosecond clock interacts badly with NTP when NTP decides that the clock has drifted ahead and needs to be slowed down. Slowing down the clock is done by decrementing the cycle-to-nanosecond multiplier, which is 1. Decrementing that gives you 0 and time is stopped. This is fixed b

[uml-devel] [PATCH 8/19] asm/futex.h should include linux/uaccess.h

2008-04-25 Thread Jeff Dike
Lots of asm-*/futex.h call pagefault_enable and pagefault_disable, which are declared in linux/uaccess.h, without including linux/uaccess.h. They all include asm/uaccess.h, so this patch replaces asm/uaccess.h with linux/uaccess.h. Compile-tested on sparc64, x86, ia64, mips, and powerpc. Signed-

[uml-devel] [PATCH 5/19] UML - random driver style fixes

2008-04-25 Thread Jeff Dike
Give random.c a style workover while I'm changing it. Signed-off-by: Jeff Dike <[EMAIL PROTECTED]> --- arch/um/drivers/random.c | 77 --- 1 file changed, 40 insertions(+), 37 deletions(-) Index: linux-2.6-git/arch/um/drivers/random.c

[uml-devel] [PATCH 16/19] UML - Fix CONFIG_RAW dependencies

2008-04-25 Thread Jeff Dike
From: Robert P. J. Day <[EMAIL PROTECTED]> Add the BLOCK dependency for RAW_DRIVER, to match what's in drivers/char/Kconfig. Also, while we're there, update the alleged obsolesence of RAW_DRIVER since it doesn't seem to be going away any time soon. Signed-off-by: Robert P. J. Day <[EMAIL PROTECT

[uml-devel] [PATCH 7/19] UML - Move hppfs_kern.c to hppfs.c

2008-04-25 Thread Jeff Dike
There's no reason for the _kern in hppfs_kern.c, so move it to hppfs.c. Signed-off-by: Jeff Dike <[EMAIL PROTECTED]> --- fs/hppfs/Makefile |6 fs/hppfs/hppfs.c | 771 ++ fs/hppfs/hppfs_kern.c | 771 ---

[uml-devel] [PATCH 15/19] UML - use __SPIN_LOCK_UNLOCKED

2008-04-25 Thread Jeff Dike
From: Robert P. J. Day <[EMAIL PROTECTED]> Use newer, non-deprecated __SPIN_LOCK_UNLOCKED macro. Signed-off-by: Robert P. J. Day <[EMAIL PROTECTED]> Signed-off-by: Jeff Dike <[EMAIL PROTECTED]> --- arch/um/include/line.h |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Index: linux-

[uml-devel] [PATCH 11/19] UML - Track and make up lost ticks

2008-04-25 Thread Jeff Dike
Alarm delivery could be noticably late in the !CONFIG_NOHZ case because lost ticks weren't being taken into account. This is now treated more carefully, with the time between ticks being calculated and the appropriate number of ticks delivered to the timekeeping system. Cc: Nix <[EMAIL PROTECTED]

[uml-devel] [PATCH 13/19] UML - Remove unused header

2008-04-25 Thread Jeff Dike
From: Adrian Bunk <[EMAIL PROTECTED]> This patch removes the unused and broken (the normal asm/keyboard.h files no longer exists) include/asm-um/keyboard.h Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]> Signed-off-by: Jeff Dike <[EMAIL PROTECTED]> --- include/asm-um/keyboard.h |6 -- 1

[uml-devel] [PATCH 0/19] UML - Cleanups and fixes for 2.6.26

2008-04-25 Thread Jeff Dike
Here's the stuff I have accumulated for 2.6.26. Cleanups and fixes of varying sizes. Patch 8 fiddles the includes of a bunch of the asm/futex.h's, so isn't UML-specific. Jeff -- Work email - jdike at linux dot intel dot com -

[uml-devel] [PATCH 12/19] UML - Fix build when SLOB is enabled

2008-04-25 Thread Jeff Dike
Reintroduce uml_kmalloc for the benefit of UML libc code. The previous tactic of declaring __kmalloc so it could be called directly from the libc side of the house turned out to be getting too intimate with slab, and it doesn't work with slob. So, the uml_kmalloc wrapper is back. It calls kmallo

[uml-devel] [PATCH 10/19] UML - Fix errno return

2008-04-25 Thread Jeff Dike
From: Johann Felix Soden <[EMAIL PROTECTED]> Error returns are negative. Signed-off-by: Johann Felix Soden <[EMAIL PROTECTED]> Signed-off-by: Jeff Dike <[EMAIL PROTECTED]> --- arch/um/drivers/hostaudio_kern.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: linux-2.6.22/arch/um/d

[uml-devel] [PATCH 19/19] UML - Physical memory shouldn't include initial stack

2008-04-25 Thread Jeff Dike
The top of physical memory should be below the initial process stack, not the top of the address space, at least for as long as the stack isn't known to the kernel VM system and appropriately reserved. Cc: "Christopher S. Aker" <[EMAIL PROTECTED]> Signed-off-by: Jeff Dike <[EMAIL PROTECTED]> ---

[uml-devel] [PATCH 3/19] UML - Style fixes

2008-04-25 Thread Jeff Dike
A few random style fixes. Signed-off-by: Jeff Dike <[EMAIL PROTECTED]> --- arch/um/include/skas_ptrace.h| 13 + arch/um/include/sysdep-i386/sigcontext.h |2 +- arch/um/kernel/um_arch.c |2 +- arch/um/os-Linux/skas/process.c |2 +- 4 f

[uml-devel] [PATCH 17/19] UML - use DIV_ROUND_UP

2008-04-25 Thread Jeff Dike
From: Jiri Olsa <[EMAIL PROTECTED]> I just saw similar patches in the janitor kernel's list, and spotted place it fits. Signed-off-by: Jiri Olsa <[EMAIL PROTECTED]> Signed-off-by: Jeff Dike <[EMAIL PROTECTED]> --- arch/um/drivers/ubd_kern.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletio

[uml-devel] [PATCH 6/19] UML - hppfs fixes

2008-04-25 Thread Jeff Dike
hppfs tidying and fixes noticed during hch's get_inode work - style fixes a copy_to_user got its return value checked hppfs_write no longer fiddles file->f_pos because it gets and returns pos in its arguments hppfs_delete_inode dputs the underlyng procfs dentry stored in its

[uml-devel] [PATCH 18/19] UML - use PAGE_SIZE in linker scripts

2008-04-25 Thread Jeff Dike
From: Cyrill Gorcunov <[EMAIL PROTECTED]> This patch includes page.h header into liker scripts that allow us to use PAGE_SIZE macro instead of numeric constant. To be able to include page.h into linker scripts page.h is needed for some modification - i.e. we need to use __ASSEMBLY__ and _AC macro

[uml-devel] [PATCH 9/19] UML - Tidy ptrace interface

2008-04-25 Thread Jeff Dike
Tidy the ptrace interface code. Removed a bunch of unused macros. Started converting register sets from arrays of longs to structures. Signed-off-by: Jeff Dike <[EMAIL PROTECTED]> --- arch/um/include/sysdep-i386/ptrace_user.h | 30 arch/um/include/sysdep-x86_64/p

[uml-devel] [PATCH 4/19] UML - Random driver fixes

2008-04-25 Thread Jeff Dike
The random driver would essentially hang if the host's /dev/random returned -EAGAIN. There was a test of need_resched followed by a schedule inside the loop, but that didn't help and it's the wrong way to work anyway. The right way is to ask for an interrupt when there is input available from the

[uml-devel] [PATCH 1/19] UML - Redo host capability detection and disabling

2008-04-25 Thread Jeff Dike
Redo how host capabilities are recorded at startup and disabled on the command line. There are now explicit variables saying what's been disabled by the command line rather than the implicitness of the have_* variable being zero. The capability variables now start at zero and are set to one as th