<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/avr32/kernel/process.c, branch linux-2.6.28.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.28.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.28.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2008-10-08T16:44:58Z</updated>
<entry>
<title>avr32: Minor pm_power_off cleanup</title>
<updated>2008-10-08T16:44:58Z</updated>
<author>
<name>Haavard Skinnemoen</name>
</author>
<published>2008-07-28T11:05:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b3bc2c5562f06ca34b30f61c5714e96490946c81'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>avr32: Use &lt;mach/foo.h&gt; instead of &lt;asm/arch/foo.h&gt;</title>
<updated>2008-08-05T12:36:57Z</updated>
<author>
<name>Haavard Skinnemoen</name>
</author>
<published>2008-08-05T11:57:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3663b736a5083b3bce74520b637f630f01f66a7f'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>nohz: prevent tick stop outside of the idle loop</title>
<updated>2008-07-18T16:10:28Z</updated>
<author>
<name>Thomas Gleixner</name>
</author>
<published>2008-07-18T15:27:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b8f8c3cf0a4ac0632ec3f0e15e9dc0c29de917af'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>avr32: Add hardware power-down function call</title>
<updated>2008-04-20T00:40:11Z</updated>
<author>
<name>Peter Ma</name>
</author>
<published>2008-04-19T07:24:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ed3fa7c9510cde67d232299cab8052ff50a08285'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>avr32: Move sleep code into mach-at32ap</title>
<updated>2008-04-20T00:40:07Z</updated>
<author>
<name>Haavard Skinnemoen</name>
</author>
<published>2008-02-24T22:24:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7e59128f31e0c57d52e86d57730d4c9281494dda'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>avr32: Fix OCD refcounting bug</title>
<updated>2008-02-27T13:23:53Z</updated>
<author>
<name>Haavard Skinnemoen</name>
</author>
<published>2008-02-27T13:04:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=325d6f5593b40b5a48cf4ade74c01681f2ff6044'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>avr32: Call tick_nohz_{stop,restart}_sched_tick() in idle loop</title>
<updated>2008-02-15T13:55:10Z</updated>
<author>
<name>Haavard Skinnemoen</name>
</author>
<published>2008-02-15T13:38:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d45ad06273f797f6239b97fd9962ecd81eec847f'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>[AVR32] Enable debugging only when needed</title>
<updated>2008-01-25T07:31:39Z</updated>
<author>
<name>Haavard Skinnemoen</name>
</author>
<published>2007-11-27T12:50:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=13b54a50525a9685065684e1e11258d27dd27bdf'/>
<id>urn:sha1:13b54a50525a9685065684e1e11258d27dd27bdf</id>
<content type='text'>
Keep track of processes being debugged (including the kernel itself)
and turn the OCD system on and off as appropriate. Since enabling
debugging turns off some optimizations in the CPU core, this fixes the
issue that enabling KProbes support or simply running a program under
gdbserver will reduce system performance significantly until the next
reboot.

The CPU performance will still be reduced for all processes while a
process is being debugged, but this is a lot better than reducing the
performance forever.

Signed-off-by: Haavard Skinnemoen &lt;hskinnemoen@atmel.com&gt;
</content>
</entry>
<entry>
<title>[AVR32] Clean up OCD register usage</title>
<updated>2007-12-07T13:54:40Z</updated>
<author>
<name>Haavard Skinnemoen</name>
</author>
<published>2007-11-27T12:31:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8dfe8f29cd371affcc3c6b35658dc4bd95ee7b61'/>
<id>urn:sha1:8dfe8f29cd371affcc3c6b35658dc4bd95ee7b61</id>
<content type='text'>
Generate a new set of OCD register definitions in asm/ocd.h and rename
__mfdr() and __mtdr() to ocd_read() and ocd_write() respectively.

The bitfield definitions are a lot more complete now, and they are
entirely based on bit numbers, not masks. This is because OCD
registers are frequently accessed from assembly code, where bit
numbers are a lot more useful (can be fed directly to sbr, bfins,
etc.)

Bitfields that consist of more than one bit have two definitions:
_START, which indicates the number of the first bit, and _SIZE, which
indicates the number of bits. These directly correspond to the
parameters taken by the bfextu, bfexts and bfins instructions.

Signed-off-by: Haavard Skinnemoen &lt;hskinnemoen@atmel.com&gt;
</content>
</entry>
<entry>
<title>[AVR32] Fix invalid status register bit definitions in asm/ptrace.h</title>
<updated>2007-12-07T13:52:33Z</updated>
<author>
<name>Haavard Skinnemoen</name>
</author>
<published>2007-11-27T17:59:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=df679771ce6a6bf57012459fbd15c981deaee526'/>
<id>urn:sha1:df679771ce6a6bf57012459fbd15c981deaee526</id>
<content type='text'>
The 'H' bit is bit 29, while the 'R' bit doesn't exist. Luckily, we
don't actually use any of the bits in question.

Also update show_regs() to show the Debug Mask and Debug state bits.

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