<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/arch/ia64/kernel/process.c, branch v2.6.26</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>[IA64] fix interrupt masking for pending works on kernel leave</title>
<updated>2008-05-14T22:55:35+00:00</updated>
<author>
<name>Hidetoshi Seto</name>
<email>seto.hidetoshi@jp.fujitsu.com</email>
</author>
<published>2008-05-09T06:26:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=3633c7308005e8c1dab594f69ef904424f8b639a'/>
<id>3633c7308005e8c1dab594f69ef904424f8b639a</id>
<content type='text'>
[Bug-fix for "[BUG?][2.6.25-mm1] sleeping during IRQ disabled"]

This patch does:
 - enable interrupts before calling schedule() as same as others, ex. x86
 - enable interrupts during ia64_do_signal() and ia64_sync_krbs()
 - do_notify_resume_user() is still called with interrupts disabled, since
   we can take short path of fsys_mode if-statement quickly.
 - pfm_handle_work() is also called with interrupts disabled, since
   it can deal interrupt mask within itself.
 - fix/add some comments/notes

Reported-by: KOSAKI Motohiro &lt;kosaki.motohiro@jp.fujitsu.com&gt;
Signed-off-by: Hidetoshi Seto &lt;seto.hidetoshi@jp.fujitsu.com&gt;
Signed-off-by: Tony Luck &lt;tony.luck@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Bug-fix for "[BUG?][2.6.25-mm1] sleeping during IRQ disabled"]

This patch does:
 - enable interrupts before calling schedule() as same as others, ex. x86
 - enable interrupts during ia64_do_signal() and ia64_sync_krbs()
 - do_notify_resume_user() is still called with interrupts disabled, since
   we can take short path of fsys_mode if-statement quickly.
 - pfm_handle_work() is also called with interrupts disabled, since
   it can deal interrupt mask within itself.
 - fix/add some comments/notes

Reported-by: KOSAKI Motohiro &lt;kosaki.motohiro@jp.fujitsu.com&gt;
Signed-off-by: Hidetoshi Seto &lt;seto.hidetoshi@jp.fujitsu.com&gt;
Signed-off-by: Tony Luck &lt;tony.luck@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>signals: ia64 renumber TIF_RESTORE_SIGMASK</title>
<updated>2008-04-30T15:29:37+00:00</updated>
<author>
<name>akpm@linux-foundation.org</name>
<email>akpm@linux-foundation.org</email>
</author>
<published>2008-04-30T07:53:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=49eaeb4bc4c901c327ee259c7768be20fd020a30'/>
<id>49eaeb4bc4c901c327ee259c7768be20fd020a30</id>
<content type='text'>
TIF_RESTORE_SIGMASK no longer needs to be in the _TIF_WORK_* masks.
Those low bits are scarce.  Renumber TIF_RESTORE_SIGMASK to free one up.

Signed-off-by: Roland McGrath &lt;roland@redhat.com&gt;
Cc: Oleg Nesterov &lt;oleg@tv-sign.ru&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
Cc: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Cc: "Luck, Tony" &lt;tony.luck@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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
TIF_RESTORE_SIGMASK no longer needs to be in the _TIF_WORK_* masks.
Those low bits are scarce.  Renumber TIF_RESTORE_SIGMASK to free one up.

Signed-off-by: Roland McGrath &lt;roland@redhat.com&gt;
Cc: Oleg Nesterov &lt;oleg@tv-sign.ru&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
Cc: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Cc: "Luck, Tony" &lt;tony.luck@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;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IA64] use CORE_DUMP_USE_REGSET</title>
<updated>2008-03-12T23:27:35+00:00</updated>
<author>
<name>Shaohua Li</name>
<email>shaohua.li@intel.com</email>
</author>
<published>2008-02-28T08:09:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6cb53d7a6f40858181facde0f52587731d2e621f'/>
<id>6cb53d7a6f40858181facde0f52587731d2e621f</id>
<content type='text'>
After we have regset support, we can use CORE_DUMP_USE_REGSET.

Signed-off-by: Shaohua Li &lt;shaohua.li@intel.com&gt;
Signed-off-by: Tony Luck &lt;tony.luck@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
After we have regset support, we can use CORE_DUMP_USE_REGSET.

