<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/arch/avr32/kernel/process.c, branch v2.6.32.31</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>ptrace: remove PT_DTRACE from avr32, mn10300, parisc, s390, sh, xtensa</title>
<updated>2009-06-18T20:03:48+00:00</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@redhat.com</email>
</author>
<published>2009-06-17T23:27:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=bba7fc0a21d76ef951cdac6d11896dc6b5a9ffa7'/>
<id>bba7fc0a21d76ef951cdac6d11896dc6b5a9ffa7</id>
<content type='text'>
avr32, mn10300, parisc, s390, sh, xtensa:

They never set PT_DTRACE, but clear it after do_execve().

Signed-off-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: David Howells &lt;dhowells@redhat.com&gt;
Acked-by: Kyle McMartin &lt;kyle@mcmartin.ca&gt;
Cc: Grant Grundler &lt;grundler@parisc-linux.org&gt;
Cc: Matthew Wilcox &lt;matthew@wil.cx&gt;
Acked-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
Cc: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Acked-by: Paul Mundt &lt;lethal@linux-sh.org&gt;
Acked-by: Chris Zankel &lt;chris@zankel.net&gt;
Acked-by: Roland McGrath &lt;roland@redhat.com&gt;
Acked-by: Haavard Skinnemoen &lt;haavard.skinnemoen@atmel.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>
avr32, mn10300, parisc, s390, sh, xtensa:

They never set PT_DTRACE, but clear it after do_execve().

Signed-off-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: David Howells &lt;dhowells@redhat.com&gt;
Acked-by: Kyle McMartin &lt;kyle@mcmartin.ca&gt;
Cc: Grant Grundler &lt;grundler@parisc-linux.org&gt;
Cc: Matthew Wilcox &lt;matthew@wil.cx&gt;
Acked-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
Cc: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Acked-by: Paul Mundt &lt;lethal@linux-sh.org&gt;
Acked-by: Chris Zankel &lt;chris@zankel.net&gt;
Acked-by: Roland McGrath &lt;roland@redhat.com&gt;
Acked-by: Haavard Skinnemoen &lt;haavard.skinnemoen@atmel.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>Simplify copy_thread()</title>
<updated>2009-04-03T02:04:51+00:00</updated>
<author>
<name>Alexey Dobriyan</name>
<email>adobriyan@gmail.com</email>
</author>
<published>2009-04-02T23:56:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6f2c55b843836d26528c56a0968689accaedbc67'/>
<id>6f2c55b843836d26528c56a0968689accaedbc67</id>
<content type='text'>
First argument unused since 2.3.11.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&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>
First argument unused since 2.3.11.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&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>avr32: Introducing asm/syscalls.h</title>
<updated>2008-12-17T12:32:38+00:00</updated>
<author>
<name>Jaswinder Singh</name>
<email>jaswinder@infradead.org</email>
</author>
<published>2008-07-25T08:18:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c80ce2d52b1d11ccb29eddb3fc1345cd49ccfc5a'/>
<id>c80ce2d52b1d11ccb29eddb3fc1345cd49ccfc5a</id>
<content type='text'>
Declaring arch-dependent syscalls for avr32 architecture

Signed-off-by: Jaswinder Singh &lt;jaswinder@infradead.org&gt;
Signed-off-by: Haavard Skinnemoen &lt;haavard.skinnemoen@atmel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Declaring arch-dependent syscalls for avr32 architecture

Signed-off-by: Jaswinder Singh &lt;jaswinder@infradead.org&gt;
Signed-off-by: Haavard Skinnemoen &lt;haavard.skinnemoen@atmel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>avr32: Minor pm_power_off cleanup</title>
<updated>2008-10-08T16:44:58+00:00</updated>
<author>
<name>Haavard Skinnemoen</name>
<email>haavard.skinnemoen@atmel.com</email>
</author>
<published>2008-07-28T11:05:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b3bc2c5562f06ca34b30f61c5714e96490946c81'/>
<id>b3bc2c5562f06ca34b30f61c5714e96490946c81</id>
<content type='text'>
Include &lt;linux/pm.h&gt; to see the declaration of pm_power_off, and remove
unneeded NULL initializer.

Signed-off-by: Haavard Skinnemoen &lt;haavard.skinnemoen@atmel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Include &lt;linux/pm.h&gt; to see the declaration of pm_power_off, and remove
unneeded NULL initializer.

Signed-off-by: Haavard Skinnemoen &lt;haavard.skinnemoen@atmel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>avr32: Use &lt;mach/foo.h&gt; instead of &lt;asm/arch/foo.h&gt;</title>
<updated>2008-08-05T12:36:57+00:00</updated>
<author>
<name>Haavard Skinnemoen</name>
<email>haavard.skinnemoen@atmel.com</email>
</author>
<published>2008-08-05T11:57:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3663b736a5083b3bce74520b637f630f01f66a7f'/>
<id>3663b736a5083b3bce74520b637f630f01f66a7f</id>
<content type='text'>
Update all avr32-specific files to use the new platform-specific header
locations. Drivers shared with ARM are left alone for now.

