Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 157082
b: refs/heads/master
c: f833bab
h: refs/heads/master
v: v3
  • Loading branch information
Suresh Siddha authored and Thomas Gleixner committed Aug 19, 2009
1 parent 566539e commit 078376d
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: de809347aeef0a68c04576c464414d0e4dce59fc
refs/heads/master: f833bab87fca5c3ce13778421b1365845843b976
6 changes: 1 addition & 5 deletions trunk/arch/x86/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -519,16 +519,12 @@ static void c1e_idle(void)
if (!cpumask_test_cpu(cpu, c1e_mask)) {
cpumask_set_cpu(cpu, c1e_mask);
/*
* Force broadcast so ACPI can not interfere. Needs
* to run with interrupts enabled as it uses
* smp_function_call.
* Force broadcast so ACPI can not interfere.
*/
local_irq_enable();
clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_FORCE,
&cpu);
printk(KERN_INFO "Switch to broadcast mode on CPU%d\n",
cpu);
local_irq_disable();
}
clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &cpu);

Expand Down
6 changes: 4 additions & 2 deletions trunk/drivers/acpi/processor_idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,9 @@ static void lapic_timer_check_state(int state, struct acpi_processor *pr,
pr->power.timer_broadcast_on_state = state;
}

static void lapic_timer_propagate_broadcast(struct acpi_processor *pr)
static void lapic_timer_propagate_broadcast(void *arg)
{
struct acpi_processor *pr = (struct acpi_processor *) arg;
unsigned long reason;

reason = pr->power.timer_broadcast_on_state < INT_MAX ?
Expand Down Expand Up @@ -635,7 +636,8 @@ static int acpi_processor_power_verify(struct acpi_processor *pr)
working++;
}

lapic_timer_propagate_broadcast(pr);
smp_call_function_single(pr->id, lapic_timer_propagate_broadcast,
pr, 1);

return (working);
}
Expand Down
16 changes: 10 additions & 6 deletions trunk/kernel/time/clockevents.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,12 @@ int clockevents_program_event(struct clock_event_device *dev, ktime_t expires,
*/
int clockevents_register_notifier(struct notifier_block *nb)
{
unsigned long flags;
int ret;

spin_lock(&clockevents_lock);
spin_lock_irqsave(&clockevents_lock, flags);
ret = raw_notifier_chain_register(&clockevents_chain, nb);
spin_unlock(&clockevents_lock);
spin_unlock_irqrestore(&clockevents_lock, flags);

return ret;
}
Expand Down Expand Up @@ -178,16 +179,18 @@ static void clockevents_notify_released(void)
*/
void clockevents_register_device(struct clock_event_device *dev)
{
unsigned long flags;

BUG_ON(dev->mode != CLOCK_EVT_MODE_UNUSED);
BUG_ON(!dev->cpumask);

spin_lock(&clockevents_lock);
spin_lock_irqsave(&clockevents_lock, flags);

list_add(&dev->list, &clockevent_devices);
clockevents_do_notify(CLOCK_EVT_NOTIFY_ADD, dev);
clockevents_notify_released();

spin_unlock(&clockevents_lock);
spin_unlock_irqrestore(&clockevents_lock, flags);
}
EXPORT_SYMBOL_GPL(clockevents_register_device);

Expand Down Expand Up @@ -235,8 +238,9 @@ void clockevents_exchange_device(struct clock_event_device *old,
void clockevents_notify(unsigned long reason, void *arg)
{
struct list_head *node, *tmp;
unsigned long flags;

spin_lock(&clockevents_lock);
spin_lock_irqsave(&clockevents_lock, flags);
clockevents_do_notify(reason, arg);

switch (reason) {
Expand All @@ -251,7 +255,7 @@ void clockevents_notify(unsigned long reason, void *arg)
default:
break;
}
spin_unlock(&clockevents_lock);
spin_unlock_irqrestore(&clockevents_lock, flags);
}
EXPORT_SYMBOL_GPL(clockevents_notify);
#endif
7 changes: 3 additions & 4 deletions trunk/kernel/time/tick-broadcast.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,11 @@ static void tick_handle_periodic_broadcast(struct clock_event_device *dev)
* Powerstate information: The system enters/leaves a state, where
* affected devices might stop
*/
static void tick_do_broadcast_on_off(void *why)
static void tick_do_broadcast_on_off(unsigned long *reason)
{
struct clock_event_device *bc, *dev;
struct tick_device *td;
unsigned long flags, *reason = why;
unsigned long flags;
int cpu, bc_stopped;

spin_lock_irqsave(&tick_broadcast_lock, flags);
Expand Down Expand Up @@ -276,8 +276,7 @@ void tick_broadcast_on_off(unsigned long reason, int *oncpu)
printk(KERN_ERR "tick-broadcast: ignoring broadcast for "
"offline CPU #%d\n", *oncpu);
else
smp_call_function_single(*oncpu, tick_do_broadcast_on_off,
&reason, 1);
tick_do_broadcast_on_off(&reason);
}

/*
Expand Down

0 comments on commit 078376d

Please sign in to comment.