xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ia64 build fixes
@ 2006-03-31 23:44 Alex Williamson
  2006-04-01 10:10 ` Keir Fraser
  0 siblings, 1 reply; 8+ messages in thread
From: Alex Williamson @ 2006-03-31 23:44 UTC (permalink / raw)
  To: Keir Fraser; +Cc: xen-devel, xen-ia64-devel


   Include features header in xenbus_probe and build features.c

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

diff -r d76a7a40f3a9 linux-2.6-xen-sparse/arch/ia64/xen/drivers/coreMakefile
--- a/linux-2.6-xen-sparse/arch/ia64/xen/drivers/coreMakefile	Fri Mar 31 17:44:26 2006 +0100
+++ b/linux-2.6-xen-sparse/arch/ia64/xen/drivers/coreMakefile	Fri Mar 31 16:31:41 2006 -0700
@@ -10,7 +10,7 @@ CPPFLAGS_vmlinux.lds += -U$(XENARCH)
 	@ln -fsn $(srctree)/arch/$(XENARCH)/kernel/vmlinux.lds.S $@
 
 
-obj-y   := gnttab.o
+obj-y   := gnttab.o features.o
 obj-$(CONFIG_PROC_FS) += xen_proc.o
 
 ifeq ($(ARCH),ia64)
diff -r d76a7a40f3a9 linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c
--- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c	Fri Mar 31 17:44:26 2006 +0100
+++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c	Fri Mar 31 16:31:41 2006 -0700
@@ -49,6 +49,7 @@
 #include <xen/xenbus.h>
 #include <xen/xen_proc.h>
 #include <xen/evtchn.h>
+#include <xen/features.h>
 
 #include "xenbus_comms.h"

^ permalink raw reply	[flat|nested] 8+ messages in thread
* [PATCH] ia64: build fixes
@ 2010-05-04 16:04 Jan Beulich
  0 siblings, 0 replies; 8+ messages in thread
From: Jan Beulich @ 2010-05-04 16:04 UTC (permalink / raw)
  To: xen-devel; +Cc: xen-ia64-devel

[-- Attachment #1: Type: text/plain, Size: 3813 bytes --]

Signed-off-by: Jan Beulich <jbeulich@novell.com>

--- 2010-05-04.orig/xen/arch/ia64/xen/dom0_ops.c	2010-01-21 15:36:53.000000000 +0100
+++ 2010-05-04/xen/arch/ia64/xen/dom0_ops.c	2010-05-04 14:03:40.000000000 +0200
@@ -735,20 +735,13 @@ long arch_do_sysctl(xen_sysctl_t *op, XE
     {
     case XEN_SYSCTL_physinfo:
     {
-        int i;
-        uint32_t max_array_ent;
-        XEN_GUEST_HANDLE_64(uint32) cpu_to_node_arr;
-
         xen_sysctl_physinfo_t *pi = &op->u.physinfo;
 
-        max_array_ent = pi->max_cpu_id;
-        cpu_to_node_arr = pi->cpu_to_node;
-
         memset(pi, 0, sizeof(*pi));
-        pi->cpu_to_node = cpu_to_node_arr;
         pi->threads_per_core = cpus_weight(per_cpu(cpu_sibling_map, 0));
         pi->cores_per_socket =
             cpus_weight(per_cpu(cpu_core_map, 0)) / pi->threads_per_core;
+        pi->nr_nodes         = (u32)num_online_nodes();
         pi->nr_cpus          = (u32)num_online_cpus();
         pi->total_pages      = total_pages; 
         pi->free_pages       = avail_domheap_pages();
@@ -757,21 +750,55 @@ long arch_do_sysctl(xen_sysctl_t *op, XE
 
         pi->max_node_id = last_node(node_online_map);
         pi->max_cpu_id = last_cpu(cpu_online_map);
-        max_array_ent = min_t(uint32_t, max_array_ent, pi->max_cpu_id);
 
-        ret = 0;
+        if ( copy_field_to_guest(u_sysctl, op, u.physinfo) )
+            ret = -EFAULT;
+    }
+    break;
+
+    case XEN_SYSCTL_topologyinfo:
+    {
+        xen_sysctl_topologyinfo_t *ti = &op->u.topologyinfo;
+        XEN_GUEST_HANDLE_64(uint32) arr;
+        uint32_t i, val, max_array_ent = ti->max_cpu_index;
+
+        ti->max_cpu_index = last_cpu(cpu_online_map);
+        max_array_ent = min(max_array_ent, ti->max_cpu_index);
+
+        arr = ti->cpu_to_core;
+        if ( !guest_handle_is_null(arr) )
+        {
+            for ( i = 0; ret == 0 && i <= max_array_ent; i++ )
+            {
+                val = cpu_online(i) ? cpu_to_core(i) : ~0u;
+                if ( copy_to_guest_offset(arr, i, &val, 1) )
+                    ret = -EFAULT;
+            }
+        }
+
+        arr = ti->cpu_to_socket;
+        if ( !guest_handle_is_null(arr) )
+        {
+            for ( i = 0; ret == 0 && i <= max_array_ent; i++ )
+            {
+                val = cpu_online(i) ? cpu_to_socket(i) : ~0u;
+                if ( copy_to_guest_offset(arr, i, &val, 1) )
+                    ret = -EFAULT;
+            }
+        }
 
-        if (!guest_handle_is_null(cpu_to_node_arr)) {
-            for (i = 0; i <= max_array_ent; i++) {
-                uint32_t node = cpu_online(i) ? cpu_to_node(i) : ~0u;
-                if (copy_to_guest_offset(cpu_to_node_arr, i, &node, 1)) {
+        arr = ti->cpu_to_node;
+        if ( !guest_handle_is_null(arr) )
+        {
+            for ( i = 0; ret == 0 && i <= max_array_ent; i++ )
+            {
+                val = cpu_online(i) ? cpu_to_node(i) : ~0u;
+                if ( copy_to_guest_offset(arr, i, &val, 1) )
                     ret = -EFAULT;
-                    break;
-                }
             }
         }
 
-        if ( copy_to_guest(u_sysctl, op, 1) )
+        if ( copy_field_to_guest(u_sysctl, op, u.topologyinfo.max_cpu_index) )
             ret = -EFAULT;
     }
     break;
--- 2010-05-04.orig/xen/common/domain.c	2010-04-22 14:43:25.000000000 +0200
+++ 2010-05-04/xen/common/domain.c	2010-05-04 13:34:25.000000000 +0200
@@ -625,8 +625,10 @@ static void complete_domain_destroy(stru
 
     xfree(d->pirq_mask);
     xfree(d->pirq_to_evtchn);
+#ifdef dom_vmce
     xfree(dom_vmce(d)->mci_ctl);
     xfree(dom_vmce(d));
+#endif
 
     xsm_free_security_domain(d);
     free_domain_struct(d);




[-- Attachment #2: ia64-build-fixes.patch --]
[-- Type: text/plain, Size: 3807 bytes --]

Signed-off-by: Jan Beulich <jbeulich@novell.com>

--- 2010-05-04.orig/xen/arch/ia64/xen/dom0_ops.c	2010-01-21 15:36:53.000000000 +0100
+++ 2010-05-04/xen/arch/ia64/xen/dom0_ops.c	2010-05-04 14:03:40.000000000 +0200
@@ -735,20 +735,13 @@ long arch_do_sysctl(xen_sysctl_t *op, XE
     {
     case XEN_SYSCTL_physinfo:
     {
-        int i;
-        uint32_t max_array_ent;
-        XEN_GUEST_HANDLE_64(uint32) cpu_to_node_arr;
-
         xen_sysctl_physinfo_t *pi = &op->u.physinfo;
 
-        max_array_ent = pi->max_cpu_id;
-        cpu_to_node_arr = pi->cpu_to_node;
-
         memset(pi, 0, sizeof(*pi));
-        pi->cpu_to_node = cpu_to_node_arr;
         pi->threads_per_core = cpus_weight(per_cpu(cpu_sibling_map, 0));
         pi->cores_per_socket =
             cpus_weight(per_cpu(cpu_core_map, 0)) / pi->threads_per_core;
+        pi->nr_nodes         = (u32)num_online_nodes();
         pi->nr_cpus          = (u32)num_online_cpus();
         pi->total_pages      = total_pages; 
         pi->free_pages       = avail_domheap_pages();
@@ -757,21 +750,55 @@ long arch_do_sysctl(xen_sysctl_t *op, XE
 
         pi->max_node_id = last_node(node_online_map);
         pi->max_cpu_id = last_cpu(cpu_online_map);
-        max_array_ent = min_t(uint32_t, max_array_ent, pi->max_cpu_id);
 
-        ret = 0;
+        if ( copy_field_to_guest(u_sysctl, op, u.physinfo) )
+            ret = -EFAULT;
+    }
+    break;
+
+    case XEN_SYSCTL_topologyinfo:
+    {
+        xen_sysctl_topologyinfo_t *ti = &op->u.topologyinfo;
+        XEN_GUEST_HANDLE_64(uint32) arr;
+        uint32_t i, val, max_array_ent = ti->max_cpu_index;
+
+        ti->max_cpu_index = last_cpu(cpu_online_map);
+        max_array_ent = min(max_array_ent, ti->max_cpu_index);
+
+        arr = ti->cpu_to_core;
+        if ( !guest_handle_is_null(arr) )
+        {
+            for ( i = 0; ret == 0 && i <= max_array_ent; i++ )
+            {
+                val = cpu_online(i) ? cpu_to_core(i) : ~0u;
+                if ( copy_to_guest_offset(arr, i, &val, 1) )
+                    ret = -EFAULT;
+            }
+        }
+
+        arr = ti->cpu_to_socket;
+        if ( !guest_handle_is_null(arr) )
+        {
+            for ( i = 0; ret == 0 && i <= max_array_ent; i++ )
+            {
+                val = cpu_online(i) ? cpu_to_socket(i) : ~0u;
+                if ( copy_to_guest_offset(arr, i, &val, 1) )
+                    ret = -EFAULT;
+            }
+        }
 
-        if (!guest_handle_is_null(cpu_to_node_arr)) {
-            for (i = 0; i <= max_array_ent; i++) {
-                uint32_t node = cpu_online(i) ? cpu_to_node(i) : ~0u;
-                if (copy_to_guest_offset(cpu_to_node_arr, i, &node, 1)) {
+        arr = ti->cpu_to_node;
+        if ( !guest_handle_is_null(arr) )
+        {
+            for ( i = 0; ret == 0 && i <= max_array_ent; i++ )
+            {
+                val = cpu_online(i) ? cpu_to_node(i) : ~0u;
+                if ( copy_to_guest_offset(arr, i, &val, 1) )
                     ret = -EFAULT;
-                    break;
-                }
             }
         }
 
-        if ( copy_to_guest(u_sysctl, op, 1) )
+        if ( copy_field_to_guest(u_sysctl, op, u.topologyinfo.max_cpu_index) )
             ret = -EFAULT;
     }
     break;
--- 2010-05-04.orig/xen/common/domain.c	2010-04-22 14:43:25.000000000 +0200
+++ 2010-05-04/xen/common/domain.c	2010-05-04 13:34:25.000000000 +0200
@@ -625,8 +625,10 @@ static void complete_domain_destroy(stru
 
     xfree(d->pirq_mask);
     xfree(d->pirq_to_evtchn);
+#ifdef dom_vmce
     xfree(dom_vmce(d)->mci_ctl);
     xfree(dom_vmce(d));
+#endif
 
     xsm_free_security_domain(d);
     free_domain_struct(d);

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 8+ messages in thread
* [PATCH] ia64 build fixes
@ 2006-03-14  4:56 Alex Williamson
  0 siblings, 0 replies; 8+ messages in thread
From: Alex Williamson @ 2006-03-14  4:56 UTC (permalink / raw)
  To: Keir Fraser; +Cc: xen-devel, xen-ia64-devel

Keir,

   The patch below is necessary to get ia64 building on current
xen-unstable.hg.  Thanks,

	Alex

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

diff -r 3983e4f1b054 xen/arch/ia64/Rules.mk
--- a/xen/arch/ia64/Rules.mk	Sun Mar 12 10:03:33 2006 +0100
+++ b/xen/arch/ia64/Rules.mk	Mon Mar 13 09:36:01 2006 -0700
@@ -12,7 +12,7 @@ CPPFLAGS  += -I$(BASEDIR)/include -I$(BA
 	     -I$(BASEDIR)/include/asm-ia64/linux-null 			\
              -I$(BASEDIR)/arch/ia64/linux -I$(BASEDIR)/arch/ia64/linux-xen
 
-CFLAGS  := -nostdinc -fno-builtin -fno-common -fno-strict-aliasing
+CFLAGS  += -nostdinc -fno-builtin -fno-common -fno-strict-aliasing
 #CFLAGS  += -O3		# -O3 over-inlines making debugging tough!
 CFLAGS  += -O2		# but no optimization causes compile errors!
 #CFLAGS  += -iwithprefix include -Wall -DMONITOR_BASE=$(MONITOR_BASE)
diff -r 3983e4f1b054 xen/include/asm-ia64/xensystem.h
--- a/xen/include/asm-ia64/xensystem.h	Sun Mar 12 10:03:33 2006 +0100
+++ b/xen/include/asm-ia64/xensystem.h	Mon Mar 13 09:36:02 2006 -0700
@@ -75,5 +75,7 @@ extern struct task_struct *vmx_ia64_swit
 // FIXME SMP... see system.h, does this need to be different?
 #define switch_to(prev,next,last)	__switch_to(prev, next, last)
 
+#define local_irq_is_enabled() (!irqs_disabled())
+
 #endif // __ASSEMBLY__
 #endif // _ASM_IA64_XENSYSTEM_H

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-05-04 16:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-31 23:44 [PATCH] ia64 build fixes Alex Williamson
2006-04-01 10:10 ` Keir Fraser
2006-04-01 21:46   ` Alex Williamson
2006-04-02  8:20     ` Keir Fraser
2006-04-02  8:31       ` Keir Fraser
2006-04-02  8:37       ` Ian Campbell
  -- strict thread matches above, loose matches on Subject: below --
2010-05-04 16:04 [PATCH] ia64: " Jan Beulich
2006-03-14  4:56 [PATCH] ia64 " Alex Williamson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).