Ported from Linux, this shuts down iosapic before preforming kexec.
This resolves a problem whereby the serial port on an HP RX2620
(which uses IOSAPIC) was not able to accept input. It probably
resolves a bunch of other as yet unseen problems too.
Thanks to Takebe-san for working out the solution to this puzzle.
Cc: Akio Takebe <takebe_akio@jp.fujitsu.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
/* do nothing... */
}
+void
+kexec_disable_iosapic(void)
+{
+ struct iosapic_intr_info *info;
+ struct iosapic_rte_info *rte;
+ u8 vec = 0;
+ for (info = iosapic_intr_info; info <
+ iosapic_intr_info + IA64_NUM_VECTORS; ++info, ++vec) {
+ list_for_each_entry(rte, &info->rtes,
+ rte_list) {
+ iosapic_write(rte->addr,
+ IOSAPIC_RTE_LOW(rte->rte_index),
+ IOSAPIC_MASK|vec);
+ iosapic_eoi(rte->addr, vec);
+ }
+ }
+}
+
static void
mask_irq (unsigned int irq)
{
dom0_mm_pgd_mfn = __pa(dom0->arch.mm.pgd) >> PAGE_SHIFT;
memcpy((char *)info + offsetof(crash_xen_info_t, dom0_mm_pgd_mfn),
&dom0_mm_pgd_mfn, sizeof(dom0_mm_pgd_mfn));
+ kexec_disable_iosapic();
#ifdef CONFIG_SMP
smp_send_stop();
#endif
void machine_kexec(xen_kexec_image_t *image)
{
+ kexec_disable_iosapic();
unw_init_running(ia64_machine_kexec, image);
for(;;);
}
void machine_reboot_kexec(xen_kexec_image_t *image);
void machine_kexec(xen_kexec_image_t *image);
void kexec_crash(void);
+void kexec_disable_iosapic(void);
void kexec_crash_save_cpu(void);
crash_xen_info_t *kexec_crash_save_info(void);
void machine_crash_shutdown(void);