Skip to content

Commit

Permalink
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/gi…
Browse files Browse the repository at this point in the history
…t/rusty/linux-2.6-for-ingo into cpus4096
  • Loading branch information
Ingo Molnar committed Dec 16, 2008
2 parents 3c68b4a + 968ea6d commit c3895b0
Show file tree
Hide file tree
Showing 141 changed files with 393 additions and 420 deletions.
1 change: 0 additions & 1 deletion arch/alpha/include/asm/smp.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_map

extern void arch_send_call_function_single_ipi(int cpu);
extern void arch_send_call_function_ipi(cpumask_t mask);
Expand Down
2 changes: 1 addition & 1 deletion arch/alpha/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 2 additions & 0 deletions arch/alpha/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
7 changes: 2 additions & 5 deletions arch/alpha/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions arch/alpha/kernel/sys_dp264.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
4 changes: 2 additions & 2 deletions arch/alpha/kernel/sys_titan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/common/gic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
10 changes: 0 additions & 10 deletions arch/arm/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,6 @@
#include <asm/tlbflush.h>
#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
Expand Down
3 changes: 1 addition & 2 deletions arch/arm/mach-at91/at91rm9200_time.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,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,
};
Expand Down Expand Up @@ -197,7 +196,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 */
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-at91/at91sam926x_time.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};

Expand Down Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-davinci/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-imx/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-ixp4xx/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-msm/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-ns9xxx/time-ns9360.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap1/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap1/timer32k.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/timer-gp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-pxa/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down Expand Up @@ -170,6 +169,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);
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-realview/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,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)
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/mach-realview/localtimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ void __cpuinit local_timer_setup(unsigned int cpu)
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);
Expand Down Expand Up @@ -199,7 +199,7 @@ void __cpuinit local_timer_setup(unsigned int cpu)
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);
}
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-sa1100/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-versatile/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,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);
}

Expand Down
4 changes: 2 additions & 2 deletions arch/arm/oprofile/op_model_mpcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/plat-mxc/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/plat-orion/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down Expand Up @@ -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);
}
2 changes: 1 addition & 1 deletion arch/avr32/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion arch/blackfin/kernel/time-ts.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions arch/cris/arch-v32/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
Loading

0 comments on commit c3895b0

Please sign in to comment.