<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/um/include/os.h, branch linux-2.6.24.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.24.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.24.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2007-12-18T03:28:15Z</updated>
<entry>
<title>uml: stop gdb from deleting breakpoints when running UML</title>
<updated>2007-12-18T03:28:15Z</updated>
<author>
<name>Stanislaw Gruszka</name>
</author>
<published>2007-12-18T00:19:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4dbed85a35ed37d9608f4f32e5d69efa775d6223'/>
<id>urn:sha1:4dbed85a35ed37d9608f4f32e5d69efa775d6223</id>
<content type='text'>
Sometimes when UML is debugged gdb miss breakpoints.

When process traced by gdb do fork, debugger remove breakpoints from
child address space. There is possibility to trace more than one fork,
but this not work with UML, I guess (only guess) there is a deadlock -
gdb waits for UML and UML waits for gdb.

When clone() is called with SIGCHLD and CLONE_VM flags, gdb see this
as PTRACE_EVENT_FORK not as PTRACE_EVENT_CLONE and remove breakpoints
from child and at the same time from traced process, because either
have the same address space.

Maybe it is possible to do fix in gdb, but I'm not sure if there is
easy way to find out if traced and child processes share memory. So I
do fix for UML, it simply do not call clone() with both SIGCHLD and
CLONE_VM flags together.  Additionally __WALL flag is used for
waitpid() to assure not miss clone and normal process events.

[ jdike - checkpatch fixes ]

Signed-off-by: Stanislaw Gruszka &lt;stf_xl@wp.pl&gt;
Signed-off-by: Jeff Dike &lt;jdike@linux.intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>uml: use *SEC_PER_*SEC constants</title>
<updated>2007-10-16T16:43:08Z</updated>
<author>
<name>Jeff Dike</name>
</author>
<published>2007-10-16T08:27:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1a80521990a0e30e61a92994a009adc52161b070'/>
<id>urn:sha1:1a80521990a0e30e61a92994a009adc52161b070</id>
<content type='text'>
There are various uses of powers of 1000, plus the odd BILLION constant in the
time code.  However, there are perfectly good definitions of *SEC_PER_*SEC in
linux/time.h which can be used instaed.

These are replaced directly in kernel code.  Userspace code imports those
constants as UM_*SEC_PER_*SEC and uses these.

Signed-off-by: Jeff Dike &lt;jdike@linux.intel.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>uml: time build fix</title>
<updated>2007-10-16T16:43:08Z</updated>
<author>
<name>Jeff Dike</name>
</author>
<published>2007-10-16T08:27:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5f734614fc6218db352d26571ab4d1604620199c'/>
<id>urn:sha1:5f734614fc6218db352d26571ab4d1604620199c</id>
<content type='text'>
Put back an implementation of timeval_to_ns in arch/um/os-Linux/time.c.
tglx pointed out in his review of tickless support that there was a
perfectly good implementation of it in linux/time.h.  The problem is that
this is userspace code which can't pull in kernel headers and there doesn't
seem to be a libc version.

So, I'm copying the version from linux/time.h rather than resurrecting my
version.  This causes some declaration changes as it now returns a signed
value rather than an unsigned value.

Signed-off-by: Jeff Dike &lt;jdike@linux.intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>uml: eliminate interrupts in the idle loop</title>
<updated>2007-10-16T16:43:08Z</updated>
<author>
<name>Jeff Dike</name>
</author>
<published>2007-10-16T08:27:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b160fb6309dc907cbd8849e549d83badb86dd35b'/>
<id>urn:sha1:b160fb6309dc907cbd8849e549d83badb86dd35b</id>
<content type='text'>
Now, the idle loop now longer needs SIGALRM firing - it can just sleep for the
requisite amount of time and fake a timer interrupt when it finishes.

Any use of ITIMER_REAL now goes away.  disable_timer only turns off
ITIMER_VIRTUAL.  switch_timers is no longer needed, so it, and all calls, goes
away.

disable_timer now returns the amount of time remaining on the timer.
default_idle uses this to tell idle_sleep how long to sleep.  idle_sleep will
call alarm_handler if nanosleep returns 0, which is the case if it didn't
return early due to an interrupt.  Otherwise, it just returns.

Signed-off-by: Jeff Dike &lt;jdike@linux.intel.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>uml: tickless support</title>
<updated>2007-10-16T16:43:08Z</updated>
<author>
<name>Jeff Dike</name>
</author>
<published>2007-10-16T08:27:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d2753a6d199791a6abc75d9f657e3457fe61705f'/>
<id>urn:sha1:d2753a6d199791a6abc75d9f657e3457fe61705f</id>
<content type='text'>
Enable tickless support.

