Displaying 16 results from an estimated 16 matches for "apic_lvtt".
2007 Apr 18
1
[PATCH 9/10] Vmi timer update.patch
...ine unsigned int vmi_get_timer_vector(void)
+{
+#ifdef CONFIG_X86_IO_APIC
+ return FIRST_DEVICE_VECTOR;
+#else
+ return FIRST_EXTERNAL_VECTOR;
+#endif
+}
+
+/** vmi clockchip */
+#ifdef CONFIG_X86_LOCAL_APIC
+static unsigned int startup_timer_irq(unsigned int irq)
+{
+ unsigned long val = apic_read(APIC_LVTT);
+ apic_write(APIC_LVTT, vmi_get_timer_vector());
+
+ return (val & APIC_SEND_PENDING);
+}
+
+static void mask_timer_irq(unsigned int irq)
+{
+ unsigned long val = apic_read(APIC_LVTT);
+ apic_write(APIC_LVTT, val | APIC_LVT_MASKED);
+}
+
+static void unmask_timer_irq(unsigned int irq)
+{
+ un...
2007 Apr 18
1
[PATCH 9/10] Vmi timer update.patch
...ine unsigned int vmi_get_timer_vector(void)
+{
+#ifdef CONFIG_X86_IO_APIC
+ return FIRST_DEVICE_VECTOR;
+#else
+ return FIRST_EXTERNAL_VECTOR;
+#endif
+}
+
+/** vmi clockchip */
+#ifdef CONFIG_X86_LOCAL_APIC
+static unsigned int startup_timer_irq(unsigned int irq)
+{
+ unsigned long val = apic_read(APIC_LVTT);
+ apic_write(APIC_LVTT, vmi_get_timer_vector());
+
+ return (val & APIC_SEND_PENDING);
+}
+
+static void mask_timer_irq(unsigned int irq)
+{
+ unsigned long val = apic_read(APIC_LVTT);
+ apic_write(APIC_LVTT, val | APIC_LVT_MASKED);
+}
+
+static void unmask_timer_irq(unsigned int irq)
+{
+ un...
2010 Dec 09
0
[PATCH]x86:vlapic: Fix possible guest tick losing after save/restore
.../arch/x86/hvm/vlapic.c Fri Dec 10 15:19:51 2010 +0800
+++ b/xen/arch/x86/hvm/vlapic.c Fri Dec 10 15:27:11 2010 +0800
@@ -955,12 +955,12 @@ static void lapic_rearm(struct vlapic *s
unsigned long tmict = vlapic_get_reg(s, APIC_TMICT);
uint64_t period;
+ s->pt.irq = vlapic_get_reg(s, APIC_LVTT) & APIC_VECTOR_MASK;
if ( (tmict = vlapic_get_reg(s, APIC_TMICT)) == 0 )
return;
period = ((uint64_t)APIC_BUS_CYCLE_NS *
(uint32_t)tmict * s->hw.timer_divisor);
- s->pt.irq = vlapic_get_reg(s, APIC_LVTT) & APIC_VECTOR_MASK;
create_periodic_t...
2007 May 15
3
[PATCH 1/12] Add suspend/resume to devices owned by Xen
...79,95 @@ void __devinit setup_local_APIC(void)
apic_pm_activate();
}
+static struct {
+ int active;
+ /* r/w apic fields */
+ unsigned int apic_id;
+ unsigned int apic_taskpri;
+ unsigned int apic_ldr;
+ unsigned int apic_dfr;
+ unsigned int apic_spiv;
+ unsigned int apic_lvtt;
+ unsigned int apic_lvtpc;
+ unsigned int apic_lvt0;
+ unsigned int apic_lvt1;
+ unsigned int apic_lvterr;
+ unsigned int apic_tmict;
+ unsigned int apic_tdcr;
+ unsigned int apic_thmr;
+} apic_pm_state;
+
+int lapic_suspend(void)
+{
+ unsigned long flags;
+
+ if (!apic_...
2010 Aug 23
1
Removing VMI kernel support from 2.6.37
...s.get_cycle_frequency();
- (void)do_div(khz, 1000);
- return khz;
-}
-
-static inline unsigned int vmi_get_timer_vector(void)
-{
- return IRQ0_VECTOR;
-}
-
-/** vmi clockchip */
-#ifdef CONFIG_X86_LOCAL_APIC
-static unsigned int startup_timer_irq(unsigned int irq)
-{
- unsigned long val = apic_read(APIC_LVTT);
- apic_write(APIC_LVTT, vmi_get_timer_vector());
-
- return (val & APIC_SEND_PENDING);
-}
-
-static void mask_timer_irq(unsigned int irq)
-{
- unsigned long val = apic_read(APIC_LVTT);
- apic_write(APIC_LVTT, val | APIC_LVT_MASKED);
-}
-
-static void unmask_timer_irq(unsigned int irq)
-{
- un...
2010 Aug 23
1
Removing VMI kernel support from 2.6.37
...s.get_cycle_frequency();
- (void)do_div(khz, 1000);
- return khz;
-}
-
-static inline unsigned int vmi_get_timer_vector(void)
-{
- return IRQ0_VECTOR;
-}
-
-/** vmi clockchip */
-#ifdef CONFIG_X86_LOCAL_APIC
-static unsigned int startup_timer_irq(unsigned int irq)
-{
- unsigned long val = apic_read(APIC_LVTT);
- apic_write(APIC_LVTT, vmi_get_timer_vector());
-
- return (val & APIC_SEND_PENDING);
-}
-
-static void mask_timer_irq(unsigned int irq)
-{
- unsigned long val = apic_read(APIC_LVTT);
- apic_write(APIC_LVTT, val | APIC_LVT_MASKED);
-}
-
-static void unmask_timer_irq(unsigned int irq)
-{
- un...
2008 Sep 09
9
[PATCH 2/4] CPUIDLE: Avoid remnant LAPIC timer intr while force hpetbroadcast
CPUIDLE: Avoid remnant LAPIC timer intr while force hpetbroadcast
LAPIC will stop during C3, and resume to work after exit from C3. Considering below case:
The LAPIC timer was programmed to expire after 1000us, but CPU enter C3 after 100us and exit C3 at 9xxus.
0us: reprogram_timer(1000us)
100us: entry C3, LAPIC timer stop
9xxus: exit C3 due to unexpected event, LAPIC timer continue running
2007 Jan 30
0
[PATCH][HVM] fix smp guest hang after restore
....c Tue Jan 30 18:03:19 2007 +0800
@@ -836,14 +836,16 @@ static int lapic_load(hvm_domain_context
tmict = vlapic_get_reg(s, APIC_TMICT);
if (tmict > 0) {
uint64_t period = APIC_BUS_CYCLE_NS * (uint32_t)tmict * s->hw.timer_divisor;
-
+ uint32_t lvtt = vlapic_get_reg(s, APIC_LVTT);
+
+ s->pt.irq = lvtt & APIC_VECTOR_MASK;
create_periodic_time(v, &s->pt, period, s->pt.irq,
vlapic_lvtt_period(s), NULL, s);
printk("lapic_load to rearm the actimer:"
"bus cycle is %uns,...
2007 Apr 18
31
[PATCH 00/28] Updates for firstfloor paravirt-ops patches
Hi Andi,
This is a set of updates for the firstfloor patch queue.
Quick rundown:
revert-mm-x86_64-mm-account-for-module-percpu-space-separately-from-kernel-percpu.patch
separate-module-percpu-space.patch
Update the module percpu accounting patch
fix-ff-allow-percpu-variables-to-be-page-aligned.patch
Make sure the percpu memory allocation is page-aligned
2007 Apr 18
31
[PATCH 00/28] Updates for firstfloor paravirt-ops patches
Hi Andi,
This is a set of updates for the firstfloor patch queue.
Quick rundown:
revert-mm-x86_64-mm-account-for-module-percpu-space-separately-from-kernel-percpu.patch
separate-module-percpu-space.patch
Update the module percpu accounting patch
fix-ff-allow-percpu-variables-to-be-page-aligned.patch
Make sure the percpu memory allocation is page-aligned
2007 Apr 18
0
[PATCH 6/6] VMI timer patches
...S_AVAILABLE,
+ per_cpu(process_times_cycles_accounted_cpu, 0) + cycles_per_alarm,
+ cycles_per_alarm);
+}
+
+#ifdef CONFIG_X86_LOCAL_APIC
+
+void __init vmi_timer_setup_boot_alarm(void)
+{
+ local_irq_disable();
+
+ /* Route the interrupt to the correct vector. */
+ apic_write_around(APIC_LVTT, LOCAL_TIMER_VECTOR);
+
+ /* Cancel the IRQ0 wired alarm, and setup the LVTT alarm. */
+ vmi_timer_ops.cancel_alarm(VMI_CYCLES_AVAILABLE);
+ vmi_timer_ops.set_alarm(
+ VMI_ALARM_WIRED_LVTT | VMI_ALARM_IS_PERIODIC | VMI_CYCLES_AVAILABLE,
+ per_cpu(process_times_cycles_accounted_cpu, 0)...
2007 Apr 18
0
[PATCH 6/6] VMI timer patches
...S_AVAILABLE,
+ per_cpu(process_times_cycles_accounted_cpu, 0) + cycles_per_alarm,
+ cycles_per_alarm);
+}
+
+#ifdef CONFIG_X86_LOCAL_APIC
+
+void __init vmi_timer_setup_boot_alarm(void)
+{
+ local_irq_disable();
+
+ /* Route the interrupt to the correct vector. */
+ apic_write_around(APIC_LVTT, LOCAL_TIMER_VECTOR);
+
+ /* Cancel the IRQ0 wired alarm, and setup the LVTT alarm. */
+ vmi_timer_ops.cancel_alarm(VMI_CYCLES_AVAILABLE);
+ vmi_timer_ops.set_alarm(
+ VMI_ALARM_WIRED_LVTT | VMI_ALARM_IS_PERIODIC | VMI_CYCLES_AVAILABLE,
+ per_cpu(process_times_cycles_accounted_cpu, 0)...
2007 Apr 18
0
[PATCH 5/5] Vmi timer.patch
...S_AVAILABLE,
+ per_cpu(process_times_cycles_accounted_cpu, 0) + cycles_per_alarm,
+ cycles_per_alarm);
+}
+
+#ifdef CONFIG_X86_LOCAL_APIC
+
+void __init vmi_timer_setup_boot_alarm(void)
+{
+ local_irq_disable();
+
+ /* Route the interrupt to the correct vector. */
+ apic_write_around(APIC_LVTT, LOCAL_TIMER_VECTOR);
+
+ /* Cancel the IRQ0 wired alarm, and setup the LVTT alarm. */
+ vmi_timer_ops.cancel_alarm(VMI_CYCLES_AVAILABLE);
+ vmi_timer_ops.set_alarm(
+ VMI_ALARM_WIRED_LVTT | VMI_ALARM_IS_PERIODIC | VMI_CYCLES_AVAILABLE,
+ per_cpu(process_times_cycles_accounted_cpu, 0)...
2007 Apr 18
0
[PATCH 5/5] Vmi timer.patch
...S_AVAILABLE,
+ per_cpu(process_times_cycles_accounted_cpu, 0) + cycles_per_alarm,
+ cycles_per_alarm);
+}
+
+#ifdef CONFIG_X86_LOCAL_APIC
+
+void __init vmi_timer_setup_boot_alarm(void)
+{
+ local_irq_disable();
+
+ /* Route the interrupt to the correct vector. */
+ apic_write_around(APIC_LVTT, LOCAL_TIMER_VECTOR);
+
+ /* Cancel the IRQ0 wired alarm, and setup the LVTT alarm. */
+ vmi_timer_ops.cancel_alarm(VMI_CYCLES_AVAILABLE);
+ vmi_timer_ops.set_alarm(
+ VMI_ALARM_WIRED_LVTT | VMI_ALARM_IS_PERIODIC | VMI_CYCLES_AVAILABLE,
+ per_cpu(process_times_cycles_accounted_cpu, 0)...
2007 Apr 18
0
[RFC, PATCH 23/24] i386 Vmi timer patch
...turn 0;
+}
+
+#ifdef CONFIG_X86_LOCAL_APIC
+
+void __init setup_boot_vmi_alarm(void)
+{
+ if (vmi_timer_used()) {
+ /* Not really the apic timer, but from the apic's
+ * perspective, it looks like the apic timer... */
+ using_apic_timer = 1;
+
+ local_irq_disable();
+
+ apic_write_around(APIC_LVTT, LOCAL_TIMER_VECTOR);
+ /* Cancel the IRQ0 wired alarm, and setup the LVTT alarm. */
+ vmi_cancel_alarm(VMI_CYCLES_AVAILABLE);
+ vmi_set_alarm(VMI_ALARM_WIRED_LVTT | VMI_ALARM_IS_PERIODIC | VMI_CYCLES_AVAILABLE,
+ per_cpu(process_times_cycles_accounted_cpu, 0) + cycles_per_alarm,
+...
2007 Apr 18
0
[RFC, PATCH 23/24] i386 Vmi timer patch
...turn 0;
+}
+
+#ifdef CONFIG_X86_LOCAL_APIC
+
+void __init setup_boot_vmi_alarm(void)
+{
+ if (vmi_timer_used()) {
+ /* Not really the apic timer, but from the apic's
+ * perspective, it looks like the apic timer... */
+ using_apic_timer = 1;
+
+ local_irq_disable();
+
+ apic_write_around(APIC_LVTT, LOCAL_TIMER_VECTOR);
+ /* Cancel the IRQ0 wired alarm, and setup the LVTT alarm. */
+ vmi_cancel_alarm(VMI_CYCLES_AVAILABLE);
+ vmi_set_alarm(VMI_ALARM_WIRED_LVTT | VMI_ALARM_IS_PERIODIC | VMI_CYCLES_AVAILABLE,
+ per_cpu(process_times_cycles_accounted_cpu, 0) + cycles_per_alarm,
+...