[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-ia64-devel] [PATCH][PVOPS] No MCA support



Hi Isaku,

   I believe this MCA/xencomm code is for dom0, not domU, so we can
remove it for now.  Thanks,

        Alex

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

 arch/ia64/kernel/mca.c     |   22 ----------------------
 arch/ia64/kernel/salinfo.c |   44 --------------------------------------------
 include/asm-ia64/sal.h     |   36 ------------------------------------
 3 files changed, 102 deletions(-)

diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c
index 94f1023..6e17aed 100644
--- a/arch/ia64/kernel/mca.c
+++ b/arch/ia64/kernel/mca.c
@@ -339,33 +339,11 @@ typedef struct ia64_state_log_s
 
 static ia64_state_log_t ia64_state_log[IA64_MAX_LOG_TYPES];
 
-#ifdef CONFIG_XEN
-DEFINE_SPINLOCK(ia64_mca_xencomm_lock);
-LIST_HEAD(ia64_mca_xencomm_list);
-
-#define IA64_MCA_XENCOMM_ALLOCATE(rec, desc) \
-       if (is_running_on_xen()) { \
-               ia64_mca_xencomm_t *entry; \
-               entry = alloc_bootmem(sizeof(ia64_mca_xencomm_t)); \
-               entry->record = rec; \
-               entry->handle = desc; \
-               list_add(&entry->list, &ia64_mca_xencomm_list); \
-       }
-#define IA64_LOG_ALLOCATE(it, size) \
-       {ia64_err_rec_t *rec; \
-       ia64_state_log[it].isl_log[IA64_LOG_CURR_INDEX(it)] = rec = \
-               (ia64_err_rec_t *)alloc_bootmem(size); \
-       IA64_MCA_XENCOMM_ALLOCATE(rec, xencomm_map(rec, size)); \
-       ia64_state_log[it].isl_log[IA64_LOG_NEXT_INDEX(it)] = rec = \
-               (ia64_err_rec_t *)alloc_bootmem(size); \
-       IA64_MCA_XENCOMM_ALLOCATE(rec, xencomm_map(rec, size));}
-#else
 #define IA64_LOG_ALLOCATE(it, size) \
        {ia64_state_log[it].isl_log[IA64_LOG_CURR_INDEX(it)] = \
                (ia64_err_rec_t *)alloc_bootmem(size); \
        ia64_state_log[it].isl_log[IA64_LOG_NEXT_INDEX(it)] = \
                (ia64_err_rec_t *)alloc_bootmem(size);}
-#endif
 #define IA64_LOG_LOCK_INIT(it) spin_lock_init(&ia64_state_log[it].isl_lock)
 #define IA64_LOG_LOCK(it)      spin_lock_irqsave(&ia64_state_log[it].isl_lock, 
s)
 #define IA64_LOG_UNLOCK(it)    
spin_unlock_irqrestore(&ia64_state_log[it].isl_lock,s)
diff --git a/arch/ia64/kernel/salinfo.c b/arch/ia64/kernel/salinfo.c
index 91bc631..779c3cc 100644
--- a/arch/ia64/kernel/salinfo.c
+++ b/arch/ia64/kernel/salinfo.c
@@ -378,25 +378,6 @@ salinfo_log_open(struct inode *inode, struct file *file)
                data->open = 0;
                return -ENOMEM;
        }
-#ifdef CONFIG_XEN
-       if (is_running_on_xen()) {
-               ia64_mca_xencomm_t *entry;
-               unsigned long flags;
-
-               entry = vmalloc(sizeof(ia64_mca_xencomm_t));
-               if (!entry) {
-                       data->open = 0;
-                       vfree(data->log_buffer);
-                       return -ENOMEM;
-               }
-               entry->record = data->log_buffer;
-               entry->handle = xencomm_map(data->log_buffer,
-                                       
ia64_sal_get_state_info_size(data->type));
-               spin_lock_irqsave(&ia64_mca_xencomm_lock, flags);
-               list_add(&entry->list, &ia64_mca_xencomm_list);
-               spin_unlock_irqrestore(&ia64_mca_xencomm_lock, flags);
-       }
-#endif
 
        return 0;
 }
