<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/x86/kernel/alternative.c, branch linux-3.1.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.1.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.1.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2011-07-15T00:57:05Z</updated>
<entry>
<title>x86-64: Move vread_tsc and vread_hpet into the vDSO</title>
<updated>2011-07-15T00:57:05Z</updated>
<author>
<name>Andy Lutomirski</name>
</author>
<published>2011-07-14T10:47:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=98d0ac38ca7b1b7a552c9a2359174ff84decb600'/>
<id>urn:sha1:98d0ac38ca7b1b7a552c9a2359174ff84decb600</id>
<content type='text'>
The vsyscall page now consists entirely of trap instructions.

Cc: John Stultz &lt;johnstul@us.ibm.com&gt;
Signed-off-by: Andy Lutomirski &lt;luto@mit.edu&gt;
Link: http://lkml.kernel.org/r/637648f303f2ef93af93bae25186e9a1bea093f5.1310639973.git.luto@mit.edu
Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>x86: Make alternative instruction pointers relative</title>
<updated>2011-07-13T18:22:56Z</updated>
<author>
<name>Andy Lutomirski</name>
</author>
<published>2011-07-13T13:24:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=59e97e4d6fbcd5b74a94cb48bcbfc6f8478a5e93'/>
<id>urn:sha1:59e97e4d6fbcd5b74a94cb48bcbfc6f8478a5e93</id>
<content type='text'>
This save a few bytes on x86-64 and means that future patches can
apply alternatives to unrelocated code.

Signed-off-by: Andy Lutomirski &lt;luto@mit.edu&gt;
Link: http://lkml.kernel.org/r/ff64a6b9a1a3860ca4a7b8b6dc7b4754f9491cd7.1310563276.git.luto@mit.edu
Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip</title>
<updated>2011-05-20T00:55:12Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2011-05-20T00:55:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=016281880439a8665ecf37514865742da58131d4'/>
<id>urn:sha1:016281880439a8665ecf37514865742da58131d4</id>
<content type='text'>
* 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86, cpu: Fix detection of Celeron Covington stepping A1 and B0
  Documentation, ABI: Update L3 cache index disable text
  x86, AMD, cacheinfo: Fix L3 cache index disable checks
  x86, AMD, cacheinfo: Fix fallout caused by max3 conversion
  x86, cpu: Change NOP selection for certain Intel CPUs
  x86, cpu: Clean up and unify the NOP selection infrastructure
  x86, percpu: Use ASM_NOP4 instead of hardcoding P6_NOP4
  x86, cpu: Move AMD Elan Kconfig under "Processor family"

Fix up trivial conflicts in alternative handling (commit dc326fca2b64
"x86, cpu: Clean up and unify the NOP selection infrastructure" removed
some hacky 5-byte instruction stuff, while commit d430d3d7e646 "jump
label: Introduce static_branch() interface" renamed HAVE_JUMP_LABEL to
CONFIG_JUMP_LABEL in the code that went away)
</content>
</entry>
<entry>
<title>Merge branch 'x86/mem' into perf/core</title>
<updated>2011-05-18T18:59:30Z</updated>
<author>
<name>Ingo Molnar</name>
</author>
<published>2011-05-18T18:59:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=01ed58abec07633791f03684b937a7e22e00c9bb'/>
<id>urn:sha1:01ed58abec07633791f03684b937a7e22e00c9bb</id>
<content type='text'>
Merge reason: memcpy_64.S changes an assumption perf bench has, so merge this
              here so we can fix it.

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>x86, alternative, doc: Add comment for applying alternatives order</title>
<updated>2011-05-17T22:40:25Z</updated>
<author>
<name>Fenghua Yu</name>
</author>
<published>2011-05-17T22:29:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=509731336313b3799cf03071d72c64fa6383895e'/>
<id>urn:sha1:509731336313b3799cf03071d72c64fa6383895e</id>
<content type='text'>
Some string operation functions may be patched twice, e.g. on enhanced REP MOVSB
/STOSB processors, memcpy is patched first by fast string alternative function,
then it is patched by enhanced REP MOVSB/STOSB alternative function.

Add comment for applying alternatives order to warn people who may change the
applying alternatives order for any reason.

[ Documentation-only patch ]

Signed-off-by: Fenghua Yu &lt;fenghua.yu@intel.com&gt;
Link: http://lkml.kernel.org/r/1305671358-14478-4-git-send-email-fenghua.yu@intel.com
Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>x86, cpu: Change NOP selection for certain Intel CPUs</title>
<updated>2011-04-18T23:40:32Z</updated>
<author>
<name>H. Peter Anvin</name>
</author>
<published>2011-04-18T22:31:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d8d9766c8c29f71c37bc4b74cc9fcf6a192c9bfd'/>
<id>urn:sha1:d8d9766c8c29f71c37bc4b74cc9fcf6a192c9bfd</id>
<content type='text'>
Due to a decoder implementation quirk, some specific Intel CPUs
actually perform better with the "k8_nops" than with the
SDM-recommended NOPs.  For runtime-selected NOPs, if we detect those
specific CPUs then use the k8_nops instead of the ones we would
normally use.

Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Jason Baron &lt;jbaron@redhat.com&gt;
Link: http://lkml.kernel.org/r/1303166160-10315-4-git-send-email-hpa@linux.intel.com
</content>
</entry>
<entry>
<title>x86, cpu: Clean up and unify the NOP selection infrastructure</title>
<updated>2011-04-18T23:40:21Z</updated>
<author>
<name>H. Peter Anvin</name>
</author>
<published>2011-04-18T22:19:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dc326fca2b640fc41aed7c015d0f456935a66255'/>
<id>urn:sha1:dc326fca2b640fc41aed7c015d0f456935a66255</id>
<content type='text'>
Clean up and unify the NOP selection infrastructure:

