Woller, Thomas
2006-Mar-02 21:29 UTC
[Xen-devel] [PATCH][discuss] io_apic disable_8254_timer
Attached/included patch partially implements the recent disable_8254_timer linux solution. Applies cleanly to c/s 9098. We are seeing the following error messages (XEN) APIC Error on CPU:0 (00) (40) (XEN) APIC Error on CPU:0 (40) (40) when using an AMD machine with ATI chipset. Not calling enable_8259A_irq(0) in io_apic.c check_timer() alleviates the error. Here is link to linux discussion and signoff by linux/andik, indication is that 2.6.17 will resolve further. Better ATI Timer fix http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=c ommit;h=ab9b32ee626e9b6df4ce2560a70ae15e62423cf4 This patch only adds "disable_8254_timer" and leaves the default as enabled - ie. There is no "enable_8254_timer" in this patch. The linux solution provides more detailed determination of whether to enable/disable using timer_over_8254, including determining if ATI chipset is present. Most of which is most likely not necessary with xen hv at this time. The added code in this patch could be ifdef 64bit, as the linux solution is only implemented in the x86_64 io_apic.c code. Tom Signed-off-by: Tom Woller <thomas.woller@amd.com> diff -r 4dd325c1d87d xen/arch/x86/io_apic.c --- a/xen/arch/x86/io_apic.c Thu Mar 2 13:43:24 2006 +++ b/xen/arch/x86/io_apic.c Thu Mar 2 19:34:39 2006 @@ -50,6 +50,7 @@ static DEFINE_SPINLOCK(ioapic_lock); int skip_ioapic_setup; +int disable_timer_over_8254 = 0; /* * # of IRQ routing registers @@ -1549,7 +1550,8 @@ apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT); init_8259A(1); timer_ack = 1; - enable_8259A_irq(0); + if(!disable_timer_over_8254) + enable_8259A_irq(0); pin1 = find_isa_irq_pin(0, mp_INT); apic1 = find_isa_irq_apic(0, mp_INT); diff -r 4dd325c1d87d xen/arch/x86/setup.c --- a/xen/arch/x86/setup.c Thu Mar 2 13:43:24 2006 +++ b/xen/arch/x86/setup.c Thu Mar 2 19:34:39 2006 @@ -67,6 +67,11 @@ extern int skip_ioapic_setup; boolean_param("noapic", skip_ioapic_setup); +/* disable_8254_timer: if true, disable interrupt 0 timer routing + * over the 8254 in addition to over the IO-APIC. */ +extern int disable_timer_over_8254; +boolean_param("disable_8254_timer", disable_timer_over_8254); + int early_boot = 1; cpumask_t cpu_present_map; _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2006-Mar-03 13:12 UTC
Re: [Xen-devel] [PATCH][discuss] io_apic disable_8254_timer
On 2 Mar 2006, at 21:29, Woller, Thomas wrote:> This patch only adds "disable_8254_timer" and leaves the default as > enabled - ie. There is no "enable_8254_timer" in this patch. The linux > solution provides more detailed determination of whether to > enable/disable using timer_over_8254, including determining if ATI > chipset is present. Most of which is most likely not necessary with > xen > hv at this time. > > The added code in this patch could be ifdef 64bit, as the linux > solution > is only implemented in the x86_64 io_apic.c code. > TomActually this gives me an excuse to pick a scab and get rid of the ''missed tick'' logic that relies on that code altogether. So I just deleted the line instead of making it conditional. I''m pretty sure that won''t break anything. Thanks, Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel