WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [IA64] Kexec: Add kexec_disable_iosapic

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [IA64] Kexec: Add kexec_disable_iosapic
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 04 Oct 2007 17:40:58 -0700
Delivery-date: Thu, 04 Oct 2007 17:43:47 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Alex Williamson <alex.williamson@xxxxxx>
# Date 1190927578 21600
# Node ID 2b0cbf3ef83f7cd61d7b6e022a7071695b7d4cf9
# Parent  d7c3b12014b355069bcea51520289befe6d4db9b
[IA64] Kexec: Add kexec_disable_iosapic

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@xxxxxxxxxxxxxx>
Signed-off-by: Simon Horman <horms@xxxxxxxxxxxx>
---
 xen/arch/ia64/linux-xen/iosapic.c |   18 ++++++++++++++++++
 xen/arch/ia64/xen/crash.c         |    1 +
 xen/arch/ia64/xen/machine_kexec.c |    1 +
 xen/include/xen/kexec.h           |    1 +
 4 files changed, 21 insertions(+)

diff -r d7c3b12014b3 -r 2b0cbf3ef83f xen/arch/ia64/linux-xen/iosapic.c
--- a/xen/arch/ia64/linux-xen/iosapic.c Thu Sep 27 15:10:42 2007 -0600
+++ b/xen/arch/ia64/linux-xen/iosapic.c Thu Sep 27 15:12:58 2007 -0600
@@ -268,6 +268,24 @@ nop (unsigned int vector)
        /* 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)
 {
diff -r d7c3b12014b3 -r 2b0cbf3ef83f xen/arch/ia64/xen/crash.c
--- a/xen/arch/ia64/xen/crash.c Thu Sep 27 15:10:42 2007 -0600
+++ b/xen/arch/ia64/xen/crash.c Thu Sep 27 15:12:58 2007 -0600
@@ -30,6 +30,7 @@ void machine_crash_shutdown(void)
     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
diff -r d7c3b12014b3 -r 2b0cbf3ef83f xen/arch/ia64/xen/machine_kexec.c
--- a/xen/arch/ia64/xen/machine_kexec.c Thu Sep 27 15:10:42 2007 -0600
+++ b/xen/arch/ia64/xen/machine_kexec.c Thu Sep 27 15:12:58 2007 -0600
@@ -85,6 +85,7 @@ static void ia64_machine_kexec(struct un
 
 void machine_kexec(xen_kexec_image_t *image)
 {
+       kexec_disable_iosapic();
        unw_init_running(ia64_machine_kexec, image);
        for(;;);
 }
diff -r d7c3b12014b3 -r 2b0cbf3ef83f xen/include/xen/kexec.h
--- a/xen/include/xen/kexec.h   Thu Sep 27 15:10:42 2007 -0600
+++ b/xen/include/xen/kexec.h   Thu Sep 27 15:12:58 2007 -0600
@@ -27,6 +27,7 @@ void machine_reboot_kexec(xen_kexec_imag
 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);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [IA64] Kexec: Add kexec_disable_iosapic, Xen patchbot-unstable <=