<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/arch/powerpc/lib, branch v3.6</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v3.6</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.6'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2012-09-05T06:05:23Z</updated>
<entry>
<title>powerpc: Don't use __put_user() in patch_instruction</title>
<updated>2012-09-05T06:05:23Z</updated>
<author>
<name>Benjamin Herrenschmidt</name>
<email>benh@kernel.crashing.org</email>
</author>
<published>2012-09-04T15:08:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=636802ef96eebe279b22ad9f9dacfe29291e45c7'/>
<id>urn:sha1:636802ef96eebe279b22ad9f9dacfe29291e45c7</id>
<content type='text'>
patch_instruction() can be called very early on ppc32, when the kernel
isn't yet running at it's linked address. That can cause the !
is_kernel_addr() test in __put_user() to trip and call might_sleep()
which is very bad at that point during boot.

Use a lower level function instead for now, at least until we get to
rework ppc32 boot process to do the code patching later, like ppc64
does.

Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc: Fix VMX in interrupt check in POWER7 copy loops</title>
<updated>2012-08-24T10:26:09Z</updated>
<author>
<name>Anton Blanchard</name>
<email>anton@samba.org</email>
</author>
<published>2012-08-07T17:51:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2fae7cdb60240e2e2d9b378afbf6d9fcce8a3890'/>
<id>urn:sha1:2fae7cdb60240e2e2d9b378afbf6d9fcce8a3890</id>
<content type='text'>
The enhanced prefetch hint patches corrupt the condition register
that was used to check if we are in interrupt. Fix this by using cr1.

Signed-off-by: Anton Blanchard &lt;anton@samba.org&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc: POWER7 copy_to_user/copy_from_user patch applied twice</title>
<updated>2012-08-24T10:26:09Z</updated>
<author>
<name>Anton Blanchard</name>
<email>anton@samba.org</email>
</author>
<published>2012-08-07T17:50:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=dad477ccd65f05bf3b5a874e0118bf4156a1fcbb'/>
<id>urn:sha1:dad477ccd65f05bf3b5a874e0118bf4156a1fcbb</id>
<content type='text'>
"powerpc: Use enhanced touch instructions in POWER7
copy_to_user/copy_from_user" was applied twice. Remove one.

Signed-off-by: Anton Blanchard &lt;anton@samba.org&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc: Put the gpr save/restore functions in their own section</title>
<updated>2012-07-11T04:19:59Z</updated>
<author>
<name>Stephen Rothwell</name>
<email>sfr@canb.auug.org.au</email>
</author>
<published>2012-07-05T21:09:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1d5a436d2ce9d1b65c905f69a33e78d69245993e'/>
<id>urn:sha1:1d5a436d2ce9d1b65c905f69a33e78d69245993e</id>
<content type='text'>
This allows the linker to know that calls to them do not need to switch
TOC and stop errors like the following when linking large configurations:

powerpc64-linux-ld: drivers/built-in.o: In function `.gpiochip_is_requested':
(.text+0x4): sibling call optimization to `_savegpr0_29' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `_savegpr0_29' extern

Signed-off-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc: Fixes for instructions not using correct register naming</title>
<updated>2012-07-10T09:18:16Z</updated>
<author>
<name>Michael Neuling</name>
<email>mikey@neuling.org</email>
</author>
<published>2012-06-25T13:33:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e55174e911637f0093bc9dac137b568e8a4a1f29'/>
<id>urn:sha1:e55174e911637f0093bc9dac137b568e8a4a1f29</id>
<content type='text'>
These macros are using integers where they could be using logical
names since they take registers.

We are going to enforce this soon, so fix these up now.

Signed-off-by: Michael Neuling &lt;mikey@neuling.org&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc: Change mtcrf to use real register names</title>
<updated>2012-07-10T09:18:11Z</updated>
<author>
<name>Michael Neuling</name>
<email>mikey@neuling.org</email>
</author>
<published>2012-06-25T13:33:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=86e32fdce7c6582a52b9468106714779d871c773'/>
<id>urn:sha1:86e32fdce7c6582a52b9468106714779d871c773</id>
<content type='text'>
mtocrf define is just a wrapper around the real instructions so we can
just use real register names here (ie. lower case).

Also remove braces in macro so this is possible.

