David Miller <[EMAIL PROTECTED]>
Cc: Rusty Russell <[EMAIL PROTECTED]>
Cc: Geert Uytterhoeven <[EMAIL PROTECTED]>
Cc: linuxppc-dev@ozlabs.org
Cc: [EMAIL PROTECTED]
Signed-off-by: Mike Travis <[EMAIL PROTECTED]>
---
linux-2.6.git:
- added back in missing pieces from x86.git
c: Rusty Russell <[EMAIL PROTECTED]>
Cc: Geert Uytterhoeven <[EMAIL PROTECTED]>
Cc: linuxppc-dev@ozlabs.org
Cc: [EMAIL PROTECTED]
Signed-off-by: Mike Travis <[EMAIL PROTECTED]>
---
linux-2.6.git:
- added back in missing pieces from x86.git merge
The change to using "select xxx
This is a copy of an older patch that is in rc3-mm1. It's needed
to allow the remaining patches to integrate correctly.
Signed-off-by: Mike Travis <[EMAIL PROTECTED]>
---
arch/x86_64/kernel/genapic.c |2 --
arch/x86_64/kernel/genapic_flat.c |1 -
arch/x86_64/kerne
Fix four instances where cpu_to_node is referenced
by array instead of via the cpu_to_node macro. This
is preparation to moving it to the per_cpu data area.
Signed-off-by: Mike Travis <[EMAIL PROTECTED]>
---
arch/x86_64/kernel/vsyscall.c |2 +-
arch/x86_64/mm/numa.c
Note:
This patch consolidates all the previous patches regarding
the conversion of static arrays sized by NR_CPUS into per_cpu
data arrays and is referenced against 2.6.23-rc6 .
v1 Intro:
In x86_64 and i386 architectures most arrays that are sized
using NR_CPUS lay in local memory on node 0.
h the same
type in ARCH x86_64.
Signed-off-by: Mike Travis <[EMAIL PROTECTED]>
---
arch/i386/kernel/cpu/intel_cacheinfo.c |4 ++--
arch/i386/kernel/smpboot.c |6 +++---
arch/x86_64/kernel/smpboot.c |6 +++---
include/asm-i386/processor.h |6
Convert cpu_sibling_map to a per_cpu cpumask_t array for the sparc64
architecture. This fixes build errors in block/blktrace.c and
kernel/sched.c when CONFIG_SCHED_SMT is defined.
Note: these changes have not been built nor tested.
Signed-off-by: Mike Travis <[EMAIL PROTECTED]>
---
allocated. I commented the code out.
Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]>
Signed-off-by: Mike Travis <[EMAIL PROTECTED]>
---
arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c |2 -
arch/i386/kernel/cpu/cpufreq/powernow-k8.c | 10
arch/
per_cpu
area is setup.
Tested and verified on an A4700.
Signed-off-by: Mike Travis <[EMAIL PROTECTED]>
---
arch/ia64/kernel/setup.c|4
arch/ia64/kernel/smpboot.c | 18 ++
arch/ia64/mm/contig.c |6 ++
include/asm-ia64/smp.h |2 +-
inclu
x86_64.
Signed-off-by: Mike Travis <[EMAIL PROTECTED]>
---
arch/i386/kernel/acpi/boot.c |2 +-
arch/i386/kernel/smp.c|2 +-
arch/i386/kernel/smpboot.c| 22 +++---
arch/x86_64/kernel/genapic.c | 15 ---
arch/x86_64/
Convert cpu_sibling_map from a static array sized by NR_CPUS to a
per_cpu variable. This saves sizeof(cpumask_t) * NR unused cpus.
Access is mostly from startup and CPU HOTPLUG functions.
Signed-off-by: Mike Travis <[EMAIL PROTECTED]>
---
arch/i386/kernel/cpu/cpufreq/p4-clockmod.c
Convert cpu_sibling_map to a per_cpu cpumask_t array for the ppc64
architecture. This fixes build errors in block/blktrace.c and
kernel/sched.c when CONFIG_SCHED_SMT is defined.
Note: these changes have not been built nor tested.
Signed-off-by: Mike Travis <[EMAIL PROTECTED]>
---
arch/p
Lameter <[EMAIL PROTECTED]>
Additionally, boot_cpu_id needed to be exported to fix compile errors in
dma code when !CONFIG_SMP.
Signed-off-by: Mike Travis <[EMAIL PROTECTED]>
---
arch/x86_64/kernel/mpparse.c |2 ++
drivers/acpi/processor_core.c |8 +---
2 files changed,
y original submission.]
Original Notes:
Convert cpu_sibling_map to a per_cpu cpumask_t array for the ppc64
architecture. This fixes build errors in block/blktrace.c and
kernel/sched.c when CONFIG_SCHED_SMT is defined.
Note: these changes have not been built nor tested.
Signed-off-by: Mike Trav
Stephen Rothwell wrote:
> On Mon, 17 Sep 2007 16:28:31 +1000 Stephen Rothwell <[EMAIL PROTECTED]> wrote:
>> the topology (on my POWERPC5+ box) is not correct:
>>
>> cpu0/topology/thread_siblings:000f
>> cpu1/topology/thread_siblings:000f
>> cpu2/topology/thread_siblings:000f
>> cp
4dbf2038f4d
>> Parent: 3212bff370c2f22e4987c6679ba485654cefb178
>> Author: Mike Travis <[EMAIL PROTECTED]>
>> AuthorDate: Wed Jan 30 13:33:32 2008 +0100
>> Committer: Ingo Molnar <[EMAIL PROTECTED]>
>> CommitDate: Wed Jan 30 13:33:32 2008 +0100
he length of the per cpu area
>
> * Removes the &__per_cpu_x in lockdep. The __per_cpu_x are already
> pointers. There is no need to take the address.
>
> * Changes generic setup_per_cpu_areas to allocate per_cpu space in
> node local memory. This requires a gener
Luck, Tony wrote:
>> Could you check the patch below? With this applied to latest -git, ia64
>> buils fine for me in a cross-compiling environment. (but i dont know
>> whether it boots ...)
>
> Uni-processor build still fails with this patch (config is
> arch/ia64/configs/tiger_defconfig
> with
Luck, Tony wrote:
>> Could you check the patch below? With this applied to latest -git, ia64
>> buils fine for me in a cross-compiling environment. (but i dont know
>> whether it boots ...)
>
> Uni-processor build still fails with this patch (config is
> arch/ia64/configs/tiger_defconfig
> with
Ingo Molnar wrote:
> * [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>> Change:
>> config ARCH_SETS_UP_PER_CPU_AREA
>> to:
>> config HAVE_SETUP_PER_CPU_AREA
>
> undocumented change:
>
>> config ARCH_NO_VIRT_TO_BUS
>> --- a/init/main.c
>> +++ b/init/main.c
>> @@ -380,6 +380,8 @@ stati
Stephen Rothwell wrote:
> On Tue, 11 Sep 2007 18:56:53 -0700 [EMAIL PROTECTED] wrote:
>> Convert cpu_sibling_map to a per_cpu cpumask_t array for the ppc64
>> architecture. This fixes build errors in block/blktrace.c and
>> kernel/sched.c when CONFIG_SCHED_SMT is defined.
>>
>> Note: these changes
Hi Paul,
I just now found this. I'll take a look immediately. I tried it
on a couple of systems but not margin.
Thanks,
Mike
Paul Jackson wrote:
> Mike,
>
> I think there is a bug either in this ia64 patch, or in the related
> generic arch patch: Convert cpu_sibling_map to be a per cpu varia
Redesign cpumask API to explicitly declare struct cpumask pointers to
the cpumask_* operators and add functions to make it easier to support
struct cpumask pointers on the stack.
This patchset supplies the infrastructure going forward to implement
this new struct cpumask API. Patches have been w
Seems like this has been here forever, but I can't see why:
find_first_bit and find_next_bit both return >= NR_CPUS on failure.
From: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Mike Travis <[EMAIL PROTECTED]>
Dynamic allocation of cpumasks requires the size.
Signed-off-by: Mike Travis <[EMAIL PROTECTED]>
---
include/linux/cpumask.h |6 ++
1 file changed, 6 insertions(+)
--- test-compile.orig/include/linux/cpumask.h
+++ test-compile/include/linux/cpumask.h
@@ -64,6 +64,7 @@
* int ne
sk operators to be normal
functions (cpus_ -> cpumask_). Note that two functions already use
variants of the new names: they are fixed in the next patch.
From: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Mike Travis <[EMA
olicy
don't matter, so we can just use cpumask_of_cpu() or the policy->cpus.
From: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Mike Travis <[EMAIL PROTECTED]>
---
arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c | 51
(cpu, temp)
...
It then becomes:
funcproto(cpumask_t *mask, ...)
{
for_each_cpu_mask_and(cpu, *mask, cpu_online_map)
...
... eliminating the need for the temp cpumask.
Applies to linux-2.6.tip/master.
Signed-off-by: Mike Travis <[EMAIL PROTEC
Percpu areas are only allocated for possible cpus. In general, you
shouldn't access random cpu's percpu areas: you're corrupting memory.
From: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Mike Travis <[EMAIL PRO
ween the related variables
and constants is: (1 <= nr_cpu_ids <= nr_cpumask_bits <= NR_CPUS).
Signed-of-by: Mike Travis <[EMAIL PROTECTED]>
---
arch/x86/kernel/setup_percpu.c |7 +--
include/linux/cpumask.h| 94 +++--
init/main.c
Instead of accessing ->bits, we use cpumask_bits(). This will be very
useful when 'struct cpumask' has a hidden definition.
From: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Mike Travis <[EMAIL PROTECTED]>
---
* use node_to_cpumask_ptr in place of node_to_cpumask to reduce stack
requirements in sched.c
Applies to linux-2.6.tip/master.
Signed-off-by: Mike Travis <[EMAIL PROTECTED]>
Acked-by: Rusty Russell <[EMAIL PROTECTED]>
---
kernel/sched.c | 13 +++--
1 file changed,
Remove CPUMASK_ALLOC() in favor of alloc_cpumask_var().
From: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Mike Travis <[EMAIL PROTECTED]>
---
include/linux/cpumask.h | 46 --
any_online_cpu() is a good name, but it takes a cpumask_t, not a
pointer.
From: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Mike Travis <[EMAIL PROTECTED]>
---
include/linux/cpumask.h | 11 ++-
lib/cpumask.
Signed-off-by: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Mike Travis <[EMAIL PROTECTED]>
---
include/linux/cpumask.h | 27 +++
kernel/sched.c | 40
kernel/workqueue.c |6 +++---
lib/cpumask.c
Using lots of allocs rather than one big alloc is less efficient, but
who cares for this setup function?
From: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Mike Travis <[EMAIL PROTECTED]>
---
ker
Set MAXSMP to enable a configuration with the maximum amount of CPUS and
NODES. Also enables CONFIG_CPUMASK_OFFSTACK which moves cpumask's off
the stack (and in structs) when using cpumask_var_t.
From: Mike Travis <[EMAIL PROTECTED]>
Acked-by: Rusty Russell <[EMAIL PROTECTED]&
(!cpus_equal(cpu_online_map, cpumask_of_cpu(cpu)))
...
* Other minor code optimizations (like using cpus_clear instead of
CPU_MASK_NONE, etc.)
Applies to linux-2.6.tip/master.
Signed-off-by: Mike Travis <[EMAIL PROTECTED]>
Acked-by: Rusty Russell <[EMAIL PROTECTED]>
-
Ugly? Yes, but as we move to fewer static cpumasks these calls vanish.
From: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Mike Travis <[EMAIL PROTECTED]>
---
include/linux/cpumask.h | 14 ++
1 file changed, 14 i
good replacement names; fortunately
they're rarely used, so we just change them over.
From: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Mike Travis <[EMAIL PROTECTED]>
---
arch/ia64/kernel/topology.c |2 +-
Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Mike Travis <[EMAIL PROTECTED]>
---
arch/alpha/Kconfig | 10 +-
arch/arm/Kconfig|6 +++---
arch/ia64/Kconfig |8
arch/m32r/Kconfig |8
arch/mips/Kconfig |4 ++--
a
Since we are moving to const cpumask pointers for the maps, we need a
way to legitimately access them. Simple accessors work well.
From: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Mike Travis <[EMAIL PROTECTED]>
---
inclu
ssell <[EMAIL PROTECTED]>
Signed-off-by: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Mike Travis <[EMAIL PROTECTED]>
---
arch/s390/include/asm/smp.h |3 -
arch/s390/kernel/smp.c | 30 +++
include/linux/smp.h | 13 +++-
kernel/smp.
nr_cpu_ids is the (badly named) runtime limit on possible CPU numbers;
ie. the variable version of NR_CPUS.
This makes is valid in all configs, including UP.
From: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Mike Travis <[
This deprecates cpumask_of_cpu(), which returns a cpumask_t
(cpumask_of() returns a const pointer, instead).
From: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Mike Travis <[EMAIL PROTECTED]>
---
include/linu
Use the accessors rather than frobbing bits directly. Most of this is
in arch code I haven't even compiled, but is straightforward.
From: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Mike Travis <[EMAIL PROTECTED]>
---
Since we're now preferring raw bitmaps for (eventually rare) static
cpumasks, we replace CPU_MASK_X with CPU_BITS_X.
From: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Mike Travis <[EMAIL PROTECTED]>
---
include
In fact, all cpumask ops will only be valid (in general) for bit
numbers < nr_cpu_ids. So use that instead of NR_CPUS in various
places.
From: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Mike Travis <[EMAIL PROTECTED]>
-
nr_cpu_ids is going to become a constant under some configs, so don't
assign it. Currently only x86 seems to anyway.
From: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Mike Travis <[EMAIL PROTECTED]>
---
arch/x86/
IL PROTECTED]>
Signed-off-by: Mike Travis <[EMAIL PROTECTED]>
---
include/linux/cpumask.h |8
1 file changed, 8 insertions(+)
--- linux-2.6.28.orig/include/linux/cpumask.h
+++ linux-2.6.28/include/linux/cpumask.h
@@ -64,6 +64,8 @@
* int next_cpu(cpu, mask) Ne
Instead of CPU_MASK_ALL_PTR and the SMP-only cpu_mask_all, this makes
cpu_all_mask and cpu_none_mask which are const cpumask pointers which
always exist.
From: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Mike Travis <[
Pointer-taking variants of first_cpu/next_cpu.
From: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Mike Travis <[EMAIL PROTECTED]>
---
include/linux/cpumask.h | 18 +-
lib/cpumask.c | 10 +
<[EMAIL PROTECTED]>
Signed-off-by: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Mike Travis <[EMAIL PROTECTED]>
---
arch/alpha/kernel/smp.c |5 --
arch/arm/kernel/smp.c | 10
arch/cris/arch-v32/kernel/smp.c |4 -
arch/ia6
cpumask.h is pretty chaotic. Now we've replaced most of it, let's
group things together a bit better.
From: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Mike Travis <[EMAIL PROTECTED]>
---
in
It's useful to check that no one is accessing > nr_cpumask_bits for
cpumasks. This also allows you to turn on CONFIG_CPUMASKS_OFFSTACK
even for smaller CONFIG_NR_CPUS.
From: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by:
threshold is.
From: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Mike Travis <[EMAIL PROTECTED]>
---
include/linux/cpumask.h | 36
lib/cpumask.c | 31 ++
off-by: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Mike Travis <[EMAIL PROTECTED]>
---
include/linux/cpumask.h | 110 +--
include/linux/seq_file.h |2
include/linux/cpumask.h | 114
There's a common case where we want any online cpu except a particular
one. This creates a helper to do that, otherwise we need a temp var
and cpumask_andnot().
From: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Mike Travis
Stephen Rothwell wrote:
> Hi Mike,
>
> Just a first small thing:
>
> On Mon, 20 Oct 2008 10:03:20 -0700 Mike Travis <[EMAIL PROTECTED]> wrote:
>> 1) The #ifdef CONFIG_HOTPLUG_CPU seems unnecessary these days.
>> 2) The loop can simply skip over offline cpus, ra
Rusty Russell wrote:
> On Tuesday 21 October 2008 04:03:37 Mike Travis wrote:
>> When nr_cpu_ids is set to CONFIG_NR_CPUS then references to nr_cpu_ids
>> will return the maximum index of the configured NR_CPUS (+1) instead
>> of the maximum index of the possible number of cpu
Impact: cleanup, update to new cpumask API
Irq_desc.affinity and irq_desc.pending_mask are now cpumask_var_t's
so access to them should be using the new cpumask API.
Signed-off-by: Mike Travis
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc:
---
arch/powerpc/kernel/irq.c |
61 matches
Mail list logo