cpumask: convert struct clock_event_device to cpumask pointers.
Impact: change calling convention of existing clock_event APIs struct clock_event_timer's cpumask field gets changed to take pointer, as does the ->broadcast function. Another single-patch change. For safety, we BUG_ON() in clockevents_register_device() if it's not set. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Cc: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
@@ -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);
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -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;
|
||||
|
@@ -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);
|
||||
|
@@ -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;
|
||||
|
@@ -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",
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
Referens i nytt ärende
Block a user