Signed-off-by: Michael Neuling &lt;mikey@neuling.org&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc: Merge STK_REG/PARAM/FRAMESIZE</title>
<updated>2012-07-10T09:18:03Z</updated>
<author>
<name>Michael Neuling</name>
<email>mikey@neuling.org</email>
</author>
<published>2012-06-25T13:33:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=44ce6a5ee751893ecdedbd7544c645752a5dbc01'/>
<id>urn:sha1:44ce6a5ee751893ecdedbd7544c645752a5dbc01</id>
<content type='text'>
Merge the defines of STACKFRAMESIZE, STK_REG, STK_PARAM from different
places.

Signed-off-by: Michael Neuling &lt;mikey@neuling.org&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc: Fix usage of register macros getting ready for %r0 change</title>
<updated>2012-07-10T09:17:55Z</updated>
<author>
<name>Michael Neuling</name>
<email>mikey@neuling.org</email>
</author>
<published>2012-06-25T13:33:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c75df6f96c59beed8632e3aced5fb4faabaa6c5b'/>
<id>urn:sha1:c75df6f96c59beed8632e3aced5fb4faabaa6c5b</id>
<content type='text'>
Anything that uses a constructed instruction (ie. from ppc-opcode.h),
need to use the new R0 macro, as %r0 is not going to work.

Also convert usages of macros where we are just determining an offset
(usually for a load/store), like:
	std	r14,STK_REG(r14)(r1)
Can't use STK_REG(r14) as %r14 doesn't work in the STK_REG macro since
it's just calculating an offset.

Signed-off-by: Michael Neuling &lt;mikey@neuling.org&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc: Optimise the 64bit optimised __clear_user</title>
<updated>2012-07-03T04:14:48Z</updated>
<author>
<name>Anton Blanchard</name>
<email>anton@samba.org</email>
</author>
<published>2012-06-04T16:02:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cf8fb5533f35709ba7e31560264b565a9c7a090f'/>
<id>urn:sha1:cf8fb5533f35709ba7e31560264b565a9c7a090f</id>
<content type='text'>
I blame Mikey for this. He elevated my slightly dubious testcase:

to benchmark status. And naturally we need to be number 1 at creating
zeros. So lets improve __clear_user some more.

As Paul suggests we can use dcbz for large lengths. This patch gets
the destination cacheline aligned then uses dcbz on whole cachelines.

Before:
10485760000 bytes (10 GB) copied, 0.414744 s, 25.3 GB/s

After:
10485760000 bytes (10 GB) copied, 0.268597 s, 39.0 GB/s

39 GB/s, a new record.

Signed-off-by: Anton Blanchard &lt;anton@samba.org&gt;
Tested-by: Olof Johansson &lt;olof@lixom.net&gt;
Acked-by: Olof Johansson &lt;olof@lixom.net&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc: POWER7 optimised memcpy using VMX and enhanced prefetch</title>
<updated>2012-07-03T04:14:46Z</updated>
<author>
<name>Anton Blanchard</name>
<email>anton@samba.org</email>
</author>
<published>2012-05-30T20:22:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b3f271e86e5a440713716bb222e1aa1227994c50'/>
<id>urn:sha1:b3f271e86e5a440713716bb222e1aa1227994c50</id>
<content type='text'>
Implement a POWER7 optimised memcpy using VMX and enhanced prefetch
instructions.

This is a copy of the POWER7 optimised copy_to_user/copy_from_user
loop. Detailed implementation and performance details can be found in
commit a66086b8197d (powerpc: POWER7 optimised
copy_to_user/copy_from_user using VMX).

I noticed memcpy issues when profiling a RAID6 workload:

	.memcpy
	.async_memcpy
	.async_copy_data
	.__raid_run_ops
	.handle_stripe
	.raid5d
	.md_thread

I created a simplified testcase by building a RAID6 array with 4 1GB
ramdisks (booting with brd.rd_size=1048576):

# mdadm -CR -e 1.2 /dev/md0 --level=6 -n4 /dev/ram[0-3]

I then timed how long it took to write to the entire array:

# dd if=/dev/zero of=/dev/md0 bs=1M

Before: 892 MB/s
After:  999 MB/s

A 12% improvement.

Signed-off-by: Anton Blanchard &lt;anton@samba.org&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
</feed>
