View | Details | Raw Unified | Return to bug 9355 | Differences between
and this patch

Collapse All | Expand All

(-)linux-2.6.24-rc/drivers/acpi/processor_idle.c (-2 / +13 lines)
Lines 1399-1404 static int acpi_idle_enter_simple(struct Link Here
1399
	struct acpi_processor *pr;
1399
	struct acpi_processor *pr;
1400
	struct acpi_processor_cx *cx = cpuidle_get_statedata(state);
1400
	struct acpi_processor_cx *cx = cpuidle_get_statedata(state);
1401
	u32 t1, t2;
1401
	u32 t1, t2;
1402
	int sleep_ticks = 0;
1403
1402
	pr = processors[smp_processor_id()];
1404
	pr = processors[smp_processor_id()];
1403
1405
1404
	if (unlikely(!pr))
1406
	if (unlikely(!pr))
Lines 1436-1441 static int acpi_idle_enter_simple(struct Link Here
1436
	/* TSC could halt in idle, so notify users */
1438
	/* TSC could halt in idle, so notify users */
1437
	mark_tsc_unstable("TSC halts in idle");;
1439
	mark_tsc_unstable("TSC halts in idle");;
1438
#endif
1440
#endif
1441
	sleep_ticks = ticks_elapsed(t1, t2);
1442
1443
	/* Tell the scheduler how much we idled: */
1444
	sched_clock_idle_wakeup_event(sleep_ticks*PM_TIMER_TICK_NS);
1439
1445
1440
	local_irq_enable();
1446
	local_irq_enable();
1441
	current_thread_info()->status |= TS_POLLING;
1447
	current_thread_info()->status |= TS_POLLING;
Lines 1443-1449 static int acpi_idle_enter_simple(struct Link Here
1443
	cx->usage++;
1449
	cx->usage++;
1444
1450
1445
	acpi_state_timer_broadcast(pr, cx, 0);
1451
	acpi_state_timer_broadcast(pr, cx, 0);
1446
	cx->time += ticks_elapsed(t1, t2);
1452
	cx->time += sleep_ticks;
1447
	return ticks_elapsed_in_us(t1, t2);
1453
	return ticks_elapsed_in_us(t1, t2);
1448
}
1454
}
1449
1455
Lines 1463-1468 static int acpi_idle_enter_bm(struct cpu Link Here
1463
	struct acpi_processor *pr;
1469
	struct acpi_processor *pr;
1464
	struct acpi_processor_cx *cx = cpuidle_get_statedata(state);
1470
	struct acpi_processor_cx *cx = cpuidle_get_statedata(state);
1465
	u32 t1, t2;
1471
	u32 t1, t2;
1472
	int sleep_ticks = 0;
1473
1466
	pr = processors[smp_processor_id()];
1474
	pr = processors[smp_processor_id()];
1467
1475
1468
	if (unlikely(!pr))
1476
	if (unlikely(!pr))
Lines 1530-1535 static int acpi_idle_enter_bm(struct cpu Link Here
1530
	/* TSC could halt in idle, so notify users */
1538
	/* TSC could halt in idle, so notify users */
1531
	mark_tsc_unstable("TSC halts in idle");
1539
	mark_tsc_unstable("TSC halts in idle");
1532
#endif
1540
#endif
1541
	sleep_ticks = ticks_elapsed(t1, t2);
1542
	/* Tell the scheduler how much we idled: */
1543
	sched_clock_idle_wakeup_event(sleep_ticks*PM_TIMER_TICK_NS);
1533
1544
1534
	local_irq_enable();
1545
	local_irq_enable();
1535
	current_thread_info()->status |= TS_POLLING;
1546
	current_thread_info()->status |= TS_POLLING;
Lines 1537-1543 static int acpi_idle_enter_bm(struct cpu Link Here
1537
	cx->usage++;
1548
	cx->usage++;
1538
1549
1539
	acpi_state_timer_broadcast(pr, cx, 0);
1550
	acpi_state_timer_broadcast(pr, cx, 0);
1540
	cx->time += ticks_elapsed(t1, t2);
1551
	cx->time += sleep_ticks;
1541
	return ticks_elapsed_in_us(t1, t2);
1552
	return ticks_elapsed_in_us(t1, t2);
1542
}
1553
}
1543
1554

Return to bug 9355