Signed-off-by: Shaohua Li &lt;shaohua.li@intel.com&gt;
Signed-off-by: Tony Luck &lt;tony.luck@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IA64] Simplify cpu_idle_wait</title>
<updated>2008-02-08T20:01:40+00:00</updated>
<author>
<name>Tony Luck</name>
<email>tony.luck@intel.com</email>
</author>
<published>2008-02-08T19:53:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=427639354ff346710012b53e1ceed5e3f3200e0c'/>
<id>427639354ff346710012b53e1ceed5e3f3200e0c</id>
<content type='text'>
This is just Venki's patch[*] for x86 ported to ia64.

* http://marc.info/?l=linux-kernel&amp;m=120249201318159&amp;w=2

Acked-by: Venkatesh Pallipadi &lt;venkatesh.pallipadi@intel.com&gt;
Signed-off-by: Tony Luck &lt;tony.luck@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is just Venki's patch[*] for x86 ported to ia64.

* http://marc.info/?l=linux-kernel&amp;m=120249201318159&amp;w=2

Acked-by: Venkatesh Pallipadi &lt;venkatesh.pallipadi@intel.com&gt;
Signed-off-by: Tony Luck &lt;tony.luck@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IA64] Synchronize kernel RSE to user-space and back</title>
<updated>2008-02-08T20:01:18+00:00</updated>
<author>
<name>Petr Tesarik</name>
<email>ptesarik@suse.cz</email>
</author>
<published>2007-12-12T14:23:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=3b2ce0b17824c42bc2e46f7dd903b4acf5e9fff9'/>
<id>3b2ce0b17824c42bc2e46f7dd903b4acf5e9fff9</id>
<content type='text'>
This is base kernel patch for ptrace RSE bug. It's basically a backport
from the utrace RSE patch I sent out several weeks ago. please review.

when a thread is stopped (ptraced), debugger might change thread's user
stack (change memory directly), and we must avoid the RSE stored in
kernel to override user stack (user space's RSE is newer than kernel's
in the case). To workaround the issue, we copy kernel RSE to user RSE
before the task is stopped, so user RSE has updated data.  we then copy
user RSE to kernel after the task is resummed from traced stop and
kernel will use the newer RSE to return to user.

Signed-off-by: Shaohua Li &lt;shaohua.li@intel.com&gt;
Signed-off-by: Petr Tesarik &lt;ptesarik@suse.cz&gt;
CC: Roland McGrath &lt;roland@redhat.com&gt;
Signed-off-by: Tony Luck &lt;tony.luck@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is base kernel patch for ptrace RSE bug. It's basically a backport
from the utrace RSE patch I sent out several weeks ago. please review.

when a thread is stopped (ptraced), debugger might change thread's user
stack (change memory directly), and we must avoid the RSE stored in
kernel to override user stack (user space's RSE is newer than kernel's
in the case). To workaround the issue, we copy kernel RSE to user RSE
before the task is stopped, so user RSE has updated data.  we then copy
user RSE to kernel after the task is resummed from traced stop and
kernel will use the newer RSE to return to user.

Signed-off-by: Shaohua Li &lt;shaohua.li@intel.com&gt;
Signed-off-by: Petr Tesarik &lt;ptesarik@suse.cz&gt;
CC: Roland McGrath &lt;roland@redhat.com&gt;
Signed-off-by: Tony Luck &lt;tony.luck@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IA64] Rename TIF_PERFMON_WORK back to TIF_NOTIFY_RESUME</title>
<updated>2008-02-08T20:00:54+00:00</updated>
<author>
<name>Petr Tesarik</name>
<email>ptesarik@suse.cz</email>
</author>
<published>2007-12-12T14:21:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=5aa92ffda1b6244b4a248df0b95c07d183ab96d2'/>
<id>5aa92ffda1b6244b4a248df0b95c07d183ab96d2</id>
<content type='text'>
Since the RSE synchronization will need a TIF_ flag, but all

work-to-be-done bits are already used, so we have to multiplex
TIF_NOTIFY_RESUME again.

