<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/arch/x86/kernel/microcode_intel.c, branch v3.2.58</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.2.58</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.2.58'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2011-10-14T11:16:35Z</updated>
<entry>
<title>x86, intel: Output microcode revision in /proc/cpuinfo</title>
<updated>2011-10-14T11:16:35Z</updated>
<author>
<name>Andi Kleen</name>
<email>ak@linux.intel.com</email>
</author>
<published>2011-10-13T00:46:33Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=506ed6b53e00ba303ad778122f08e1fca7cf5efb'/>
<id>urn:sha1:506ed6b53e00ba303ad778122f08e1fca7cf5efb</id>
<content type='text'>
I got a request to make it easier to determine the microcode
update level on Intel CPUs. This patch adds a new "microcode"
field to /proc/cpuinfo.

The microcode level is also outputed on fatal machine checks
together with the other CPUID model information.

I removed the respective code from the microcode update driver,
it just reads the field from cpu_data. Also when the microcode
is updated it fills in the new values too.

I had to add a memory barrier to native_cpuid to prevent it
being optimized away when the result is not used.

This turns out to clean up further code which already got this
information manually. This is done in followon patches.

Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Acked-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
Link: http://lkml.kernel.org/r/1318466795-7393-1-git-send-email-andi@firstfloor.org
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>x86/microcode: Fix double vfree() and remove redundant pointer checks before vfree()</title>
<updated>2010-12-27T13:33:30Z</updated>
<author>
<name>Jesper Juhl</name>
<email>jj@chaosbits.net</email>
</author>
<published>2010-12-25T18:57:41Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5cdd2de0a76d0ac47f107c8a7b32d75d25768dc1'/>
<id>urn:sha1:5cdd2de0a76d0ac47f107c8a7b32d75d25768dc1</id>
<content type='text'>
In arch/x86/kernel/microcode_intel.c::generic_load_microcode()
we have  this:

	while (leftover) {
		...
		if (get_ucode_data(mc, ucode_ptr, mc_size) ||
		    microcode_sanity_check(mc) &lt; 0) {
			vfree(mc);
			break;
		}
		...
	}

	if (mc)
		vfree(mc);

This will cause a double free of 'mc'. This patch fixes that by
just  removing the vfree() call in the loop since 'mc' will be
freed nicely just  after we break out of the loop.

There's also a second change in the patch. I noticed a lot of
checks for  pointers being NULL before passing them to vfree().
That's completely  redundant since vfree() deals gracefully with
being passed a NULL pointer.  Removing the redundant checks
yields a nice size decrease for the object  file.

Size before the patch:
   text    data     bss     dec     hex filename
   4578     240    1032    5850    16da arch/x86/kernel/microcode_intel.o
Size after the patch:
   text    data     bss     dec     hex filename
   4489     240     984    5713    1651 arch/x86/kernel/microcode_intel.o

Signed-off-by: Jesper Juhl &lt;jj@chaosbits.net&gt;
Acked-by: Tigran Aivazian &lt;tigran@aivazian.fsnet.co.uk&gt;
Cc: Shaohua Li &lt;shaohua.li@intel.com&gt;
LKML-Reference: &lt;alpine.LNX.2.00.1012251946100.10759@swampdragon.chaosbits.net&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>Update broken web addresses in arch directory.</title>
<updated>2010-10-18T09:03:21Z</updated>
<author>
<name>Justin P. Mattock</name>
<email>justinmattock@gmail.com</email>
</author>
<published>2010-10-16T17:36:23Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=50a23e6eec6f20d55a3a920e47adb455bff6046e'/>
<id>urn:sha1:50a23e6eec6f20d55a3a920e47adb455bff6046e</id>
<content type='text'>
The patch below updates broken web addresses in the arch directory.