Signed-off-by: Haavard Skinnemoen &lt;haavard.skinnemoen@atmel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Update all avr32-specific files to use the new platform-specific header
locations. Drivers shared with ARM are left alone for now.

Signed-off-by: Haavard Skinnemoen &lt;haavard.skinnemoen@atmel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>nohz: prevent tick stop outside of the idle loop</title>
<updated>2008-07-18T16:10:28+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2008-07-18T15:27:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b8f8c3cf0a4ac0632ec3f0e15e9dc0c29de917af'/>
<id>b8f8c3cf0a4ac0632ec3f0e15e9dc0c29de917af</id>
<content type='text'>
Jack Ren and Eric Miao tracked down the following long standing
problem in the NOHZ code:

	scheduler switch to idle task
	enable interrupts

Window starts here

	----&gt; interrupt happens (does not set NEED_RESCHED)
	      	irq_exit() stops the tick

	----&gt; interrupt happens (does set NEED_RESCHED)

	return from schedule()
	
	cpu_idle(): preempt_disable();

Window ends here

The interrupts can happen at any point inside the race window. The
first interrupt stops the tick, the second one causes the scheduler to
rerun and switch away from idle again and we end up with the tick
disabled.

The fact that it needs two interrupts where the first one does not set
NEED_RESCHED and the second one does made the bug obscure and extremly
hard to reproduce and analyse. Kudos to Jack and Eric.

Solution: Limit the NOHZ functionality to the idle loop to make sure
that we can not run into such a situation ever again.

cpu_idle()
{
	preempt_disable();

	while(1) {
		 tick_nohz_stop_sched_tick(1); &lt;- tell NOHZ code that we
		 			          are in the idle loop

		 while (!need_resched())
		       halt();

		 tick_nohz_restart_sched_tick(); &lt;- disables NOHZ mode
		 preempt_enable_no_resched();
		 schedule();
		 preempt_disable();
	}
}

In hindsight we should have done this forever, but ... 

/me grabs a large brown paperbag.

Debugged-by: Jack Ren &lt;jack.ren@marvell.com&gt;, 
Debugged-by: eric miao &lt;eric.y.miao@gmail.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Jack Ren and Eric Miao tracked down the following long standing
problem in the NOHZ code:

	scheduler switch to idle task
	enable interrupts

Window starts here

	----&gt; interrupt happens (does not set NEED_RESCHED)
	      	irq_exit() stops the tick

	----&gt; interrupt happens (does set NEED_RESCHED)

	return from schedule()
	
	cpu_idle(): preempt_disable();

Window ends here

The interrupts can happen at any point inside the race window. The
first interrupt stops the tick, the second one causes the scheduler to
rerun and switch away from idle again and we end up with the tick
disabled.

The fact that it needs two interrupts where the first one does not set
NEED_RESCHED and the second one does made the bug obscure and extremly
hard to reproduce and analyse. Kudos to Jack and Eric.

Solution: Limit the NOHZ functionality to the idle loop to make sure
that we can not run into such a situation ever again.

cpu_idle()
{
	preempt_disable();

	while(1) {
		 tick_nohz_stop_sched_tick(1); &lt;- tell NOHZ code that we
		 			          are in the idle loop

		 while (!need_resched())
		       halt();

		 tick_nohz_restart_sched_tick(); &lt;- disables NOHZ mode
		 preempt_enable_no_resched();
		 schedule();
		 preempt_disable();
	}
}

In hindsight we should have done this forever, but ... 

/me grabs a large brown paperbag.

Debugged-by: Jack Ren &lt;jack.ren@marvell.com&gt;, 
Debugged-by: eric miao &lt;eric.y.miao@gmail.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>avr32: Add hardware power-down function call</title>
<updated>2008-04-20T00:40:11+00:00</updated>
<author>
<name>Peter Ma</name>
<email>peterma@mediamatech.com</email>
</author>
<published>2008-04-19T07:24:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ed3fa7c9510cde67d232299cab8052ff50a08285'/>
<id>ed3fa7c9510cde67d232299cab8052ff50a08285</id>
<content type='text'>
This patch adds in the indirect call to pm_power_off(), as is done in
other architectures (e.g. ARM).

Tested on NGW100, with custom board with GPIO control over main DC
power.

Signed-off-by: Peter Ma &lt;pma@mediamatech.com&gt;
Signed-off-by: Haavard Skinnemoen &lt;haavard.skinnemoen@atmel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds in the indirect call to pm_power_off(), as is done in
other architectures (e.g. ARM).

Tested on NGW100, with custom board with GPIO control over main DC
power.