@@ -408,31 +389,6 @@ salinfo_log_release(struct inode *inode, struct file *file)
        struct salinfo_data *data = entry->data;
 
        if (data->state == STATE_NO_DATA) {
-#ifdef CONFIG_XEN
-               if (is_running_on_xen()) {
-                       struct list_head *pos, *n;
-                       ia64_mca_xencomm_t *found_entry = NULL;
-                       unsigned long flags;
-
-                       spin_lock_irqsave(&ia64_mca_xencomm_lock, flags);
-                       list_for_each_safe(pos, n, &ia64_mca_xencomm_list) {
-                               ia64_mca_xencomm_t *entry;
-
-                               entry = list_entry(pos, ia64_mca_xencomm_t,
-                                                  list);
-                               if (entry->record == data->log_buffer) {
-                                       list_del(&entry->list);
-                                       found_entry = entry;
-                                       break;
-                               }
-                       }
-                       spin_unlock_irqrestore(&ia64_mca_xencomm_lock, flags);
-                       if (found_entry) {
-                               xencomm_free(found_entry->handle);
-                               vfree(found_entry);
-                       }
-               }
-#endif
                vfree(data->log_buffer);
                vfree(data->oemdata);
                data->log_buffer = NULL;
diff --git a/include/asm-ia64/sal.h b/include/asm-ia64/sal.h
index 2965112..f4904db 100644
--- a/include/asm-ia64/sal.h
+++ b/include/asm-ia64/sal.h
@@ -42,9 +42,6 @@
 #include <asm/pal.h>
 #include <asm/system.h>
 #include <asm/fpu.h>
-#ifdef CONFIG_XEN
-#include <asm/xen/xencomm.h>
-#endif
 
 extern spinlock_t sal_lock;
 
@@ -682,43 +679,10 @@ ia64_sal_clear_state_info (u64 sal_info_type)
 /* Get the processor and platform information logged by SAL with respect to 
the machine
  * state at the time of the MCAs, INITs, CMCs, or CPEs.
  */
-#ifdef CONFIG_XEN
-static inline u64 ia64_sal_get_state_info_size (u64 sal_info_type);
-typedef struct ia64_mca_xencomm_t {
-       void *record;
-       struct xencomm_handle *handle;
-       struct list_head list;
-} ia64_mca_xencomm_t;
-extern struct list_head ia64_mca_xencomm_list;
-extern spinlock_t ia64_mca_xencomm_lock;
-#endif
-
 static inline u64
 ia64_sal_get_state_info (u64 sal_info_type, u64 *sal_info)
 {
        struct ia64_sal_retval isrv;
-#ifdef CONFIG_XEN
-       if (is_running_on_xen()) {
-               ia64_mca_xencomm_t *entry;
-               struct xencomm_handle *desc = NULL;
-               unsigned long flags;
-
-               spin_lock_irqsave(&ia64_mca_xencomm_lock, flags);
-               list_for_each_entry(entry, &ia64_mca_xencomm_list, list) {
-                       if (entry->record == sal_info) {
-                               desc = entry->handle;
-                               break;
-                       }
-               }
-               spin_unlock_irqrestore(&ia64_mca_xencomm_lock, flags);
-
-               if (desc == NULL)
-                       return 0;
-
-               SAL_CALL_REENTRANT(isrv, SAL_GET_STATE_INFO, sal_info_type, 0,
-                                  desc, 0, 0, 0, 0);
-       } else
-#endif
        SAL_CALL_REENTRANT(isrv, SAL_GET_STATE_INFO, sal_info_type, 0,
                      sal_info, 0, 0, 0, 0);
        if (isrv.status)



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.