<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/x86/kernel/process_32.c, branch linux-3.18.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.18.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.18.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2015-06-28T17:39:27Z</updated>
<entry>
<title>x86: Store a per-cpu shadow copy of CR4</title>
<updated>2015-06-28T17:39:27Z</updated>
<author>
<name>Andy Lutomirski</name>
</author>
<published>2014-10-24T22:58:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=63753fac67e11fb6bac3d5c6a48bd319d9e612c2'/>
<id>urn:sha1:63753fac67e11fb6bac3d5c6a48bd319d9e612c2</id>
<content type='text'>
[ Upstream commit 1e02ce4cccdcb9688386e5b8d2c9fa4660b45389 ]

Context switches and TLB flushes can change individual bits of CR4.
CR4 reads take several cycles, so store a shadow copy of CR4 in a
per-cpu variable.

To avoid wasting a cache line, I added the CR4 shadow to
cpu_tlbstate, which is already touched in switch_mm.  The heaviest
users of the cr4 shadow will be switch_mm and __switch_to_xtra, and
__switch_to_xtra is called shortly after switch_mm during context
switch, so the cacheline is likely to be hot.

Signed-off-by: Andy Lutomirski &lt;luto@amacapital.net&gt;
Reviewed-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Cc: Kees Cook &lt;keescook@chromium.org&gt;
Cc: Andrea Arcangeli &lt;aarcange@redhat.com&gt;
Cc: Vince Weaver &lt;vince@deater.net&gt;
Cc: "hillf.zj" &lt;hillf.zj@alibaba-inc.com&gt;
Cc: Valdis Kletnieks &lt;Valdis.Kletnieks@vt.edu&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Arnaldo Carvalho de Melo &lt;acme@kernel.org&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Link: http://lkml.kernel.org/r/3a54dd3353fffbf84804398e00dfdc5b7c1afd7d.1414190806.git.luto@amacapital.net
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>x86: copy_thread: Don't nullify -&gt;ptrace_bps twice</title>
<updated>2014-09-02T21:51:17Z</updated>
<author>
<name>Oleg Nesterov</name>
</author>
<published>2014-09-02T17:57:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6f46b3aef0031c08a7b439d63013dad2aeb093b2'/>
<id>urn:sha1:6f46b3aef0031c08a7b439d63013dad2aeb093b2</id>
<content type='text'>
Both 32bit and 64bit versions of copy_thread() do memset(ptrace_bps)
twice for no reason, kill the 2nd memset().

Signed-off-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Link: http://lkml.kernel.org/r/20140902175733.GA21676@redhat.com
Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>x86, fpu: Shift "fpu_counter = 0" from copy_thread() to arch_dup_task_struct()</title>
<updated>2014-09-02T21:51:16Z</updated>
<author>
<name>Oleg Nesterov</name>
</author>
<published>2014-09-02T17:57:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dc56c0f9b870fba7a4eef2bb463db6881284152b'/>
<id>urn:sha1:dc56c0f9b870fba7a4eef2bb463db6881284152b</id>
<content type='text'>
Cosmetic, but I think thread.fpu_counter should be initialized in
arch_dup_task_struct() too, along with other "fpu" variables. And
probably it make sense to turn it into thread.fpu-&gt;counter.

Signed-off-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Link: http://lkml.kernel.org/r/20140902175730.GA21669@redhat.com
Reviewed-by: Suresh Siddha &lt;sbsiddha@gmail.com&gt;
Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>x86: Keep thread_info on thread stack in x86_32</title>
<updated>2014-03-07T00:56:55Z</updated>
<author>
<name>Steven Rostedt</name>
</author>
<published>2014-02-06T14:41:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=198d208df4371734ac4728f69cb585c284d20a15'/>
<id>urn:sha1:198d208df4371734ac4728f69cb585c284d20a15</id>
<content type='text'>
x86_64 uses a per_cpu variable kernel_stack to always point to
the thread stack of current. This is where the thread_info is stored
and is accessed from this location even when the irq or exception stack
is in use. This removes the complexity of having to maintain the
thread info on the stack when interrupts are running and having to
copy the preempt_count and other fields to the interrupt stack.

x86_32 uses the old method of copying the thread_info from the thread
stack to the exception stack just before executing the exception.

Having the two different requires #ifdefs and also the x86_32 way
is a bit of a pain to maintain. By converting x86_32 to the same
method of x86_64, we can remove #ifdefs, clean up the x86_32 code
a little, and remove the overhead of the copy.

Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Brian Gerst &lt;brgerst@gmail.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Link: http://lkml.kernel.org/r/20110806012354.263834829@goodmis.org
Link: http://lkml.kernel.org/r/20140206144321.852942014@goodmis.org
Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>x86: Delete non-required instances of include &lt;linux/init.h&gt;</title>
<updated>2014-01-07T05:25:18Z</updated>
<author>
<name>Paul Gortmaker</name>
</author>
<published>2014-01-07T00:20:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=663b55b9b39fa9c848cca273ca4e12bf29b32c71'/>
<id>urn:sha1:663b55b9b39fa9c848cca273ca4e12bf29b32c71</id>
<content type='text'>
None of these files are actually using any __init type directives
and hence don't need to include &lt;linux/init.h&gt;.  Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.

