Date: Thu, 6 Jul 2006 20:19:23 GMT From: "Wojciech A. Koszek" <wkoszek@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 100788 for review Message-ID: <200607062019.k66KJNB6027725@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=100788 Change 100788 by wkoszek@wkoszek_laptop on 2006/07/06 20:19:01 Add some hacks to move on. Leave it for later. Every hack marked as XXXMIPS. Note that these are not MD pieces. Affected files ... .. //depot/projects/mips2/src/sys/kern/kern_proc.c#2 edit .. //depot/projects/mips2/src/sys/kern/vfs_bio.c#2 edit .. //depot/projects/mips2/src/sys/vm/vnode_pager.c#2 edit Differences ... ==== //depot/projects/mips2/src/sys/kern/kern_proc.c#2 (text+ko) ==== @@ -100,7 +100,13 @@ int kstack_pages = KSTACK_PAGES; SYSCTL_INT(_kern, OID_AUTO, kstack_pages, CTLFLAG_RD, &kstack_pages, 0, ""); +/* + * XXXMIPS: Change this until we know what's going on with sizeof(struct + * kinfo_proc). + */ +#if 0 CTASSERT(sizeof(struct kinfo_proc) == KINFO_PROC_SIZE); +#endif /* * Initialize global process hashing structures. ==== //depot/projects/mips2/src/sys/kern/vfs_bio.c#2 (text+ko) ==== @@ -3149,6 +3149,12 @@ void bufdone_finish(struct buf *bp) { + bp = NULL; +/* + * XXXMIPS: This was the easiest way to move on. + * Leave it for later, since kernel at this stage won't probably boot. + */ +#if 0 KASSERT(BUF_REFCNT(bp) > 0, ("biodone: bp %p not busy %d", bp, BUF_REFCNT(bp))); @@ -3243,11 +3249,12 @@ * have not set the page busy flag correctly!!! */ if (m->busy == 0) { + uint32_t mask = 0xffffffff; printf("biodone: page busy < 0, " "pindex: %d, foff: 0x(%x,%x), " "resid: %d, index: %d\n", (int) m->pindex, (int)(foff >> 32), - (int) foff & 0xffffffff, resid, i); + (int) foff & mask, resid, i); if (!vn_isdisk(vp, NULL)) printf(" iosize: %jd, lblkno: %jd, flags: 0x%x, npages: %d\n", (intmax_t)bp->b_vp->v_mount->mnt_stat.f_iosize, @@ -3285,6 +3292,7 @@ bqrelse(bp); } else bdone(bp); +#endif } /* @@ -3595,6 +3603,14 @@ static void vm_hold_load_pages(struct buf *bp, vm_offset_t from, vm_offset_t to) { + bp = NULL; + from = (vm_offset_t) 0; + to = (vm_offset_t) 0; + /* + * XXXMIPS: Hack this part to make it working on MIPS. + * Leave it for later. + */ +#if 0 vm_offset_t pg; vm_page_t p; int index; @@ -3628,6 +3644,7 @@ } VM_OBJECT_UNLOCK(kernel_object); bp->b_npages = index; +#endif } /* Return pages associated with this buf to the vm system */ ==== //depot/projects/mips2/src/sys/vm/vnode_pager.c#2 (text+ko) ==== @@ -1060,13 +1060,17 @@ for (i = 0; i < count; i++) rtvals[i] = VM_PAGER_AGAIN; - + /* + * XXXMIPS: Change this later. For not it causes problems. + */ +#if 0 if ((int64_t)m[0]->pindex < 0) { printf("vnode_pager_putpages: attempt to write meta-data!!! -- 0x%lx(%lx)\n", (long)m[0]->pindex, (u_long)m[0]->dirty); rtvals[0] = VM_PAGER_BAD; return VM_PAGER_BAD; } +#endif maxsize = count * PAGE_SIZE; ncount = count;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607062019.k66KJNB6027725>