<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/include/asm-i386/system.h, branch docs-6.8</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=docs-6.8</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=docs-6.8'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2007-10-11T09:20:03+00:00</updated>
<entry>
<title>i386/x86_64: move headers to include/asm-x86</title>
<updated>2007-10-11T09:20:03+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2007-10-11T09:20:03+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=96a388de5dc53a8b234b3fd41f3ae2cedc9ffd42'/>
<id>urn:sha1:96a388de5dc53a8b234b3fd41f3ae2cedc9ffd42</id>
<content type='text'>
Move the headers to include/asm-x86 and fixup the
header install make rules

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>i386: remove bogus comment about memory barrier</title>
<updated>2007-09-29T16:13:59+00:00</updated>
<author>
<name>Nick Piggin</name>
<email>npiggin@suse.de</email>
</author>
<published>2007-09-29T13:28:48+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=4827bbb06e4b59922c2b9bfb13ad1bf936bdebe5'/>
<id>urn:sha1:4827bbb06e4b59922c2b9bfb13ad1bf936bdebe5</id>
<content type='text'>
The comment being removed by this patch is incorrect and misleading.

In the following situation:

	1. load  ...
	2. store 1 -&gt; X
	3. wmb
	4. rmb
	5. load  a &lt;- Y
	6. store ...

4 will only ensure ordering of 1 with 5.
3 will only ensure ordering of 2 with 6.

Further, a CPU with strictly in-order stores will still only provide that
2 and 6 are ordered (effectively, it is the same as a weakly ordered CPU
with wmb after every store).

In all cases, 5 may still be executed before 2 is visible to other CPUs!

The additional piece of the puzzle that mb() provides is the store/load
ordering, which fundamentally cannot be achieved with any combination of
rmb()s and wmb()s.

This can be an unexpected result if one expected any sort of global ordering
guarantee to barriers (eg. that the barriers themselves are sequentially
consistent with other types of barriers).  However sfence or lfence barriers
need only provide an ordering partial ordering of memory operations -- Consider
that wmb may be implemented as nothing more than inserting a special barrier
entry in the store queue, or, in the case of x86, it can be a noop as the store
queue is in order. And an rmb may be implemented as a directive to prevent
subsequent loads only so long as their are no previous outstanding loads (while
there could be stores still in store queues).

I can actually see the occasional load/store being reordered around lfence on
my core2. That doesn't prove my above assertions, but it does show the comment
is wrong (unless my program is -- can send it out by request).

So:
   mb() and smp_mb() always have and always will require a full mfence
   or lock prefixed instruction on x86.  And we should remove this comment.

Signed-off-by: Nick Piggin &lt;npiggin@suse.de&gt;
Cc: Paul McKenney &lt;paulmck@us.ibm.com&gt;
Cc: David Howells &lt;dhowells@redhat.com&gt;
Cc: Andi Kleen &lt;ak@suse.de&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] sched: sched_cacheflush is now unused</title>
<updated>2007-07-19T19:28:35+00:00</updated>
<author>
<name>Ralf Baechle</name>
<email>ralf@linux-mips.org</email>
</author>
<published>2007-07-19T19:28:35+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=c41917df8a1adde34864116ce2231a7fe308d2ff'/>
<id>urn:sha1:c41917df8a1adde34864116ce2231a7fe308d2ff</id>
<content type='text'>
Since Ingo's recent scheduler rewrite which was merged as commit
0437e109e1841607f2988891eaa36c531c6aa6ac sched_cacheflush is unused.

Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>x86: create asm/cmpxchg.h</title>
<updated>2007-05-08T18:15:20+00:00</updated>
<author>
<name>Jeff Dike</name>
<email>jdike@addtoit.com</email>
</author>
<published>2007-05-08T07:35:02+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=a436ed9c5106b41606cbb55ab3b28389fe8ae04f'/>
<id>urn:sha1:a436ed9c5106b41606cbb55ab3b28389fe8ae04f</id>
<content type='text'>
i386:

  Rearrange the cmpxchg code to allow atomic.h to get it without needing to
  include system.h.  This kills warnings in the UML build from atomic.h about
  implicit declarations of cmpxchg symbols.  The i386 build presumably isn't
  seeing this because a separate inclusion of system.h is covering it over.

  The cmpxchg stuff is moved to asm-i386/cmpxchg.h, with an include left in
  system.h for the benefit of generic code which expects cmpxchg there.

  Meanwhile, atomic.h includes cmpxchg.h.

  This causes no noticable damage to the i386 build.

x86_64:

  Move cmpxchg into its own header.  atomic.h already included system.h, so
  this is changed to include cmpxchg.h.

  This is purely cleanup - it's not fixing any warnings - so if the x86_64
  system.h isn't considered as cleanup-worthy as i386, then this can be
  dropped.

  It causes no noticable damage to the x86_64 build.

uml:

  The i386 and x86_64 cmpxchg patches require an asm-um/cmpxchg.h for the
  UML build.

Signed-off-by: Jeff Dike &lt;jdike@linux.intel.com&gt;
Cc: Paolo 'Blaisorblade' Giarrusso &lt;blaisorblade@yahoo.it&gt;
Cc: Andi Kleen &lt;ak@suse.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Remove tas()</title>
<updated>2007-05-08T18:15:20+00:00</updated>
<author>
<name>Jeff Dike</name>
<email>jdike@addtoit.com</email>
</author>
<published>2007-05-08T07:34:59+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=5dc12ddee93d63d7107cbbf70db23476d7b30e43'/>
<id>urn:sha1:5dc12ddee93d63d7107cbbf70db23476d7b30e43</id>
<content type='text'>
tas() has no users, so get rid of it.