Signed-off-by: Justin P. Mattock &lt;justinmattock@gmail.com&gt;
Signed-off-by: Maciej W. Rozycki &lt;macro@linux-mips.org&gt;
Cc: Finn Thain &lt;fthain@telegraphics.com.au&gt;
Cc: Randy Dunlap &lt;rdunlap@xenotime.net&gt;
Reviewed-by: Finn Thain &lt;fthain@telegraphics.com.au&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>x86: Improve Intel microcode loader performance</title>
<updated>2010-03-11T12:49:06Z</updated>
<author>
<name>Dimitri Sivanich</name>
<email>sivanich@sgi.com</email>
</author>
<published>2010-03-05T17:42:03Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=938179b4f8cf8a4f11234ebf2dff2eb48400acfe'/>
<id>urn:sha1:938179b4f8cf8a4f11234ebf2dff2eb48400acfe</id>
<content type='text'>
We've noticed that on large SGI UV system configurations,
running microcode.ctl can take very long periods of time.  This
is due to the large number of vmalloc/vfree calls made by the
Intel generic_load_microcode() logic.

By reusing allocated space, the following patch reduces the time
to run microcode.ctl on a 1024 cpu system from approximately 80
seconds down to 1 or 2 seconds.

Signed-off-by: Dimitri Sivanich &lt;sivanich@sgi.com&gt;
Acked-by: Dmitry Adamushko &lt;dmitry.adamushko@gmail.com&gt;
Cc: Avi Kivity &lt;avi@redhat.com&gt;
Cc: Bill Davidsen &lt;davidsen@tmr.com&gt;
LKML-Reference: &lt;20100305174203.GA19638@sgi.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>x86: Remove trailing spaces in messages</title>
<updated>2010-02-07T16:47:51Z</updated>
<author>
<name>Frans Pop</name>
<email>elendil@planet.nl</email>
</author>
<published>2010-02-06T17:47:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3235dc3f22378f35ce77eba0d0f62db2d9c4844e'/>
<id>urn:sha1:3235dc3f22378f35ce77eba0d0f62db2d9c4844e</id>
<content type='text'>
Signed-off-by: Frans Pop &lt;elendil@planet.nl&gt;
Cc: Avi Kivity &lt;avi@redhat.com&gt;
Cc: x86@kernel.org
LKML-Reference: &lt;1265478443-31072-10-git-send-email-elendil@planet.nl&gt;
[ Left out the KVM bits. ]
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>arch/x86/kernel/microcode*: Use pr_fmt() and remove duplicated KERN_ERR prefix</title>
<updated>2009-12-09T07:25:57Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2009-12-09T06:30:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f58e1f53de52a70391b6478617311207c7203363'/>
<id>urn:sha1:f58e1f53de52a70391b6478617311207c7203363</id>
<content type='text'>
- Use #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
- Remove "microcode: " prefix from each pr_&lt;level&gt;
- Fix duplicated KERN_ERR prefix
- Coalesce pr_&lt;level&gt; format strings
- Add a space after an exclamation point

No other change in output.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Cc: Andy Whitcroft &lt;apw@canonical.com&gt;
Cc: Andreas Herrmann &lt;herrmann.der.user@googlemail.com&gt;
LKML-Reference: &lt;1260340250.27677.191.camel@Joe-Laptop.home&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>x86: microcode: use smp_call_function_single instead of set_cpus_allowed, cleanup of synchronization logic</title>
<updated>2009-05-12T08:36:44Z</updated>
<author>
<name>Dmitry Adamushko</name>
<email>dmitry.adamushko@gmail.com</email>
</author>
<published>2009-05-11T21:48:27Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=871b72dd1e12afc3f024479531d25a9339d2e3f9'/>
<id>urn:sha1:871b72dd1e12afc3f024479531d25a9339d2e3f9</id>
<content type='text'>
* Solve issues described in 6f66cbc63081fd70e3191b4dbb796746780e5ae1
  in a way that doesn't resort to set_cpus_allowed();

* in fact, only collect_cpu_info and apply_microcode callbacks
  must run on a target cpu, others will do just fine on any other.
  smp_call_function_single() (as suggested by Ingo) is used to run
  these callbacks on a target cpu.

* cleanup of synchronization logic of the 'microcode_core' part

  The generic 'microcode_core' part guarantees that only a single cpu
  (be it a full-fledged cpu, one of the cores or HT)
  is being updated at any particular moment of time.

  In general, there is no need for any additional sync. mechanism in
  arch-specific parts (the patch removes existing spinlocks).

  See also the "Synchronization" section in microcode_core.c.

