Subject: Re: XEN2_DOM0 doesn't build on i386-current
To: None <current-users@NetBSD.org>
From: Hisashi T Fujinaka <htodd@twofifty.com>
List: current-users
Date: 03/04/2007 18:29:16
Here's a newer one (I missed xennetback_xenbus.c, I think):
Index: i386/bios32.c
===================================================================
RCS file: /home/cvs/netbsd/src/sys/arch/xen/i386/bios32.c,v
retrieving revision 1.2
diff -u -r1.2 bios32.c
--- i386/bios32.c 4 Mar 2007 06:01:09 -0000 1.2
+++ i386/bios32.c 5 Mar 2007 02:27:43 -0000
@@ -125,12 +125,12 @@
bios32_init()
{
paddr_t entry = 0;
- void *p;
+ char *p;
unsigned char cksum;
int i;
- for (p = (void *)ISA_HOLE_VADDR(BIOS32_START);
- p < (void *)ISA_HOLE_VADDR(BIOS32_END);
+ for (p = (char *)ISA_HOLE_VADDR(BIOS32_START);
+ p < (char *)ISA_HOLE_VADDR(BIOS32_END);
p += 16) {
if (*(int *)p != BIOS32_MAKESIG('_', '3', '2', '_'))
continue;
@@ -165,7 +165,7 @@
#if NIPMI > 0
/* see if we have SMBIOS extentions */
for (p = ISA_HOLE_VADDR(SMBIOS_START);
- p < (void *)ISA_HOLE_VADDR(SMBIOS_END); p+= 16) {
+ p < (char *)ISA_HOLE_VADDR(SMBIOS_END); p+= 16) {
struct smbhdr * sh = (struct smbhdr *)p;
u_int8_t chksum;
vaddr_t eva;
Index: i386/machdep.c
===================================================================
RCS file: /home/cvs/netbsd/src/sys/arch/xen/i386/machdep.c,v
retrieving revision 1.36
diff -u -r1.36 machdep.c
--- i386/machdep.c 4 Mar 2007 06:01:10 -0000 1.36
+++ i386/machdep.c 5 Mar 2007 02:27:43 -0000
@@ -376,7 +376,7 @@
cpu_info_primary.ci_curpcb = pcb = &lwp0.l_addr->u_pcb;
pcb->pcb_tss.tss_ioopt =
- ((void *)pcb->pcb_iomap - (void *)&pcb->pcb_tss) << 16
+ ((char *)pcb->pcb_iomap - (char *)&pcb->pcb_tss) << 16
| SEL_KPL; /* i/o pl */
for (x = 0; x < sizeof(pcb->pcb_iomap) / 4; x++)
@@ -412,7 +412,7 @@
struct pcb *pcb = ci->ci_idle_pcb;
pcb->pcb_tss.tss_ioopt =
- ((void *)pcb->pcb_iomap - (void *)&pcb->pcb_tss) << 16
+ ((char *)pcb->pcb_iomap - (char *)&pcb->pcb_tss) << 16
| SEL_KPL; /* i/o pl */
for (x = 0; x < sizeof(pcb->pcb_iomap) / 4; x++)
pcb->pcb_iomap[x] = 0xffffffff;
Index: i386/pmap.c
===================================================================
RCS file: /home/cvs/netbsd/src/sys/arch/xen/i386/pmap.c,v
retrieving revision 1.25
diff -u -r1.25 pmap.c
--- i386/pmap.c 4 Mar 2007 06:01:10 -0000 1.25
+++ i386/pmap.c 5 Mar 2007 02:27:43 -0000
@@ -449,7 +449,7 @@
#ifdef MULTIPROCESSOR
#define PTESLEW(pte, id) ((pte)+(id)*NPTECL)
-#define VASLEW(va,id) ((va)+(id)*NPTECL*PAGE_SIZE)
+#define VASLEW(va,id) ((char *)(va)+(id)*NPTECL*PAGE_SIZE)
#else
#define PTESLEW(pte, id) (pte)
#define VASLEW(va,id) (va)
@@ -459,7 +459,7 @@
* special VAs and the PTEs that map them
*/
static pt_entry_t *csrc_pte, *cdst_pte, *zero_pte, *ptp_pte;
-static void *csrcp, cdstp, zerop, ptpp;
+static void *csrcp, *cdstp, *zerop, *ptpp;
/*
* pool and cache that PDPs are allocated from
@@ -1182,13 +1182,13 @@
* as well; we could waste less space if we knew the largest
* CPU ID beforehand.
*/
- csrcp = (void *) virtual_avail; csrc_pte = pte;
+ csrcp = (char *) virtual_avail; csrc_pte = pte;
- cdstp = (void *) virtual_avail+PAGE_SIZE; cdst_pte = pte+1;
+ cdstp = (char *) virtual_avail+PAGE_SIZE; cdst_pte = pte+1;
- zerop = (void *) virtual_avail+PAGE_SIZE*2; zero_pte = pte+2;
+ zerop = (char *) virtual_avail+PAGE_SIZE*2; zero_pte = pte+2;
- ptpp = (void *) virtual_avail+PAGE_SIZE*3; ptp_pte = pte+3;
+ ptpp = (char *) virtual_avail+PAGE_SIZE*3; ptp_pte = pte+3;
virtual_avail += PAGE_SIZE * X86_MAXPROCS * NPTECL;
pte += X86_MAXPROCS * NPTECL;
Index: xen/xennetback_xenbus.c
===================================================================
RCS file: /home/cvs/netbsd/src/sys/arch/xen/xen/xennetback_xenbus.c,v
retrieving revision 1.13
diff -u -r1.13 xennetback_xenbus.c
--- xen/xennetback_xenbus.c 4 Mar 2007 06:01:11 -0000 1.13
+++ xen/xennetback_xenbus.c 5 Mar 2007 02:27:43 -0000
@@ -918,7 +918,7 @@
"0x%x ma 0x%x\n", (u_int)xmit_va,
(u_int)xmit_ma));
m_copydata(m, 0, m->m_pkthdr.len,
- (void *)xmit_va + LINUX_REQUESTED_OFFSET);
+ (char *)xmit_va + LINUX_REQUESTED_OFFSET);
offset = LINUX_REQUESTED_OFFSET;
pages_pool_free[nppitems].va = xmit_va;
pages_pool_free[nppitems].pa = xmit_pa;
--
Hisashi T Fujinaka - htodd@twofifty.com
BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte