From owner-p4-projects@FreeBSD.ORG Thu Jul 6 20:19:45 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E0EEC16A4DE; Thu, 6 Jul 2006 20:19:44 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A534716A4E1 for ; Thu, 6 Jul 2006 20:19:44 +0000 (UTC) (envelope-from wkoszek@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5478743D86 for ; Thu, 6 Jul 2006 20:19:31 +0000 (GMT) (envelope-from wkoszek@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k66KJNGD027740 for ; Thu, 6 Jul 2006 20:19:23 GMT (envelope-from wkoszek@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k66KJNB6027725 for perforce@freebsd.org; Thu, 6 Jul 2006 20:19:23 GMT (envelope-from wkoszek@FreeBSD.org) Date: Thu, 6 Jul 2006 20:19:23 GMT Message-Id: <200607062019.k66KJNB6027725@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to wkoszek@FreeBSD.org using -f From: "Wojciech A. Koszek" To: Perforce Change Reviews Cc: Subject: PERFORCE change 100788 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2006 20:19:45 -0000 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;