* return -EINVAL instead of -1 (which is translated into -EPERM) in
  microcode_write(), reload_cpu() and mc_sysdev_add(). Other suggestions
  for an error code?

* use 'enum ucode_state' as return value of request_microcode_{fw, user}
  to gain more flexibility by distinguishing between real error cases
  and situations when an appropriate ucode was not found (which is not an
  error per-se).

* some minor cleanups

Thanks a lot to Hugh Dickins for review/suggestions/testing!

   Reference: http://marc.info/?l=linux-kernel&amp;m=124025889012541&amp;w=2

[ Impact: refactor and clean up microcode driver locking code ]

Signed-off-by: Dmitry Adamushko &lt;dmitry.adamushko@gmail.com&gt;
Acked-by: Hugh Dickins &lt;hugh@veritas.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Cc: Andreas Herrmann &lt;andreas.herrmann3@amd.com&gt;
Cc: Peter Oruba &lt;peter.oruba@amd.com&gt;
Cc: Arjan van de Ven &lt;arjan@infradead.org&gt;
LKML-Reference: &lt;1242078507.5560.9.camel@earth&gt;
[ did some more cleanups ]
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
 arch/x86/include/asm/microcode.h  |   25 ++
 arch/x86/kernel/microcode_amd.c   |   58 ++----
 arch/x86/kernel/microcode_core.c  |  326 +++++++++++++++++++++-----------------
 arch/x86/kernel/microcode_intel.c |   92 +++-------
 4 files changed, 261 insertions(+), 240 deletions(-)

(~20 new comment lines)
</content>
</entry>
<entry>
<title>x86: microcode: cleanup</title>
<updated>2009-03-18T12:51:17Z</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2009-03-11T10:19:46Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4bae1967357bfc78a2fad1be5e81a4b868980ae6'/>
<id>urn:sha1:4bae1967357bfc78a2fad1be5e81a4b868980ae6</id>
<content type='text'>
Impact: cleanup

Cc: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Dmitry Adamushko &lt;dmitry.adamushko@gmail.com&gt;
Cc: Peter Oruba &lt;peter.oruba@amd.com&gt;
LKML-Reference: &lt;200903111632.37279.rusty@rustcorp.com.au&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>x86: microcode_intel.c fix style problems</title>
<updated>2009-01-12T10:22:40Z</updated>
<author>
<name>Jaswinder Singh Rajput</name>
<email>jaswinderrajput@gmail.com</email>
</author>
<published>2009-01-12T09:14:29Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=dd3feda7748b4c2739de47daaaa387fb01926c15'/>
<id>urn:sha1:dd3feda7748b4c2739de47daaaa387fb01926c15</id>
<content type='text'>
Impact: cleanup

Fix:

 WARNING: Use #include &lt;linux/uaccess.h&gt; instead of &lt;asm/uaccess.h&gt;
 ERROR: trailing whitespace
 ERROR: "(foo*)" should be "(foo *)"

 total: 3 errors, 1 warnings

Signed-off-by: Jaswinder Singh Rajput &lt;jaswinderrajput@gmail.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>Merge branches 'x86/apic', 'x86/cleanups', 'x86/cpufeature', 'x86/crashdump', 'x86/debug', 'x86/defconfig', 'x86/detect-hyper', 'x86/doc', 'x86/dumpstack', 'x86/early-printk', 'x86/fpu', 'x86/idle', 'x86/io', 'x86/memory-corruption-check', 'x86/microcode', 'x86/mm', 'x86/mtrr', 'x86/nmi-watchdog', 'x86/pat2', 'x86/pci-ioapic-boot-irq-quirks', 'x86/ptrace', 'x86/quirks', 'x86/reboot', 'x86/setup-memory', 'x86/signal', 'x86/sparse-fixes', 'x86/time', 'x86/uv' and 'x86/xen' into x86/core</title>
<updated>2008-12-23T15:27:23Z</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2008-12-23T15:27:23Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=fa623d1b0222adbe8f822e53c08003b9679a410c'/>
<id>urn:sha1:fa623d1b0222adbe8f822e53c08003b9679a410c</id>
<content type='text'>
</content>
</entry>
</feed>
