<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/cpu.c, branch v2.6.32</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v2.6.32</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.32'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2009-09-15T16:19:38Z</updated>
<entry>
<title>Merge branch 'x86-pat-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip</title>
<updated>2009-09-15T16:19:38Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2009-09-15T16:19:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=227423904c709a8e60245c97081bbeb4fb500655'/>
<id>urn:sha1:227423904c709a8e60245c97081bbeb4fb500655</id>
<content type='text'>
* 'x86-pat-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86, pat: Fix cacheflush address in change_page_attr_set_clr()
  mm: remove !NUMA condition from PAGEFLAGS_EXTENDED condition set
  x86: Fix earlyprintk=dbgp for machines without NX
  x86, pat: Sanity check remap_pfn_range for RAM region
  x86, pat: Lookup the protection from memtype list on vm_insert_pfn()
  x86, pat: Add lookup_memtype to get the current memtype of a paddr
  x86, pat: Use page flags to track memtypes of RAM pages
  x86, pat: Generalize the use of page flag PG_uncached
  x86, pat: Add rbtree to do quick lookup in memtype tracking
  x86, pat: Add PAT reserve free to io_mapping* APIs
  x86, pat: New i/f for driver to request memtype for IO regions
  x86, pat: ioremap to follow same PAT restrictions as other PAT users
  x86, pat: Keep identity maps consistent with mmaps even when pat_disabled
  x86, mtrr: make mtrr_aps_delayed_init static bool
  x86, pat/mtrr: Rendezvous all the cpus for MTRR/PAT init
  generic-ipi: Allow cpus not yet online to call smp_call_function with irqs disabled
  x86: Fix an incorrect argument of reserve_bootmem()
  x86: Fix system crash when loading with "reservetop" parameter
</content>
</entry>
<entry>
<title>x86, intel_txt: clean up the impact on generic code, unbreak non-x86</title>
<updated>2009-09-02T01:25:07Z</updated>
<author>
<name>Shane Wang</name>
<email>shane.wang@intel.com</email>
</author>
<published>2009-09-02T01:25:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=69575d388603365f2afbf4166df93152df59b165'/>
<id>urn:sha1:69575d388603365f2afbf4166df93152df59b165</id>
<content type='text'>
Move tboot.h from asm to linux to fix the build errors of intel_txt
patch on non-X86 platforms. Remove the tboot code from generic code
init/main.c and kernel/cpu.c.

Signed-off-by: Shane Wang &lt;shane.wang@intel.com&gt;
Signed-off-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
</content>
</entry>
<entry>
<title>x86, pat/mtrr: Rendezvous all the cpus for MTRR/PAT init</title>
<updated>2009-08-21T23:25:55Z</updated>
<author>
<name>Suresh Siddha</name>
<email>suresh.b.siddha@intel.com</email>
</author>
<published>2009-08-20T01:05:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d0af9eed5aa91b6b7b5049cae69e5ea956fd85c3'/>
<id>urn:sha1:d0af9eed5aa91b6b7b5049cae69e5ea956fd85c3</id>
<content type='text'>
SDM Vol 3a section titled "MTRR considerations in MP systems" specifies
the need for synchronizing the logical cpu's while initializing/updating
MTRR.

Currently Linux kernel does the synchronization of all cpu's only when
a single MTRR register is programmed/updated. During an AP online
(during boot/cpu-online/resume)  where we initialize all the MTRR/PAT registers,
we don't follow this synchronization algorithm.

This can lead to scenarios where during a dynamic cpu online, that logical cpu
is initializing MTRR/PAT with cache disabled (cr0.cd=1) etc while other logical
HT sibling continue to run (also with cache disabled because of cr0.cd=1
on its sibling).

Starting from Westmere, VMX transitions with cr0.cd=1 don't work properly
(because of some VMX performance optimizations) and the above scenario
(with one logical cpu doing VMX activity and another logical cpu coming online)
can result in system crash.

Fix the MTRR initialization by doing rendezvous of all the cpus. During
boot and resume, we delay the MTRR/PAT init for APs till all the
logical cpu's come online and the rendezvous process at the end of AP's bringup,
will initialize the MTRR/PAT for all AP's.

For dynamic single cpu online, we synchronize all the logical cpus and
do the MTRR/PAT init on the AP that is coming online.

Signed-off-by: Suresh Siddha &lt;suresh.b.siddha@intel.com&gt;
Signed-off-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
</content>
</entry>
<entry>
<title>x86, intel_txt: Intel TXT Sx shutdown support</title>
<updated>2009-07-21T18:50:04Z</updated>
<author>
<name>Joseph Cihula</name>
<email>joseph.cihula@intel.com</email>
</author>
<published>2009-07-01T02:31:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=86886e55b273f565935491816c7c96b82469d4f8'/>
<id>urn:sha1:86886e55b273f565935491816c7c96b82469d4f8</id>
<content type='text'>
Support for graceful handling of sleep states (S3/S4/S5) after an Intel(R) TXT launch.

