<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-linux/include/asm-powerpc/current.h, branch stable</title>
<subtitle>WireGuard for the Linux kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-linux/atom/include/asm-powerpc/current.h?h=stable</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-linux/atom/include/asm-powerpc/current.h?h=stable'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/'/>
<updated>2008-08-04T02:02:00Z</updated>
<entry>
<title>powerpc: Move include files to arch/powerpc/include/asm</title>
<updated>2008-08-04T02:02:00Z</updated>
<author>
<name>Stephen Rothwell</name>
<email>sfr@canb.auug.org.au</email>
</author>
<published>2008-08-01T05:20:30Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=b8b572e1015f81b4e748417be2629dfe51ab99f9'/>
<id>urn:sha1:b8b572e1015f81b4e748417be2629dfe51ab99f9</id>
<content type='text'>
from include/asm-powerpc.  This is the result of a

mkdir arch/powerpc/include/asm
git mv include/asm-powerpc/* arch/powerpc/include/asm

Followed by a few documentation/comment fixups and a couple of places
where &lt;asm-powepc/...&gt; was being used explicitly.  Of the latter only
one was outside the arch code and it is a driver only built for powerpc.

Signed-off-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
</content>
</entry>
<entry>
<title>[POWERPC] Include stddef.h in asm-powerpc/current.h to get offsetof</title>
<updated>2007-03-09T04:03:24Z</updated>
<author>
<name>Olaf Hering</name>
<email>olaf@aepfle.de</email>
</author>
<published>2007-02-25T19:04:18Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=dbc11f539df7c9a32424b78afb0314c68d5e7d0b'/>
<id>urn:sha1:dbc11f539df7c9a32424b78afb0314c68d5e7d0b</id>
<content type='text'>
On Tue, Oct 31, Hugh Dickins wrote:

&gt; +++ linux/include/asm-powerpc/current.h	2006-10-30 19:27:05.000000000 +0000

&gt; +static inline struct task_struct *get_current(void)
&gt; +{
&gt; +	struct task_struct *task;
&gt; +
&gt; +	__asm__ __volatile__("ld %0,%1(13)"
&gt; +	: "=r" (task)
&gt; +	: "i" (offsetof(struct paca_struct, __current)));

This breaks compile of 2.6.18.8:

  CC [M]  drivers/media/video/pwc/pwc-uncompress.o
In file included from /home/olaf/kernel/linux-2.6.18.8/drivers/media/video/pwc/pwc-uncompress.c:29:
include2/asm/current.h: In function 'get_current':
include2/asm/current.h:23: warning: implicit declaration of function 'offsetof'
include2/asm/current.h:23: error: expected expression before 'struct'
make[5]: *** [drivers/media/video/pwc/pwc-uncompress.o] Error 1

Signed-off-by: Olaf Hering &lt;olaf@aepfle.de&gt;
Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
</content>
</entry>
<entry>
<title>[POWERPC] Make current preempt-safe</title>
<updated>2006-11-01T03:52:48Z</updated>
<author>
<name>Hugh Dickins</name>
<email>hugh@veritas.com</email>
</author>
<published>2006-10-31T18:39:31Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=5fe8e8b88e68e517637e3f8287f1fee89e2d9252'/>
<id>urn:sha1:5fe8e8b88e68e517637e3f8287f1fee89e2d9252</id>
<content type='text'>
Repeated -j20 kernel builds on a G5 Quad running an SMP PREEMPT kernel
would often collapse within a day, some exec failing with "Bad address".
In each case examined, load_elf_binary was doing a kernel_read, but
generic_file_aio_read's access_ok saw current-&gt;thread.fs.seg as USER_DS
instead of KERNEL_DS.

objdump of filemap.o shows gcc 4.1.0 emitting "mr r5,r13 ... ld r9,416(r5)"
here for get_paca()-&gt;__current, instead of the expected and much more usual
"ld r9,416(r13)"; I've seen other gcc4s do the same, but perhaps not gcc3s.

So, if the task is preempted and rescheduled on a different cpu in between
the mr and the ld, r5 will be looking at a different paca_struct from the
one it's now on, pick up the wrong __current, and perhaps the wrong seg.
Presumably much worse could happen elsewhere, though that split is rare.

Other architectures appear to be safe (x86_64's read_pda is more limiting
than get_paca), but ppc64 needs to force "current" into one instruction.

Signed-off-by: Hugh Dickins &lt;hugh@veritas.com&gt;
Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] powerpc: sanitize header files for user space includes</title>
<updated>2006-01-09T04:13:08Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2005-12-16T21:43:46Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=88ced0314938814e1772b4d0d7ab20c52e4472b6'/>
<id>urn:sha1:88ced0314938814e1772b4d0d7ab20c52e4472b6</id>
<content type='text'>
include/asm-ppc/ had #ifdef __KERNEL__ in all header files that
are not meant for use by user space, include/asm-powerpc does
not have this yet.

This patch gets us a lot closer there. There are a few cases
where I was not sure, so I left them out. I have verified
that no CONFIG_* symbols are used outside of __KERNEL__
any more and that there are no obvious compile errors when
including any of the headers in user space libraries.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] powerpc: Merge current.h</title>
<updated>2005-11-10T00:23:53Z</updated>
<author>
<name>David Gibson</name>
<email>david@gibson.dropbear.id.au</email>
</author>
<published>2005-11-09T02:04:06Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=584224e4095d8abcf2bef38efacc291be9a44c20'/>
<id>urn:sha1:584224e4095d8abcf2bef38efacc291be9a44c20</id>
<content type='text'>
This patch merges current.h.  This is a one-big-ifdef merge, but both
versions are so tiny, I think we can live with it.  While we're at it,
we get rid of the fairly pointless redirection through get_current()
in the ppc64 version.

Built and booted on POWER5 LPAR (ARCH=powerpc &amp; ARCH=ppc64).  Built
for 32-bit pmac (ARCH=powerpc &amp; ARCH=ppc).

Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
</content>
</entry>
</feed>