- Make the atomic 5-byte NOP a part of the selection system.
- Pick NOPs once during early boot and then be done with it.

Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Jason Baron &lt;jbaron@redhat.com&gt;
Link: http://lkml.kernel.org/r/1303166160-10315-3-git-send-email-hpa@linux.intel.com
</content>
</entry>
<entry>
<title>jump label: Introduce static_branch() interface</title>
<updated>2011-04-04T16:48:08Z</updated>
<author>
<name>Jason Baron</name>
</author>
<published>2011-03-16T21:29:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d430d3d7e646eb1eac2bb4aa244a644312e67c76'/>
<id>urn:sha1:d430d3d7e646eb1eac2bb4aa244a644312e67c76</id>
<content type='text'>
Introduce:

static __always_inline bool static_branch(struct jump_label_key *key);

instead of the old JUMP_LABEL(key, label) macro.

In this way, jump labels become really easy to use:

Define:

        struct jump_label_key jump_key;

Can be used as:

        if (static_branch(&amp;jump_key))
                do unlikely code

enable/disale via:

        jump_label_inc(&amp;jump_key);
        jump_label_dec(&amp;jump_key);

that's it!

For the jump labels disabled case, the static_branch() becomes an
atomic_read(), and jump_label_inc()/dec() are simply atomic_inc(),
atomic_dec() operations. We show testing results for this change below.

Thanks to H. Peter Anvin for suggesting the 'static_branch()' construct.

Since we now require a 'struct jump_label_key *key', we can store a pointer into
the jump table addresses. In this way, we can enable/disable jump labels, in
basically constant time. This change allows us to completely remove the previous
hashtable scheme. Thanks to Peter Zijlstra for this re-write.

Testing:

I ran a series of 'tbench 20' runs 5 times (with reboots) for 3
configurations, where tracepoints were disabled.

jump label configured in
avg: 815.6

jump label *not* configured in (using atomic reads)
avg: 800.1

jump label *not* configured in (regular reads)
avg: 803.4

Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
LKML-Reference: &lt;20110316212947.GA8792@redhat.com&gt;
Signed-off-by: Jason Baron &lt;jbaron@redhat.com&gt;
Suggested-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
Tested-by: David Daney &lt;ddaney@caviumnetworks.com&gt;
Acked-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
Acked-by: David S. Miller &lt;davem@davemloft.net&gt;
Acked-by: Mathieu Desnoyers &lt;mathieu.desnoyers@efficios.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>x86: Fix common misspellings</title>
<updated>2011-03-18T09:39:30Z</updated>
<author>
<name>Lucas De Marchi</name>
</author>
<published>2011-03-17T19:24:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0d2eb44f631d9d0a826efa3156f157477fdaecf4'/>
<id>urn:sha1:0d2eb44f631d9d0a826efa3156f157477fdaecf4</id>
<content type='text'>
They were generated by 'codespell' and then manually reviewed.

Signed-off-by: Lucas De Marchi &lt;lucas.demarchi@profusion.mobi&gt;
Cc: trivial@kernel.org
LKML-Reference: &lt;1300389856-1099-3-git-send-email-lucas.demarchi@profusion.mobi&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>x86: stop_machine_text_poke() should issue sync_core()</title>
<updated>2011-03-15T15:36:37Z</updated>
<author>
<name>Mathieu Desnoyers</name>
</author>
<published>2011-03-03T16:01:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0e00f7aed6af21fc09b2a94d28bc34e449bd3a53'/>
<id>urn:sha1:0e00f7aed6af21fc09b2a94d28bc34e449bd3a53</id>
<content type='text'>
Intel Archiecture Software Developer's Manual section 7.1.3 specifies that a
core serializing instruction such as "cpuid" should be executed on _each_ core
before the new instruction is made visible.

Failure to do so can lead to unspecified behavior (Intel XMC erratas include
General Protection Fault in the list), so we should avoid this at all cost.

This problem can affect modified code executed by interrupt handlers after
interrupt are re-enabled at the end of stop_machine, because no core serializing
instruction is executed between the code modification and the moment interrupts
are reenabled.

Because stop_machine_text_poke performs the text modification from the first CPU
decrementing stop_machine_first, modified code executed in thread context is
also affected by this problem. To explain why, we have to split the CPUs in two
categories: the CPU that initiates the text modification (calls text_poke_smp)
and all the others. The scheduler, executed on all other CPUs after
stop_machine, issues an "iret" core serializing instruction, and therefore
handles core serialization for all these CPUs. However, the text modification
initiator can continue its execution on the same thread and access the modified
text without any scheduler call. Given that the CPU that initiates the code
modification is not guaranteed to be the one actually performing the code
modification, it falls into the XMC errata.

Q: Isn't this executed from an IPI handler, which will return with IRET (a
   serializing instruction) anyway?
A: No, now stop_machine uses per-cpu workqueue, so that handler will be
   executed from worker threads. There is no iret anymore.

Signed-off-by: Mathieu Desnoyers &lt;mathieu.desnoyers@efficios.com&gt;
LKML-Reference: &lt;20110303160137.GB1590@Krystal&gt;
Reviewed-by: Masami Hiramatsu &lt;masami.hiramatsu.pt@hitachi.com&gt;
Cc: &lt;stable@kernel.org&gt;
Cc: Arjan van de Ven &lt;arjan@infradead.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Andi Kleen &lt;andi@firstfloor.org&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
</content>
</entry>
</feed>