Signed-off-by: Jeff Dike &lt;jdike@linux.intel.com&gt;
Cc: &lt;linux-arch@vger.kernel.org&gt;
Cc: Paolo 'Blaisorblade' Giarrusso &lt;blaisorblade@yahoo.it&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>local_t: i386 extension</title>
<updated>2007-05-08T18:15:20+00:00</updated>
<author>
<name>Mathieu Desnoyers</name>
<email>mathieu.desnoyers@polymtl.ca</email>
</author>
<published>2007-05-08T07:34:44+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=a075227948636e10aa2cc2d8725fbbab27681d4a'/>
<id>urn:sha1:a075227948636e10aa2cc2d8725fbbab27681d4a</id>
<content type='text'>
Signed-off-by: Mathieu Desnoyers &lt;mathieu.desnoyers@polymtl.ca&gt;
Cc: Andi Kleen &lt;ak@muc.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] i386: rationalize paravirt wrappers</title>
<updated>2007-05-02T17:27:10+00:00</updated>
<author>
<name>Rusty Russell</name>
<email>rusty@rustcorp.com.au</email>
</author>
<published>2007-05-02T17:27:10+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=90a0a06aa81692028864c21f981905fda46b1208'/>
<id>urn:sha1:90a0a06aa81692028864c21f981905fda46b1208</id>
<content type='text'>
paravirt.c used to implement native versions of all low-level
functions.  Far cleaner is to have the native versions exposed in the
headers and as inline native_XXX, and if !CONFIG_PARAVIRT, then simply
#define XXX native_XXX.

There are several nice side effects:

1) write_dt_entry() now takes the correct "struct Xgt_desc_struct *"
   not "void *".

2) load_TLS is reintroduced to the for loop, not manually unrolled
   with a #error in case the bounds ever change.

3) Macros become inlines, with type checking.

4) Access to the native versions is trivial for KVM, lguest, Xen and
   others who might want it.

Signed-off-by: Jeremy Fitzhardinge &lt;jeremy@xensource.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Signed-off-by: Andi Kleen &lt;ak@suse.de&gt;
Cc: Andi Kleen &lt;ak@muc.de&gt;
Cc: Avi Kivity &lt;avi@qumranet.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] paravirt: header and stubs for paravirtualisation</title>
<updated>2006-12-07T01:14:07+00:00</updated>
<author>
<name>Rusty Russell</name>
<email>rusty@rustcorp.com.au</email>
</author>
<published>2006-12-07T01:14:07+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=d3561b7fa0fb0fc583bab0eeda32bec9e4c4056d'/>
<id>urn:sha1:d3561b7fa0fb0fc583bab0eeda32bec9e4c4056d</id>
<content type='text'>
Create a paravirt.h header for all the critical operations which need to be
replaced with hypervisor calls, and include that instead of defining native
operations, when CONFIG_PARAVIRT.

This patch does the dumbest possible replacement of paravirtualized
instructions: calls through a "paravirt_ops" structure.  Currently these are
function implementations of native hardware: hypervisors will override the ops
structure with their own variants.

All the pv-ops functions are declared "fastcall" so that a specific
register-based ABI is used, to make inlining assember easier.

And:

+From: Andy Whitcroft &lt;apw@shadowen.org&gt;

The paravirt ops introduce a 'weak' attribute onto memory_setup().
Code ordering leads to the following warnings on x86:

    arch/i386/kernel/setup.c:651: warning: weak declaration of
                `memory_setup' after first use results in unspecified behavior

Move memory_setup() to avoid this.

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Signed-off-by: Chris Wright &lt;chrisw@sous-sol.org&gt;
Signed-off-by: Andi Kleen &lt;ak@suse.de&gt;
Cc: Jeremy Fitzhardinge &lt;jeremy@goop.org&gt;
Cc: Zachary Amsden &lt;zach@vmware.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Andy Whitcroft &lt;apw@shadowen.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] x86: implement always-locked bit ops, for memory shared with an SMP hypervisor</title>
<updated>2006-09-26T15:48:55+00:00</updated>
<author>
<name>Chris Wright</name>
<email>chrisw@sous-sol.org</email>
</author>
<published>2006-09-26T06:32:23+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=027a8c7e6067a1bcdef6775d1b1c08729dfbae51'/>
<id>urn:sha1:027a8c7e6067a1bcdef6775d1b1c08729dfbae51</id>
<content type='text'>
Add "always lock'd" implementations of set_bit, clear_bit and change_bit and
the corresponding test_and_ functions.  Also add "always lock'd"
implementation of cmpxchg.  These give guaranteed strong synchronisation and
are required for non-SMP kernels running on an SMP hypervisor.

Signed-off-by: Ian Pratt &lt;ian.pratt@xensource.com&gt;
Signed-off-by: Christian Limpach &lt;Christian.Limpach@cl.cam.ac.uk&gt;
Signed-off-by: Chris Wright &lt;chrisw@sous-sol.org&gt;
Signed-off-by: Jeremy Fitzhardinge &lt;jeremy@xensource.com&gt;
Cc: Christoph Lameter &lt;clameter@sgi.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>x86: save/restore eflags in context switch</title>
<updated>2006-09-18T23:20:40+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@g5.osdl.org</email>
</author>
<published>2006-09-18T23:20:40+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=47a5c6fa0e204a2b63309c648bb2fde36836c826'/>
<id>urn:sha1:47a5c6fa0e204a2b63309c648bb2fde36836c826</id>
<content type='text'>
(And reset it on new thread creation)

It turns out that eflags is important to save and restore not just
because of iopl, but due to the magic bits like the NT bit, which we
don't want leaking between different threads.

Tested-by: Mike Galbraith &lt;efault@gmx.de&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
</feed>