CONFIG_TICK_ONESHOT and CONFIG_NO_HZ are enabled.

itimer_clockevent gets CLOCK_EVT_FEAT_ONESHOT and an implementation of
.set_next_event.

CONFIG_UML_REAL_TIME_CLOCK goes away because it only makes sense when there is
a clock ticking away all the time.  timer_handler now just calls do_IRQ once
without trying to figure out how many ticks to emulate.

The idle loop now needs to turn ticking on and off.

Userspace ticks keep happening as usual.  However, the userspace loop keep
track of when the next wakeup should happen and suppresses process ticks until
that happens.

Signed-off-by: Jeff Dike &lt;jdike@linux.intel.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>uml: separate timer initialization</title>
<updated>2007-10-16T16:43:08Z</updated>
<author>
<name>Jeff Dike</name>
</author>
<published>2007-10-16T08:27:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=78a26e25ce4837a03ac3b6c32cdae1958e547639'/>
<id>urn:sha1:78a26e25ce4837a03ac3b6c32cdae1958e547639</id>
<content type='text'>
Move timer signal initialization from init_irq_signals to a new function,
timer_init.

Signed-off-by: Jeff Dike &lt;jdike@linux.intel.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>uml: simplify interval setting</title>
<updated>2007-10-16T16:43:08Z</updated>
<author>
<name>Jeff Dike</name>
</author>
<published>2007-10-16T08:27:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a2f018bf389422a55f1455ab8b9b5eedc5ea1803'/>
<id>urn:sha1:a2f018bf389422a55f1455ab8b9b5eedc5ea1803</id>
<content type='text'>
set_interval took a timer type as an argument, but it always specified a
virtual timer.  So, it is not needed, and it is gone, and set_interval is
simplified appropriately.

Signed-off-by: Jeff Dike &lt;jdike@linux.intel.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>uml: fix timer switching</title>
<updated>2007-10-16T16:43:08Z</updated>
<author>
<name>Jeff Dike</name>
</author>
<published>2007-10-16T08:27:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=181bde801afae4304843ce95c868d4419ae87310'/>
<id>urn:sha1:181bde801afae4304843ce95c868d4419ae87310</id>
<content type='text'>
Fix up the switching between virtual and real timers.  The idle loop sleeps,
so the timer at that point must be real time.  At all other times, the timer
must be virtual.  Even when userspace is running, and the kernel is asleep,
the virtual timer is correct because the process timer will be running and the
process timer will be firing.

The timer switch used to be in the context switch and timer handler code.
This is moved to the idle loop and the signal handler, making it much more
clear why it is happening.

switch_timers now returns the old timer type so that it may be restored.  The
signal handler uses this in order to restore the previous timer type when it
returns.

Signed-off-by: Jeff Dike &lt;jdike@linux.intel.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>uml: userspace files should call libc directly</title>
<updated>2007-10-16T16:43:06Z</updated>
<author>
<name>Jeff Dike</name>
</author>
<published>2007-10-16T08:27:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=512b6fb1c14d4c34f23a3419b0789ad01914a899'/>
<id>urn:sha1:512b6fb1c14d4c34f23a3419b0789ad01914a899</id>
<content type='text'>
A number of files that were changed in the recent removal of tt mode
are userspace files which call the os_* wrappers instead of calling
libc directly.  A few other files were affected by this, through

This patch makes these call glibc directly.

There are also style fixes in the affected areas.

os_print_error has no remaining callers, so it is deleted.

There is a interface change to os_set_exec_close, eliminating a
parameter which was always the same.  The callers are fixed as well.

os_process_pc got its error path cleaned up.

Signed-off-by: Jeff Dike &lt;jdike@linux.intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>uml: remove os_* usage from userspace files</title>
<updated>2007-10-16T16:43:06Z</updated>
<author>
<name>Jeff Dike</name>
</author>
<published>2007-10-16T08:27:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8ca842c4b5cbc70b9180617e9f26b6ac9f40dbb9'/>
<id>urn:sha1:8ca842c4b5cbc70b9180617e9f26b6ac9f40dbb9</id>
<content type='text'>
This patch fixes some userspace files which were calling libc through the os_*
wrappers.

It turns out that there was only one user of os_new_tty_pgrp, so it can be
deleted.

There are also some style and whitespace fixes in here.

Signed-off-by: Jeff Dike &lt;jdike@linux.intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