Without this patch, attempting to place the system in one of the ACPI sleep
states (S3/S4/S5) will cause the TXT hardware to treat this as an attack and
will cause a system reset, with memory locked.  Not only may the subsequent
memory scrub take some time, but the platform will be unable to enter the
requested power state.

This patch calls back into the tboot so that it may properly and securely clean
up system state and clear the secrets-in-memory flag, after which it will place
the system into the requested sleep state using ACPI information passed by the kernel.

 arch/x86/kernel/smpboot.c     |    2 ++
 drivers/acpi/acpica/hwsleep.c |    3 +++
 kernel/cpu.c                  |    7 ++++++-
 3 files changed, 11 insertions(+), 1 deletion(-)

Signed-off-by: Joseph Cihula &lt;joseph.cihula@intel.com&gt;
Signed-off-by: Shane Wang &lt;shane.wang@intel.com&gt;
Signed-off-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
</content>
</entry>
<entry>
<title>mm/init: cpu_hotplug_init() must be initialized before SLAB</title>
<updated>2009-06-23T04:18:12Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2009-06-23T04:18:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=31950eb66ff47c946fd9c65c2f8c94b6b7ba13fc'/>
<id>urn:sha1:31950eb66ff47c946fd9c65c2f8c94b6b7ba13fc</id>
<content type='text'>
SLAB uses get/put_online_cpus() which use a mutex which is itself only
initialized when cpu_hotplug_init() is called.  Currently we hang suring
boot in SLAB due to doing that too late.

Reported by James Bottomley and Sachin Sant (and possibly others).
Debugged by Benjamin Herrenschmidt.

This just removes the dynamic initialization of the data structures, and
replaces it with a static one, avoiding this dependency entirely, and
removing one unnecessary special initcall.

Tested-by: Sachin Sant &lt;sachinp@in.ibm.com&gt;
Tested-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
Tested-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>cpumask: use set_cpu_active in init/main.c</title>
<updated>2009-03-30T11:35:12Z</updated>
<author>
<name>Rusty Russell</name>
<email>rusty@rustcorp.com.au</email>
</author>
<published>2009-03-31T04:05:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2b17fa506c418e9fb02bbbc7f426d2bbb5b247a6'/>
<id>urn:sha1:2b17fa506c418e9fb02bbbc7f426d2bbb5b247a6</id>
<content type='text'>
cpu_active_map is deprecated in favor of cpu_active_mask, which is
const for safety: we use accessors now (set_cpu_active) is we really
want to make a change.

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>stop_machine/cpu hotplug: fix disable_nonboot_cpus</title>
<updated>2009-01-07T19:36:14Z</updated>
<author>
<name>Heiko Carstens</name>
<email>heiko.carstens@de.ibm.com</email>
</author>
<published>2009-01-07T15:19:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a0e280e0f33f6c859a235fb69a875ed8f3420388'/>
<id>urn:sha1:a0e280e0f33f6c859a235fb69a875ed8f3420388</id>
<content type='text'>
disable_nonboot_cpus calls _cpu_down. But _cpu_down requires that the
caller already created the stop_machine workqueue (like cpu_down does).
Otherwise a call to stop_machine will lead to accesses to random memory
regions.

When introducing this new interface (9ea09af3bd3090e8349ca2899ca2011bd94cda85
"stop_machine: introduce stop_machine_create/destroy") I missed the second
call site of _cpu_down.
So add the missing stop_machine_create/destroy calls to disable_nonboot_cpus
as well.

Fixes suspend-to-ram/disk and also this bug:

[  286.547348] BUG: unable to handle kernel paging request at 6b6b6b6b
[  286.548940] IP: [&lt;c0150ca4&gt;] __stop_machine+0x88/0xe3
[  286.550598] Oops: 0002 [#1] SMP
[  286.560580] Pid: 3273, comm: halt Not tainted (2.6.28-06127-g238c6d5
[  286.560580] EIP: is at __stop_machine+0x88/0xe3
[  286.560580] Process halt (pid: 3273, ti=f1a28000 task=f4530f30
[  286.560580] Call Trace:
[  286.560580]  [&lt;c03d04e4&gt;] ? _cpu_down+0x10f/0x234
[  286.560580]  [&lt;c012a57e&gt;] ? disable_nonboot_cpus+0x58/0xdc
[  286.560580]  [&lt;c01360c0&gt;] ? kernel_poweroff+0x22/0x39
[  286.560580]  [&lt;c0136301&gt;] ? sys_reboot+0xde/0x14c
[  286.560580]  [&lt;c01331b2&gt;] ? complete_signal+0x179/0x191
[  286.560580]  [&lt;c0133396&gt;] ? send_signal+0x1cc/0x1e1
[  286.560580]  [&lt;c03de418&gt;] ? _spin_unlock_irqrestore+0x2d/0x3c
[  286.560580]  [&lt;c0133b65&gt;] ? group_send_signal_info+0x58/0x61
[  286.560580]  [&lt;c0133b9e&gt;] ? kill_pid_info+0x30/0x3a
[  286.560580]  [&lt;c0133d49&gt;] ? sys_kill+0x75/0x13a
[  286.560580]  [&lt;c01a06cb&gt;] ? mntput_no_expire+ox1f/0x101
[  286.560580]  [&lt;c019b3b3&gt;] ? dput+0x1e/0x105
[  286.560580]  [&lt;c018ef87&gt;] ?  __fput+0x150/0x158
[  286.560580]  [&lt;c0157abf&gt;] ? audit_syscall_entry+0x137/0x159
[  286.560580]  [&lt;c010329f&gt;] ? sysenter_do_call+0x12/0x34

Reported-and-tested-by: "Justin P. Mattock" &lt;justinmattock@gmail.com&gt;
Reviewed-by: Pekka Enberg &lt;penberg@cs.helsinki.fi&gt;
Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Tested-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>stop_machine: introduce stop_machine_create/destroy.</title>
<updated>2009-01-04T22:10:14Z</updated>
<author>
<name>Heiko Carstens</name>
<email>heiko.carstens@de.ibm.com</email>
</author>
<published>2008-12-22T11:36:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9ea09af3bd3090e8349ca2899ca2011bd94cda85'/>
<id>urn:sha1:9ea09af3bd3090e8349ca2899ca2011bd94cda85</id>
<content type='text'>
Introduce stop_machine_create/destroy. With this interface subsystems
that need a non-failing stop_machine environment can create the
stop_machine machine threads before actually calling stop_machine.
When the threads aren't needed anymore they can be killed with
stop_machine_destroy again.

When stop_machine gets called and the threads aren't present they
will be created and destroyed automatically. This restores the old
behaviour of stop_machine.

This patch also converts cpu hotplug to the new interface since it
is special: cpu_down calls __stop_machine instead of stop_machine.
However the kstop threads will only be created when stop_machine
gets called.

Changing the code so that the threads would be created automatically
on __stop_machine is currently not possible: when __stop_machine gets
called we hold cpu_add_remove_lock, which is the same lock that
create_rt_workqueue would take. So the workqueue needs to be created
before the cpu hotplug code locks cpu_add_remove_lock.

Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>cpumask: convert kernel/cpu.c</title>
<updated>2008-12-31T23:42:28Z</updated>
<author>
<name>Rusty Russell</name>
<email>rusty@rustcorp.com.au</email>
</author>
<published>2008-12-31T23:42:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e0b582ec56f1a1d8b30ebf340a7b91fb09f26c8c'/>
<id>urn:sha1:e0b582ec56f1a1d8b30ebf340a7b91fb09f26c8c</id>
<content type='text'>
Impact: Reduce kernel stack and memory usage, use new cpumask API.

Use cpumask_var_t for take_cpu_down() stack var, and frozen_cpus.

Note that notify_cpu_starting() can be called before core_initcall
allocates frozen_cpus, but the NULL check is optimized out by gcc for
the CONFIG_CPUMASK_OFFSTACK=n case.

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>cpumask: make set_cpu_*/init_cpu_* out-of-line</title>
<updated>2008-12-29T22:35:16Z</updated>
<author>
<name>Rusty Russell</name>
<email>rusty@rustcorp.com.au</email>
</author>
<published>2008-12-29T22:35:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3fa41520696fec2815e2d88fbcccdda77ba4d693'/>
<id>urn:sha1:3fa41520696fec2815e2d88fbcccdda77ba4d693</id>
<content type='text'>
They're only for use in boot/cpu hotplug code anyway, and this avoids
the use of deprecated cpu_*_map.

Stephen Rothwell points out that gcc 4.2.4 (on powerpc at least)
didn't like the cast away of const anyway:

  include/linux/cpumask.h: In function 'set_cpu_possible':
  include/linux/cpumask.h:1052: warning: passing argument 2 of 'cpumask_set_cpu' discards qualifiers from pointer target type

So this kills two birds with one stone.

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
</feed>