[ hpa: undid incorrect removal from arch/x86/kernel/head_32.S ]

Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Link: http://lkml.kernel.org/r/1389054026-12947-1-git-send-email-paul.gortmaker@windriver.com
Signed-off-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
</content>
</entry>
<entry>
<title>x86: move fpu_counter into ARCH specific thread_struct</title>
<updated>2013-11-13T03:09:13Z</updated>
<author>
<name>Vineet Gupta</name>
</author>
<published>2013-11-12T23:08:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c375f15a434db1867cb004bafba92aba739e4e39'/>
<id>urn:sha1:c375f15a434db1867cb004bafba92aba739e4e39</id>
<content type='text'>
Only a couple of arches (sh/x86) use fpu_counter in task_struct so it can
be moved out into ARCH specific thread_struct, reducing the size of
task_struct for other arches.

Compile tested i386_defconfig + gcc 4.7.3

Signed-off-by: Vineet Gupta &lt;vgupta@synopsys.com&gt;
Acked-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Paul Mundt &lt;paul.mundt@gmail.com&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>sched, x86: Provide a per-cpu preempt_count implementation</title>
<updated>2013-09-25T12:07:57Z</updated>
<author>
<name>Peter Zijlstra</name>
</author>
<published>2013-08-14T12:51:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c2daa3bed53a81171cf8c1a36db798e82b91afe8'/>
<id>urn:sha1:c2daa3bed53a81171cf8c1a36db798e82b91afe8</id>
<content type='text'>
Convert x86 to use a per-cpu preemption count. The reason for doing so
is that accessing per-cpu variables is a lot cheaper than accessing
thread_info variables.

We still need to save/restore the actual preemption count due to
PREEMPT_ACTIVE so we place the per-cpu __preempt_count variable in the
same cache-line as the other hot __switch_to() variables such as
current_task.

NOTE: this save/restore is required even for !PREEMPT kernels as
cond_resched() also relies on preempt_count's PREEMPT_ACTIVE to ignore
task_struct::state.

Also rename thread_info::preempt_count to ensure nobody is
'accidentally' still poking at it.

Suggested-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Link: http://lkml.kernel.org/n/tip-gzn5rfsf8trgjoqx8hyayy3q@git.kernel.org
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>x86, asmlinkage: Make 32bit/64bit __switch_to visible</title>
<updated>2013-08-06T21:18:30Z</updated>
<author>
<name>Andi Kleen</name>
</author>
<published>2013-08-05T22:02:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=35ea7903b8a97162e38da9da3b560df74713321d'/>
<id>urn:sha1:35ea7903b8a97162e38da9da3b560df74713321d</id>
<content type='text'>
This function is called from inline assembler, so has to be visible.

Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Link: http://lkml.kernel.org/r/1375740170-7446-6-git-send-email-andi@firstfloor.org
Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'x86-debug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2013-07-02T23:25:06Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2013-07-02T23:25:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=55a0d3ff603a69ea4ec7677effd457f838390afc'/>
<id>urn:sha1:55a0d3ff603a69ea4ec7677effd457f838390afc</id>
<content type='text'>
Pull x86 debug update from Ingo Molnar:
 "Misc debuggability improvements:

   - Optimize the x86 CPU register printout a bit
   - Expose the tboot TXT log via debugfs
   - Small do_debug() cleanup"

* 'x86-debug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/tboot: Provide debugfs interfaces to access TXT log
  x86: Remove weird PTR_ERR() in do_debug
  x86/debug: Only print out DR registers if they are not power-on defaults
</content>
</entry>
<entry>
<title>x86, flags: Rename X86_EFLAGS_BIT1 to X86_EFLAGS_FIXED</title>
<updated>2013-06-25T23:25:32Z</updated>
<author>
<name>H. Peter Anvin</name>
</author>
<published>2013-04-27T23:10:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1adfa76a95fe4444124a502f7cc858a39d5b8e01'/>
<id>urn:sha1:1adfa76a95fe4444124a502f7cc858a39d5b8e01</id>
<content type='text'>
Bit 1 in the x86 EFLAGS is always set.  Name the macro something that
actually tries to explain what it is all about, rather than being a
tautology.

Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
Cc: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Cc: Gleb Natapov &lt;gleb@redhat.com&gt;
Cc: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Link: http://lkml.kernel.org/n/tip-f10rx5vjjm6tfnt8o1wseb3v@git.kernel.org
</content>
</entry>
</feed>
