summaryrefslogtreecommitdiff
path: root/xen
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2020-03-29 13:17:46 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2020-03-29 13:21:25 +0200
commit86156357706b3c741c6b5feda1d36d8687c660de (patch)
tree35fa025a58f2489827d1afb275a632465fbb7daf /xen
parent1e90662dd80c64de27b432c9d6911fad937da804 (diff)
64bit: fix warnings
* device/net_io.h (net_set_filter, ethernet_priority): Add prototypes. * device/subrs.h: Include <device/if_hdr.h>. (if_init_queues): Add prototype. * i386/i386/model_dep.h (machine_relax): Add prototype. * i386/i386/trap.c (i386_astintr): Move mycpu variable definition to where it is used. * i386/i386at/model_dep.c (i386at_init): Likewise for nb_direct, addr, delta. * i386/xen/xen.c (return_to_iret): Change type to char[]. * xen/console.c: Include <i386at/kd.h>. * xen/evt.c (hyp_evt_handler): Cast NEVNT to int. * xen/grant.c: Include <model_dep.h>. (hyp_grant_takeback, hyp_grant_init): Fix print format. * xen/net.c: Include <device/subrs.h>. (paranoia): Remove variable. (hyp_net_init, device_close, device_open): Cast nd - vif_data to int. Fix print format. * xen/store.c (store_put): Cast sizeof to int. * xen/time.c: Include "xen.h". * xen/xen.h (hypclock_machine_intr): Add prototype.
Diffstat (limited to 'xen')
-rw-r--r--xen/console.c1
-rw-r--r--xen/evt.c2
-rw-r--r--xen/grant.c5
-rw-r--r--xen/net.c16
-rw-r--r--xen/store.c2
-rw-r--r--xen/time.c1
-rw-r--r--xen/xen.h2
7 files changed, 16 insertions, 13 deletions
diff --git a/xen/console.c b/xen/console.c
index e5aeb186..4907903e 100644
--- a/xen/console.c
+++ b/xen/console.c
@@ -16,6 +16,7 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include <i386at/kd.h>
#include <sys/types.h>
#include <device/tty.h>
#include <device/cons.h>
diff --git a/xen/evt.c b/xen/evt.c
index ae7e5d7a..296101aa 100644
--- a/xen/evt.c
+++ b/xen/evt.c
@@ -106,7 +106,7 @@ void hyp_intrinit() {
void hyp_evt_handler(evtchn_port_t port, void (*handler)(), int unit, spl_t spl) {
if (port > NEVNT)
- panic("event channel port %d > %d not supported\n", port, NEVNT);
+ panic("event channel port %d > %d not supported\n", port, (int) NEVNT);
intpri[port] = spl;
iunit[port] = unit;
form_int_mask();
diff --git a/xen/grant.c b/xen/grant.c
index ae3a7bfc..6715a374 100644
--- a/xen/grant.c
+++ b/xen/grant.c
@@ -16,6 +16,7 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include <model_dep.h>
#include <sys/types.h>
#include <mach/vm_param.h>
#include <machine/spl.h>
@@ -99,7 +100,7 @@ void hyp_grant_takeback(grant_ref_t grant) {
simple_lock(&lock);
if (grants[grant].flags & (GTF_reading|GTF_writing))
- panic("grant %d still in use (%lx)\n", grant, grants[grant].flags);
+ panic("grant %d still in use (%x)\n", grant, grants[grant].flags);
/* Note: this is not safe, a cmpxchg is needed, see grant_table.h */
grants[grant].flags = 0;
@@ -128,7 +129,7 @@ void hyp_grant_init(void) {
ret = hyp_grant_table_op(GNTTABOP_setup_table, kvtolin(&setup), 1);
if (ret)
- panic("setup grant table error %d", ret);
+ panic("setup grant table error %ld", ret);
if (setup.status)
panic("setup grant table: %d\n", setup.status);
diff --git a/xen/net.c b/xen/net.c
index 11121387..1dc2209e 100644
--- a/xen/net.c
+++ b/xen/net.c
@@ -30,6 +30,7 @@
#include <device/device_reply.user.h>
#include <device/device_emul.h>
#include <device/ds_routines.h>
+#include <device/subrs.h>
#include <intel/pmap.h>
#include <xen/public/io/netif.h>
#include <xen/public/memory.h>
@@ -48,9 +49,6 @@
#define ADDRESS_SIZE 6
#define WINDOW __RING_SIZE((netif_rx_sring_t*)0, PAGE_SIZE)
-/* Are we paranoid enough to not leak anything to backend? */
-static const int paranoia = 0;
-
struct net_data {
struct device device;
struct ifnet ifnet;
@@ -458,7 +456,7 @@ void hyp_net_init(void) {
c = hyp_store_write(0, hyp_store_state_connected, 5, VIF_PATH, "/", nd->vif, "/", "state");
if (!c)
- panic("couldn't store state for eth%d (%s)", nd - vif_data, hyp_store_error);
+ panic("couldn't store state for eth%d (%s)", (int) (nd - vif_data), hyp_store_error);
kfree((vm_offset_t) c, strlen(c)+1);
while(1) {
@@ -478,7 +476,7 @@ void hyp_net_init(void) {
nd->rx_buf_pfn[i] = atop(addr);
if (!nd->rx_copy) {
if (hyp_do_update_va_mapping(kvtolin(nd->rx_buf[i]), 0, UVMF_INVLPG|UVMF_ALL))
- panic("eth: couldn't clear rx kv buf %d at %p", i, addr);
+ panic("eth: couldn't clear rx kv buf %d at %lx", i, addr);
}
/* and enqueue it to backend. */
enqueue_rx_buf(nd, i);
@@ -526,8 +524,8 @@ device_close(void *devp)
{
struct net_data *nd = devp;
if (--nd->open_count < 0)
- panic("too many closes on eth%d", nd - vif_data);
- printf("close, eth%d count %d\n",nd-vif_data,nd->open_count);
+ panic("too many closes on eth%d", (int) (nd - vif_data));
+ printf("close, eth%d count %d\n", (int) (nd - vif_data), nd->open_count);
if (nd->open_count)
return 0;
ipc_kobject_set(nd->port, IKO_NULL, IKOT_NONE);
@@ -560,12 +558,12 @@ device_open (ipc_port_t reply_port, mach_msg_type_name_t reply_port_type,
if (nd->open_count >= 0) {
*devp = &nd->device ;
nd->open_count++ ;
- printf("re-open, eth%d count %d\n",nd-vif_data,nd->open_count);
+ printf("re-open, eth%d count %d\n", (int) (nd - vif_data), nd->open_count);
return D_SUCCESS;
}
nd->open_count = 1;
- printf("eth%d count %d\n",nd-vif_data,nd->open_count);
+ printf("eth%d count %d\n", (int) (nd - vif_data), nd->open_count);
port = ipc_port_alloc_kernel();
if (port == IP_NULL) {
diff --git a/xen/store.c b/xen/store.c
index 659a70c7..23cbc223 100644
--- a/xen/store.c
+++ b/xen/store.c
@@ -62,7 +62,7 @@ static void store_put(hyp_store_transaction_t t, uint32_t type, struct store_req
totlen += sizeof(head);
if (totlen > sizeof(store->req) - 1)
- panic("too big store message %d, max %d", totlen, sizeof(store->req));
+ panic("too big store message %d, max %d", totlen, (int) sizeof(store->req));
while (hyp_ring_available(store->req, store->req_prod, store->req_cons) < totlen)
hyp_yield();
diff --git a/xen/time.c b/xen/time.c
index f2707a82..e8abd56b 100644
--- a/xen/time.c
+++ b/xen/time.c
@@ -25,6 +25,7 @@
#include <machine/ipl.h>
#include <mach/machine/eflags.h>
#include <xen/evt.h>
+#include "xen.h"
#include "time.h"
#include "store.h"
diff --git a/xen/xen.h b/xen/xen.h
index f0a3abb9..cbb793e2 100644
--- a/xen/xen.h
+++ b/xen/xen.h
@@ -24,4 +24,6 @@ void hyp_dev_init(void);
void hyp_idle(void);
void hyp_p2m_init(void);
+void hypclock_machine_intr(int old_ipl, void *ret_addr, struct i386_interrupt_state *regs, uint64_t delta);
+
#endif /* XEN_XEN_H */