Signed-off-by: Peter Ma &lt;pma@mediamatech.com&gt;
Signed-off-by: Haavard Skinnemoen &lt;haavard.skinnemoen@atmel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>avr32: Move sleep code into mach-at32ap</title>
<updated>2008-04-20T00:40:07+00:00</updated>
<author>
<name>Haavard Skinnemoen</name>
<email>hskinnemoen@atmel.com</email>
</author>
<published>2008-02-24T22:24:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7e59128f31e0c57d52e86d57730d4c9281494dda'/>
<id>7e59128f31e0c57d52e86d57730d4c9281494dda</id>
<content type='text'>
Create a new file, pm-at32ap700x.S, in mach-at32ap and move the CPU
idle sleep code there. Make it possible to disable the sleep code.

Signed-off-by: Haavard Skinnemoen &lt;hskinnemoen@atmel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Create a new file, pm-at32ap700x.S, in mach-at32ap and move the CPU
idle sleep code there. Make it possible to disable the sleep code.

Signed-off-by: Haavard Skinnemoen &lt;hskinnemoen@atmel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>avr32: Fix OCD refcounting bug</title>
<updated>2008-02-27T13:23:53+00:00</updated>
<author>
<name>Haavard Skinnemoen</name>
<email>hskinnemoen@atmel.com</email>
</author>
<published>2008-02-27T13:04:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=325d6f5593b40b5a48cf4ade74c01681f2ff6044'/>
<id>325d6f5593b40b5a48cf4ade74c01681f2ff6044</id>
<content type='text'>
Iff the parent has TIF_DEBUG set, _and_ clone_flags includes
CLONE_PTRACE we should set the TIF_DEBUG flag for the child and
increment the ocd refcount. Otherwise, the TIF_DEBUG flag must be
unset.

Currently, the child inherits TIF_DEBUG from the parent before
copy_thread is called, so TIF_DEBUG may be already be set before we
determine whether the child is supposed to inherit debugging
capabilities from the parent or not. This means that ocd_enable()
won't increment the refcount, because TIF_DEBUG is already set, and
that TIF_DEBUG will be set for processes that aren't being debugged.

This leads to a refcounting asymmetry, which may show up as

------------[ cut here ]------------
Badness at arch/avr32/kernel/ocd.c:73
PC is at ocd_disable+0x34/0x60
LR is at put_lock_stats+0xa/0x20

as reported by David Brownell. Happens when strace'ing a process that
forks a new child process, e.g. "strace mount -tjffs2 mtd1 /mnt", and
subsequently killing the child process (e.g. "umount /mnt".)

Signed-off-by: Haavard Skinnemoen &lt;hskinnemoen@atmel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Iff the parent has TIF_DEBUG set, _and_ clone_flags includes
CLONE_PTRACE we should set the TIF_DEBUG flag for the child and
increment the ocd refcount. Otherwise, the TIF_DEBUG flag must be
unset.

Currently, the child inherits TIF_DEBUG from the parent before
copy_thread is called, so TIF_DEBUG may be already be set before we
determine whether the child is supposed to inherit debugging
capabilities from the parent or not. This means that ocd_enable()
won't increment the refcount, because TIF_DEBUG is already set, and
that TIF_DEBUG will be set for processes that aren't being debugged.

This leads to a refcounting asymmetry, which may show up as

------------[ cut here ]------------
Badness at arch/avr32/kernel/ocd.c:73
PC is at ocd_disable+0x34/0x60
LR is at put_lock_stats+0xa/0x20

as reported by David Brownell. Happens when strace'ing a process that
forks a new child process, e.g. "strace mount -tjffs2 mtd1 /mnt", and
subsequently killing the child process (e.g. "umount /mnt".)

Signed-off-by: Haavard Skinnemoen &lt;hskinnemoen@atmel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>avr32: Call tick_nohz_{stop,restart}_sched_tick() in idle loop</title>
<updated>2008-02-15T13:55:10+00:00</updated>
<author>
<name>Haavard Skinnemoen</name>
<email>hskinnemoen@atmel.com</email>
</author>
<published>2008-02-15T13:38:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d45ad06273f797f6239b97fd9962ecd81eec847f'/>
<id>d45ad06273f797f6239b97fd9962ecd81eec847f</id>
<content type='text'>
This fixes a hang on boot with nohz enabled. nohz is not actually
supported in mainline yet, but patches that add support for it are
currently under review.

When nohz is compiled out, the functions are no-ops, so this patch
results in no functional change, but it arguably makes the code more
correct.

Signed-off-by: Haavard Skinnemoen &lt;hskinnemoen@atmel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes a hang on boot with nohz enabled. nohz is not actually
supported in mainline yet, but patches that add support for it are
currently under review.

When nohz is compiled out, the functions are no-ops, so this patch
results in no functional change, but it arguably makes the code more
correct.

Signed-off-by: Haavard Skinnemoen &lt;hskinnemoen@atmel.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
