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-ia64-devel

[Xen-ia64-devel] [PATCH][PVOPS] remove VMX_GUEST/is_inital_xendomain() c

To: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Subject: [Xen-ia64-devel] [PATCH][PVOPS] remove VMX_GUEST/is_inital_xendomain() code
From: Alex Williamson <alex.williamson@xxxxxx>
Date: Mon, 17 Mar 2008 13:56:23 -0600
Cc: xen-ia64-devel <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 17 Mar 2008 12:56:33 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: OSLO R&D
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi Isaku,

   This removes some obvious unused code in the
xen-ia64-domu-minimal-2008mar06 branch.  I'm afraid this kind of stuff
will only get in the way for people reviewing domU-only changes.
Thanks,

        Alex

Signed-off-by: Alex Williamson <alex.williamson@xxxxxx>
---

arch/ia64/xen/irq_xen.c           |   10 ----
arch/ia64/xen/xen_pv_ops.c        |   80 +-------------------------------------
arch/ia64/xen/xencomm.c           |    8 ---
include/asm-ia64/xen/hypervisor.h |   29 +++----------
4 files changed, 12 insertions(+), 115 deletions(-)

diff --git a/arch/ia64/xen/irq_xen.c b/arch/ia64/xen/irq_xen.c
index 57fab2b..1c6c77b 100644
--- a/arch/ia64/xen/irq_xen.c
+++ b/arch/ia64/xen/irq_xen.c
@@ -407,15 +407,6 @@ xen_init_IRQ_early(void)
 #endif
 }
 