Signed-off-by: Shaohua Li &lt;shaohua.li@intel.com&gt;
Signed-off-by: Petr Tesarik &lt;ptesarik@suse.cz&gt;
Signed-off-by: Tony Luck &lt;tony.luck@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since the RSE synchronization will need a TIF_ flag, but all

work-to-be-done bits are already used, so we have to multiplex
TIF_NOTIFY_RESUME again.

Signed-off-by: Shaohua Li &lt;shaohua.li@intel.com&gt;
Signed-off-by: Petr Tesarik &lt;ptesarik@suse.cz&gt;
Signed-off-by: Tony Luck &lt;tony.luck@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IA64] set_thread_area fails in IA32 chroot</title>
<updated>2007-12-19T19:06:40+00:00</updated>
<author>
<name>Ian Wienand</name>
<email>ianw@gelato.unsw.edu.au</email>
</author>
<published>2007-11-20T03:12:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e384f41409cb9e543fbc84b375e2ba46cbcbec6a'/>
<id>e384f41409cb9e543fbc84b375e2ba46cbcbec6a</id>
<content type='text'>
I tried to upgrade an IA32 chroot on my IA64 to a new glibc with TLS.
It kept dying because set_thread_area was returning -ESRCH
(bugs.debian.org/451939).

I instrumented arch/ia64/ia32/sys_ia32.c:get_free_idx() and ended up
seeing output like

[pid] idx   desc-&gt;a  desc-&gt;b
-----------------------------
[2710] 0 -&gt; c6b0ffff 40dff31b
[2710] 1 -&gt; 0 0
[2710] 2 -&gt; 0 0

[2710] 0 -&gt; c6b0ffff 40dff31b
[2710] 1 -&gt; c6b0ffff 40dff31b
[2710] 2 -&gt; 0 0

[2711] 0 -&gt; c6b0ffff 40dff31b
[2711] 1 -&gt; c6b0ffff 40dff31b
[2711] 2 -&gt; 48c0ffff 40dff317

which suggested to me that TLS pointers were surviving exec() calls,
leading to GDT pointers filling up and the eventual failure of
get_free_idx().

I think the solution is flushing the tls array on exec.

Signed-Off-By: Ian Wienand &lt;ianw@gelato.unsw.edu.au&gt;
Signed-off-by: Tony Luck &lt;tony.luck@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I tried to upgrade an IA32 chroot on my IA64 to a new glibc with TLS.
It kept dying because set_thread_area was returning -ESRCH
(bugs.debian.org/451939).

I instrumented arch/ia64/ia32/sys_ia32.c:get_free_idx() and ended up
seeing output like

[pid] idx   desc-&gt;a  desc-&gt;b
-----------------------------
[2710] 0 -&gt; c6b0ffff 40dff31b
[2710] 1 -&gt; 0 0
[2710] 2 -&gt; 0 0

[2710] 0 -&gt; c6b0ffff 40dff31b
[2710] 1 -&gt; c6b0ffff 40dff31b
[2710] 2 -&gt; 0 0

[2711] 0 -&gt; c6b0ffff 40dff31b
[2711] 1 -&gt; c6b0ffff 40dff31b
[2711] 2 -&gt; 48c0ffff 40dff317

which suggested to me that TLS pointers were surviving exec() calls,
leading to GDT pointers filling up and the eventual failure of
get_free_idx().

I think the solution is flushing the tls array on exec.

Signed-Off-By: Ian Wienand &lt;ianw@gelato.unsw.edu.au&gt;
Signed-off-by: Tony Luck &lt;tony.luck@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IA64] print kernel release in OOPS to make kerneloops.org happy</title>
<updated>2007-12-19T01:04:04+00:00</updated>
<author>
<name>Luck, Tony</name>
<email>tony.luck@intel.com</email>
</author>
<published>2007-12-18T19:46:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=ee211b37aa98123b1d9b19d228011e632a4bbe75'/>
<id>ee211b37aa98123b1d9b19d228011e632a4bbe75</id>
<content type='text'>
The ia64 oops message doesn't include the kernel version, which
makes it hard to automatically categorize oops messages scraped
from mailing lists and bug databases.

