<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/cpu.c, branch v2.6.30</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.30</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.30'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2009-03-30T11:35:12Z</updated>
<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>
<entry>
<title>cpumask: switch over to cpu_online/possible/active/present_mask: core</title>
<updated>2008-12-29T22:35:14Z</updated>
<author>
<name>Rusty Russell</name>
<email>rusty@rustcorp.com.au</email>
</author>
<published>2008-12-29T22:35:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b3199c025d1646e25e7d1d640dd605db251dccf8'/>
<id>urn:sha1:b3199c025d1646e25e7d1d640dd605db251dccf8</id>
<content type='text'>
Impact: cleanup

This implements the obsolescent cpu_online_map in terms of
cpu_online_mask, rather than the other way around.  Same for the other
maps.

The documentation comments are also updated to refer to _mask rather
than _map.

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Signed-off-by: Mike Travis &lt;travis@sgi.com&gt;
</content>
</entry>
<entry>
<title>cpumask: centralize cpu_online_map and cpu_possible_map</title>
<updated>2008-12-13T10:49:41Z</updated>
<author>
<name>Rusty Russell</name>
<email>rusty@rustcorp.com.au</email>
</author>
<published>2008-12-13T10:49:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=98a79d6a50181ca1ecf7400eda01d5dc1bc0dbf0'/>
<id>urn:sha1:98a79d6a50181ca1ecf7400eda01d5dc1bc0dbf0</id>
<content type='text'>
Impact: cleanup

Each SMP arch defines these themselves.  Move them to a central
location.

Twists:
1) Some archs (m32, parisc, s390) set possible_map to all 1, so we add a
   CONFIG_INIT_ALL_POSSIBLE for this rather than break them.

2) mips and sparc32 '#define cpu_possible_map phys_cpu_present_map'.
   Those archs simply have phys_cpu_present_map replaced everywhere.

3) Alpha defined cpu_possible_map to cpu_present_map; this is tricky
   so I just manipulate them both in sync.

4) IA64, cris and m32r have gratuitous 'extern cpumask_t cpu_possible_map'
   declarations.

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Reviewed-by: Grant Grundler &lt;grundler@parisc-linux.org&gt;
Tested-by: Tony Luck &lt;tony.luck@intel.com&gt;
Acked-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Mike Travis &lt;travis@sgi.com&gt;
Cc: ink@jurassic.park.msu.ru
Cc: rmk@arm.linux.org.uk
Cc: starvik@axis.com
Cc: tony.luck@intel.com
Cc: takata@linux-m32r.org
Cc: ralf@linux-mips.org
Cc: grundler@parisc-linux.org
Cc: paulus@samba.org
Cc: schwidefsky@de.ibm.com
Cc: lethal@linux-sh.org
Cc: wli@holomorphy.com
Cc: davem@davemloft.net
Cc: jdike@addtoit.com
Cc: mingo@redhat.com
</content>
</entry>
<entry>
<title>cpuinit fixes in kernel/*</title>
<updated>2008-11-30T18:03:37Z</updated>
<author>
<name>Al Viro</name>
<email>viro@ftp.linux.org.uk</email>
</author>
<published>2008-11-22T17:36:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8419641450edc838a6ce7cdf0f99d262bf0af2d5'/>
<id>urn:sha1:8419641450edc838a6ce7cdf0f99d262bf0af2d5</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>cpumask: introduce new API, without changing anything</title>
<updated>2008-11-06T08:05:33Z</updated>
<author>
<name>Rusty Russell</name>
<email>rusty@rustcorp.com.au</email>
</author>
<published>2008-11-05T02:39:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2d3854a37e8b767a51aba38ed6d22817b0631e33'/>
<id>urn:sha1:2d3854a37e8b767a51aba38ed6d22817b0631e33</id>
<content type='text'>
Impact: introduce new APIs

We want to deprecate cpumasks on the stack, as we are headed for
gynormous numbers of CPUs.  Eventually, we want to head towards an
undefined 'struct cpumask' so they can never be declared on stack.

1) New cpumask functions which take pointers instead of copies.
   (cpus_* -&gt; cpumask_*)

2) Several new helpers to reduce requirements for temporary cpumasks
   (cpumask_first_and, cpumask_next_and, cpumask_any_and)

3) Helpers for declaring cpumasks on or offstack for large NR_CPUS
   (cpumask_var_t, alloc_cpumask_var and free_cpumask_var)

4) 'struct cpumask' for explicitness and to mark new-style code.

5) Make iterator functions stop at nr_cpu_ids (a runtime constant),
   not NR_CPUS for time efficiency and for smaller dynamic allocations
   in future.

6) cpumask_copy() so we can allocate less than a full cpumask eventually
   (for alloc_cpumask_var), and so we can eliminate the 'struct cpumask'
   definition eventually.

7) work_on_cpu() helper for doing task on a CPU, rather than saving old
   cpumask for current thread and manipulating it.

8) smp_call_function_many() which is smp_call_function_mask() except
   taking a cpumask pointer.

Note that this patch simply introduces the new functions and leaves
the obsolescent ones in place.  This is to simplify the transition
patches.

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>Merge branches 'sched/devel', 'sched/cpu-hotplug', 'sched/cpusets' and 'sched/urgent' into sched/core</title>
<updated>2008-10-08T09:31:02Z</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2008-10-08T09:31:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=990d0f2ced23052abc7efa09bd05bff34e00cf73'/>
<id>urn:sha1:990d0f2ced23052abc7efa09bd05bff34e00cf73</id>
<content type='text'>
</content>
</entry>
</feed>