-static void __init
-xen_init_IRQ_late(void)
-{
-#ifdef CONFIG_XEN_PRIVILEGED_GUEST
-       if (is_running_on_xen() && !ia64_platform_is("xen"))
-               xen_irq_init();
-#endif
-}
-
 static void
 xen_resend_irq(unsigned int vector)
 {
@@ -424,7 +415,6 @@ xen_resend_irq(unsigned int vector)
 
 const struct pv_irq_ops xen_irq_ops __initdata = {
        .init_IRQ_early = xen_init_IRQ_early,
-       .init_IRQ_late = xen_init_IRQ_late,
 
        .assign_irq_vector = xen_assign_irq_vector,
        .free_irq_vector = xen_free_irq_vector,
diff --git a/arch/ia64/xen/xen_pv_ops.c b/arch/ia64/xen/xen_pv_ops.c
index 93a5c64..2a1b485 100644
--- a/arch/ia64/xen/xen_pv_ops.c
+++ b/arch/ia64/xen/xen_pv_ops.c
@@ -134,76 +134,18 @@ xen_arch_setup_early(void)
 static void __init
 xen_arch_setup_console(char **cmdline_p)
 {
-       /*
-        * If a console= is NOT specified, we assume using the
-        * xencons console is desired.  By default, this is xvc0
-        * for both dom0 and domU.
-        */
-       if (!strstr(*cmdline_p, "console=")) {
-               char *p, *q, name[5] = "xvc";
-               int offset = 0;
-
-#if defined(CONFIG_VGA_CONSOLE)
-               /*
-                * conswitchp might be set intelligently from the
-                * PCDP code.  If set to VGA console, use it.
-                */
-               if (is_initial_xendomain() && conswitchp == &vga_con)
-                       strncpy(name, "tty", 3);
-#endif
-
-               p = strstr(*cmdline_p, "xencons=");
-
-               if (p) {
-                       p += 8;
-                       if (!strncmp(p, "ttyS", 4)) {
-                               strncpy(name, p, 4);
-                               p += 4;
-                               offset = simple_strtol(p, &q, 10);
-                               if (p == q)
-                                       offset = 0;
-                       } else if (!strncmp(p, "tty", 3) ||
-                                  !strncmp(p, "xvc", 3)) {
-                               strncpy(name, p, 3);
-                               p += 3;
-                               offset = simple_strtol(p, &q, 10);
-                               if (p == q)
-                                       offset = 0;
-                       } else if (!strncmp(p, "off", 3))
-                               offset = -1;
-               }
-
-               if (offset >= 0)
-                       add_preferred_console(name, offset, NULL);
-       } else if (!is_initial_xendomain()) {
-               /* use hvc_xen */
-               add_preferred_console("hvc", 0, NULL);
-       }
+       /* use hvc_xen */
+       add_preferred_console("hvc", 0, NULL);
 
 #if !defined(CONFIG_VT) || !defined(CONFIG_DUMMY_CONSOLE)
-       if (!is_initial_xendomain()) {
-               conswitchp = NULL;
-       }
+       conswitchp = NULL;
 #endif
 }
 
 static int __init
 xen_arch_setup_nomca(void)
 {
-       if (!is_initial_xendomain())
-               return 1;
-       return 0;
-}
-
-static void __init
-xen_post_platform_setup(void)
-{
-#ifdef CONFIG_XEN_PRIVILEGED_GUEST
-       if (is_running_on_xen() && !ia64_platform_is("xen")) {
-               extern ia64_mv_setup_t xen_setup;
-               xen_setup(cmdline_p);
-       }
-#endif
+       return 1;
 }
 
 static void __init
@@ -217,17 +159,6 @@ xen_post_paging_init(void)
 }
 
 static void __init
-__xen_cpu_init(void)
-{
-#ifdef CONFIG_XEN_PRIVILEGED_GUEST
-       if (is_running_on_xen() && !ia64_platform_is("xen")) {
-               extern ia64_mv_cpu_init_t xen_cpu_init;
-               xen_cpu_init();
-       }
-#endif
-}
-
-static void __init
 xen_post_smp_prepare_boot_cpu(void)
 {
        xen_setup_vcpu_info_placement();
@@ -241,11 +172,8 @@ static const struct pv_init_ops xen_init_ops __initdata = {
        .arch_setup_early = xen_arch_setup_early,
        .arch_setup_console = xen_arch_setup_console,
        .arch_setup_nomca = xen_arch_setup_nomca,
-       .post_platform_setup = xen_post_platform_setup,
        .post_paging_init = xen_post_paging_init,
 
-       .cpu_init = __xen_cpu_init,
-
        .post_smp_prepare_boot_cpu = xen_post_smp_prepare_boot_cpu,
 
        .bundle_patch_module = &xen_alt_bundle_patch_module,
diff --git a/arch/ia64/xen/xencomm.c b/arch/ia64/xen/xencomm.c
index 6e9da66..f40f344 100644
--- a/arch/ia64/xen/xencomm.c
+++ b/arch/ia64/xen/xencomm.c
@@ -39,10 +39,8 @@ xencomm_initialize(void)
 unsigned long
 xencomm_vtop(unsigned long vaddr)
 {
-#ifndef CONFIG_VMX_GUEST
        struct page *page;
        struct vm_area_struct *vma;
-#endif
 
        if (vaddr == 0)
                return 0;
@@ -88,11 +86,6 @@ xencomm_vtop(unsigned long vaddr)
                return __pa(vaddr);
        }
 
-
-#ifdef CONFIG_VMX_GUEST
-       /* No privcmd within vmx guest.  */
-       return ~0UL;
-#else
        /* XXX double-check (lack of) locking */
        vma = find_extend_vma(current->mm, vaddr);
        if (!vma)
@@ -104,5 +97,4 @@ xencomm_vtop(unsigned long vaddr)
                return ~0UL;
 
        return (page_to_pfn(page) << PAGE_SHIFT) | (vaddr & ~PAGE_MASK);
-#endif
 }
diff --git a/include/asm-ia64/xen/hypervisor.h 
b/include/asm-ia64/xen/hypervisor.h
index 3c93109..277bf33 100644
--- a/include/asm-ia64/xen/hypervisor.h
+++ b/include/asm-ia64/xen/hypervisor.h
@@ -36,17 +36,8 @@
 #ifdef CONFIG_XEN
 /* running_on_xen is set before executing any C code by early_xen_setup */
 extern const int running_on_xen;
-#define is_running_on_xen()                    (running_on_xen)
-#else /* CONFIG_XEN */
-# ifdef CONFIG_VMX_GUEST
-#  define is_running_on_xen()                  (1)
-# else /* CONFIG_VMX_GUEST */
-#  define is_running_on_xen()                  (0)
-#  define HYPERVISOR_ioremap(offset, size)     (offset)
-# endif /* CONFIG_VMX_GUEST */
-#endif /* CONFIG_XEN */
-
-#if defined(CONFIG_XEN) || defined(CONFIG_VMX_GUEST)
+# define is_running_on_xen()                   (running_on_xen)
+
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/version.h>
@@ -60,9 +51,7 @@ extern const int running_on_xen;
 #include <asm/ptrace.h>
 #include <asm/page.h>
 #include <asm/percpu.h>
-#ifdef CONFIG_XEN
 #include <asm/xen/hypercall.h>
-#endif
 
 extern struct shared_info *HYPERVISOR_shared_info;
 extern struct start_info *xen_start_info;
@@ -125,7 +114,6 @@ HYPERVISOR_poll(
        return rc;
 }
 
-#ifndef CONFIG_VMX_GUEST
 /* for drivers/xen/privcmd/privcmd.c */
 #define machine_to_phys_mapping 0
 struct vm_area_struct;
@@ -183,7 +171,6 @@ void xen_post_suspend(int suspend_cancelled);
 
 /* For setup_arch() in arch/ia64/kernel/setup.c */
 void xen_ia64_enable_opt_feature(void);
-#endif /* !CONFIG_VMX_GUEST */
 
 #define __pte_ma(_x)   ((pte_t) {(_x)})        /* unmodified use */
 #define mfn_pte(_x, _y)        __pte_ma(0)             /* unmodified use */
@@ -237,13 +224,13 @@ MULTI_mmu_update(struct multicall_entry *mcl, struct 
mmu_update *req,
                (-ENOSYS);                                              \
        })
 
-#endif /* CONFIG_XEN || CONFIG_VMX_GUEST */
+#else /* CONFIG_XEN */
+
+#define is_running_on_xen()                    (0)
+#define HYPERVISOR_ioremap(offset, size)       (offset)
 
-#ifdef CONFIG_XEN_PRIVILEGED_GUEST
-#define is_initial_xendomain()                                         \
-       (is_running_on_xen() ? xen_start_info->flags & SIF_INITDOMAIN : 0)
-#else
-#define is_initial_xendomain() 0
 #endif
 
+#define is_initial_xendomain()                 (0)
+
 #endif /* _ASM_IA64_XEN_HYPERVISOR_H */



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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-ia64-devel] [PATCH][PVOPS] remove VMX_GUEST/is_inital_xendomain() code, Alex Williamson <=