cpus4096 updates for v2.6.29
Subsystems (41)
Linus,
Please pull the latest cpus4096-for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git cpus4096-for-linus
This includes the off-stack 'struct cpumask' feature and API changes from Rusty and from Mike Travis: core cpumask infrastructure changes, the conversion of all scheduler cpumask use to the new APIs, and the conversion of x86 the architecture to the new cpumask APIs.
[ The shortlog and diffstat below was done with the assumption of you
having been able to pull the x86, tracing, scheduler and sparseirq trees. If there was a problem with any of those trees then please disregard this pull request. This tree will generate a minor conflict in kernel/time/tick-sched.c. ]
CONFIG_MAXSMP is now safe and got reintroduced [and triggers off-stack cpumask allocations] - but it is default-off, so that people do not run into it accidentally.
There's a category of scheduler changes that were applied to this tree, because they intimately interacted with cpumask details that prevented them from going into a separate topic: the load-balancer fixes and generalizations from Vaidyanathan Srinivasan and Gautham R Shenoy.
Because cpumask changes traditionally had a track record of breaking non-x86 architectures, i conducted a cross-arch build test:
testing 13 architectures:
testing alpha: -git: pass ( 15), -tip: pass ( 15) testing arm: -git: pass ( 5), -tip: pass ( 5) testing blackfin: -git: pass (4134), -tip: pass (4131) testing cris: -git: pass ( 28), -tip: pass ( 28) testing ia64: -git: pass ( 129), -tip: pass ( 132) testing m32r: -git: pass ( 21), -tip: pass ( 21) testing m68k: -git: pass ( 150), -tip: pass ( 150) testing mips: -git: pass ( 4), -tip: pass ( 4) testing powerpc: -git: pass ( 10), -tip: pass ( 10) testing sh: -git: pass ( 23), -tip: pass ( 23) testing sparc: -git: pass ( 0), -tip: pass ( 0) testing sparc64: -git: pass ( 3), -tip: pass ( 3) testing xtensa: -git: pass ( 25), -tip: pass ( 25)
( The number in parenthesis is the number of build warnings on that arch,
conducted with 4.3.3 20081123. )
Thanks,
Ingo
------------------>
Gautham R Shenoy (1):
sched: framework for sched_mc/smt_power_savings=N
Ingo Molnar (6):
sched: convert struct root_domain to cpumask_var_t, fix
x86: update io_apic.c to the new cpumask code
sched: move test_sd_parent() to an SMP section of sched.h
sched: fix warning in kernel/sched.c
x86: fix warning in arch/x86/kernel/io_apic.c
x86: export vector_used_by_percpu_irq
Mike Travis (20):
sched: reduce stack size requirements in kernel/sched.c
x86: fix build error with post-merge of tip/cpus4096 and rr-for-ingo/master.
x86: enable MAXSMP
x86 smp: modify send_IPI_mask interface to accept cpumask_t pointers
x86: move and enhance debug printk for nr_cpu_ids etc.
x86: Add cpu_mask_to_apicid_and
x86: update add-cpu_mask_to_apicid_and to use struct cpumask*
x86: Update io_apic.c to use new cpumask API
xen: convert to cpumask_var_t and new cpumask primitives.
x86: fixup_irqs() doesnt need an argument.
x86: cosmetic changes apic-related files.
x86: Set CONFIG_NR_CPUS even on UP
x86: prepare for cpumask iterators to only go to nr_cpu_ids
x86: Use cpumask accessors code for possible/present maps.
x86: Remove cpumask games in x86/kernel/cpu/intel_cacheinfo.c
x86: use work_on_cpu in x86/kernel/cpu/mcheck/mce_amd_64.c
x86: xen: use smp_call_function_many()
x86: Introduce topology_core_cpumask()/topology_thread_cpumask()
x86: fix cpu_mask_to_apicid_and to include cpu_online_mask
x86: use possible_cpus=NUM to extend the possible cpus allowed
Rusty Russell (30):
sched: convert sched.c from for_each_cpu_mask to for_each_cpu.
sched: get rid of boutique sched.c allocations, use cpumask_var_t.
sched: remove any_online_cpu()
sched: wrap sched_group and sched_domain cpumask accesses.
sched: convert struct sched_group/sched_domain cpumask_ts to variable bitmaps
sched: convert nohz_cpu_mask to cpumask_var_t.
sched: convert struct root_domain to cpumask_var_t.
sched: convert nohz struct to cpumask_var_t.
sched: convert idle_balance() to cpumask_var_t.
sched: convert rebalance_domains() to cpumask_var_t.
sched: convert sys_sched_getaffinity() to cpumask_var_t.
sched: avoid stack var in move_task_off_dead_cpu
sched: convert struct (sys_)sched_setaffinity() to cpumask_var_t.
sched: convert sched_domain_debug to cpumask_var_t.
sched: convert cpu_isolated_map to cpumask_var_t.
sched: convert falback_doms to cpumask_var_t.
sched: convert struct cpupri_vec cpumask_var_t.
sched: convert check_preempt_equal_prio to cpumask_var_t.
sched: convert local_cpu_mask to cpumask_var_t.
sched: convert remaining old-style cpumask operators
sched: convert nohz struct to cpumask_var_t, fix
sched: convert local_cpu_mask to cpumask_var_t, fix
sched: avoid stack var in move_task_off_dead_cpu, fix
cpumask: centralize cpu_online_map and cpu_possible_map
cpumask: change cpumask_scnprintf, cpumask_parse_user, cpulist_parse, and cpulist_scnprintf to take pointers.
cpumask: make irq_set_affinity() take a const struct cpumask
cpumask: convert struct clock_event_device to cpumask pointers.
cpumask: Add CONFIG_CPUMASK_OFFSTACK
cpumask: Introduce cpumask_of_{node,pcibus} to replace {node,pcibus}_to_cpumask
cpumask: Use all NR_CPUS bits unless CONFIG_CPUMASK_OFFSTACK
Suresh Siddha (1):
x86: use logical apicid in x2apic_cluster's x2apic_cpu_mask_to_apicid_and()
Vaidyanathan Srinivasan (7):
sched: convert BALANCE_FOR_xx_POWER to inline functions
sched: favour lower logical cpu number for sched_mc balance
sched: nominate preferred wakeup cpu
sched: bias task wakeups to preferred semi-idle packages
sched: activate active load balancing in new idle cpus
sched: add SD_BALANCE_NEWIDLE at MC and CPU level for sched_mc>0
sched: nominate preferred wakeup cpu, fix
Yinghai Lu (1):
x86: fix lguest used_vectors breakage, -v2
Documentation/cpu-hotplug.txt | 17 +- arch/alpha/include/asm/smp.h | 1 - arch/alpha/kernel/irq.c | 2 +- arch/alpha/kernel/process.c | 2 + arch/alpha/kernel/smp.c | 7 +- arch/alpha/kernel/sys_dp264.c | 8 +- arch/alpha/kernel/sys_titan.c | 4 +- arch/arm/common/gic.c | 4 +- arch/arm/kernel/irq.c | 2 +- arch/arm/kernel/smp.c | 10 - arch/arm/mach-at91/at91rm9200_time.c | 3 +- arch/arm/mach-at91/at91sam926x_time.c | 2 +- arch/arm/mach-davinci/time.c | 2 +- arch/arm/mach-imx/time.c | 2 +- arch/arm/mach-ixp4xx/common.c | 2 +- arch/arm/mach-msm/timer.c | 2 +- arch/arm/mach-ns9xxx/time-ns9360.c | 2 +- arch/arm/mach-omap1/time.c | 2 +- arch/arm/mach-omap1/timer32k.c | 2 +- arch/arm/mach-omap2/timer-gp.c | 2 +- arch/arm/mach-pxa/time.c | 2 +- arch/arm/mach-realview/core.c | 2 +- arch/arm/mach-realview/localtimer.c | 4 +- arch/arm/mach-sa1100/time.c | 2 +- arch/arm/mach-versatile/core.c | 2 +- arch/arm/oprofile/op_model_mpcore.c | 4 +- arch/arm/plat-mxc/time.c | 2 +- arch/arm/plat-orion/time.c | 2 +- arch/avr32/kernel/time.c | 2 +- arch/blackfin/kernel/time-ts.c | 2 +- arch/cris/arch-v32/kernel/irq.c | 4 +- arch/cris/arch-v32/kernel/smp.c | 4 - arch/cris/include/asm/smp.h | 1 - arch/ia64/hp/sim/hpsim_irq.c | 2 +- arch/ia64/include/asm/smp.h | 1 - arch/ia64/include/asm/topology.h | 2 - arch/ia64/kernel/iosapic.c | 12 +- arch/ia64/kernel/irq.c | 9 +- arch/ia64/kernel/msi_ia64.c | 12 +- arch/ia64/kernel/smpboot.c | 10 +- arch/ia64/kernel/topology.c | 2 +- arch/ia64/sn/kernel/irq.c | 6 +- arch/ia64/sn/kernel/msi_sn.c | 7 +- arch/m32r/Kconfig | 1 + arch/m32r/kernel/smpboot.c | 6 - arch/m68knommu/platform/coldfire/pit.c | 2 +- arch/mips/include/asm/irq.h | 3 +- arch/mips/include/asm/mach-ip27/topology.h | 1 - arch/mips/include/asm/smp.h | 3 - arch/mips/jazz/irq.c | 2 +- arch/mips/kernel/cevt-bcm1480.c | 4 +- arch/mips/kernel/cevt-ds1287.c | 2 +- arch/mips/kernel/cevt-gt641xx.c | 2 +- arch/mips/kernel/cevt-r4k.c | 2 +- arch/mips/kernel/cevt-sb1250.c | 4 +- arch/mips/kernel/cevt-smtc.c | 2 +- arch/mips/kernel/cevt-txx9.c | 2 +- arch/mips/kernel/i8253.c | 2 +- arch/mips/kernel/irq-gic.c | 6 +- arch/mips/kernel/smp-cmp.c | 6 +- arch/mips/kernel/smp-mt.c | 2 +- arch/mips/kernel/smp.c | 7 +- arch/mips/kernel/smtc.c | 6 +- arch/mips/mti-malta/malta-smtc.c | 6 +- arch/mips/nxp/pnx8550/common/time.c | 1 + arch/mips/pmc-sierra/yosemite/smp.c | 6 +- arch/mips/sgi-ip27/ip27-smp.c | 2 +- arch/mips/sgi-ip27/ip27-timer.c | 2 +- arch/mips/sibyte/bcm1480/irq.c | 8 +- arch/mips/sibyte/bcm1480/smp.c | 8 +- arch/mips/sibyte/sb1250/irq.c | 8 +- arch/mips/sibyte/sb1250/smp.c | 8 +- arch/mips/sni/time.c | 2 +- arch/parisc/Kconfig | 1 + arch/parisc/kernel/irq.c | 6 +- arch/parisc/kernel/smp.c | 15 - arch/powerpc/include/asm/topology.h | 1 - arch/powerpc/kernel/irq.c | 2 +- arch/powerpc/kernel/smp.c | 4 - arch/powerpc/kernel/time.c | 2 +- arch/powerpc/platforms/pseries/xics.c | 4 +- arch/powerpc/sysdev/mpic.c | 4 +- arch/powerpc/sysdev/mpic.h | 2 +- arch/s390/Kconfig | 1 + arch/s390/kernel/smp.c | 6 - arch/s390/kernel/time.c | 2 +- arch/sh/include/asm/smp.h | 2 +- arch/sh/include/asm/topology.h | 1 - arch/sh/kernel/smp.c | 10 +- arch/sh/kernel/timers/timer-broadcast.c | 2 +- arch/sh/kernel/timers/timer-tmu.c | 2 +- arch/sparc/include/asm/smp_32.h | 2 - arch/sparc/kernel/smp.c | 6 +- arch/sparc/kernel/sparc_ksyms.c | 4 - arch/sparc64/kernel/irq.c | 11 +- arch/sparc64/kernel/of_device.c | 2 +- arch/sparc64/kernel/pci_msi.c | 2 +- arch/sparc64/kernel/smp.c | 4 - arch/sparc64/kernel/time.c | 2 +- arch/um/kernel/smp.c | 7 - arch/um/kernel/time.c | 2 +- arch/x86/Kconfig | 13 +- arch/x86/include/asm/bigsmp/apic.h | 32 +- arch/x86/include/asm/bigsmp/ipi.h | 13 +- arch/x86/include/asm/desc.h | 10 +- arch/x86/include/asm/es7000/apic.h | 82 ++- arch/x86/include/asm/es7000/ipi.h | 12 +- arch/x86/include/asm/genapic_32.h | 13 +- arch/x86/include/asm/genapic_64.h | 14 +- arch/x86/include/asm/ipi.h | 23 +- arch/x86/include/asm/irq.h | 3 +- arch/x86/include/asm/mach-default/mach_apic.h | 28 +- arch/x86/include/asm/mach-default/mach_ipi.h | 18 +- arch/x86/include/asm/mach-generic/mach_apic.h | 1 + arch/x86/include/asm/numaq/apic.h | 12 +- arch/x86/include/asm/numaq/ipi.h | 13 +- arch/x86/include/asm/smp.h | 6 +- arch/x86/include/asm/summit/apic.h | 55 ++- arch/x86/include/asm/summit/ipi.h | 9 +- arch/x86/include/asm/topology.h | 2 + arch/x86/kernel/apic.c | 34 +- arch/x86/kernel/cpu/intel_cacheinfo.c | 45 +- arch/x86/kernel/cpu/mcheck/mce_amd_64.c | 108 ++-- arch/x86/kernel/genapic_flat_64.c | 107 ++- arch/x86/kernel/genx2apic_cluster.c | 81 ++- arch/x86/kernel/genx2apic_phys.c | 74 ++- arch/x86/kernel/genx2apic_uv_x.c | 61 ++- arch/x86/kernel/hpet.c | 8 +- arch/x86/kernel/i8253.c | 2 +- arch/x86/kernel/io_apic.c | 370 +++++----- arch/x86/kernel/ipi.c | 28 +- arch/x86/kernel/irq.c | 3 + arch/x86/kernel/irq_32.c | 13 +- arch/x86/kernel/irq_64.c | 15 +- arch/x86/kernel/irqinit_32.c | 16 +- arch/x86/kernel/irqinit_64.c | 13 + arch/x86/kernel/mfgpt_32.c | 2 +- arch/x86/kernel/reboot.c | 5 +- arch/x86/kernel/setup_percpu.c | 19 +- arch/x86/kernel/smp.c | 8 +- arch/x86/kernel/smpboot.c | 33 +- arch/x86/kernel/tlb_32.c | 2 +- arch/x86/kernel/tlb_64.c | 2 +- arch/x86/kernel/traps.c | 12 +- arch/x86/kernel/vmiclock_32.c | 2 +- arch/x86/lguest/boot.c | 2 +- arch/x86/mach-generic/bigsmp.c | 5 +- arch/x86/mach-generic/es7000.c | 5 +- arch/x86/mach-generic/numaq.c | 5 +- arch/x86/mach-generic/summit.c | 5 +- arch/x86/mach-voyager/voyager_smp.c | 9 +- arch/x86/mm/numa_64.c | 4 +- arch/x86/mm/srat_64.c | 2 +- arch/x86/xen/mmu.c | 20 +- arch/x86/xen/smp.c | 27 +- arch/x86/xen/suspend.c | 3 +- arch/x86/xen/time.c | 2 +- arch/x86/xen/xen-ops.h | 2 +- drivers/base/cpu.c | 2 +- drivers/base/node.c | 4 +- drivers/base/topology.c | 4 +- drivers/clocksource/tcb_clksrc.c | 2 +- drivers/lguest/interrupts_and_traps.c | 13 +- drivers/parisc/iosapic.c | 7 +- drivers/pci/pci-sysfs.c | 4 +- drivers/pci/probe.c | 4 +- drivers/xen/events.c | 6 +- include/asm-generic/topology.h | 14 +- include/asm-m32r/smp.h | 2 - include/linux/clockchips.h | 4 +- include/linux/cpumask.h | 98 ++- include/linux/interrupt.h | 4 +- include/linux/irq.h | 3 +- include/linux/sched.h | 92 ++- include/linux/topology.h | 6 +- init/Kconfig | 9 + kernel/cpu.c | 11 +- kernel/cpuset.c | 4 +- kernel/irq/chip.c | 2 +- kernel/irq/manage.c | 22 +- kernel/irq/migration.c | 14 +- kernel/irq/proc.c | 31 +- kernel/profile.c | 4 +- kernel/rcuclassic.c | 2 +- kernel/sched.c | 970 ++++++++++++++----------- kernel/sched_cpupri.c | 39 +- kernel/sched_cpupri.h | 5 +- kernel/sched_fair.c | 32 +- kernel/sched_rt.c | 73 ++- kernel/sched_stats.h | 3 +- kernel/taskstats.c | 2 +- kernel/time/clockevents.c | 2 + kernel/time/tick-broadcast.c | 2 +- kernel/time/tick-common.c | 12 +- kernel/time/tick-sched.c | 10 +- kernel/trace/trace.c | 4 +- lib/Kconfig | 7 + mm/slub.c | 2 +- 198 files changed, 2019 insertions(+), 1424 deletions(-)
[git pull] cpus4096 updates for v2.6.29, #2
Quoted 10 lines · Ingo Molnar
Linus,
Please pull the latest cpus4096-for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git cpus4096-for-linusThis includes the off-stack 'struct cpumask' feature and API changes from Rusty and from Mike Travis: core cpumask infrastructure changes, the conversion of all scheduler cpumask use to the new APIs, and the conversion of x86 the architecture to the new cpumask APIs.
this has a conflict with latest -git - the resolution for that (and an init section annotation patch) can be pulled from the cpus4096-for-linus-2 tree at:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git cpus4096-for-linus-2
Thanks,
Ingo
------------------>
Gautham R Shenoy (1):
sched: framework for sched_mc/smt_power_savings=N
Ingo Molnar (6):
sched: convert struct root_domain to cpumask_var_t, fix
x86: update io_apic.c to the new cpumask code
sched: move test_sd_parent() to an SMP section of sched.h
sched: fix warning in kernel/sched.c
x86: fix warning in arch/x86/kernel/io_apic.c
x86: export vector_used_by_percpu_irq
Mike Travis (20):
sched: reduce stack size requirements in kernel/sched.c
x86: fix build error with post-merge of tip/cpus4096 and rr-for-ingo/master.
x86: enable MAXSMP
x86 smp: modify send_IPI_mask interface to accept cpumask_t pointers
x86: move and enhance debug printk for nr_cpu_ids etc.
x86: Add cpu_mask_to_apicid_and
x86: update add-cpu_mask_to_apicid_and to use struct cpumask*
x86: Update io_apic.c to use new cpumask API
xen: convert to cpumask_var_t and new cpumask primitives.
x86: fixup_irqs() doesnt need an argument.
x86: cosmetic changes apic-related files.
x86: Set CONFIG_NR_CPUS even on UP
x86: prepare for cpumask iterators to only go to nr_cpu_ids
x86: Use cpumask accessors code for possible/present maps.
x86: Remove cpumask games in x86/kernel/cpu/intel_cacheinfo.c
x86: use work_on_cpu in x86/kernel/cpu/mcheck/mce_amd_64.c
x86: xen: use smp_call_function_many()
x86: Introduce topology_core_cpumask()/topology_thread_cpumask()
x86: fix cpu_mask_to_apicid_and to include cpu_online_mask
x86: use possible_cpus=NUM to extend the possible cpus allowed
Rusty Russell (30):
sched: convert sched.c from for_each_cpu_mask to for_each_cpu.
sched: get rid of boutique sched.c allocations, use cpumask_var_t.
sched: remove any_online_cpu()
sched: wrap sched_group and sched_domain cpumask accesses.
sched: convert struct sched_group/sched_domain cpumask_ts to variable bitmaps
sched: convert nohz_cpu_mask to cpumask_var_t.
sched: convert struct root_domain to cpumask_var_t.
sched: convert nohz struct to cpumask_var_t.
sched: convert idle_balance() to cpumask_var_t.
sched: convert rebalance_domains() to cpumask_var_t.
sched: convert sys_sched_getaffinity() to cpumask_var_t.
sched: avoid stack var in move_task_off_dead_cpu
sched: convert struct (sys_)sched_setaffinity() to cpumask_var_t.
sched: convert sched_domain_debug to cpumask_var_t.
sched: convert cpu_isolated_map to cpumask_var_t.
sched: convert falback_doms to cpumask_var_t.
sched: convert struct cpupri_vec cpumask_var_t.
sched: convert check_preempt_equal_prio to cpumask_var_t.
sched: convert local_cpu_mask to cpumask_var_t.
sched: convert remaining old-style cpumask operators
sched: convert nohz struct to cpumask_var_t, fix
sched: convert local_cpu_mask to cpumask_var_t, fix
sched: avoid stack var in move_task_off_dead_cpu, fix
cpumask: centralize cpu_online_map and cpu_possible_map
cpumask: change cpumask_scnprintf, cpumask_parse_user, cpulist_parse, and cpulist_scnprintf to take pointers.
cpumask: make irq_set_affinity() take a const struct cpumask
cpumask: convert struct clock_event_device to cpumask pointers.
cpumask: Add CONFIG_CPUMASK_OFFSTACK
cpumask: Introduce cpumask_of_{node,pcibus} to replace {node,pcibus}_to_cpumask
cpumask: Use all NR_CPUS bits unless CONFIG_CPUMASK_OFFSTACK
Sergio Luis (1):
x86: mark get_cpu_leaves() with __cpuinit annotation
Suresh Siddha (1):
x86: use logical apicid in x2apic_cluster's x2apic_cpu_mask_to_apicid_and()
Vaidyanathan Srinivasan (7):
sched: convert BALANCE_FOR_xx_POWER to inline functions
sched: favour lower logical cpu number for sched_mc balance
sched: nominate preferred wakeup cpu
sched: bias task wakeups to preferred semi-idle packages
sched: activate active load balancing in new idle cpus
sched: add SD_BALANCE_NEWIDLE at MC and CPU level for sched_mc>0
sched: nominate preferred wakeup cpu, fix
Yinghai Lu (1):
x86: fix lguest used_vectors breakage, -v2
Documentation/cpu-hotplug.txt | 17 +- arch/alpha/include/asm/smp.h | 1 - arch/alpha/kernel/irq.c | 2 +- arch/alpha/kernel/process.c | 2 + arch/alpha/kernel/smp.c | 7 +- arch/alpha/kernel/sys_dp264.c | 8 +- arch/alpha/kernel/sys_titan.c | 4 +- arch/arm/common/gic.c | 4 +- arch/arm/kernel/irq.c | 2 +- arch/arm/kernel/smp.c | 10 - arch/arm/mach-at91/at91rm9200_time.c | 3 +- arch/arm/mach-at91/at91sam926x_time.c | 2 +- arch/arm/mach-davinci/time.c | 2 +- arch/arm/mach-imx/time.c | 2 +- arch/arm/mach-ixp4xx/common.c | 2 +- arch/arm/mach-msm/timer.c | 2 +- arch/arm/mach-ns9xxx/time-ns9360.c | 2 +- arch/arm/mach-omap1/time.c | 2 +- arch/arm/mach-omap1/timer32k.c | 2 +- arch/arm/mach-omap2/timer-gp.c | 2 +- arch/arm/mach-pxa/time.c | 2 +- arch/arm/mach-realview/core.c | 2 +- arch/arm/mach-realview/localtimer.c | 4 +- arch/arm/mach-sa1100/time.c | 2 +- arch/arm/mach-versatile/core.c | 2 +- arch/arm/oprofile/op_model_mpcore.c | 4 +- arch/arm/plat-mxc/time.c | 2 +- arch/arm/plat-orion/time.c | 2 +- arch/avr32/kernel/time.c | 2 +- arch/blackfin/kernel/time-ts.c | 2 +- arch/cris/arch-v32/kernel/irq.c | 4 +- arch/cris/arch-v32/kernel/smp.c | 4 - arch/cris/include/asm/smp.h | 1 - arch/ia64/hp/sim/hpsim_irq.c | 2 +- arch/ia64/include/asm/smp.h | 1 - arch/ia64/include/asm/topology.h | 2 - arch/ia64/kernel/iosapic.c | 12 +- arch/ia64/kernel/irq.c | 9 +- arch/ia64/kernel/msi_ia64.c | 12 +- arch/ia64/kernel/smpboot.c | 10 +- arch/ia64/kernel/topology.c | 2 +- arch/ia64/sn/kernel/irq.c | 6 +- arch/ia64/sn/kernel/msi_sn.c | 7 +- arch/m32r/Kconfig | 1 + arch/m32r/kernel/smpboot.c | 6 - arch/m68knommu/platform/coldfire/pit.c | 2 +- arch/mips/include/asm/irq.h | 3 +- arch/mips/include/asm/mach-ip27/topology.h | 1 - arch/mips/include/asm/smp.h | 3 - arch/mips/jazz/irq.c | 2 +- arch/mips/kernel/cevt-bcm1480.c | 4 +- arch/mips/kernel/cevt-ds1287.c | 2 +- arch/mips/kernel/cevt-gt641xx.c | 2 +- arch/mips/kernel/cevt-r4k.c | 2 +- arch/mips/kernel/cevt-sb1250.c | 4 +- arch/mips/kernel/cevt-smtc.c | 2 +- arch/mips/kernel/cevt-txx9.c | 2 +- arch/mips/kernel/i8253.c | 2 +- arch/mips/kernel/irq-gic.c | 6 +- arch/mips/kernel/smp-cmp.c | 6 +- arch/mips/kernel/smp-mt.c | 2 +- arch/mips/kernel/smp.c | 7 +- arch/mips/kernel/smtc.c | 6 +- arch/mips/mti-malta/malta-smtc.c | 6 +- arch/mips/nxp/pnx8550/common/time.c | 1 + arch/mips/pmc-sierra/yosemite/smp.c | 6 +- arch/mips/sgi-ip27/ip27-smp.c | 2 +- arch/mips/sgi-ip27/ip27-timer.c | 2 +- arch/mips/sibyte/bcm1480/irq.c | 8 +- arch/mips/sibyte/bcm1480/smp.c | 8 +- arch/mips/sibyte/sb1250/irq.c | 8 +- arch/mips/sibyte/sb1250/smp.c | 8 +- arch/mips/sni/time.c | 2 +- arch/parisc/Kconfig | 1 + arch/parisc/kernel/irq.c | 6 +- arch/parisc/kernel/smp.c | 15 - arch/powerpc/include/asm/topology.h | 1 - arch/powerpc/kernel/irq.c | 2 +- arch/powerpc/kernel/smp.c | 4 - arch/powerpc/kernel/time.c | 2 +- arch/powerpc/platforms/pseries/xics.c | 4 +- arch/powerpc/sysdev/mpic.c | 4 +- arch/powerpc/sysdev/mpic.h | 2 +- arch/s390/Kconfig | 1 + arch/s390/kernel/smp.c | 6 - arch/s390/kernel/time.c | 2 +- arch/sh/include/asm/smp.h | 2 +- arch/sh/include/asm/topology.h | 1 - arch/sh/kernel/smp.c | 10 +- arch/sh/kernel/timers/timer-broadcast.c | 2 +- arch/sh/kernel/timers/timer-tmu.c | 2 +- arch/sparc/include/asm/smp_32.h | 2 - arch/sparc/kernel/irq_64.c | 11 +- arch/sparc/kernel/of_device_64.c | 2 +- arch/sparc/kernel/pci_msi.c | 2 +- arch/sparc/kernel/smp_32.c | 6 +- arch/sparc/kernel/smp_64.c | 4 - arch/sparc/kernel/sparc_ksyms_32.c | 4 - arch/sparc/kernel/time_64.c | 2 +- arch/um/kernel/smp.c | 7 - arch/um/kernel/time.c | 2 +- arch/x86/Kconfig | 13 +- arch/x86/include/asm/bigsmp/apic.h | 32 +- arch/x86/include/asm/bigsmp/ipi.h | 13 +- arch/x86/include/asm/desc.h | 10 +- arch/x86/include/asm/es7000/apic.h | 82 ++- arch/x86/include/asm/es7000/ipi.h | 12 +- arch/x86/include/asm/genapic_32.h | 13 +- arch/x86/include/asm/genapic_64.h | 14 +- arch/x86/include/asm/ipi.h | 23 +- arch/x86/include/asm/irq.h | 3 +- arch/x86/include/asm/mach-default/mach_apic.h | 28 +- arch/x86/include/asm/mach-default/mach_ipi.h | 18 +- arch/x86/include/asm/mach-generic/mach_apic.h | 1 + arch/x86/include/asm/numaq/apic.h | 12 +- arch/x86/include/asm/numaq/ipi.h | 13 +- arch/x86/include/asm/smp.h | 6 +- arch/x86/include/asm/summit/apic.h | 55 ++- arch/x86/include/asm/summit/ipi.h | 9 +- arch/x86/include/asm/topology.h | 2 + arch/x86/kernel/apic.c | 34 +- arch/x86/kernel/cpu/intel_cacheinfo.c | 45 +- arch/x86/kernel/cpu/mcheck/mce_amd_64.c | 108 ++-- arch/x86/kernel/genapic_flat_64.c | 107 ++- arch/x86/kernel/genx2apic_cluster.c | 81 ++- arch/x86/kernel/genx2apic_phys.c | 74 ++- arch/x86/kernel/genx2apic_uv_x.c | 61 ++- arch/x86/kernel/hpet.c | 8 +- arch/x86/kernel/i8253.c | 2 +- arch/x86/kernel/io_apic.c | 370 +++++----- arch/x86/kernel/ipi.c | 28 +- arch/x86/kernel/irq.c | 3 + arch/x86/kernel/irq_32.c | 13 +- arch/x86/kernel/irq_64.c | 15 +- arch/x86/kernel/irqinit_32.c | 16 +- arch/x86/kernel/irqinit_64.c | 13 + arch/x86/kernel/mfgpt_32.c | 2 +- arch/x86/kernel/reboot.c | 5 +- arch/x86/kernel/setup_percpu.c | 19 +- arch/x86/kernel/smp.c | 8 +- arch/x86/kernel/smpboot.c | 33 +- arch/x86/kernel/tlb_32.c | 2 +- arch/x86/kernel/tlb_64.c | 2 +- arch/x86/kernel/traps.c | 12 +- arch/x86/kernel/vmiclock_32.c | 2 +- arch/x86/lguest/boot.c | 2 +- arch/x86/mach-generic/bigsmp.c | 5 +- arch/x86/mach-generic/es7000.c | 5 +- arch/x86/mach-generic/numaq.c | 5 +- arch/x86/mach-generic/summit.c | 5 +- arch/x86/mach-voyager/voyager_smp.c | 9 +- arch/x86/mm/numa_64.c | 4 +- arch/x86/mm/srat_64.c | 2 +- arch/x86/xen/mmu.c | 20 +- arch/x86/xen/smp.c | 27 +- arch/x86/xen/suspend.c | 3 +- arch/x86/xen/time.c | 2 +- arch/x86/xen/xen-ops.h | 2 +- drivers/base/cpu.c | 2 +- drivers/base/node.c | 4 +- drivers/base/topology.c | 4 +- drivers/clocksource/tcb_clksrc.c | 2 +- drivers/lguest/interrupts_and_traps.c | 13 +- drivers/parisc/iosapic.c | 7 +- drivers/pci/pci-sysfs.c | 4 +- drivers/pci/probe.c | 4 +- drivers/xen/events.c | 6 +- include/asm-generic/topology.h | 14 +- include/asm-m32r/smp.h | 2 - include/linux/clockchips.h | 4 +- include/linux/cpumask.h | 98 ++- include/linux/interrupt.h | 4 +- include/linux/irq.h | 3 +- include/linux/sched.h | 92 ++- include/linux/topology.h | 6 +- init/Kconfig | 9 + kernel/cpu.c | 11 +- kernel/cpuset.c | 4 +- kernel/irq/chip.c | 2 +- kernel/irq/manage.c | 22 +- kernel/irq/migration.c | 14 +- kernel/irq/proc.c | 31 +- kernel/profile.c | 4 +- kernel/rcuclassic.c | 2 +- kernel/sched.c | 970 ++++++++++++++----------- kernel/sched_cpupri.c | 39 +- kernel/sched_cpupri.h | 5 +- kernel/sched_fair.c | 32 +- kernel/sched_rt.c | 73 ++- kernel/sched_stats.h | 3 +- kernel/taskstats.c | 2 +- kernel/time/clockevents.c | 2 + kernel/time/tick-broadcast.c | 2 +- kernel/time/tick-common.c | 12 +- kernel/time/tick-sched.c | 10 +- kernel/trace/trace.c | 4 +- lib/Kconfig | 7 + mm/slub.c | 2 +- 198 files changed, 2019 insertions(+), 1424 deletions(-)
Documentation/cpu-hotplug.txt +9 -8
@@ -50,16 +50,17 @@ additional_cpus=n (*) Use this to limit hotpluggable cpus. This option sets cpu_possible_map = cpu_present_map + additional_cpus (*) Option valid only for following architectures -- x86_64, ia64 +- ia64 -ia64 and x86_64 use the number of disabled local apics in ACPI tables MADT -to determine the number of potentially hot-pluggable cpus. The implementation -should only rely on this to count the # of cpus, but *MUST* not rely on the -apicid values in those tables for disabled apics. In the event BIOS doesn't -mark such hot-pluggable cpus as disabled entries, one could use this -parameter "additional_cpus=x" to represent those cpus in the cpu_possible_map. +ia64 uses the number of disabled local apics in ACPI tables MADT to +determine the number of potentially hot-pluggable cpus. The implementation +should only rely on this to count the # of cpus, but *MUST* not rely +on the apicid values in those tables for disabled apics. In the event +BIOS doesn't mark such hot-pluggable cpus as disabled entries, one could +use this parameter "additional_cpus=x" to represent those cpus in the +cpu_possible_map. -possible_cpus=n [s390 only] use this to set hotpluggable cpus. +possible_cpus=n [s390,x86_64] use this to set hotpluggable cpus. This option sets possible_cpus bits in cpu_possible_map. Thus keeping the numbers of bits set constant even if the machine gets rebooted.
arch/alpha/include/asm/smp.h +0 -1
@@ -45,7 +45,6 @@ extern struct cpuinfo_alpha cpu_data[NR_CPUS];#define raw_smp_processor_id () (current_thread_info()->cpu)extern int smp_num_cpus; -#define cpu_possible_map cpu_present_mapextern void arch_send_call_function_single_ipi (int cpu);extern void arch_send_call_function_ipi (cpumask_t mask);
arch/alpha/kernel/irq.c +1 -1
@@ -55,7 +55,7 @@ int irq_select_affinity(unsigned int irq) last_cpu = cpu; irq_desc[irq].affinity =cpumask_of_cpu (cpu); - irq_desc[irq].chip->set_affinity (irq,cpumask_of_cpu (cpu)); + irq_desc[irq].chip->set_affinity (irq,cpumask_of (cpu)); return 0; }#endif /* CONFIG_SMP */
arch/alpha/kernel/process.c +2 -0
@@ -94,6 +94,7 @@ common_shutdown_1(void *generic_ptr) flags |=0x00040000UL ;/* "remain halted" */ *pflags = flags;cpu_clear (cpuid, cpu_present_map); +cpu_clear (cpuid, cpu_possible_map); halt(); }#endif
@@ -120,6 +121,7 @@ common_shutdown_1(void *generic_ptr)#ifdef CONFIG_SMP /* Wait for the secondaries to halt. */ cpu_clear (boot_cpuid, cpu_present_map); +cpu_clear (boot_cpuid, cpu_possible_map);while (cpus_weight (cpu_present_map))barrier ();#endif
arch/alpha/kernel/smp.c +2 -5
@@ -70,11 +70,6 @@ enum ipi_message_type {/* Set to a secondary's cpuid when it comes online. */ static int smp_secondary_alive__devinitdata =0 ; -/* Which cpus ids came online. */ -cpumask_t cpu_online_map; - -EXPORT_SYMBOL (cpu_online_map); -int smp_num_probed;/* Internal processor count */ int smp_num_cpus =1 ;/* Number that came online. */ EXPORT_SYMBOL (smp_num_cpus);
@@ -440,6 +435,7 @@ setup_smp(void) ((char *)cpubase + i*hwrpb->processor_size);if ((cpu->flags &0x1cc ) ==0x1cc ) { smp_num_probed++; +cpu_set (i, cpu_possible_map);cpu_set (i, cpu_present_map); cpu->pal_revision = boot_cpu_palrev; }
@@ -473,6 +469,7 @@ smp_prepare_cpus(unsigned int max_cpus)/* Nothing to do on a UP box, or when told not to. */ if (smp_num_probed ==1 || max_cpus ==0 ) { + cpu_possible_map =cpumask_of_cpu (boot_cpuid); cpu_present_map =cpumask_of_cpu (boot_cpuid);printk (KERN_INFO "SMP mode deactivated.\n" );return ;
arch/alpha/kernel/sys_dp264.c +4 -4
@@ -177,19 +177,19 @@ cpu_set_irq_affinity(unsigned int irq, cpumask_t affinity) }static void -dp264_set_affinity (unsigned int irq,cpumask_t affinity) +dp264_set_affinity (unsigned int irq,const struct cpumask *affinity) {spin_lock (&dp264_irq_lock); -cpu_set_irq_affinity (irq, affinity); +cpu_set_irq_affinity (irq, *affinity);tsunami_update_irq_hw (cached_irq_mask);spin_unlock (&dp264_irq_lock); }static void -clipper_set_affinity (unsigned int irq,cpumask_t affinity) +clipper_set_affinity (unsigned int irq,const struct cpumask *affinity) {spin_lock (&dp264_irq_lock); -cpu_set_irq_affinity (irq -16 , affinity); +cpu_set_irq_affinity (irq -16 , *affinity);tsunami_update_irq_hw (cached_irq_mask);spin_unlock (&dp264_irq_lock); }
arch/alpha/kernel/sys_titan.c +2 -2
@@ -158,10 +158,10 @@ titan_cpu_set_irq_affinity(unsigned int irq, cpumask_t affinity) }static void -titan_set_irq_affinity (unsigned int irq,cpumask_t affinity) +titan_set_irq_affinity (unsigned int irq,const struct cpumask *affinity) {spin_lock (&titan_irq_lock); -titan_cpu_set_irq_affinity (irq -16 , affinity); +titan_cpu_set_irq_affinity (irq -16 , *affinity);titan_update_irq_hw (titan_cached_irq_mask);spin_unlock (&titan_irq_lock); }
arch/arm/common/gic.c +2 -2
@@ -109,11 +109,11 @@ static void gic_unmask_irq(unsigned int irq) }#ifdef CONFIG_SMP -static void gic_set_cpu (unsigned int irq,cpumask_t mask_val) +static void gic_set_cpu (unsigned int irq,const struct cpumask *mask_val) {void __iomem *reg =gic_dist_base (irq) +GIC_DIST_TARGET + (gic_irq (irq) & ~3 );unsigned int shift = (irq %4 ) *8 ; -unsigned int cpu =first_cpu (mask_val); +unsigned int cpu =cpumask_first (mask_val);u32 val;spin_lock (&irq_controller_lock);
arch/arm/kernel/irq.c +1 -1
@@ -174,7 +174,7 @@ static void route_irq(struct irq_desc *desc, unsigned int irq, unsigned int cpu)pr_debug ("IRQ%u: moving from cpu%u to cpu%u\n" , irq, desc->cpu, cpu);spin_lock_irq (&desc->lock); - desc->chip->set_affinity (irq,cpumask_of_cpu (cpu)); + desc->chip->set_affinity (irq,cpumask_of (cpu));spin_unlock_irq (&desc->lock); }
arch/arm/kernel/smp.c +0 -10
@@ -34,16 +34,6 @@#include <asm/ptrace.h> /* -* bitmask of present and online CPUs. -* The present bitmask indicates that the CPU is physically present. -* The online bitmask indicates that the CPU is up and running. -*/ -cpumask_t cpu_possible_map; -EXPORT_SYMBOL (cpu_possible_map); -cpumask_t cpu_online_map; -EXPORT_SYMBOL (cpu_online_map); - -/* * as from 2.5, kernels no longer have an init_tasks structure * so we need some other way of telling a new secondary core * where to place its SVC stack
arch/arm/mach-at91/at91rm9200_time.c +1 -2
@@ -178,7 +178,6 @@ static struct clock_event_device clkevt = { .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, .shift = 32, .rating = 150, - .cpumask = CPU_MASK_CPU0, .set_next_event = clkevt32k_next_event, .set_mode = clkevt32k_mode, };
@@ -206,7 +205,7 @@ void __init at91rm9200_timer_init(void) clkevt.mult =div_sc (AT91_SLOW_CLOCK ,NSEC_PER_SEC , clkevt.shift); clkevt.max_delta_ns =clockevent_delta2ns (AT91_ST_ALMV , &clkevt); clkevt.min_delta_ns =clockevent_delta2ns (2 , &clkevt) +1 ; - clkevt.cpumask =cpumask_of_cpu (0 ); + clkevt.cpumask =cpumask_of (0 );clockevents_register_device (&clkevt);/* register clocksource */
arch/arm/mach-at91/at91sam926x_time.c +1 -1
@@ -91,7 +91,6 @@ static struct clock_event_device pit_clkevt = { .features = CLOCK_EVT_FEAT_PERIODIC, .shift = 32, .rating = 100, - .cpumask = CPU_MASK_CPU0, .set_mode = pit_clkevt_mode, };
@@ -173,6 +172,7 @@ static void __init at91sam926x_pit_init(void)/* Set up and register clockevents */ pit_clkevt.mult =div_sc (pit_rate,NSEC_PER_SEC , pit_clkevt.shift); + pit_clkevt.cpumask =cpumask_of (0 );clockevents_register_device (&pit_clkevt); }
arch/arm/mach-davinci/time.c +1 -1
@@ -322,7 +322,7 @@ static void __init davinci_timer_init(void) clockevent_davinci.min_delta_ns =clockevent_delta2ns (1 , &clockevent_davinci); - clockevent_davinci.cpumask =cpumask_of_cpu (0 ); + clockevent_davinci.cpumask =cpumask_of (0 );clockevents_register_device (&clockevent_davinci); }
arch/arm/mach-imx/time.c +1 -1
@@ -184,7 +184,7 @@ static int __init imx_clockevent_init(unsigned long rate) clockevent_imx.min_delta_ns =clockevent_delta2ns (0xf , &clockevent_imx); - clockevent_imx.cpumask =cpumask_of_cpu (0 ); + clockevent_imx.cpumask =cpumask_of (0 );clockevents_register_device (&clockevent_imx);
arch/arm/mach-ixp4xx/common.c +1 -1
@@ -487,7 +487,7 @@ static int __init ixp4xx_clockevent_init(void)clockevent_delta2ns (0xfffffffe , &clockevent_ixp4xx); clockevent_ixp4xx.min_delta_ns =clockevent_delta2ns (0xf , &clockevent_ixp4xx); - clockevent_ixp4xx.cpumask =cpumask_of_cpu (0 ); + clockevent_ixp4xx.cpumask =cpumask_of (0 );clockevents_register_device (&clockevent_ixp4xx);return 0 ;
arch/arm/mach-msm/timer.c +1 -1
@@ -182,7 +182,7 @@ static void __init msm_timer_init(void)clockevent_delta2ns (0xf0000000 >> clock->shift, ce);/* 4 gets rounded down to 3 */ ce->min_delta_ns =clockevent_delta2ns (4 , ce); - ce->cpumask =cpumask_of_cpu (0 ); + ce->cpumask =cpumask_of (0 ); cs->mult =clocksource_hz2mult (clock->freq, cs->shift); res =clocksource_register (cs);
arch/arm/mach-ns9xxx/time-ns9360.c +1 -1
@@ -173,7 +173,7 @@ static void __init ns9360_timer_init(void) ns9360_clockevent_device.min_delta_ns =clockevent_delta2ns (1 , &ns9360_clockevent_device); - ns9360_clockevent_device.cpumask =cpumask_of_cpu (0 ); + ns9360_clockevent_device.cpumask =cpumask_of (0 );clockevents_register_device (&ns9360_clockevent_device); setup_irq(IRQ_NS9360_TIMER0 + TIMER_CLOCKEVENT,
arch/arm/mach-omap1/time.c +1 -1
@@ -173,7 +173,7 @@ static __init void omap_init_mpu_timer(unsigned long rate) clockevent_mpu_timer1.min_delta_ns =clockevent_delta2ns (1 , &clockevent_mpu_timer1); - clockevent_mpu_timer1.cpumask =cpumask_of_cpu (0 ); + clockevent_mpu_timer1.cpumask =cpumask_of (0 );clockevents_register_device (&clockevent_mpu_timer1); }
arch/arm/mach-omap1/timer32k.c +1 -1
@@ -187,7 +187,7 @@ static __init void omap_init_32k_timer(void) clockevent_32k_timer.min_delta_ns =clockevent_delta2ns (1 , &clockevent_32k_timer); - clockevent_32k_timer.cpumask =cpumask_of_cpu (0 ); + clockevent_32k_timer.cpumask =cpumask_of (0 );clockevents_register_device (&clockevent_32k_timer); }
arch/arm/mach-omap2/timer-gp.c +1 -1
@@ -120,7 +120,7 @@ static void __init omap2_gp_clockevent_init(void) clockevent_gpt.min_delta_ns =clockevent_delta2ns (1 , &clockevent_gpt); - clockevent_gpt.cpumask =cpumask_of_cpu (0 ); + clockevent_gpt.cpumask =cpumask_of (0 );clockevents_register_device (&clockevent_gpt); }
arch/arm/mach-pxa/time.c +1 -1
@@ -122,7 +122,6 @@ static struct clock_event_device ckevt_pxa_osmr0 = { .features = CLOCK_EVT_FEAT_ONESHOT, .shift = 32, .rating = 200, - .cpumask = CPU_MASK_CPU0, .set_next_event = pxa_osmr0_set_next_event, .set_mode = pxa_osmr0_set_mode, };
@@ -163,6 +162,7 @@ static void __init pxa_timer_init(void)clockevent_delta2ns (0x7fffffff , &ckevt_pxa_osmr0); ckevt_pxa_osmr0.min_delta_ns =clockevent_delta2ns (MIN_OSCR_DELTA *2 , &ckevt_pxa_osmr0) +1 ; + ckevt_pxa_osmr0.cpumask =cpumask_of (0 ); cksrc_pxa_oscr0.mult =clocksource_hz2mult (clock_tick_rate, cksrc_pxa_oscr0.shift);
arch/arm/mach-realview/core.c +1 -1
@@ -624,7 +624,7 @@ static struct clock_event_device timer0_clockevent = { .set_mode = timer_set_mode, .set_next_event = timer_set_next_event, .rating = 300, - .cpumask = CPU_MASK_ALL, + .cpumask = cpu_all_mask, };static void __init realview_clockevents_init (unsigned int timer_irq)
arch/arm/mach-realview/localtimer.c +2 -2
@@ -154,7 +154,7 @@ void __cpuinit local_timer_setup(void) clk->set_mode = local_timer_set_mode; clk->set_next_event = local_timer_set_next_event; clk->irq =IRQ_LOCALTIMER ; - clk->cpumask =cpumask_of_cpu (cpu); + clk->cpumask =cpumask_of (cpu); clk->shift =20 ; clk->mult =div_sc (mpcore_timer_rate,NSEC_PER_SEC , clk->shift); clk->max_delta_ns =clockevent_delta2ns (0xffffffff , clk);
@@ -193,7 +193,7 @@ void __cpuinit local_timer_setup(void) clk->rating =200 ; clk->set_mode = dummy_timer_set_mode; clk->broadcast = smp_timer_broadcast; - clk->cpumask =cpumask_of_cpu (cpu); + clk->cpumask =cpumask_of (cpu);clockevents_register_device (clk); }
arch/arm/mach-sa1100/time.c +1 -1
@@ -73,7 +73,6 @@ static struct clock_event_device ckevt_sa1100_osmr0 = { .features = CLOCK_EVT_FEAT_ONESHOT, .shift = 32, .rating = 200, - .cpumask = CPU_MASK_CPU0, .set_next_event = sa1100_osmr0_set_next_event, .set_mode = sa1100_osmr0_set_mode, };
@@ -110,6 +109,7 @@ static void __init sa1100_timer_init(void)clockevent_delta2ns (0x7fffffff , &ckevt_sa1100_osmr0); ckevt_sa1100_osmr0.min_delta_ns =clockevent_delta2ns (MIN_OSCR_DELTA *2 , &ckevt_sa1100_osmr0) +1 ; + ckevt_sa1100_osmr0.cpumask =cpumask_of (0 ); cksrc_sa1100_oscr.mult =clocksource_hz2mult (CLOCK_TICK_RATE , cksrc_sa1100_oscr.shift);
arch/arm/mach-versatile/core.c +1 -1
@@ -1005,7 +1005,7 @@ static void __init versatile_timer_init(void) timer0_clockevent.min_delta_ns =clockevent_delta2ns (0xf , &timer0_clockevent); - timer0_clockevent.cpumask =cpumask_of_cpu (0 ); + timer0_clockevent.cpumask =cpumask_of (0 );clockevents_register_device (&timer0_clockevent); }
arch/arm/oprofile/op_model_mpcore.c +2 -2
@@ -260,10 +260,10 @@ static void em_stop(void)static void em_route_irq (int irq,unsigned int cpu) {struct irq_desc *desc = irq_desc + irq; -cpumask_t mask =cpumask_of_cpu (cpu); +const struct cpumask *mask =cpumask_of (cpu);spin_lock_irq (&desc->lock); - desc->affinity = mask; + desc->affinity = *mask; desc->chip->set_affinity (irq, mask);spin_unlock_irq (&desc->lock); }
arch/arm/plat-mxc/time.c +1 -1
@@ -190,7 +190,7 @@ static int __init mxc_clockevent_init(void) clockevent_mxc.min_delta_ns =clockevent_delta2ns (0xff , &clockevent_mxc); - clockevent_mxc.cpumask =cpumask_of_cpu (0 ); + clockevent_mxc.cpumask =cpumask_of (0 );clockevents_register_device (&clockevent_mxc);
arch/arm/plat-orion/time.c +1 -1
@@ -149,7 +149,6 @@ static struct clock_event_device orion_clkevt = { .features = CLOCK_EVT_FEAT_ONESHOT | CLOCK_EVT_FEAT_PERIODIC, .shift = 32, .rating = 300, - .cpumask = CPU_MASK_CPU0, .set_next_event = orion_clkevt_next_event, .set_mode = orion_clkevt_mode, };
@@ -199,5 +198,6 @@ void __init orion_time_init(unsigned int irq, unsigned int tclk) orion_clkevt.mult =div_sc (tclk,NSEC_PER_SEC , orion_clkevt.shift); orion_clkevt.max_delta_ns =clockevent_delta2ns (0xfffffffe , &orion_clkevt); orion_clkevt.min_delta_ns =clockevent_delta2ns (1 , &orion_clkevt); + orion_clkevt.cpumask =cpumask_of (0 );clockevents_register_device (&orion_clkevt); }
arch/avr32/kernel/time.c +1 -1
@@ -106,7 +106,6 @@ static struct clock_event_device comparator = { .features = CLOCK_EVT_FEAT_ONESHOT, .shift = 16, .rating = 50, - .cpumask = CPU_MASK_CPU0, .set_next_event = comparator_next_event, .set_mode = comparator_mode, };
@@ -134,6 +133,7 @@ void __init time_init(void) comparator.mult =div_sc (counter_hz,NSEC_PER_SEC , comparator.shift); comparator.max_delta_ns =clockevent_delta2ns ((u32 )~0 , &comparator); comparator.min_delta_ns =clockevent_delta2ns (50 , &comparator) +1 ; + comparator.cpumask =cpumask_of (0 );sysreg_write (COMPARE ,0 ); timer_irqaction.dev_id = &comparator;
arch/blackfin/kernel/time-ts.c +1 -1
@@ -162,7 +162,6 @@ static struct clock_event_device clockevent_bfin = { .name = "bfin_core_timer", .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, .shift = 32, - .cpumask = CPU_MASK_CPU0, .set_next_event = bfin_timer_set_next_event, .set_mode = bfin_timer_set_mode, };
@@ -193,6 +192,7 @@ static int __init bfin_clockevent_init(void) clockevent_bfin.mult =div_sc (timer_clk,NSEC_PER_SEC , clockevent_bfin.shift); clockevent_bfin.max_delta_ns =clockevent_delta2ns (-1 , &clockevent_bfin); clockevent_bfin.min_delta_ns =clockevent_delta2ns (100 , &clockevent_bfin); + clockevent_bfin.cpumask =cpumask_of (0 );clockevents_register_device (&clockevent_bfin);return 0 ;
arch/cris/arch-v32/kernel/irq.c +2 -2
@@ -325,11 +325,11 @@ static void end_crisv32_irq(unsigned int irq) { } -void set_affinity_crisv32_irq (unsigned int irq,cpumask_t dest) +void set_affinity_crisv32_irq (unsigned int irq,const struct cpumask *dest) {unsigned long flags;spin_lock_irqsave (&irq_lock, flags); - irq_allocations[irq -FIRST_IRQ ].mask = dest; + irq_allocations[irq -FIRST_IRQ ].mask = *dest;spin_unlock_irqrestore (&irq_lock, flags); }
arch/cris/arch-v32/kernel/smp.c +0 -4
@@ -29,11 +29,7 @@spinlock_t cris_atomic_locks[] = { [0 ...LOCK_COUNT -1 ] =SPIN_LOCK_UNLOCKED };/* CPU masks */ -cpumask_t cpu_online_map =CPU_MASK_NONE ; -EXPORT_SYMBOL (cpu_online_map);cpumask_t phys_cpu_present_map =CPU_MASK_NONE ; -cpumask_t cpu_possible_map; -EXPORT_SYMBOL (cpu_possible_map);EXPORT_SYMBOL (phys_cpu_present_map);/* Variables used during SMP boot */
arch/cris/include/asm/smp.h +0 -1
@@ -4,7 +4,6 @@#include <linux/cpumask.h> extern cpumask_t phys_cpu_present_map; -extern cpumask_t cpu_possible_map;#define raw_smp_processor_id () (current_thread_info()->cpu)
arch/ia64/hp/sim/hpsim_irq.c +1 -1
@@ -22,7 +22,7 @@ hpsim_irq_noop (unsigned int irq) }static void -hpsim_set_affinity_noop (unsigned int a,cpumask_t b) +hpsim_set_affinity_noop (unsigned int a,const struct cpumask *b) { }
arch/ia64/include/asm/smp.h +0 -1
@@ -57,7 +57,6 @@ extern struct smp_boot_data {extern char no_int_routing__devinitdata ; -extern cpumask_t cpu_online_map;extern cpumask_t cpu_core_map[NR_CPUS ];DECLARE_PER_CPU (cpumask_t, cpu_sibling_map);extern int smp_num_siblings;
arch/ia64/include/asm/topology.h +0 -2
@@ -55,7 +55,6 @@void build_cpu_to_node_map (void );#define SD_CPU_INIT (struct sched_domain) { \ - .span = CPU_MASK_NONE, \ .parent = NULL, \ .child = NULL, \ .groups = NULL, \
@@ -80,7 +79,6 @@ void build_cpu_to_node_map(void);/* sched_domains SD_NODE_INIT for IA64 NUMA machines */ #define SD_NODE_INIT (struct sched_domain) { \ - .span = CPU_MASK_NONE, \ .parent = NULL, \ .child = NULL, \ .groups = NULL, \
arch/ia64/kernel/iosapic.c +6 -6
@@ -330,25 +330,25 @@ unmask_irq (unsigned int irq)static void -iosapic_set_affinity (unsigned int irq,cpumask_t mask) +iosapic_set_affinity (unsigned int irq,const struct cpumask *mask) {#ifdef CONFIG_SMP u32 high32, low32; -int dest, rte_index; +int cpu, dest, rte_index;int redir = (irq &IA64_IRQ_REDIRECTED ) ?1 :0 ;struct iosapic_rte_info *rte;struct iosapic *iosapic; irq &= (~IA64_IRQ_REDIRECTED ); -cpus_and (mask, mask, cpu_online_map); -if (cpus_empty (mask)) + cpu =cpumask_first_and (cpu_online_mask, mask); +if (cpu >= nr_cpu_ids)return ; -if (irq_prepare_move (irq,first_cpu (mask))) +if (irq_prepare_move (irq, cpu))return ; - dest =cpu_physical_id (first_cpu (mask)); + dest =cpu_physical_id (cpu);if (!iosapic_intr_info[irq].count)return ;/* not an IOSAPIC interrupt */
arch/ia64/kernel/irq.c +4 -5
@@ -133,7 +133,6 @@ unsigned int vectors_in_migration[NR_IRQS];*/ static void migrate_irqs (void ) { -cpumask_t mask;irq_desc_t *desc;int irq, new_cpu;
@@ -152,15 +151,14 @@ static void migrate_irqs(void)if (desc->status ==IRQ_PER_CPU )continue ; -cpus_and (mask, irq_desc[irq].affinity, cpu_online_map); -if (any_online_cpu (mask) ==NR_CPUS ) { +if (cpumask_any_and (&irq_desc[irq].affinity, cpu_online_mask) + >= nr_cpu_ids) {/* * Save it for phase 2 processing */ vectors_in_migration[irq] = irq; new_cpu =any_online_cpu (cpu_online_map); - mask =cpumask_of_cpu (new_cpu);/* * Al three are essential, currently WARN_ON.. maybe panic?
@@ -168,7 +166,8 @@ static void migrate_irqs(void)if (desc->chip && desc->chip->disable && desc->chip->enable && desc->chip->set_affinity) { desc->chip->disable (irq); - desc->chip->set_affinity (irq, mask); + desc->chip->set_affinity (irq, +cpumask_of (new_cpu)); desc->chip->enable (irq); }else { WARN_ON((!(desc->chip) || !(desc->chip->disable) ||
arch/ia64/kernel/msi_ia64.c +6 -6
@@ -49,11 +49,12 @@static struct irq_chip ia64_msi_chip;#ifdef CONFIG_SMP -static void ia64_set_msi_irq_affinity (unsigned int irq,cpumask_t cpu_mask) +static void ia64_set_msi_irq_affinity (unsigned int irq, +const cpumask_t *cpu_mask) {struct msi_msg msg;u32 addr, data; -int cpu =first_cpu (cpu_mask); +int cpu =first_cpu (*cpu_mask);if (!cpu_online (cpu))return ;
@@ -166,12 +167,11 @@ void arch_teardown_msi_irq(unsigned int irq) #ifdef CONFIG_DMAR #ifdef CONFIG_SMP -static void dmar_msi_set_affinity(unsigned int irq, cpumask_t mask) +static void dmar_msi_set_affinity(unsigned int irq, const struct cpumask *mask) { struct irq_cfg *cfg = irq_cfg + irq; struct msi_msg msg; - int cpu = first_cpu(mask); - + int cpu = cpumask_first(mask); if (!cpu_online(cpu)) return;
@@ -187,7 +187,7 @@ static void dmar_msi_set_affinity(unsigned int irq, cpumask_t mask) msg.address_lo |=MSI_ADDR_DESTID_CPU (cpu_physical_id (cpu));dmar_msi_write (irq, &msg); - irq_desc[irq].affinity = mask; + irq_desc[irq].affinity = *mask; }#endif /* CONFIG_SMP */
arch/ia64/kernel/smpboot.c +2 -8
@@ -131,12 +131,6 @@ struct task_struct *task_for_booting_cpu;*/ DEFINE_PER_CPU (int, cpu_state); -/* Bitmasks of currently online, and possible CPUs */ -cpumask_t cpu_online_map; -EXPORT_SYMBOL (cpu_online_map); -cpumask_t cpu_possible_map =CPU_MASK_NONE ; -EXPORT_SYMBOL (cpu_possible_map); - cpumask_t cpu_core_map[NR_CPUS] __cacheline_aligned;EXPORT_SYMBOL (cpu_core_map);DEFINE_PER_CPU_SHARED_ALIGNED (cpumask_t, cpu_sibling_map);
@@ -688,7 +682,7 @@ int migrate_platform_irqs(unsigned int cpu) {int new_cpei_cpu;irq_desc_t *desc =NULL ; -cpumask_t mask; +const struct cpumask *mask;int retval =0 ;/*
@@ -701,7 +695,7 @@ int migrate_platform_irqs(unsigned int cpu)* Now re-target the CPEI to a different processor */ new_cpei_cpu =any_online_cpu (cpu_online_map); - mask =cpumask_of_cpu (new_cpei_cpu); + mask =cpumask_of (new_cpei_cpu);set_cpei_target_cpu (new_cpei_cpu); desc = irq_desc + ia64_cpe_irq;/*
arch/ia64/kernel/topology.c +1 -1
@@ -219,7 +219,7 @@ static ssize_t show_shared_cpu_map(struct cache_info *this_leaf, char *buf)cpumask_t shared_cpu_map;cpus_and (shared_cpu_map, this_leaf->shared_cpu_map, cpu_online_map); - len =cpumask_scnprintf (buf,NR_CPUS +1 , shared_cpu_map); + len =cpumask_scnprintf (buf,NR_CPUS +1 , &shared_cpu_map); len +=sprintf (buf+len,"\n" );return len; }
arch/ia64/sn/kernel/irq.c +3 -3
@@ -227,14 +227,14 @@ finish_up:return new_irq_info; } -static void sn_set_affinity_irq (unsigned int irq,cpumask_t mask) +static void sn_set_affinity_irq (unsigned int irq,const struct cpumask *mask) {struct sn_irq_info *sn_irq_info, *sn_irq_info_safe;nasid_t nasid;int slice; - nasid =cpuid_to_nasid (first_cpu (mask)); - slice =cpuid_to_slice (first_cpu (mask)); + nasid =cpuid_to_nasid (cpumask_first (mask)); + slice =cpuid_to_slice (cpumask_first (mask));list_for_each_entry_safe (sn_irq_info, sn_irq_info_safe, sn_irq_lh[irq], list)
arch/ia64/sn/kernel/msi_sn.c +4 -3
@@ -151,7 +151,8 @@ int sn_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *entry) }#ifdef CONFIG_SMP -static void sn_set_msi_irq_affinity (unsigned int irq,cpumask_t cpu_mask) +static void sn_set_msi_irq_affinity (unsigned int irq, +const struct cpumask *cpu_mask) {struct msi_msg msg;int slice;
@@ -164,7 +165,7 @@ static void sn_set_msi_irq_affinity(unsigned int irq, cpumask_t cpu_mask)struct sn_pcibus_provider *provider;unsigned int cpu; - cpu =first_cpu (cpu_mask); + cpu =cpumask_first (cpu_mask); sn_irq_info = sn_msi_info[irq].sn_irq_info;if (sn_irq_info ==NULL || sn_irq_info->irq_int_bit >=0 )return ;
@@ -204,7 +205,7 @@ static void sn_set_msi_irq_affinity(unsigned int irq, cpumask_t cpu_mask) msg.address_lo = (u32)(bus_addr &0x00000000ffffffff );write_msi_msg (irq, &msg); - irq_desc[irq].affinity = cpu_mask; + irq_desc[irq].affinity = *cpu_mask; }#endif /* CONFIG_SMP */
arch/m32r/Kconfig +1 -0
@@ -10,6 +10,7 @@ config M32R default y select HAVE_IDE select HAVE_OPROFILE + select INIT_ALL_POSSIBLE config SBUS bool
arch/m32r/kernel/smpboot.c +0 -6
@@ -73,17 +73,11 @@ static unsigned int bsp_phys_id = -1;/* Bitmask of physically existing CPUs */ physid_mask_t phys_cpu_present_map; -/* Bitmask of currently online CPUs */ -cpumask_t cpu_online_map; -EXPORT_SYMBOL (cpu_online_map); -cpumask_t cpu_bootout_map;cpumask_t cpu_bootin_map;static cpumask_t cpu_callin_map;cpumask_t cpu_callout_map;EXPORT_SYMBOL (cpu_callout_map); -cpumask_t cpu_possible_map =CPU_MASK_ALL ; -EXPORT_SYMBOL (cpu_possible_map);/* Per CPU bogomips and other parameters */ struct cpuinfo_m32r cpu_data[NR_CPUS] __cacheline_aligned;
arch/m68knommu/platform/coldfire/pit.c +1 -1
@@ -156,7 +156,7 @@ void hw_timer_init(void) {u32 imr; - cf_pit_clockevent.cpumask =cpumask_of_cpu (smp_processor_id ()); + cf_pit_clockevent.cpumask =cpumask_of (smp_processor_id ()); cf_pit_clockevent.mult =div_sc (FREQ ,NSEC_PER_SEC ,32 ); cf_pit_clockevent.max_delta_ns =clockevent_delta2ns (0xFFFF , &cf_pit_clockevent);
arch/mips/include/asm/irq.h +2 -1
@@ -49,7 +49,8 @@ static inline void smtc_im_ack_irq(unsigned int irq)#ifdef CONFIG_MIPS_MT_SMTC_IRQAFF #include <linux/cpumask.h> -extern void plat_set_irq_affinity (unsigned int irq,cpumask_t affinity); +extern void plat_set_irq_affinity (unsigned int irq, +const struct cpumask *affinity);extern void smtc_forward_irq (unsigned int irq);/*
arch/mips/include/asm/mach-ip27/topology.h +0 -1
@@ -37,7 +37,6 @@ extern unsigned char __node_distances[MAX_COMPACT_NODES][MAX_COMPACT_NODES];/* sched_domains SD_NODE_INIT for SGI IP27 machines */ #define SD_NODE_INIT (struct sched_domain) { \ - .span = CPU_MASK_NONE, \ .parent = NULL, \ .child = NULL, \ .groups = NULL, \
arch/mips/include/asm/smp.h +0 -3
@@ -38,9 +38,6 @@ extern int __cpu_logical_map[NR_CPUS];#define SMP_RESCHEDULE_YOURSELF 0x1/* XXX braindead */ #define SMP_CALL_FUNCTION 0x2 -extern cpumask_t phys_cpu_present_map; -#define cpu_possible_map phys_cpu_present_map - extern void asmlinkage smp_bootstrap(void);/*
arch/mips/jazz/irq.c +1 -1
@@ -146,7 +146,7 @@ void __init plat_time_init(void)BUG_ON (HZ !=100 ); - cd->cpumask =cpumask_of_cpu (cpu); + cd->cpumask =cpumask_of (cpu);clockevents_register_device (cd); action->dev_id = cd;setup_irq (JAZZ_TIMER_IRQ , action);
arch/mips/kernel/cevt-bcm1480.c +2 -2
@@ -126,7 +126,7 @@ void __cpuinit sb1480_clockevent_init(void) cd->min_delta_ns =clockevent_delta2ns (2 , cd); cd->rating =200 ; cd->irq = irq; - cd->cpumask =cpumask_of_cpu (cpu); + cd->cpumask =cpumask_of (cpu); cd->set_next_event = sibyte_next_event; cd->set_mode = sibyte_set_mode;clockevents_register_device (cd);
@@ -148,6 +148,6 @@ void __cpuinit sb1480_clockevent_init(void) action->name = name; action->dev_id = cd; -irq_set_affinity (irq,cpumask_of_cpu (cpu)); +irq_set_affinity (irq,cpumask_of (cpu));setup_irq (irq, action); }
arch/mips/kernel/cevt-ds1287.c +1 -1
@@ -88,7 +88,6 @@ static void ds1287_event_handler(struct clock_event_device *dev)static struct clock_event_device ds1287_clockevent = { .name ="ds1287" , .features =CLOCK_EVT_FEAT_PERIODIC , - .cpumask =CPU_MASK_CPU0 , .set_next_event = ds1287_set_next_event, .set_mode = ds1287_set_mode, .event_handler = ds1287_event_handler,
@@ -122,6 +121,7 @@ int __init ds1287_clockevent_init(int irq)clockevent_set_clock (cd,32768 ); cd->max_delta_ns =clockevent_delta2ns (0x7fffffff , cd); cd->min_delta_ns =clockevent_delta2ns (0x300 , cd); + cd->cpumask =cpumask_of (0 );clockevents_register_device (&ds1287_clockevent);
arch/mips/kernel/cevt-gt641xx.c +1 -1
@@ -96,7 +96,6 @@ static void gt641xx_timer0_event_handler(struct clock_event_device *dev)static struct clock_event_device gt641xx_timer0_clockevent = { .name ="gt641xx-timer0" , .features =CLOCK_EVT_FEAT_PERIODIC |CLOCK_EVT_FEAT_ONESHOT , - .cpumask =CPU_MASK_CPU0 , .irq =GT641XX_TIMER0_IRQ , .set_next_event = gt641xx_timer0_set_next_event, .set_mode = gt641xx_timer0_set_mode,
@@ -132,6 +131,7 @@ static int __init gt641xx_timer0_clockevent_init(void)clockevent_set_clock (cd, gt641xx_base_clock); cd->max_delta_ns =clockevent_delta2ns (0x7fffffff , cd); cd->min_delta_ns =clockevent_delta2ns (0x300 , cd); + cd->cpumask =cpumask_of (0 );clockevents_register_device (>641xx_timer0_clockevent);
arch/mips/kernel/cevt-r4k.c +1 -1
@@ -195,7 +195,7 @@ int __cpuinit mips_clockevent_init(void) cd->rating =300 ; cd->irq = irq; - cd->cpumask =cpumask_of_cpu (cpu); + cd->cpumask =cpumask_of (cpu); cd->set_next_event = mips_next_event; cd->set_mode = mips_set_clock_mode; cd->event_handler = mips_event_handler;
arch/mips/kernel/cevt-sb1250.c +2 -2
@@ -125,7 +125,7 @@ void __cpuinit sb1250_clockevent_init(void) cd->min_delta_ns =clockevent_delta2ns (2 , cd); cd->rating =200 ; cd->irq = irq; - cd->cpumask =cpumask_of_cpu (cpu); + cd->cpumask =cpumask_of (cpu); cd->set_next_event = sibyte_next_event; cd->set_mode = sibyte_set_mode;clockevents_register_device (cd);
@@ -147,6 +147,6 @@ void __cpuinit sb1250_clockevent_init(void) action->name = name; action->dev_id = cd; -irq_set_affinity (irq,cpumask_of_cpu (cpu)); +irq_set_affinity (irq,cpumask_of (cpu));setup_irq (irq, action); }
arch/mips/kernel/cevt-smtc.c +1 -1
@@ -292,7 +292,7 @@ int __cpuinit mips_clockevent_init(void) cd->rating =300 ; cd->irq = irq; - cd->cpumask =cpumask_of_cpu (cpu); + cd->cpumask =cpumask_of (cpu); cd->set_next_event = mips_next_event; cd->set_mode = mips_set_clock_mode; cd->event_handler = mips_event_handler;
arch/mips/kernel/cevt-txx9.c +1 -1
@@ -112,7 +112,6 @@ static struct clock_event_device txx9tmr_clock_event_device = { .name = "TXx9", .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, .rating = 200, - .cpumask = CPU_MASK_CPU0, .set_mode = txx9tmr_set_mode, .set_next_event = txx9tmr_set_next_event, };
@@ -150,6 +149,7 @@ void __init txx9_clockevent_init(unsigned long baseaddr, int irq,clockevent_delta2ns (0xffffffff >> (32 -TXX9_TIMER_BITS ), cd); cd->min_delta_ns =clockevent_delta2ns (0xf , cd); cd->irq = irq; + cd->cpumask =cpumask_of (0 ),clockevents_register_device (cd);setup_irq (irq, &txx9tmr_irq); printk(KERN_INFO "TXx9: clockevent device at 0x%lx, irq %d\n",
arch/mips/kernel/i8253.c +1 -1
@@ -115,7 +115,7 @@ void __init setup_pit_timer(void)* Start pit with the boot cpu mask and make it global after the * IO_APIC has been initialized. */ - cd->cpumask =cpumask_of_cpu (cpu); + cd->cpumask =cpumask_of (cpu);clockevent_set_clock (cd,CLOCK_TICK_RATE ); cd->max_delta_ns =clockevent_delta2ns (0x7FFF , cd); cd->min_delta_ns =clockevent_delta2ns (0xF , cd);
arch/mips/kernel/irq-gic.c +3 -3
@@ -155,7 +155,7 @@ static void gic_unmask_irq(unsigned int irq)static DEFINE_SPINLOCK (gic_lock); -static void gic_set_affinity (unsigned int irq,cpumask_t cpumask) +static void gic_set_affinity (unsigned int irq,const struct cpumask *cpumask) {cpumask_t tmp =CPU_MASK_NONE ;unsigned long flags;
@@ -164,7 +164,7 @@ static void gic_set_affinity(unsigned int irq, cpumask_t cpumask)pr_debug (KERN_DEBUG "%s called\n" , __func__); irq -= _irqbase; -cpus_and (tmp, cpumask, cpu_online_map); +cpumask_and (&tmp, cpumask, cpu_online_mask);if (cpus_empty (tmp))return ;
@@ -187,7 +187,7 @@ static void gic_set_affinity(unsigned int irq, cpumask_t cpumask)set_bit (irq, pcpu_masks[first_cpu (tmp)].pcpu_mask); } - irq_desc[irq].affinity = cpumask; + irq_desc[irq].affinity = *cpumask;spin_unlock_irqrestore (&gic_lock, flags); }
arch/mips/kernel/smp-cmp.c +3 -3
@@ -51,10 +51,10 @@ static int __init allowcpus(char *str)int len;cpus_clear (cpu_allow_map); -if (cpulist_parse (str, cpu_allow_map) ==0 ) { +if (cpulist_parse (str, &cpu_allow_map) ==0 ) {cpu_set (0 , cpu_allow_map);cpus_and (cpu_possible_map, cpu_possible_map, cpu_allow_map); - len =cpulist_scnprintf (buf,sizeof (buf)-1 , cpu_possible_map); + len =cpulist_scnprintf (buf,sizeof (buf)-1 , &cpu_possible_map); buf[len] ='\0' ;pr_debug ("Allowable CPUs: %s\n" , buf);return 1 ;
@@ -226,7 +226,7 @@ void __init cmp_smp_setup(void)for (i =1 ; i <NR_CPUS ; i++) {if (amon_cpu_avail (i)) { -cpu_set (i, phys_cpu_present_map); +cpu_set (i, cpu_possible_map); __cpu_number_map[i] = ++ncpu; __cpu_logical_map[ncpu] = i; }
arch/mips/kernel/smp-mt.c +1 -1
@@ -70,7 +70,7 @@ static unsigned int __init smvp_vpe_init(unsigned int tc, unsigned int mvpconf0,write_vpe_c0_vpeconf0 (tmp);/* Record this as available CPU */ -cpu_set (tc, phys_cpu_present_map); +cpu_set (tc, cpu_possible_map); __cpu_number_map[tc] = ++ncpu; __cpu_logical_map[ncpu] = tc; }
arch/mips/kernel/smp.c +1 -6
@@ -44,15 +44,10 @@#include <asm/mipsmtregs.h> #endif /* CONFIG_MIPS_MT_SMTC */ -cpumask_t phys_cpu_present_map;/* Bitmask of available CPUs */ volatile cpumask_t cpu_callin_map;/* Bitmask of started secondaries */ -cpumask_t cpu_online_map;/* Bitmask of currently online CPUs */ int __cpu_number_map[NR_CPUS ];/* Map physical to logical */ int __cpu_logical_map[NR_CPUS ];/* Map logical to physical */ -EXPORT_SYMBOL (phys_cpu_present_map); -EXPORT_SYMBOL (cpu_online_map); -extern void cpu_idle (void );/* Number of TCs (or siblings in Intel speak) per CPU core */
@@ -195,7 +190,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)/* preload SMP state for boot cpu */ void __devinit smp_prepare_boot_cpu (void ) { -cpu_set (0 , phys_cpu_present_map); +cpu_set (0 , cpu_possible_map);cpu_set (0 , cpu_online_map);cpu_set (0 , cpu_callin_map); }
arch/mips/kernel/smtc.c +3 -3
@@ -290,7 +290,7 @@ static void smtc_configure_tlb(void)* possibly leave some TCs/VPEs as "slave" processors. * * Use c0_MVPConf0 to find out how many TCs are available, setting up -* phys_cpu_present_map and the logical/physical mappings. +* cpu_possible_map and the logical/physical mappings. */ int __init smtc_build_cpu_map (int start_cpu_slot)
@@ -304,7 +304,7 @@ int __init smtc_build_cpu_map(int start_cpu_slot)*/ ntcs = ((read_c0_mvpconf0 () &MVPCONF0_PTC ) >>MVPCONF0_PTC_SHIFT ) +1 ;for (i=start_cpu_slot; i<NR_CPUS && i<ntcs; i++) { -cpu_set (i, phys_cpu_present_map); +cpu_set (i, cpu_possible_map); __cpu_number_map[i] = i; __cpu_logical_map[i] = i; }
@@ -521,7 +521,7 @@ void smtc_prepare_cpus(int cpus)* Pull any physically present but unused TCs out of circulation. */ while (tc < (((val &MVPCONF0_PTC ) >>MVPCONF0_PTC_SHIFT ) +1 )) { -cpu_clear (tc, phys_cpu_present_map); +cpu_clear (tc, cpu_possible_map);cpu_clear (tc, cpu_present_map); tc++; }
arch/mips/mti-malta/malta-smtc.c +3 -3
@@ -114,9 +114,9 @@ struct plat_smp_ops msmtc_smp_ops = {*/ -void plat_set_irq_affinity (unsigned int irq,cpumask_t affinity) +void plat_set_irq_affinity (unsigned int irq,const struct cpumask *affinity) { -cpumask_t tmask = affinity; +cpumask_t tmask = *affinity;int cpu =0 ;void smtc_set_irq_affinity (unsigned int irq,cpumask_t aff);
@@ -139,7 +139,7 @@ void plat_set_irq_affinity(unsigned int irq, cpumask_t affinity)* be made to forward to an offline "CPU". */ -for_each_cpu_mask (cpu, affinity) { +for_each_cpu (cpu, affinity) {if ((cpu_data[cpu].vpe_id !=0 ) || !cpu_online (cpu))cpu_clear (cpu, tmask); }
arch/mips/nxp/pnx8550/common/time.c +1 -0
@@ -102,6 +102,7 @@ __init void plat_time_init(void)unsigned int p;unsigned int pow2p; + pnx8xxx_clockevent.cpumask = cpu_none_mask;clockevents_register_device (&pnx8xxx_clockevent);clocksource_register (&pnx_clocksource);
arch/mips/pmc-sierra/yosemite/smp.c +3 -3
@@ -141,7 +141,7 @@ static void __cpuinit yos_boot_secondary(int cpu, struct task_struct *idle) }/* -* Detect available CPUs, populate phys_cpu_present_map before smp_init +* Detect available CPUs, populate cpu_possible_map before smp_init * * We don't want to start the secondary CPU yet nor do we have a nice probing * feature in PMON so we just assume presence of the secondary core.
@@ -150,10 +150,10 @@ static void __init yos_smp_setup(void) {int i; -cpus_clear (phys_cpu_present_map); +cpus_clear (cpu_possible_map);for (i =0 ; i <2 ; i++) { -cpu_set (i, phys_cpu_present_map); +cpu_set (i, cpu_possible_map); __cpu_number_map[i] = i; __cpu_logical_map[i] = i; }
arch/mips/sgi-ip27/ip27-smp.c +1 -1
@@ -76,7 +76,7 @@ static int do_cpumask(cnodeid_t cnode, nasid_t nasid, int highest)/* Only let it join in if it's marked enabled */ if ((acpu->cpu_info.flags &KLINFO_ENABLE ) && (tot_cpus_found !=NR_CPUS )) { -cpu_set (cpuid, phys_cpu_present_map); +cpu_set (cpuid, cpu_possible_map);alloc_cpupda (cpuid, tot_cpus_found); cpus_found++; tot_cpus_found++;
arch/mips/sgi-ip27/ip27-timer.c +1 -1
@@ -134,7 +134,7 @@ void __cpuinit hub_rt_clock_event_init(void) cd->min_delta_ns =clockevent_delta2ns (0x300 , cd); cd->rating =200 ; cd->irq = irq; - cd->cpumask =cpumask_of_cpu (cpu); + cd->cpumask =cpumask_of (cpu); cd->set_next_event = rt_next_event; cd->set_mode = rt_set_mode;clockevents_register_device (cd);
arch/mips/sibyte/bcm1480/irq.c +4 -4
@@ -50,7 +50,7 @@ static void enable_bcm1480_irq(unsigned int irq);static void disable_bcm1480_irq (unsigned int irq);static void ack_bcm1480_irq (unsigned int irq);#ifdef CONFIG_SMP -static void bcm1480_set_affinity (unsigned int irq,cpumask_t mask); +static void bcm1480_set_affinity (unsigned int irq,const struct cpumask *mask);#endif #ifdef CONFIG_PCI
@@ -109,7 +109,7 @@ void bcm1480_unmask_irq(int cpu, int irq) }#ifdef CONFIG_SMP -static void bcm1480_set_affinity (unsigned int irq,cpumask_t mask) +static void bcm1480_set_affinity (unsigned int irq,const struct cpumask *mask) {int i =0 , old_cpu, cpu, int_on, k;u64 cur_ints;
@@ -117,11 +117,11 @@ static void bcm1480_set_affinity(unsigned int irq, cpumask_t mask)unsigned long flags;unsigned int irq_dirty; -if (cpus_weight (mask) !=1 ) { +if (cpumask_weight (mask) !=1 ) {printk ("attempted to set irq affinity for irq %d to multiple CPUs\n" , irq);return ; } - i =first_cpu (mask); + i =cpumask_first (mask);/* Convert logical CPU to physical CPU */ cpu =cpu_logical_map (i);
arch/mips/sibyte/bcm1480/smp.c +4 -4
@@ -136,7 +136,7 @@ static void __cpuinit bcm1480_boot_secondary(int cpu, struct task_struct *idle)/* * Use CFE to find out how many CPUs are available, setting up -* phys_cpu_present_map and the logical/physical mappings. +* cpu_possible_map and the logical/physical mappings. * XXXKW will the boot CPU ever not be physical 0? * * Common setup before any secondaries are started
@@ -145,14 +145,14 @@ static void __init bcm1480_smp_setup(void) {int i, num; -cpus_clear (phys_cpu_present_map); -cpu_set (0 , phys_cpu_present_map); +cpus_clear (cpu_possible_map); +cpu_set (0 , cpu_possible_map); __cpu_number_map[0 ] =0 ; __cpu_logical_map[0 ] =0 ;for (i =1 , num =0 ; i <NR_CPUS ; i++) {if (cfe_cpu_stop (i) ==0 ) { -cpu_set (i, phys_cpu_present_map); +cpu_set (i, cpu_possible_map); __cpu_number_map[i] = ++num; __cpu_logical_map[num] = i; }
arch/mips/sibyte/sb1250/irq.c +4 -4
@@ -50,7 +50,7 @@ static void enable_sb1250_irq(unsigned int irq);static void disable_sb1250_irq (unsigned int irq);static void ack_sb1250_irq (unsigned int irq);#ifdef CONFIG_SMP -static void sb1250_set_affinity (unsigned int irq,cpumask_t mask); +static void sb1250_set_affinity (unsigned int irq,const struct cpumask *mask);#endif #ifdef CONFIG_SIBYTE_HAS_LDT
@@ -103,16 +103,16 @@ void sb1250_unmask_irq(int cpu, int irq) }#ifdef CONFIG_SMP -static void sb1250_set_affinity (unsigned int irq,cpumask_t mask) +static void sb1250_set_affinity (unsigned int irq,const struct cpumask *mask) {int i =0 , old_cpu, cpu, int_on;u64 cur_ints;struct irq_desc *desc = irq_desc + irq;unsigned long flags; - i =first_cpu (mask); + i =cpumask_first (mask); -if (cpus_weight (mask) >1 ) { +if (cpumask_weight (mask) >1 ) {printk ("attempted to set irq affinity for irq %d to multiple CPUs\n" , irq);return ; }
arch/mips/sibyte/sb1250/smp.c +4 -4
@@ -124,7 +124,7 @@ static void __cpuinit sb1250_boot_secondary(int cpu, struct task_struct *idle)/* * Use CFE to find out how many CPUs are available, setting up -* phys_cpu_present_map and the logical/physical mappings. +* cpu_possible_map and the logical/physical mappings. * XXXKW will the boot CPU ever not be physical 0? * * Common setup before any secondaries are started
@@ -133,14 +133,14 @@ static void __init sb1250_smp_setup(void) {int i, num; -cpus_clear (phys_cpu_present_map); -cpu_set (0 , phys_cpu_present_map); +cpus_clear (cpu_possible_map); +cpu_set (0 , cpu_possible_map); __cpu_number_map[0 ] =0 ; __cpu_logical_map[0 ] =0 ;for (i =1 , num =0 ; i <NR_CPUS ; i++) {if (cfe_cpu_stop (i) ==0 ) { -cpu_set (i, phys_cpu_present_map); +cpu_set (i, cpu_possible_map); __cpu_number_map[i] = ++num; __cpu_logical_map[num] = i; }
arch/mips/sni/time.c +1 -1
@@ -80,7 +80,7 @@ static void __init sni_a20r_timer_setup(void)struct irqaction *action = &a20r_irqaction;unsigned int cpu =smp_processor_id (); - cd->cpumask =cpumask_of_cpu (cpu); + cd->cpumask =cpumask_of (cpu);clockevents_register_device (cd); action->dev_id = cd;setup_irq (SNI_A20R_IRQ_TIMER , &a20r_irqaction);
arch/parisc/Kconfig +1 -0
@@ -11,6 +11,7 @@ config PARISC select HAVE_OPROFILE select RTC_CLASS select RTC_DRV_PARISC + select INIT_ALL_POSSIBLE help The PA-RISC microprocessor is designed by Hewlett-Packard and used in many of their workstations & servers (HP9000 700 and 800 series,
arch/parisc/kernel/irq.c +3 -3
@@ -131,12 +131,12 @@ int cpu_check_affinity(unsigned int irq, cpumask_t *dest) return 0; } -static void cpu_set_affinity_irq (unsigned int irq,cpumask_t dest) +static void cpu_set_affinity_irq (unsigned int irq,const struct cpumask *dest) { -if (cpu_check_affinity (irq, &dest)) +if (cpu_check_affinity (irq, dest))return ; - irq_desc[irq].affinity = dest; + irq_desc[irq].affinity = *dest; }#endif
arch/parisc/kernel/smp.c +0 -15
@@ -67,21 +67,6 @@ static volatile int cpu_now_booting __read_mostly = 0; /* track which CPU is boostatic int parisc_max_cpus__read_mostly =1 ; -/* online cpus are ones that we've managed to bring up completely -* possible cpus are all valid cpu -* present cpus are all detected cpu -* -* On startup we bring up the "possible" cpus. Since we discover -* CPUs later, we add them as hotplug, so the possible cpu mask is -* empty in the beginning. -*/ - -cpumask_t cpu_online_map__read_mostly =CPU_MASK_NONE ;/* Bitmap of online CPUs */ -cpumask_t cpu_possible_map__read_mostly =CPU_MASK_ALL ;/* Bitmap of Present CPUs */ - -EXPORT_SYMBOL (cpu_online_map); -EXPORT_SYMBOL (cpu_possible_map); -DEFINE_PER_CPU (spinlock_t, ipi_lock) =SPIN_LOCK_UNLOCKED ;enum ipi_message_type {
arch/powerpc/include/asm/topology.h +0 -1
@@ -48,7 +48,6 @@ static inline int pcibus_to_node(struct pci_bus *bus)/* sched_domains SD_NODE_INIT for PPC64 machines */ #define SD_NODE_INIT (struct sched_domain) { \ - .span = CPU_MASK_NONE, \ .parent = NULL, \ .child = NULL, \ .groups = NULL, \
arch/powerpc/kernel/irq.c +1 -1
@@ -237,7 +237,7 @@ void fixup_irqs(cpumask_t map) mask = map; }if (irq_desc[irq].chip->set_affinity) - irq_desc[irq].chip->set_affinity (irq, mask); + irq_desc[irq].chip->set_affinity (irq, &mask);else if (irq_desc[irq].action && !(warned++))printk ("Cannot set affinity for irq %i\n" , irq); }
arch/powerpc/kernel/smp.c +0 -4
@@ -59,13 +59,9 @@struct thread_info *secondary_ti; -cpumask_t cpu_possible_map =CPU_MASK_NONE ; -cpumask_t cpu_online_map =CPU_MASK_NONE ;DEFINE_PER_CPU (cpumask_t, cpu_sibling_map) =CPU_MASK_NONE ;DEFINE_PER_CPU (cpumask_t, cpu_core_map) =CPU_MASK_NONE ; -EXPORT_SYMBOL (cpu_online_map); -EXPORT_SYMBOL (cpu_possible_map);EXPORT_PER_CPU_SYMBOL (cpu_sibling_map);EXPORT_PER_CPU_SYMBOL (cpu_core_map);
arch/powerpc/kernel/time.c +1 -1
@@ -844,7 +844,7 @@ static void register_decrementer_clockevent(int cpu)struct clock_event_device *dec = &per_cpu (decrementers, cpu).event; *dec = decrementer_clockevent; - dec->cpumask =cpumask_of_cpu (cpu); + dec->cpumask =cpumask_of (cpu);printk (KERN_DEBUG "clockevent: %s mult[%lx] shift[%d] cpu[%d]\n" , dec->name, dec->mult, dec->shift, cpu);
arch/powerpc/platforms/pseries/xics.c +2 -2
@@ -332,7 +332,7 @@ static void xics_eoi_lpar(unsigned int virq)lpar_xirr_info_set ((0xff <<24 ) | irq); } -static void xics_set_affinity (unsigned int virq,cpumask_t cpumask) +static void xics_set_affinity (unsigned int virq,const struct cpumask *cpumask) {unsigned int irq;int status;
@@ -870,7 +870,7 @@ void xics_migrate_irqs_away(void)/* Reset affinity to all cpus */ irq_desc[virq].affinity =CPU_MASK_ALL ; - desc->chip->set_affinity (virq,CPU_MASK_ALL ); + desc->chip->set_affinity (virq, cpu_all_mask); unlock:spin_unlock_irqrestore (&desc->lock, flags); }
arch/powerpc/sysdev/mpic.c +2 -2
@@ -806,7 +806,7 @@ static void mpic_end_ipi(unsigned int irq)#endif /* CONFIG_SMP */ -void mpic_set_affinity (unsigned int irq,cpumask_t cpumask) +void mpic_set_affinity (unsigned int irq,const struct cpumask *cpumask) {struct mpic *mpic =mpic_from_irq (irq);unsigned int src =mpic_irq_to_hw (irq);
@@ -818,7 +818,7 @@ void mpic_set_affinity(unsigned int irq, cpumask_t cpumask) }else {cpumask_t tmp; -cpus_and (tmp, cpumask, cpu_online_map); +cpumask_and (&tmp, cpumask, cpu_online_mask);mpic_irq_write (src,MPIC_INFO (IRQ_DESTINATION ),mpic_physmask (cpus_addr (tmp)[0 ]));
arch/powerpc/sysdev/mpic.h +1 -1
@@ -36,6 +36,6 @@ static inline int mpic_pasemi_msi_init(struct mpic *mpic)extern int mpic_set_irq_type (unsigned int virq,unsigned int flow_type);extern void mpic_set_vector (unsigned int virq,unsigned int vector); -extern void mpic_set_affinity (unsigned int irq,cpumask_t cpumask); +extern void mpic_set_affinity (unsigned int irq,const struct cpumask *cpumask);#endif /* _POWERPC_SYSDEV_MPIC_H */
arch/s390/Kconfig +1 -0
@@ -83,6 +83,7 @@ config S390 select HAVE_KRETPROBES select HAVE_KVM if 64BIT select HAVE_ARCH_TRACEHOOK + select INIT_ALL_POSSIBLE source "init/Kconfig"
arch/s390/kernel/smp.c +0 -6
@@ -55,12 +55,6 @@struct _lowcore *lowcore_ptr[NR_CPUS ];EXPORT_SYMBOL (lowcore_ptr); -cpumask_t cpu_online_map =CPU_MASK_NONE ; -EXPORT_SYMBOL (cpu_online_map); - -cpumask_t cpu_possible_map =CPU_MASK_ALL ; -EXPORT_SYMBOL (cpu_possible_map); -static struct task_struct *current_set[NR_CPUS ];static u8 smp_cpu_type;
arch/s390/kernel/time.c +1 -1
@@ -160,7 +160,7 @@ void init_cpu_timer(void) cd->min_delta_ns =1 ; cd->max_delta_ns =LONG_MAX ; cd->rating =400 ; - cd->cpumask =cpumask_of_cpu (cpu); + cd->cpumask =cpumask_of (cpu); cd->set_next_event = s390_next_event; cd->set_mode = s390_set_mode;
arch/sh/include/asm/smp.h +1 -1
@@ -31,7 +31,7 @@ enum { };void smp_message_recv (unsigned int msg); -void smp_timer_broadcast (cpumask_t mask); +void smp_timer_broadcast (const struct cpumask *mask);void local_timer_interrupt (void );void local_timer_setup (unsigned int cpu);
arch/sh/include/asm/topology.h +0 -1
@@ -5,7 +5,6 @@/* sched_domains SD_NODE_INIT for sh machines */ #define SD_NODE_INIT (struct sched_domain) { \ - .span = CPU_MASK_NONE, \ .parent = NULL, \ .child = NULL, \ .groups = NULL, \
arch/sh/kernel/smp.c +2 -8
@@ -31,12 +31,6 @@int __cpu_number_map[NR_CPUS ];/* Map physical to logical */ int __cpu_logical_map[NR_CPUS ];/* Map logical to physical */ -cpumask_t cpu_possible_map; -EXPORT_SYMBOL (cpu_possible_map); - -cpumask_t cpu_online_map; -EXPORT_SYMBOL (cpu_online_map); -static inline void __init smp_store_cpu_info (unsigned int cpu) {struct sh_cpuinfo *c = cpu_data + cpu;
@@ -190,11 +184,11 @@ void arch_send_call_function_single_ipi(int cpu)plat_send_ipi (cpu,SMP_MSG_FUNCTION_SINGLE ); } -void smp_timer_broadcast (cpumask_t mask) +void smp_timer_broadcast (const struct cpumask *mask) {int cpu; -for_each_cpu_mask (cpu, mask) +for_each_cpu (cpu, mask)plat_send_ipi (cpu,SMP_MSG_TIMER ); }
arch/sh/kernel/timers/timer-broadcast.c +1 -1
@@ -51,7 +51,7 @@ void __cpuinit local_timer_setup(unsigned int cpu) clk->mult =1 ; clk->set_mode = dummy_timer_set_mode; clk->broadcast = smp_timer_broadcast; - clk->cpumask =cpumask_of_cpu (cpu); + clk->cpumask =cpumask_of (cpu);clockevents_register_device (clk); }
arch/sh/kernel/timers/timer-tmu.c +1 -1
@@ -263,7 +263,7 @@ static int tmu_timer_init(void) tmu0_clockevent.min_delta_ns =clockevent_delta2ns (1 , &tmu0_clockevent); - tmu0_clockevent.cpumask =cpumask_of_cpu (0 ); + tmu0_clockevent.cpumask =cpumask_of (0 );clockevents_register_device (&tmu0_clockevent);
arch/sparc/include/asm/smp_32.h +0 -2
@@ -29,8 +29,6 @@*/ extern unsigned char boot_cpu_id; -extern cpumask_t phys_cpu_present_map; -#define cpu_possible_map phys_cpu_present_maptypedef void (*smpfunc_t )(unsigned long ,unsigned long ,unsigned long ,unsigned long ,unsigned long );
arch/sparc/kernel/irq_64.c +7 -4
@@ -312,7 +312,8 @@ static void sun4u_irq_enable(unsigned int virt_irq) } } -static void sun4u_set_affinity (unsigned int virt_irq,cpumask_t mask) +static void sun4u_set_affinity (unsigned int virt_irq, +const struct cpumask *mask) {sun4u_irq_enable (virt_irq); }
@@ -362,7 +363,8 @@ static void sun4v_irq_enable(unsigned int virt_irq) ino, err); } -static void sun4v_set_affinity (unsigned int virt_irq,cpumask_t mask) +static void sun4v_set_affinity (unsigned int virt_irq, +const struct cpumask *mask) {unsigned int ino = virt_irq_table[virt_irq].dev_ino;unsigned long cpuid =irq_choose_cpu (virt_irq);
@@ -429,7 +431,8 @@ static void sun4v_virq_enable(unsigned int virt_irq) dev_handle, dev_ino, err); } -static void sun4v_virt_set_affinity (unsigned int virt_irq,cpumask_t mask) +static void sun4v_virt_set_affinity (unsigned int virt_irq, +const struct cpumask *mask) {unsigned long cpuid, dev_handle, dev_ino;int err;
@@ -851,7 +854,7 @@ void fixup_irqs(void) !(irq_desc[irq].status & IRQ_PER_CPU)) {if (irq_desc[irq].chip->set_affinity) irq_desc[irq].chip->set_affinity (irq, - irq_desc[irq].affinity); + &irq_desc[irq].affinity); }spin_unlock_irqrestore (&irq_desc[irq].lock, flags); }
arch/sparc/kernel/of_device_64.c +1 -1
@@ -780,7 +780,7 @@ out:if (nid !=-1 ) {cpumask_t numa_mask =node_to_cpumask (nid); -irq_set_affinity (irq, numa_mask); +irq_set_affinity (irq, &numa_mask); }return irq;
arch/sparc/kernel/pci_msi.c +1 -1
@@ -288,7 +288,7 @@ static int bringup_one_msi_queue(struct pci_pbm_info *pbm,if (nid !=-1 ) {cpumask_t numa_mask =node_to_cpumask (nid); -irq_set_affinity (irq, numa_mask); +irq_set_affinity (irq, &numa_mask); } err = request_irq(irq, sparc64_msiq_interrupt, 0, "MSIQ",
arch/sparc/kernel/smp_32.c +2 -4
@@ -39,8 +39,6 @@ volatile unsigned long cpu_callin_map[NR_CPUS] __cpuinitdata = {0,};unsigned char boot_cpu_id =0 ;unsigned char boot_cpu_id4 =0 ;/* boot_cpu_id << 2 */ -cpumask_t cpu_online_map =CPU_MASK_NONE ; -cpumask_t phys_cpu_present_map =CPU_MASK_NONE ;cpumask_t smp_commenced_mask =CPU_MASK_NONE ;/* The only guaranteed locking primitive available on all Sparc
@@ -334,7 +332,7 @@ void __init smp_setup_cpu_possible_map(void) instance =0 ;while (!cpu_find_by_instance (instance,NULL , &mid)) {if (mid <NR_CPUS ) { -cpu_set (mid, phys_cpu_present_map); +cpu_set (mid, cpu_possible_map);cpu_set (mid, cpu_present_map); } instance++;
@@ -354,7 +352,7 @@ void __init smp_prepare_boot_cpu(void)current_thread_info ()->cpu = cpuid;cpu_set (cpuid, cpu_online_map); -cpu_set (cpuid, phys_cpu_present_map); +cpu_set (cpuid, cpu_possible_map); }int __cpuinit __cpu_up (unsigned int cpu)
arch/sparc/kernel/smp_64.c +0 -4
@@ -49,14 +49,10 @@int sparc64_multi_core__read_mostly ; -cpumask_t cpu_possible_map__read_mostly =CPU_MASK_NONE ; -cpumask_t cpu_online_map__read_mostly =CPU_MASK_NONE ;DEFINE_PER_CPU (cpumask_t, cpu_sibling_map) =CPU_MASK_NONE ;cpumask_t cpu_core_map[NR_CPUS ]__read_mostly = { [0 ...NR_CPUS -1 ] =CPU_MASK_NONE }; -EXPORT_SYMBOL (cpu_possible_map); -EXPORT_SYMBOL (cpu_online_map);EXPORT_PER_CPU_SYMBOL (cpu_sibling_map);EXPORT_SYMBOL (cpu_core_map);
arch/sparc/kernel/sparc_ksyms_32.c +0 -4
@@ -112,10 +112,6 @@ EXPORT_PER_CPU_SYMBOL(__cpu_data);#ifdef CONFIG_SMP /* IRQ implementation. */ EXPORT_SYMBOL (synchronize_irq); - -/* CPU online map and active count. */ -EXPORT_SYMBOL (cpu_online_map); -EXPORT_SYMBOL (phys_cpu_present_map);#endif EXPORT_SYMBOL (__udelay);
arch/sparc/kernel/time_64.c +1 -1
@@ -763,7 +763,7 @@ void __devinit setup_sparc64_timer(void) sevt = &__get_cpu_var (sparc64_events);memcpy (sevt, &sparc64_clockevent,sizeof (*sevt)); - sevt->cpumask =cpumask_of_cpu (smp_processor_id ()); + sevt->cpumask =cpumask_of (smp_processor_id ());clockevents_register_device (sevt); }
arch/um/kernel/smp.c +0 -7
@@ -25,13 +25,6 @@ DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);#include "irq_user.h" #include "os.h" -/* CPU online map, set by smp_boot_cpus */ -cpumask_t cpu_online_map =CPU_MASK_NONE ; -cpumask_t cpu_possible_map =CPU_MASK_NONE ; - -EXPORT_SYMBOL (cpu_online_map); -EXPORT_SYMBOL (cpu_possible_map); -/* Per CPU bogomips and other parameters * The only piece used here is the ipi pipe, which is set before SMP is * started and never changed.
arch/um/kernel/time.c +1 -1
@@ -50,7 +50,7 @@ static int itimer_next_event(unsigned long delta,static struct clock_event_device itimer_clockevent = { .name ="itimer" , .rating =250 , - .cpumask =CPU_MASK_ALL , + .cpumask = cpu_all_mask, .features =CLOCK_EVT_FEAT_PERIODIC |CLOCK_EVT_FEAT_ONESHOT , .set_mode = itimer_set_mode, .set_next_event = itimer_next_event,
arch/x86/Kconfig +7 -6
@@ -601,19 +601,20 @@ config IOMMU_HELPER config MAXSMP bool "Configure Maximum number of SMP Processors and NUMA Nodes" - depends on X86_64 && SMP && BROKEN + depends on X86_64 && SMP && DEBUG_KERNEL && EXPERIMENTAL + select CPUMASK_OFFSTACK default n help Configure maximum number of CPUS and NUMA Nodes for this architecture. If unsure, say N. config NR_CPUS - int "Maximum number of CPUs (2-512)" if !MAXSMP - range 2 512 - depends on SMP + int "Maximum number of CPUs" if SMP && !MAXSMP + range 2 512 if SMP && !MAXSMP + default "1" if !SMP default "4096" if MAXSMP - default "32" if X86_NUMAQ || X86_SUMMIT || X86_BIGSMP || X86_ES7000 - default "8" + default "32" if SMP && (X86_NUMAQ || X86_SUMMIT || X86_BIGSMP || X86_ES7000) + default "8" if SMP help This allows you to specify the maximum number of CPUs which this kernel will support. The maximum supported value is 512 and the
arch/x86/include/asm/bigsmp/apic.h +25 -7
@@ -9,12 +9,12 @@ static inline int apic_id_registered(void)return (1 ); } -static inline cpumask_t target_cpus (void ) +static inline const cpumask_t *target_cpus (void ) {#ifdef CONFIG_SMP -return cpu_online_map; +return &cpu_online_map;#else -return cpumask_of_cpu (0 ); +return &cpumask_of_cpu (0 );#endif }
@@ -79,7 +79,7 @@ static inline int apicid_to_node(int logical_apicid)static inline int cpu_present_to_apicid (int mps_cpu) { -if (mps_cpu <NR_CPUS ) +if (mps_cpu < nr_cpu_ids)return (int )per_cpu (x86_bios_cpu_apicid, mps_cpu);return BAD_APICID ;
@@ -94,7 +94,7 @@ extern u8 cpu_2_logical_apicid[];/* Mapping from cpu number to logical apicid */ static inline int cpu_to_logical_apicid (int cpu) { -if (cpu >=NR_CPUS ) +if (cpu >= nr_cpu_ids)return BAD_APICID ;return cpu_physical_id (cpu); }
@@ -119,16 +119,34 @@ static inline int check_phys_apicid_present(int boot_cpu_physical_apicid) }/* As we are using single CPU as destination, pick only one CPU here */ -static inline unsigned int cpu_mask_to_apicid (cpumask_t cpumask) +static inline unsigned int cpu_mask_to_apicid (const cpumask_t *cpumask) {int cpu;int apicid; - cpu =first_cpu (cpumask); + cpu =first_cpu (*cpumask); apicid =cpu_to_logical_apicid (cpu);return apicid; } +static inline unsigned int cpu_mask_to_apicid_and (const struct cpumask *cpumask, +const struct cpumask *andmask) +{ +int cpu; + +/* +* We're using fixed IRQ delivery, can only return one phys APIC ID. +* May as well be the first. +*/ +for_each_cpu_and (cpu, cpumask, andmask) +if (cpumask_test_cpu (cpu, cpu_online_mask)) +break ; +if (cpu < nr_cpu_ids) +return cpu_to_logical_apicid (cpu); + +return BAD_APICID ; +} +static inline u32 phys_pkg_id (u32 cpuid_apic,int index_msb) {return cpuid_apic >> index_msb;
arch/x86/include/asm/bigsmp/ipi.h +5 -8
@@ -1,25 +1,22 @@#ifndef __ASM_MACH_IPI_H#define __ASM_MACH_IPI_H -void send_IPI_mask_sequence (cpumask_t mask,int vector); +void send_IPI_mask_sequence (const struct cpumask *mask,int vector); +void send_IPI_mask_allbutself (const struct cpumask *mask,int vector); -static inline void send_IPI_mask (cpumask_t mask,int vector) +static inline void send_IPI_mask (const struct cpumask *mask,int vector) {send_IPI_mask_sequence (mask, vector); }static inline void send_IPI_allbutself (int vector) { -cpumask_t mask = cpu_online_map; -cpu_clear (smp_processor_id (), mask); - -if (!cpus_empty (mask)) -send_IPI_mask (mask, vector); +send_IPI_mask_allbutself (cpu_online_mask, vector); }static inline void send_IPI_all (int vector) { -send_IPI_mask (cpu_online_map, vector); +send_IPI_mask (cpu_online_mask, vector); }#endif /* __ASM_MACH_IPI_H */
arch/x86/include/asm/desc.h +4 -6
@@ -320,16 +320,14 @@ static inline void set_intr_gate(unsigned int n, void *addr)_set_gate (n,GATE_INTERRUPT , addr,0 ,0 , __KERNEL_CS); } -#define SYS_VECTOR_FREE 0 -#define SYS_VECTOR_ALLOCED 1 -extern int first_system_vector; -extern char system_vectors[]; +/* used_vectors is BITMAP for irq is not managed by percpu vector_irq */ +extern unsigned long used_vectors[];static inline void alloc_system_vector (int vector) { -if (system_vectors[vector] ==SYS_VECTOR_FREE ) { - system_vectors[vector] =SYS_VECTOR_ALLOCED ; +if (!test_bit (vector, used_vectors)) { +set_bit (vector, used_vectors);if (first_system_vector > vector) first_system_vector = vector; }else
arch/x86/include/asm/es7000/apic.h +64 -18
157 lines not on this page · raw message
arch/x86/include/asm/es7000/ipi.h +5 -7
@@ -1,24 +1,22 @@#ifndef __ASM_ES7000_IPI_H#define __ASM_ES7000_IPI_H -void send_IPI_mask_sequence (cpumask_t mask,int vector); +void send_IPI_mask_sequence (const struct cpumask *mask,int vector); +void send_IPI_mask_allbutself (const struct cpumask *mask,int vector); -static inline void send_IPI_mask (cpumask_t mask,int vector) +static inline void send_IPI_mask (const struct cpumask *mask,int vector) {send_IPI_mask_sequence (mask, vector); }static inline void send_IPI_allbutself (int vector) { -cpumask_t mask = cpu_online_map; -cpu_clear (smp_processor_id (), mask); -if (!cpus_empty (mask)) -send_IPI_mask (mask, vector); +send_IPI_mask_allbutself (cpu_online_mask, vector); }static inline void send_IPI_all (int vector) { -send_IPI_mask (cpu_online_map, vector); +send_IPI_mask (cpu_online_mask, vector); }#endif /* __ASM_ES7000_IPI_H */
arch/x86/include/asm/genapic_32.h +9 -4
@@ -24,7 +24,7 @@ struct genapic {int (*probe)(void );int (*apic_id_registered)(void ); -cpumask_t (*target_cpus)(void); +const struct cpumask *(*target_cpus)(void );int int_delivery_mode;int int_dest_mode;int ESR_DISABLE ;
@@ -57,12 +57,16 @@ struct genapic {unsigned (*get_apic_id)(unsigned long x);unsigned long apic_id_mask; -unsigned int (*cpu_mask_to_apicid)(cpumask_t cpumask); -cpumask_t (*vector_allocation_domain)(int cpu); +unsigned int (*cpu_mask_to_apicid)(const struct cpumask *cpumask); +unsigned int (*cpu_mask_to_apicid_and)(const struct cpumask *cpumask, +const struct cpumask *andmask); +void (*vector_allocation_domain)(int cpu,struct cpumask *retmask);#ifdef CONFIG_SMP /* ipi */ -void (*send_IPI_mask)(cpumask_t mask,int vector); +void (*send_IPI_mask)(const struct cpumask *mask,int vector); +void (*send_IPI_mask_allbutself)(const struct cpumask *mask, +int vector);void (*send_IPI_allbutself)(int vector);void (*send_IPI_all)(int vector);#endif
@@ -114,6 +118,7 @@ struct genapic {APICFUNC (get_apic_id) \ .apic_id_mask =APIC_ID_MASK , \ APICFUNC(cpu_mask_to_apicid) \ + APICFUNC(cpu_mask_to_apicid_and) \ APICFUNC(vector_allocation_domain) \ APICFUNC(acpi_madt_oem_check) \ IPIFUNC(send_IPI_mask) \
arch/x86/include/asm/genapic_64.h +10 -4
@@ -1,6 +1,8 @@#ifndef _ASM_X86_GENAPIC_64_H#define _ASM_X86_GENAPIC_64_H +#include <linux/cpumask.h> +/* * Copyright 2004 James Cleverdon, IBM. * Subject to the GNU Public License, v.2
@@ -18,16 +20,20 @@ struct genapic {u32 int_delivery_mode;u32 int_dest_mode;int (*apic_id_registered)(void ); -cpumask_t (*target_cpus)(void); -cpumask_t (*vector_allocation_domain)(int cpu); +const struct cpumask *(*target_cpus)(void ); +void (*vector_allocation_domain)(int cpu,struct cpumask *retmask);void (*init_apic_ldr)(void );/* ipi */ -void (*send_IPI_mask)(cpumask_t mask,int vector); +void (*send_IPI_mask)(const struct cpumask *mask,int vector); +void (*send_IPI_mask_allbutself)(const struct cpumask *mask, +int vector);void (*send_IPI_allbutself)(int vector);void (*send_IPI_all)(int vector);void (*send_IPI_self)(int vector);/* */ -unsigned int (*cpu_mask_to_apicid)(cpumask_t cpumask); +unsigned int (*cpu_mask_to_apicid)(const struct cpumask *cpumask); +unsigned int (*cpu_mask_to_apicid_and)(const struct cpumask *cpumask, +const struct cpumask *andmask);unsigned int (*phys_pkg_id)(int index_msb);unsigned int (*get_apic_id)(unsigned long x);unsigned long (*set_apic_id)(unsigned int id);
arch/x86/include/asm/ipi.h +21 -2
@@ -117,7 +117,8 @@ static inline void __send_IPI_dest_field(unsigned int mask, int vector,native_apic_mem_write (APIC_ICR , cfg); } -static inline void send_IPI_mask_sequence (cpumask_t mask,int vector) +static inline void send_IPI_mask_sequence (const struct cpumask *mask, +int vector) {unsigned long flags;unsigned long query_cpu;
@@ -128,11 +129,29 @@ static inline void send_IPI_mask_sequence(cpumask_t mask, int vector)* - mbligh */ local_irq_save (flags); -for_each_cpu_mask_nr (query_cpu, mask) { +for_each_cpu (query_cpu, mask) {__send_IPI_dest_field (per_cpu (x86_cpu_to_apicid, query_cpu), vector,APIC_DEST_PHYSICAL ); } local_irq_restore(flags); } +static inline void send_IPI_mask_allbutself (const struct cpumask *mask, +int vector) +{ +unsigned long flags; +unsigned int query_cpu; +unsigned int this_cpu =smp_processor_id (); + +/* See Hack comment above */ + +local_irq_save (flags); +for_each_cpu (query_cpu, mask) +if (query_cpu != this_cpu) +__send_IPI_dest_field ( +per_cpu (x86_cpu_to_apicid, query_cpu), + vector,APIC_DEST_PHYSICAL ); +local_irq_restore (flags); +} +#endif /* _ASM_X86_IPI_H */
arch/x86/include/asm/irq.h +2 -1
@@ -33,7 +33,7 @@ static inline int irq_canonicalize(int irq)#ifdef CONFIG_HOTPLUG_CPU #include <linux/cpumask.h> -extern void fixup_irqs (cpumask_t map); +extern void fixup_irqs (void );#endif extern unsigned int do_IRQ (struct pt_regs *regs);
@@ -42,5 +42,6 @@ extern void native_init_IRQ(void);/* Interrupt vector management */ extern DECLARE_BITMAP(used_vectors, NR_VECTORS); +extern int vector_used_by_percpu_irq (unsigned int vector);#endif /* _ASM_X86_IRQ_H */
arch/x86/include/asm/mach-default/mach_apic.h +19 -9
@@ -8,12 +8,12 @@#define APIC_DFR_VALUE (APIC_DFR_FLAT) -static inline cpumask_t target_cpus (void ) +static inline const struct cpumask *target_cpus (void ) {#ifdef CONFIG_SMP -return cpu_online_map; +return cpu_online_mask;#else -return cpumask_of_cpu (0 ); +return cpumask_of (0 );#endif }
@@ -28,6 +28,7 @@ static inline cpumask_t target_cpus(void)#define apic_id_registered (genapic->apic_id_registered)#define init_apic_ldr (genapic->init_apic_ldr)#define cpu_mask_to_apicid (genapic->cpu_mask_to_apicid) +#define cpu_mask_to_apicid_and (genapic->cpu_mask_to_apicid_and)#define phys_pkg_id (genapic->phys_pkg_id)#define vector_allocation_domain (genapic->vector_allocation_domain)#define read_apic_id () (GET_APIC_ID(apic_read(APIC_ID)))
@@ -61,9 +62,19 @@ static inline int apic_id_registered(void)return physid_isset (read_apic_id (), phys_cpu_present_map); } -static inline unsigned int cpu_mask_to_apicid (cpumask_t cpumask) +static inline unsigned int cpu_mask_to_apicid (const struct cpumask *cpumask) { -return cpus_addr (cpumask)[0 ]; +return cpumask_bits (cpumask)[0 ]; +} + +static inline unsigned int cpu_mask_to_apicid_and (const struct cpumask *cpumask, +const struct cpumask *andmask) +{ +unsigned long mask1 =cpumask_bits (cpumask)[0 ]; +unsigned long mask2 =cpumask_bits (andmask)[0 ]; +unsigned long mask3 =cpumask_bits (cpu_online_mask)[0 ]; + +return (unsigned int )(mask1 & mask2 & mask3); }static inline u32 phys_pkg_id (u32 cpuid_apic,int index_msb)
@@ -88,7 +99,7 @@ static inline int apicid_to_node(int logical_apicid)#endif } -static inline cpumask_t vector_allocation_domain (int cpu) +static inline void vector_allocation_domain (int cpu,struct cpumask *retmask) {/* Careful. Some cpus do not strictly honor the set of cpus * specified in the interrupt destination when using lowest
@@ -98,8 +109,7 @@ static inline cpumask_t vector_allocation_domain(int cpu)* deliver interrupts to the wrong hyperthread when only one * hyperthread was specified in the interrupt desitination. */ -cpumask_t domain = { { [0 ] =APIC_ALL_CPUS , } }; - return domain; + *retmask = (cpumask_t) { { [0] = APIC_ALL_CPUS } }; }#endif
@@ -131,7 +141,7 @@ static inline int cpu_to_logical_apicid(int cpu)static inline int cpu_present_to_apicid (int mps_cpu) { -if (mps_cpu <NR_CPUS &&cpu_present (mps_cpu)) +if (mps_cpu < nr_cpu_ids &&cpu_present (mps_cpu))return (int )per_cpu (x86_bios_cpu_apicid, mps_cpu);else return BAD_APICID ;
arch/x86/include/asm/mach-default/mach_ipi.h +9 -9
@@ -4,7 +4,8 @@/* Avoid include hell */ #define NMI_VECTOR 0x02 -void send_IPI_mask_bitmask (cpumask_t mask,int vector); +void send_IPI_mask_bitmask (const struct cpumask *mask,int vector); +void send_IPI_mask_allbutself (const struct cpumask *mask,int vector);void __send_IPI_shortcut (unsigned int shortcut,int vector);extern int no_broadcast;
@@ -12,28 +13,27 @@ extern int no_broadcast;#ifdef CONFIG_X86_64 #include <asm/genapic.h> #define send_IPI_mask (genapic->send_IPI_mask) +#define send_IPI_mask_allbutself (genapic->send_IPI_mask_allbutself)#else -static inline void send_IPI_mask (cpumask_t mask,int vector) +static inline void send_IPI_mask (const struct cpumask *mask,int vector) {send_IPI_mask_bitmask (mask, vector); } +void send_IPI_mask_allbutself (const struct cpumask *mask,int vector);#endif static inline void __local_send_IPI_allbutself (int vector) { -if (no_broadcast || vector ==NMI_VECTOR ) { -cpumask_t mask = cpu_online_map; - -cpu_clear (smp_processor_id (), mask); -send_IPI_mask (mask, vector); - }else +if (no_broadcast || vector ==NMI_VECTOR ) +send_IPI_mask_allbutself (cpu_online_mask, vector); +else __send_IPI_shortcut (APIC_DEST_ALLBUT , vector); }static inline void __local_send_IPI_all (int vector) {if (no_broadcast || vector ==NMI_VECTOR ) -send_IPI_mask (cpu_online_map, vector); +send_IPI_mask (cpu_online_mask, vector);else __send_IPI_shortcut (APIC_DEST_ALLINC , vector); }
arch/x86/include/asm/mach-generic/mach_apic.h +1 -0
@@ -24,6 +24,7 @@#define check_phys_apicid_present (genapic->check_phys_apicid_present)#define check_apicid_used (genapic->check_apicid_used)#define cpu_mask_to_apicid (genapic->cpu_mask_to_apicid) +#define cpu_mask_to_apicid_and (genapic->cpu_mask_to_apicid_and)#define vector_allocation_domain (genapic->vector_allocation_domain)#define enable_apic_mode (genapic->enable_apic_mode)#define phys_pkg_id (genapic->phys_pkg_id)
arch/x86/include/asm/numaq/apic.h +9 -3
@@ -7,9 +7,9 @@#define APIC_DFR_VALUE (APIC_DFR_CLUSTER) -static inline cpumask_t target_cpus (void ) +static inline const cpumask_t *target_cpus (void ) { -return CPU_MASK_ALL ; +return &CPU_MASK_ALL ; }#define NO_BALANCE_IRQ (1)
@@ -122,7 +122,13 @@ static inline void enable_apic_mode(void)* We use physical apicids here, not logical, so just return the default * physical broadcast to stop people from breaking us */ -static inline unsigned int cpu_mask_to_apicid (cpumask_t cpumask) +static inline unsigned int cpu_mask_to_apicid (const cpumask_t *cpumask) +{ +return (int )0xF ; +} + +static inline unsigned int cpu_mask_to_apicid_and (const struct cpumask *cpumask, +const struct cpumask *andmask) {return (int )0xF ; }
arch/x86/include/asm/numaq/ipi.h +5 -8
@@ -1,25 +1,22 @@#ifndef __ASM_NUMAQ_IPI_H#define __ASM_NUMAQ_IPI_H -void send_IPI_mask_sequence (cpumask_t ,int vector); +void send_IPI_mask_sequence (const struct cpumask *mask,int vector); +void send_IPI_mask_allbutself (const struct cpumask *mask,int vector); -static inline void send_IPI_mask (cpumask_t mask,int vector) +static inline void send_IPI_mask (const struct cpumask *mask,int vector) {send_IPI_mask_sequence (mask, vector); }static inline void send_IPI_allbutself (int vector) { -cpumask_t mask = cpu_online_map; -cpu_clear (smp_processor_id (), mask); - -if (!cpus_empty (mask)) -send_IPI_mask (mask, vector); +send_IPI_mask_allbutself (cpu_online_mask, vector); }static inline void send_IPI_all (int vector) { -send_IPI_mask (cpu_online_map, vector); +send_IPI_mask (cpu_online_mask, vector); }#endif /* __ASM_NUMAQ_IPI_H */
arch/x86/include/asm/smp.h +3 -3
@@ -60,7 +60,7 @@ struct smp_ops {void (*cpu_die)(unsigned int cpu);void (*play_dead)(void ); -void (*send_call_func_ipi)(cpumask_t mask); +void (*send_call_func_ipi)(const struct cpumask *mask);void (*send_call_func_single_ipi)(int cpu); };
@@ -125,7 +125,7 @@ static inline void arch_send_call_function_single_ipi(int cpu)static inline void arch_send_call_function_ipi (cpumask_t mask) { - smp_ops.send_call_func_ipi (mask); + smp_ops.send_call_func_ipi (&mask); }void cpu_disable_common (void );
@@ -138,7 +138,7 @@ void native_cpu_die(unsigned int cpu);void native_play_dead (void );void play_dead_common (void ); -void native_send_call_func_ipi (cpumask_t mask); +void native_send_call_func_ipi (const struct cpumask *mask);void native_send_call_func_single_ipi (int cpu);extern void prefill_possible_map (void );
arch/x86/include/asm/summit/apic.h +49 -6
92 lines not on this page · raw message
arch/x86/include/asm/summit/ipi.h +5 -4
@@ -1,9 +1,10 @@#ifndef __ASM_SUMMIT_IPI_H#define __ASM_SUMMIT_IPI_H -void send_IPI_mask_sequence (cpumask_t mask,int vector); +void send_IPI_mask_sequence (const cpumask_t *mask,int vector); +void send_IPI_mask_allbutself (const cpumask_t *mask,int vector); -static inline void send_IPI_mask (cpumask_t mask,int vector) +static inline void send_IPI_mask (const cpumask_t *mask,int vector) {send_IPI_mask_sequence (mask, vector); }
@@ -14,12 +15,12 @@ static inline void send_IPI_allbutself(int vector)cpu_clear (smp_processor_id (), mask);if (!cpus_empty (mask)) - send_IPI_mask(mask, vector); + send_IPI_mask(&mask, vector); }static inline void send_IPI_all (int vector) { -send_IPI_mask (cpu_online_map, vector); +send_IPI_mask (&cpu_online_map, vector); }#endif /* __ASM_SUMMIT_IPI_H */
arch/x86/include/asm/topology.h +2 -0
@@ -226,6 +226,8 @@ extern cpumask_t cpu_coregroup_map(int cpu);#define topology_core_id (cpu) (cpu_data(cpu).cpu_core_id)#define topology_core_siblings (cpu) (per_cpu(cpu_core_map, cpu))#define topology_thread_siblings (cpu) (per_cpu(cpu_sibling_map, cpu)) +#define topology_core_cpumask (cpu) (&per_cpu(cpu_core_map, cpu)) +#define topology_thread_cpumask (cpu) (&per_cpu(cpu_sibling_map, cpu))/* indicates that pointers to the topology cpumask_t maps are valid */ #define arch_provides_topology_pointers yes
arch/x86/kernel/apic.c +18 -16
@@ -119,8 +119,6 @@ EXPORT_SYMBOL_GPL(local_apic_timer_c2_ok);int first_system_vector =0xfe ; -char system_vectors[NR_VECTORS ] = { [0 ...NR_VECTORS -1 ] =SYS_VECTOR_FREE }; -/* * Debug level, exported for io_apic.c */
@@ -142,7 +140,7 @@ static int lapic_next_event(unsigned long delta, struct clock_event_device *evt);static void lapic_timer_setup (enum clock_event_mode mode,struct clock_event_device *evt); -static void lapic_timer_broadcast (cpumask_t mask); +static void lapic_timer_broadcast (const cpumask_t *mask);static void apic_pm_activate (void );/*
@@ -455,7 +453,7 @@ static void lapic_timer_setup(enum clock_event_mode mode,/* * Local APIC timer broadcast function */ -static void lapic_timer_broadcast (cpumask_t mask) +static void lapic_timer_broadcast (const cpumask_t *mask) {#ifdef CONFIG_SMP send_IPI_mask (mask,LOCAL_TIMER_VECTOR );
@@ -471,7 +469,7 @@ static void __cpuinit setup_APIC_timer(void)struct clock_event_device *levt = &__get_cpu_var (lapic_events);memcpy (levt, &lapic_clockevent,sizeof (*levt)); - levt->cpumask =cpumask_of_cpu (smp_processor_id ()); + levt->cpumask =cpumask_of (smp_processor_id ());clockevents_register_device (levt); }
@@ -1807,28 +1805,32 @@ void disconnect_bsp_APIC(int virt_wire_setup)void __cpuinit generic_processor_info (int apicid,int version) {int cpu; -cpumask_t tmp_map;/* * Validate version */ if (version ==0x0 ) {pr_warning ("BIOS bug, APIC version is 0 for CPU#%d! " -"fixing up to 0x10. (tell your hw vendor)\n" , - version); +"fixing up to 0x10. (tell your hw vendor)\n" , + version); version =0x10 ; } apic_version[apicid] = version; -if (num_processors >=NR_CPUS ) { -pr_warning ("WARNING: NR_CPUS limit of %i reached." -" Processor ignored.\n" ,NR_CPUS ); +if (num_processors >= nr_cpu_ids) { +int max = nr_cpu_ids; +int thiscpu = max + disabled_cpus; + +pr_warning ( +"ACPI: NR_CPUS/possible_cpus limit of %i reached." +" Processor %d/0x%x ignored.\n" , max, thiscpu, apicid); + + disabled_cpus++;return ; } num_processors++; -cpus_complement (tmp_map, cpu_present_map); - cpu =first_cpu (tmp_map); + cpu =cpumask_next_zero (-1 , cpu_present_mask);physid_set (apicid, phys_cpu_present_map);if (apicid == boot_cpu_physical_apicid) {
@@ -1878,8 +1880,8 @@ void __cpuinit generic_processor_info(int apicid, int version) }#endif -cpu_set (cpu, cpu_possible_map); -cpu_set (cpu, cpu_present_map); +set_cpu_possible (cpu, true); +set_cpu_present (cpu, true); }#ifdef CONFIG_X86_64
@@ -2081,7 +2083,7 @@ __cpuinit int apic_is_clustered_box(void) bios_cpu_apicid =early_per_cpu_ptr (x86_bios_cpu_apicid);bitmap_zero (clustermap,NUM_APIC_CLUSTERS ); -for (i =0 ; i <NR_CPUS ; i++) { +for (i =0 ; i < nr_cpu_ids; i++) {/* are we being called early in kernel startup? */ if (bios_cpu_apicid) { id = bios_cpu_apicid[i];
arch/x86/kernel/cpu/intel_cacheinfo.c +21 -24
69 lines not on this page · raw message
arch/x86/kernel/cpu/mcheck/mce_amd_64.c +55 -53
202 lines not on this page · raw message
arch/x86/kernel/genapic_flat_64.c +81 -26
210 lines not on this page · raw message
arch/x86/kernel/genx2apic_cluster.c +60 -21
140 lines not on this page · raw message
arch/x86/kernel/genx2apic_phys.c +57 -17
133 lines not on this page · raw message
arch/x86/kernel/genx2apic_uv_x.c +44 -17
8 lines not on this page · raw message
arch/x86/kernel/io_apic.c +178 -192
370 lines not on this page · raw message
include/linux/cpumask.h +64 -34
98 lines not on this page · raw message
include/linux/sched.h +72 -20
92 lines not on this page · raw message
kernel/sched.c +556 -414
970 lines not on this page · raw message
kernel/sched_rt.c +44 -29
73 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.