Signed-off-by: Tony Luck &lt;tony.luck@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The ia64 oops message doesn't include the kernel version, which
makes it hard to automatically categorize oops messages scraped
from mailing lists and bug databases.

Signed-off-by: Tony Luck &lt;tony.luck@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Use helpers to obtain task pid in printks (arch code)</title>
<updated>2007-10-19T18:53:43+00:00</updated>
<author>
<name>Alexey Dobriyan</name>
<email>adobriyan@openvz.org</email>
</author>
<published>2007-10-19T06:40:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=19c5870c0eefd27c6d09d867465e0571262e05d0'/>
<id>19c5870c0eefd27c6d09d867465e0571262e05d0</id>
<content type='text'>
One of the easiest things to isolate is the pid printed in kernel log.
There was a patch, that made this for arch-independent code, this one makes
so for arch/xxx files.

It took some time to cross-compile it, but hopefully these are all the
printks in arch code.

Signed-off-by: Alexey Dobriyan &lt;adobriyan@openvz.org&gt;
Signed-off-by: Pavel Emelyanov &lt;xemul@openvz.org&gt;
Cc: &lt;linux-arch@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
One of the easiest things to isolate is the pid printed in kernel log.
There was a patch, that made this for arch-independent code, this one makes
so for arch/xxx files.

It took some time to cross-compile it, but hopefully these are all the
printks in arch code.

Signed-off-by: Alexey Dobriyan &lt;adobriyan@openvz.org&gt;
Signed-off-by: Pavel Emelyanov &lt;xemul@openvz.org&gt;
Cc: &lt;linux-arch@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IA64] disable irq's and check need_resched before safe_halt</title>
<updated>2007-08-13T17:17:23+00:00</updated>
<author>
<name>Dimitri Sivanich</name>
<email>sivanich@sgi.com</email>
</author>
<published>2007-08-07T13:49:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=71416bea5afa9e5a6c76c1509ab69c46c857a2bb'/>
<id>71416bea5afa9e5a6c76c1509ab69c46c857a2bb</id>
<content type='text'>
While sending interrupts to a cpu to repeatedly wake a thread, on occasion
that thread will take a full timer tick cycle (4002 usec in my case)
to wakeup.

The problem concerns a race condition in the code around the safe_halt()
call in the default_idle() routine.  Setting 'nohalt' on the kernel
command line causes the long wakeups to disappear.

void
default_idle (void)
{
        local_irq_enable();
        while (!need_resched()) {
--&gt;             if (can_do_pal_halt)
--&gt;                     safe_halt();
                else

A timer tick could arrive between the check for !need_resched and the
actual call to safe_halt() (which does a pal call to PAL_HALT_LIGHT).
By the time the timer tick completes, a thread that might now need to run
could get held up for as long as a timer tick waiting for the halted cpu.

I'm proposing that we disable irq's and check need_resched again before
calling safe_halt().  Does anyone see any problem with this approach?

Signed-off-by: Dimitri Sivanich &lt;sivanich@sgi.com&gt;
Signed-off-by: Tony Luck &lt;tony.luck@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While sending interrupts to a cpu to repeatedly wake a thread, on occasion
that thread will take a full timer tick cycle (4002 usec in my case)
to wakeup.

The problem concerns a race condition in the code around the safe_halt()
call in the default_idle() routine.  Setting 'nohalt' on the kernel
command line causes the long wakeups to disappear.

void
default_idle (void)
{
        local_irq_enable();
        while (!need_resched()) {
--&gt;             if (can_do_pal_halt)
--&gt;                     safe_halt();
                else

A timer tick could arrive between the check for !need_resched and the
actual call to safe_halt() (which does a pal call to PAL_HALT_LIGHT).
By the time the timer tick completes, a thread that might now need to run
could get held up for as long as a timer tick waiting for the halted cpu.

I'm proposing that we disable irq's and check need_resched again before
calling safe_halt().  Does anyone see any problem with this approach?

Signed-off-by: Dimitri Sivanich &lt;sivanich@sgi.com&gt;
Signed-off-by: Tony Luck &lt;tony.luck@intel.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
